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

Collect the domain transaction fee and use as the operator reward #1859

Merged
merged 7 commits into from
Aug 24, 2023

Conversation

NingLin-P
Copy link
Member

@NingLin-P NingLin-P commented Aug 21, 2023

close #1774

This PR collects all the transaction fees that are deducted from the transaction sender and uses it as the operator reward. The changes this PR brings:

  • Introduce the pallet-domain-transaction-fees for tracking the transaction fees of the current domain block
  • Track all the transaction fees that are deducted from the transaction sender in pallet-domain-transaction-fees
  • Use the transaction fees as the operator reward

NOTE: in Ethereum the base fee of a transaction is burned but in this PR we simply collect the base fee of evm transaction and use it as the operator reward.

Code contributor checklist:

This pallet is used to collet all the transaction fee of all transactions
included in current block, these transaction fees is used later as the
operator reward.

Signed-off-by: linning <[email protected]>
THe transaction fee is deducted from the transaction sender, and the total
amount of balance being deducted is recorded in the pallet_domain_transaction_fees

Signed-off-by: linning <[email protected]>
Copy link
Contributor

@vedhavyas vedhavyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions on Impl but overall make sense

domains/pallets/domain-transaction-fees/Cargo.toml Outdated Show resolved Hide resolved
domains/pallets/domain-transaction-fees/src/lib.rs Outdated Show resolved Hide resolved
domains/runtime/evm/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@vedhavyas vedhavyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

domains/runtime/evm/src/lib.rs Show resolved Hide resolved
@NingLin-P NingLin-P merged commit fc18225 into main Aug 24, 2023
9 checks passed
@NingLin-P NingLin-P deleted the tx-fee branch August 24, 2023 13:00
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.

Set execution rewards in ER
2 participants