Skip to content

Commit f828b30

Browse files
authored
Merge pull request #3492 from bnb-chain/develop
Draft release v1.6.5
2 parents 0f7131f + cc4fa1e commit f828b30

File tree

21 files changed

+596
-96
lines changed

21 files changed

+596
-96
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# Changelog
2+
## v1.6.5
3+
### FEATURE
4+
[\#3488](https://github.com/bnb-chain/bsc/pull/3488) miner: optional transaction gas limit cap
5+
6+
### IMPROVEMENT
7+
[\#3483](https://github.com/bnb-chain/bsc/pull/3483) feat: remove the handshake from the bsc protocol
8+
[\#3486](https://github.com/bnb-chain/bsc/pull/3486) feat: update filtermaps checkpoints
9+
210
## v1.6.4
311
### FEATURE
412
[\#3466](https://github.com/bnb-chain/bsc/pull/3466) config: update BSC Mainnet hardfork time: Fermi

cmd/geth/main.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ var (
9898
utils.TxPoolOverflowPoolSlotsFlag,
9999
utils.TxPoolLifetimeFlag,
100100
utils.TxPoolReannounceTimeFlag,
101+
utils.MinerTxGasLimitFlag,
101102
utils.BlobPoolDataDirFlag,
102103
utils.BlobPoolDataCapFlag,
103104
utils.BlobPoolPriceBumpFlag,
@@ -455,9 +456,19 @@ func startNode(ctx *cli.Context, stack *node.Node, backend ethapi.Backend, isCon
455456
// Start auxiliary services if enabled
456457
ethBackend, ok := backend.(*eth.EthAPIBackend)
457458
gasCeil := ethBackend.Miner().GasCeil()
459+
maxTxGas := uint64(0)
458460
if gasCeil > params.SystemTxsGasSoftLimit {
459-
ethBackend.TxPool().SetMaxGas(gasCeil - params.SystemTxsGasSoftLimit)
461+
maxTxGas = gasCeil - params.SystemTxsGasSoftLimit
460462
}
463+
if txGasLimit := ethBackend.Miner().TxGasLimit(); txGasLimit > 0 {
464+
if maxTxGas == 0 || txGasLimit < maxTxGas {
465+
maxTxGas = txGasLimit
466+
}
467+
}
468+
if maxTxGas > 0 {
469+
ethBackend.TxPool().SetMaxGas(maxTxGas)
470+
}
471+
461472
if ctx.Bool(utils.MiningEnabledFlag.Name) {
462473
// Mining only makes sense if a full Ethereum node is running
463474
if ctx.String(utils.SyncModeFlag.Name) == "light" {

cmd/utils/flags.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,11 @@ var (
564564
Value: ethconfig.Defaults.TxPool.ReannounceTime,
565565
Category: flags.TxPoolCategory,
566566
}
567+
MinerTxGasLimitFlag = &cli.Uint64Flag{
568+
Name: "miner.txgaslimit",
569+
Usage: fmt.Sprintf("Maximum gas allowed per transaction (default = 0, disabled; min = %d)", params.MinTxGasLimitCap),
570+
Category: flags.MinerCategory,
571+
}
567572
// Blob transaction pool settings
568573
BlobPoolDataDirFlag = &cli.StringFlag{
569574
Name: "blobpool.datadir",
@@ -1990,6 +1995,13 @@ func setMiner(ctx *cli.Context, cfg *minerconfig.Config) {
19901995
if ctx.Bool(DisableVoteAttestationFlag.Name) {
19911996
cfg.DisableVoteAttestation = true
19921997
}
1998+
if ctx.IsSet(MinerTxGasLimitFlag.Name) {
1999+
limit := ctx.Uint64(MinerTxGasLimitFlag.Name)
2000+
if limit != 0 && limit < params.MinTxGasLimitCap {
2001+
Fatalf("Invalid --miner.txgaslimit: %d (must be >= %d or 0)", limit, params.MinTxGasLimitCap)
2002+
}
2003+
cfg.TxGasLimit = limit
2004+
}
19932005
}
19942006

19952007
func setRequiredBlocks(ctx *cli.Context, cfg *ethconfig.Config) {

core/error.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ var (
128128
// Message validation errors:
129129
ErrEmptyAuthList = errors.New("EIP-7702 transaction with empty auth list")
130130
ErrSetCodeTxCreate = errors.New("EIP-7702 transaction cannot be used to create contract")
131+
132+
// -- EIP-7825 errors --
133+
ErrGasLimitTooHigh = errors.New("transaction gas limit too high")
131134
)
132135

133136
// EIP-7702 state transition errors.

core/filtermaps/checkpoints_bsc_chapel.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,19 @@
7979
{"blockNumber": 57267971, "blockId": "0x2984e427405c6849b6c2f90ebceb1ea2893afd3b6ea97b33fad18d8d31d5fc61", "firstIndex": 5234491368},
8080
{"blockNumber": 58425417, "blockId": "0x25002aab6e71628d48c236ae8c08bc9a74da5b6c35e03674edfd3a53daf88bf5", "firstIndex": 5301600198},
8181
{"blockNumber": 60271759, "blockId": "0x00dce6a8452de89e793eaa55bc3bfa02f7fe367db4aad6ef529fb519e0c735d4", "firstIndex": 5368708917},
82-
{"blockNumber": 61537782, "blockId": "0x4ed62896407fbb4fa87460bef0c895995944270e2edc66cec908f13f96f1b921", "firstIndex": 5435812303}
83-
]
82+
{"blockNumber": 61537782, "blockId": "0x4ed62896407fbb4fa87460bef0c895995944270e2edc66cec908f13f96f1b921", "firstIndex": 5435812303},
83+
{"blockNumber": 64360888, "blockId": "0x6a39882e5378d84c7526bf98f46b7303cb50f4f62757204059a40fde3e1dfd8b", "firstIndex": 5502926829},
84+
{"blockNumber": 67016971, "blockId": "0xa7de4647908dd6de2e360a9344d17c7b6aa08e03826c247e558fef059fdb1b77", "firstIndex": 5570035712},
85+
{"blockNumber": 70533695, "blockId": "0x39db812a91440cd85bf8fb9ba41f79d8dbdc36362502a83429e8950f21c7dc36", "firstIndex": 5637144576},
86+
{"blockNumber": 72087231, "blockId": "0xd3e6c3d751894a685d4e3f78ec6ce5d3b1783255ffcd161e9637f35c7f40e2d7", "firstIndex": 5704249850},
87+
{"blockNumber": 72103710, "blockId": "0xe21125b3b4762e8652958c99e0f3b9dbe731a3ab0fd39d5b1be5f2dc73a296ef", "firstIndex": 5771359406},
88+
{"blockNumber": 72472818, "blockId": "0x419cfba495f8b21c5bdb394b3bd363c303245d23522b97d35306cf55f804f498", "firstIndex": 5838463753},
89+
{"blockNumber": 72655153, "blockId": "0x355965957a9c1cbfac6078403aed37049a9207db0646649aef61e1a83f149248", "firstIndex": 5905574773},
90+
{"blockNumber": 73206219, "blockId": "0x83afb3d603ac6f896282bc21eafa680220cb61202f2079c7c33def0c4dc68828", "firstIndex": 5972679707},
91+
{"blockNumber": 73436144, "blockId": "0xd0b2e5b32b74d6cb8cffee1476468a4afd9572b499ccbc60b21ac220b215baf0", "firstIndex": 6039791353},
92+
{"blockNumber": 73604097, "blockId": "0xa3d3904329563523cdf462fad851ad1bda28a587ca034039651ae82b8a4ba5c7", "firstIndex": 6106898188},
93+
{"blockNumber": 73613573, "blockId": "0x49309309873548401b052d8e63130d308a926c23c44b93b66a3a4268bfe1a66b", "firstIndex": 6174013719},
94+
{"blockNumber": 73620987, "blockId": "0x66aa30c386ecb1be45717b8c6e1276ed7582f97a875bc5184fb671ae44960512", "firstIndex": 6241117647},
95+
{"blockNumber": 73628450, "blockId": "0x55ccb502864bf601a4782126708ad4f0c18304282d8c09a45a3536421f11797a", "firstIndex": 6308225769},
96+
{"blockNumber": 74624775, "blockId": "0x32c0e4faf55c4d8f130a8634cbdb329f00410f390952f7fcdd7cdbfd76d76556", "firstIndex": 6375342074}
97+
]

0 commit comments

Comments
 (0)