Skip to content

Remove TransactionInputs::asset_witnesses  #2261

@igamigo

Description

@igamigo

Discussed in 0xMiden/node#1490

TransactionInputs::asset_witnesses only contains prefetched asset witnesses (note assets + fee asset).
On re-execution, AFAICT, dynamic calls to DataStore::get_vault_asset_witnesses() are skipped because the Merkle paths are already in advice data, but prefetched witnesses are still fetched every time, so DataStore implementors .
This introduces an inconsistent, under-documented behavior and forces validator implementations to special-case prefetched assets.

Keeping this in mind, we could remove TransactionInputs::asset_witnesses in favor of adding the witnesses directly in TransactionInputs::with_asset_witnesses as suggested here 0xMiden/node#1490 (comment) and consider skipping prefetch on re-execution by checking advice inputs before fetching.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions