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

feat: Add Support for Zero Fee Addresses #53

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

ckartik
Copy link

@ckartik ckartik commented Nov 22, 2024

This PR introduces support for zero fee addresses in the Ethereum state transition logic and configuration. This will ensure accounts like the Oracle and Relayer for the bridge never run out of funds.

Note: to set the whitelisted accounts, you must configure them in the genesis file.

@ckartik ckartik requested review from shaspitz and Mikelle November 22, 2024 22:01
core/state_transition.go Outdated Show resolved Hide resolved
geth-poa/genesis.json Outdated Show resolved Hide resolved
@ckartik ckartik requested a review from shaspitz November 25, 2024 17:01
core/state_transition.go Outdated Show resolved Hide resolved
st.state.AddBalance(treasuryAccount, bothFees)

// @shaspitz do we note want to also remove the fee from the sender account, even when we increment the treasury account?
if slices.Contains(st.evm.Config.ZeroFeeAddresses, sender.Address()) {

Choose a reason for hiding this comment

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

don't we use vm.config now from the cli flag above?

Copy link
Author

@ckartik ckartik Nov 25, 2024

Choose a reason for hiding this comment

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

That is vm.config. it's just called st.evm.Config

@ckartik ckartik requested a review from shaspitz November 25, 2024 18:28
Copy link

@shaspitz shaspitz left a comment

Choose a reason for hiding this comment

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

Thanks! It's worth one of us testing this before merging, we'll also need to integrate with nomad keystore setup

@ckartik ckartik merged commit dd8d982 into master Nov 25, 2024
1 check failed
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