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 fee distribution via L1Block contract #36

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

Pangssu
Copy link
Collaborator

@Pangssu Pangssu commented Apr 25, 2023

DepositTx updates the ValidatorRewardRatio in the L1Block contract, which is used to distribute the tx fee to ProtocolVault and ValidatorRewardVault.

@Pangssu Pangssu requested a review from a team April 25, 2023 06:38
core/types/fee_distribution.go Show resolved Hide resolved
core/state_transition.go Outdated Show resolved Hide resolved
core/state_transition.go Outdated Show resolved Hide resolved
core/state_transition.go Outdated Show resolved Hide resolved
@@ -432,19 +432,28 @@ func (st *StateTransition) innerTransitionDb() (*ExecutionResult, error) {
effectiveTip = cmath.BigMin(st.gasTipCap, new(big.Int).Sub(st.gasFeeCap, st.evm.Context.BaseFee))
}

gasUsed := new(big.Int).SetUint64(st.gasUsed())
kromaConfig := st.evm.ChainConfig().Kroma
blockNum := st.evm.Context.BlockNumber.Uint64()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Strictly speaking, this is only used when kromaConfig != nil but you don't have to follow this. because it's too minor

DepositTx updates the ValidatorRewardRatio in the L1Block contract, which
is used to distribute the tx fee to ProtocolVault and ValidatorRewardVault.
Copy link
Collaborator

@chokobole chokobole left a comment

Choose a reason for hiding this comment

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

LGTM

@chokobole chokobole merged commit 3306c69 into dev Apr 26, 2023
@chokobole chokobole deleted the feat/add-fee-distribution branch April 26, 2023 12:27
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