Skip to content

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
wants to merge 43 commits into from
Closed

EIP-1559 miner changes #22833

wants to merge 43 commits into from

Conversation

lightclient
Copy link
Member

This PR implements the changes in the miner module. It's based on top of quilt/eip1559-mempool here: #22791

@lightclient lightclient force-pushed the eip1559-miner branch 2 times, most recently from 5bcb44f to 66b0935 Compare May 7, 2021 01:35
@lightclient lightclient force-pushed the eip1559-miner branch 2 times, most recently from e5a3356 to 266ba7c Compare May 10, 2021 18:53
@holiman
Copy link
Contributor

holiman commented May 11, 2021

I've built the holiman/geth-baikal and holiman/geth-baikal-alltools off of this PR now, to use as sealer for baikal.

@holiman holiman force-pushed the eip1559-miner branch 2 times, most recently from 2f6643c to c263746 Compare May 11, 2021 14:12
@fjl fjl added this to the 1.10.4 milestone May 11, 2021
@holiman
Copy link
Contributor

holiman commented May 11, 2021

@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
	}
}

adietrichs and others added 14 commits May 17, 2021 15:48
* 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
lightclient and others added 27 commits May 17, 2021 15:48
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
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.

4 participants