-
Notifications
You must be signed in to change notification settings - Fork 20.8k
EIP-1559 miner changes #22833
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
Closed
Closed
EIP-1559 miner changes #22833
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5bcb44f
to
66b0935
Compare
e5a3356
to
266ba7c
Compare
I've built the |
2f6643c
to
c263746
Compare
@karalabe I mean, we could just do this: // CalcGasLimit1559 calculates the next block gas limit under 1559 rules.
// The gas calculator simply tries to target gasCeil
func CalcGasLimit1559(parentGasUsed, parentGasLimit, desiredLimit uint64) uint64 {
delta := parentGasLimit/params.GasLimitBoundDivisor - 1
if parentGasLimit < desiredLimit {
if limit = parentGasLimit + delta; limit > desiredLimit {
return desiredLimit
} else {
return limit
}
}
if limit = parentGasLimit - delta; limit < desiredLimit {
return desiredLimit
} else {
return limit
}
} |
* replace GasPriceCmp and GasPriceIntCmp with FeeCapCmp, FeeCapIntCmp, TipCmp, TipIntCmp (and update all usages) * update Cost to use FeeCap instead of GasPrice
* add eip1559 status indicator * add DynamicFeeTx to transaction type check * remove underpriced transactions on minimum miner tip increases * require both a fee cap and tip bump for transaction replacement * use tip as secondary comparison criterion for priceHeap sorting
…transaction validation
…e post-EIP-1559 arm of pool.SetMinMinerFee()
…olRepricingKeepsLocals()
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
59bde1b
to
7a3ef74
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the changes in the miner module. It's based on top of
quilt/eip1559-mempool
here: #22791