Skip to content

Request note asset witnesses before transaction execution #1852

@PhilippGackstatter

Description

@PhilippGackstatter

#1848 introduced lazy loading for asset witnesses. Asset witnesses are also needed for mutating the input vault and they are currently requested on-demand. But the note assets are known before tx execution starts and so they can be requested as part of fetching transaction inputs. One idea is to change the data store as follows and allow fetching some asset witnesses in bulk:

fn get_transaction_inputs(
    &self,
    account_id: AccountId,
    ref_blocks: BTreeSet<BlockNumber>,
    asset_vault_keys: Vec<Word>,
) -> impl FutureMaybeSend<
    Result<(PartialAccount, Option<Word>, BlockHeader, PartialBlockchain, Vec<AssetWitness>), DataStoreError>,
>;

We would then request all witnesses for assets in input notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    rustIssues that affect or pull requests that update Rust code

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions