core: add new eip-1559 tx constraints (#22970)

This PR adds the new consensus constraints of EIP-1559 transactions as specified in https://github.com/ethereum/EIPs#3594
This commit is contained in:
Felföldi Zsolt
2021-05-30 19:37:52 +02:00
committed by GitHub
parent 966ee3ae6d
commit 2d716c4b01
5 changed files with 102 additions and 12 deletions

View File

@ -72,6 +72,18 @@ var (
// current network configuration.
ErrTxTypeNotSupported = types.ErrTxTypeNotSupported
// ErrTipAboveFeeCap is a sanity error to ensure no one is able to specify a
// transaction with a tip higher than the total fee cap.
ErrTipAboveFeeCap = errors.New("tip higher than fee cap")
// ErrTipVeryHigh is a sanity error to avoid extremely big numbers specified
// in the tip field.
ErrTipVeryHigh = errors.New("tip higher than 2^256-1")
// ErrFeeCapVeryHigh is a sanity error to avoid extremely big numbers specified
// in the fee cap field.
ErrFeeCapVeryHigh = errors.New("fee cap higher than 2^256-1")
// ErrFeeCapTooLow is returned if the transaction fee cap is less than the
// the base fee of the block.
ErrFeeCapTooLow = errors.New("fee cap less than block base fee")