Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the approach to obtain (weight_limit, proof_size_base_cost) #1121

Merged
merged 5 commits into from
Jul 30, 2023

Conversation

boundless-forest
Copy link
Collaborator

I reorganized the usage of proof_size_base_cost function and modified the approach to obtain (weight_limit, proof_size_base_cost).

  1. Add another proof_size_base_cost field to the TransactionData type and calculate the proof size base cost while converting the transaction into the transaction data in the Ethereum pallet. So we don't need a seperate proof_size_base_cost(transaction: &Transaction) function. It can also be more easily reused by other projects.
  2. Abstract the behaviour of obtain (weight_limit, proof_size_base_cost) into a function transaction_weight. It's used in many places.

@sorpaas sorpaas merged commit a1c5a57 into polkadot-evm:master Jul 30, 2023
@boundless-forest boundless-forest deleted the bear-reuse-item branch July 31, 2023 05:45
frank0528 pushed a commit to DeepBrainChain/DBC-EVM that referenced this pull request Sep 10, 2024
…olkadot-evm#1121)

* Move `proof_size_base_cost` out to reuse it

* Add field

* Reuse `transaction_weight`

* Code clean

* Fix clippy
frank0528 pushed a commit to DeepBrainChain/DBC-EVM that referenced this pull request Sep 24, 2024
…olkadot-evm#1121)

* Move `proof_size_base_cost` out to reuse it

* Add field

* Reuse `transaction_weight`

* Code clean

* Fix clippy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants