Skip to content

Replace fee faucet ID with fee asset key #2952

@PhilippGackstatter

Description

@PhilippGackstatter

After #2939, the TX executor assumes the callback flag of the fee asset is set to disabled and the composition of the asset is AssetComposition::Fungible. Since users only provide the fee faucet ID when constructing FeeParameters, this set of requirements is never explicitly checked, which is error-prone. Users could be providing the account ID of a faucet that issues non-fungible, callback-enabled assets, and so the fee asset essentially does not exist in practice.

Consider changing FeeParameters::fee_faucet_id to a fee_asset_key: AssetVaultKey and checking the above requirements in the constructor instead, to provide feedback to the caller.

The tx kernel should likely also take the whole asset key as an input (provided as advice) rather than just the faucet ID, which is less error-prone.

Brought up by @mmagician in #2939 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    kernelsRelated to transaction, batch, or block kernels
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions