Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Contracts: return proof_size with ContractResult from dry-runs #12410

Closed

Description

@ascjones

Currently, in order to choose a value for gas_limit a UI would first dry-run the extrinsic via state_call and use the resulting ContractResult::gas_required as a parameter to the actual extrinsic.

Now that weights are two dimensional and also include proof_size, we should add that to the ContractResult in order for UIs to correctly populate that value, without having to manually supply a value.

Rel paritytech/subxt#679

Activity

  1. added
    Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coder
    on Oct 3, 2022
  2. burdges commented on Oct 3, 2022

    @burdges

    As an aside, actual runtimes could change since other transactions could impact Merkle proof CPU time, but not sure this impacts weight. It won't change much usually though..

  3. athei commented on Oct 5, 2022

    @athei
    Member

    Yes state can always change in-between and make the gas estimation stale. In practice it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coder

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions