diff --git a/CHANGELOG.md b/CHANGELOG.md
index e673c67c65..52978c6ede 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,24 @@
# Changelog
+## v1.7.1
+v1.7.1 is for BSC Chapel testnet [Osaka/Mendel hardfork](https://github.com/bnb-chain/BEPs/blob/master/BEPs/BEP-658.md),the hard fork time is 2026-03-24 02:30:00 AM UTC
+
+### FEATURE
+- [feat: support bid block size check for BEP-655](https://github.com/bnb-chain/bsc/pull/3529)
+- [feat: support mev bid gas check of bep 652](https://github.com/bnb-chain/bsc/pull/3528)
+- [eip4844.go: disable eip-7918 for bsc](https://github.com/bnb-chain/bsc/pull/3531)
+- [feat: implement BEP-657 - Limit Blob Transaction Inclusion by Block Number](https://github.com/bnb-chain/bsc/pull/3533)
+
+### BUGFIX
+- [core/types: fix typo in vote comparison (#3573)](https://github.com/bnb-chain/bsc/pull/3573)
+- [Fee history issue](https://github.com/bnb-chain/bsc/pull/3577)
+- [go.mod: upgrade otel to fix CVE-2026-24051](https://github.com/bnb-chain/bsc/pull/3554)
+- [fix: fix gaslimit check in trace api (#3580)](https://github.com/bnb-chain/bsc/pull/3580)
+- [miner: fix missing tcount increment in commitBlobTransaction (#3581)](https://github.com/bnb-chain/bsc/pull/3581)
+- [fix: superinstruction bad block (#3582)](https://github.com/bnb-chain/bsc/pull/3582)
+- [core/vm: align super-instruction minStack and maxStack bounds (#3584)](https://github.com/bnb-chain/bsc/pull/3584)
+- [rlp: finalize listIterator on parse error to prevent non-advancing loops (#3586)](https://github.com/bnb-chain/bsc/pull/3586)
+- [eth/protocols/snap: restore peers to idle pool on request revert (#3587)](https://github.com/bnb-chain/bsc/pull/3587)
+
## v1.7.0
v1.7.0-alpha is a preview release for upstream code sync, it catches up with [go-ethereum release [v1.16.7]](https://github.com/ethereum/go-ethereum/releases/tag/v1.16.7) and also include several bug fix and improvements.
@@ -35,6 +55,11 @@ Key changes from the code sync include:
- [ci: upgrade github actions to latest versions](https://github.com/bnb-chain/bsc/pull/3515)
- [ci: ignore nancy failre of quic-go@v0.49.1](https://github.com/bnb-chain/bsc/pull/3512)
+## v1.6.7
+### BUGFIX
+crypto/secp256k1: fix coordinate check
+crypto/ecies: fix ECIES invalid-curve handling
+
## v1.6.6
### BUGFIX
core/txpool: drop peers on invalid KZG proofs
diff --git a/README.md b/README.md
index 0ceeffde2d..0206d19b3b 100644
--- a/README.md
+++ b/README.md
@@ -147,11 +147,11 @@ Download latest chaindata snapshot from [here](https://github.com/bnb-chain/bsc-
#### 4. Start a full node
```shell
-## It will run with Path-Base Storage Scheme by default and enable inline state prune, keeping the latest 90000 blocks' history state.
-./geth --config ./config.toml --datadir ./node --cache 8000 --rpc.allow-unprotected-txs --history.transactions 0
+## It will run with Path-Base Storage Scheme by default and enable inline state prune, keeping the latest 600000 blocks' history state.
+./geth --config ./config.toml --datadir ./node --cache 8000 --rpc.allow-unprotected-txs --history.transactions 0 --history.logs 576000
## It is recommend to run fullnode with `--tries-verify-mode none` if you want high performance and care little about state consistency.
-./geth --config ./config.toml --datadir ./node --cache 8000 --rpc.allow-unprotected-txs --history.transactions 0 --tries-verify-mode none
+./geth --config ./config.toml --datadir ./node --cache 8000 --rpc.allow-unprotected-txs --history.transactions 0 --history.logs 576000 --tries-verify-mode none
```
#### 5. Monitor node status
diff --git a/build/checksums.txt b/build/checksums.txt
index 98ee3a91ef..fc8f90c5ab 100644
--- a/build/checksums.txt
+++ b/build/checksums.txt
@@ -1,8 +1,8 @@
# This file contains sha256 checksums of optional build dependencies.
-# version:spec-tests v5.1.0
+# version:spec-tests v5.4.0
# https://github.com/ethereum/execution-spec-tests/releases
-# https://github.com/ethereum/execution-spec-tests/releases/download/v5.1.0
+# https://github.com/ethereum/execution-spec-tests/releases/download/v5.4.0
a3192784375acec7eaec492799d5c5d0c47a2909a3cc40178898e4ecd20cc416 fixtures_develop.tar.gz
# version:golang 1.25.1
diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go
index 2a573e1056..5da9d17ade 100644
--- a/cmd/geth/chaincmd.go
+++ b/cmd/geth/chaincmd.go
@@ -75,6 +75,7 @@ var (
utils.OverrideMendel,
utils.OverrideBPO1,
utils.OverrideBPO2,
+ utils.OverridePasteur,
utils.OverrideVerkle,
// utils.MultiDataBaseFlag,
}, utils.DatabaseFlags),
@@ -365,6 +366,10 @@ func initGenesis(ctx *cli.Context) error {
v := ctx.Uint64(utils.OverrideBPO2.Name)
overrides.OverrideBPO2 = &v
}
+ if ctx.IsSet(utils.OverridePasteur.Name) {
+ v := ctx.Uint64(utils.OverridePasteur.Name)
+ overrides.OverridePasteur = &v
+ }
if ctx.IsSet(utils.OverrideVerkle.Name) {
v := ctx.Uint64(utils.OverrideVerkle.Name)
overrides.OverrideVerkle = &v
diff --git a/cmd/geth/config.go b/cmd/geth/config.go
index e01043af74..6a3d462730 100644
--- a/cmd/geth/config.go
+++ b/cmd/geth/config.go
@@ -286,6 +286,10 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
v := ctx.Uint64(utils.OverrideBPO2.Name)
cfg.Eth.OverrideBPO2 = &v
}
+ if ctx.IsSet(utils.OverridePasteur.Name) {
+ v := ctx.Uint64(utils.OverridePasteur.Name)
+ cfg.Eth.OverridePasteur = &v
+ }
if ctx.IsSet(utils.OverrideVerkle.Name) {
v := ctx.Uint64(utils.OverrideVerkle.Name)
cfg.Eth.OverrideVerkle = &v
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index eb2c24cf9a..1e13ea9f9b 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -80,6 +80,7 @@ var (
utils.OverrideMendel,
utils.OverrideBPO1,
utils.OverrideBPO2,
+ utils.OverridePasteur,
utils.OverrideVerkle,
utils.OverrideGenesisFlag,
utils.OverrideFullImmutabilityThreshold,
diff --git a/cmd/jsutils/getchainstatus.js b/cmd/jsutils/getchainstatus.js
index 324c87c7a3..b74864047c 100644
--- a/cmd/jsutils/getchainstatus.js
+++ b/cmd/jsutils/getchainstatus.js
@@ -227,7 +227,12 @@ const builderMap = new Map([
["0x48FeE1BB3823D72fdF80671ebaD5646Ae397BB48", "puissant us"],
["0x48B4bBEbF0655557A461e91B8905b85864B8BB48", "puissant x"],
["0x4827b423D03a349b7519Dda537e9A28d31ecBB48", "puissant y"],
- ["0x48B2665E5E9a343409199D70F7495c8aB660BB48", "puissant:z"],
+ ["0x48B2665E5E9a343409199D70F7495c8aB660BB48", "puissant z"],
+ // unknown
+ ["0x48265F91F542dCE47ABE5E6683bb086c0f36BB48", "unknown-1"],
+ ["0x48437A0d4AB091b81c6DeD43dEbf23cdfC85BB48", "unknown-2"],
+ ["0x4851f44038fE746173e9E3C4A6e7E904c619BB48", "unknown-3"],
+ ["0x4880cb180d3bb665748f7b66f75F1fEE68D8BB48", "unknown-4"],
// blockroute
["0xD4376FdC9b49d90e6526dAa929f2766a33BFFD52", "blockroute dublin"],
["0x2873fc7aD9122933BECB384f5856f0E87918388d", "blockroute frankfurt"],
@@ -241,10 +246,13 @@ const builderMap = new Map([
["0x36CB523286D57680efBbfb417C63653115bCEBB5", "jetbldr ap"],
["0x3aD6121407f6EDb65C8B2a518515D45863C206A8", "jetbldr eu"],
["0x345324dC15F1CDcF9022E3B7F349e911fb823b4C", "jetbldr us"],
+ ["0xfd38358475078F81a45077f6e59dff8286e0dCA1", "jetbldr dublin"],
+ ["0x7F5fbFd8e2eB3160dF4c96757DEEf29E26F969a3", "jetbldr tokyo"],
+ ["0xA0Cde9891C6966fCe740817cc5576De2C669AB43", "jetbldr virginia"],
// blockbus
- ["0x3FC0c936c00908c07723ffbf2d536D6E0f62C3A4", "jetbldr dublin"],
- ["0x17e9F0D7E45A500f0148B29C6C98EfD19d95F138", "jetbldr tokyo"],
- ["0x1319Be8b8Ec4AA81f501924BdCF365fBcAa8d753", "jetbldr virginia"],
+ ["0x3FC0c936c00908c07723ffbf2d536D6E0f62C3A4", "blockbus dublin"],
+ ["0x17e9F0D7E45A500f0148B29C6C98EfD19d95F138", "blockbus tokyo"],
+ ["0x1319Be8b8Ec4AA81f501924BdCF365fBcAa8d753", "blockbus virginia"],
// txboost(blocksmith)
["0x6Dddf681C908705472D09B1D7036B2241B50e5c7", "txboost ap"],
["0x76736159984AE865a9b9Cc0Df61484A49dA68191", "txboost eu"],
@@ -258,9 +266,12 @@ const builderMap = new Map([
["0xb49f86586a840AB9920D2f340a85586E50FD30a2", "inblock eu"],
["0x0F6D8b72F3687de6f2824903a83B3ba13c0e88A0", "inblock us"],
// nodereal
- ["0x79102dB16781ddDfF63F301C9Be557Fd1Dd48fA0", "nodereal ap"],
- ["0xd0d56b330a0dea077208b96910ce452fd77e1b6f", "nodereal eu"],
- ["0x4f24ce4cd03a6503de97cf139af2c26347930b99", "nodereal us"],
+ ["0x79102dB16781ddDfF63F301C9Be557Fd1Dd48fA0", "nodereal ap-1"],
+ ["0x5B526b45e833704d84b5C2EB0F41323dA9466c48", "nodereal ap-2"],
+ ["0xd0d56b330a0dea077208b96910ce452fd77e1b6f", "nodereal eu-1"],
+ ["0xa547F87B2BADE689a404544859314CBC01f2605e", "nodereal eu-2"],
+ ["0x4f24ce4cd03a6503de97cf139af2c26347930b99", "nodereal us-1"],
+ ["0xFD3F1Ad459D585C50Cf4630649817C6E0cec7335", "nodereal us-2"],
// xzbuilder
["0x812720cb4639550D7BDb1d8F2be463F4a9663762", "xzbuilder"],
diff --git a/cmd/keeper/go.mod b/cmd/keeper/go.mod
index 3b99baf5e2..a78d7ebde9 100644
--- a/cmd/keeper/go.mod
+++ b/cmd/keeper/go.mod
@@ -76,7 +76,7 @@ require (
github.com/prysmaticlabs/prysm/v5 v5.3.2 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
- github.com/rogpeppe/go-internal v1.13.1 // indirect
+ github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/rs/cors v1.8.2 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
@@ -94,7 +94,7 @@ require (
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/sync v0.18.0 // indirect
- golang.org/x/sys v0.38.0 // indirect
+ golang.org/x/sys v0.40.0 // indirect
golang.org/x/text v0.31.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
google.golang.org/grpc v1.69.4 // indirect
diff --git a/cmd/keeper/go.sum b/cmd/keeper/go.sum
index 7c328b5f68..9d361bfff9 100644
--- a/cmd/keeper/go.sum
+++ b/cmd/keeper/go.sum
@@ -112,8 +112,8 @@ github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=
github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
-github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
-github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
+github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
@@ -141,8 +141,8 @@ github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl76
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
-github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
+github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us=
@@ -258,8 +258,8 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
-github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
-github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
+github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
+github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U=
github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
@@ -273,8 +273,8 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
-github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
+github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe h1:nbdqkIGOGfUAD54q1s2YBcBz/WcsxCO9HUQ4aGV5hUw=
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
@@ -301,18 +301,18 @@ github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFi
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI=
go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE=
-go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
-go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
-go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
-go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
-go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
-go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
-go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
-go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
+go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
+go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
+go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms=
+go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g=
+go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g=
+go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc=
+go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8=
+go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE=
go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc=
go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8=
-go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
-go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
+go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw=
+go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@@ -353,8 +353,8 @@ golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
-golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
+golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
+golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index df8c7778da..5b455109d5 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -334,6 +334,11 @@ var (
Usage: "Manually specify the bpo2 fork timestamp, overriding the bundled setting",
Category: flags.EthCategory,
}
+ OverridePasteur = &cli.Uint64Flag{
+ Name: "override.pasteur",
+ Usage: "Manually specify the Pasteur fork timestamp, overriding the bundled setting",
+ Category: flags.EthCategory,
+ }
OverrideVerkle = &cli.Uint64Flag{
Name: "override.verkle",
Usage: "Manually specify the Verkle fork timestamp, overriding the bundled setting",
diff --git a/consensus/misc/eip4844/eip4844.go b/consensus/misc/eip4844/eip4844.go
index e14d129561..f5e083584f 100644
--- a/consensus/misc/eip4844/eip4844.go
+++ b/consensus/misc/eip4844/eip4844.go
@@ -110,6 +110,13 @@ func VerifyEIP4844Header(config *params.ChainConfig, parent, header *types.Heade
return errors.New("header is missing blobGasUsed")
}
+ // BEP-657: non-eligible blocks must have no blob gas used
+ if !IsBlobEligibleBlock(config, header.Number.Uint64(), header.Time) {
+ if *header.BlobGasUsed != 0 {
+ return fmt.Errorf("blob transactions not allowed in block %d (N %% %d != 0)", header.Number.Uint64(), params.BlobEligibleBlockInterval)
+ }
+ }
+
// Verify that the blob gas used remains within reasonable limits.
if *header.BlobGasUsed > bcfg.maxBlobGas() {
return fmt.Errorf("blob gas used %d exceeds maximum allowance %d", *header.BlobGasUsed, bcfg.maxBlobGas())
@@ -129,12 +136,21 @@ func VerifyEIP4844Header(config *params.ChainConfig, parent, header *types.Heade
// CalcExcessBlobGas calculates the excess blob gas after applying the set of
// blobs on top of the excess blob gas.
func CalcExcessBlobGas(config *params.ChainConfig, parent *types.Header, headTimestamp uint64) uint64 {
- isOsaka := config.IsOsaka(config.LondonBlock, headTimestamp)
+ eip7918 := config.IsOsaka(config.LondonBlock, headTimestamp) && config.IsNotInBSC()
bcfg := latestBlobConfig(config, headTimestamp)
- return calcExcessBlobGas(isOsaka, bcfg, parent)
+
+ // BEP-657: for non-recalculation blocks (N % BlobEligibleBlockInterval != 1), inherit parent's ExcessBlobGas
+ if config.IsMendel(config.LondonBlock, headTimestamp) && parent.Number.Uint64()%params.BlobEligibleBlockInterval != 0 {
+ if parent.ExcessBlobGas != nil {
+ return *parent.ExcessBlobGas
+ }
+ return 0
+ }
+
+ return calcExcessBlobGas(eip7918, bcfg, parent)
}
-func calcExcessBlobGas(isOsaka bool, bcfg *BlobConfig, parent *types.Header) uint64 {
+func calcExcessBlobGas(eip7918 bool, bcfg *BlobConfig, parent *types.Header) uint64 {
var parentExcessBlobGas, parentBlobGasUsed uint64
if parent.ExcessBlobGas != nil {
parentExcessBlobGas = *parent.ExcessBlobGas
@@ -151,7 +167,7 @@ func calcExcessBlobGas(isOsaka bool, bcfg *BlobConfig, parent *types.Header) uin
// EIP-7918 (post-Osaka) introduces a different formula for computing excess,
// in cases where the price is lower than a 'reserve price'.
- if isOsaka {
+ if eip7918 {
var (
baseCost = big.NewInt(params.BlobBaseCost)
reservePrice = baseCost.Mul(baseCost, parent.BaseFee)
@@ -185,6 +201,15 @@ func MaxBlobsPerBlock(cfg *params.ChainConfig, time uint64) int {
return blobConfig.Max
}
+// IsBlobEligibleBlock returns whether blob transactions can be included in the block.
+// BEP-657: After Mendel fork, only blocks where N % BlobEligibleBlockInterval == 0 can include blob transactions.
+func IsBlobEligibleBlock(cfg *params.ChainConfig, blockNumber uint64, time uint64) bool {
+ if !cfg.IsMendel(cfg.LondonBlock, time) {
+ return true
+ }
+ return blockNumber%params.BlobEligibleBlockInterval == 0
+}
+
// MaxBlobGasPerBlock returns the maximum blob gas that can be spent in a block at the given timestamp.
func MaxBlobGasPerBlock(cfg *params.ChainConfig, time uint64) uint64 {
return uint64(MaxBlobsPerBlock(cfg, time)) * params.BlobTxBlobGasPerBlob
diff --git a/consensus/misc/eip4844/eip4844_test.go b/consensus/misc/eip4844/eip4844_test.go
index 35934370af..92a8605e98 100644
--- a/consensus/misc/eip4844/eip4844_test.go
+++ b/consensus/misc/eip4844/eip4844_test.go
@@ -228,3 +228,82 @@ func TestCalcExcessBlobGasEIP7918(t *testing.T) {
}
}
}
+
+// TestBEP657 tests BEP-657: Limit Blob Transaction Inclusion by Block Number.
+// After Mendel fork, only blocks where N % BlobEligibleBlockInterval == 0 can include blob transactions.
+func TestBEP657(t *testing.T) {
+ mendelTime := uint64(1000)
+ cfg := *params.RialtoChainConfig
+ cfg.MendelTime = &mendelTime
+ config := &cfg
+ targetBlobGas := uint64(config.BlobScheduleConfig.Cancun.Target) * params.BlobTxBlobGasPerBlob
+
+ // Test IsBlobEligibleBlock
+ for _, tt := range []struct {
+ blockNum uint64
+ time uint64
+ want bool
+ }{
+ {1, 999, true}, // before fork: all eligible
+ {5, 1000, true}, // after fork: N%5==0 eligible
+ {1, 1000, false}, // after fork: N%5!=0 not eligible
+ } {
+ if got := IsBlobEligibleBlock(config, tt.blockNum, tt.time); got != tt.want {
+ t.Errorf("IsBlobEligibleBlock(%d, %d) = %v, want %v", tt.blockNum, tt.time, got, tt.want)
+ }
+ }
+
+ // Test CalcExcessBlobGas: inherit vs recalculate
+ for i, tt := range []struct {
+ parentNum uint64
+ excess uint64
+ used uint64
+ time uint64
+ wantInherit bool
+ }{
+ {5, 600000, params.BlobTxBlobGasPerBlob * 4, 1000, false}, // parent N%5==0: recalc
+ {3, 700000, 0, 1000, true}, // parent N%5!=0: inherit
+ {3, 500000, params.BlobTxBlobGasPerBlob * 2, 999, false}, // before fork: recalc
+ } {
+ parent := &types.Header{Number: big.NewInt(int64(tt.parentNum)), Time: 1000, ExcessBlobGas: &tt.excess, BlobGasUsed: &tt.used}
+ got := CalcExcessBlobGas(config, parent, tt.time)
+ if tt.wantInherit && got != tt.excess {
+ t.Errorf("CalcExcessBlobGas test %d: want inherit %d, got %d", i, tt.excess, got)
+ }
+ if !tt.wantInherit {
+ want := tt.excess + tt.used
+ if want >= targetBlobGas {
+ want -= targetBlobGas
+ } else {
+ want = 0
+ }
+ if got != want {
+ t.Errorf("CalcExcessBlobGas test %d: want recalc %d, got %d", i, want, got)
+ }
+ }
+ }
+
+ // Test VerifyEIP4844Header: BlobGasUsed validation
+ makeHeader := func(num, blobGas, time uint64) *types.Header {
+ zero := uint64(0)
+ return &types.Header{Number: big.NewInt(int64(num)), Time: time, ExcessBlobGas: &zero, BlobGasUsed: &blobGas}
+ }
+ for i, tt := range []struct {
+ parentNum, headerNum, blobGas uint64
+ time uint64
+ wantErr bool
+ }{
+ {4, 5, params.BlobTxBlobGasPerBlob, 1000, false}, // eligible: can have blobs
+ {5, 6, params.BlobTxBlobGasPerBlob, 1000, true}, // non-eligible: must fail
+ {5, 6, 0, 1000, false}, // non-eligible: no blobs OK
+ {5, 6, params.BlobTxBlobGasPerBlob, 999, false}, // before fork: all OK
+ } {
+ err := VerifyEIP4844Header(config, makeHeader(tt.parentNum, 0, 1000), makeHeader(tt.headerNum, tt.blobGas, tt.time))
+ if tt.wantErr && err == nil {
+ t.Errorf("VerifyEIP4844Header test %d: expected error", i)
+ }
+ if !tt.wantErr && err != nil {
+ t.Errorf("VerifyEIP4844Header test %d: unexpected error: %v", i, err)
+ }
+ }
+}
diff --git a/consensus/parlia/finality_test.go b/consensus/parlia/finality_test.go
new file mode 100644
index 0000000000..495f6d4802
--- /dev/null
+++ b/consensus/parlia/finality_test.go
@@ -0,0 +1,175 @@
+// Copyright 2017 The bnb-chain Authors
+// This file is part of the bnb-chain library.
+//
+// The bnb-chain library is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// The bnb-chain library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with the bnb-chain library. If not, see .
+
+package parlia
+
+import (
+ "math/big"
+ "testing"
+
+ "github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/consensus"
+ "github.com/ethereum/go-ethereum/core/types"
+ "github.com/ethereum/go-ethereum/params"
+)
+
+type finalizedHeaderChain struct {
+ cfg *params.ChainConfig
+ current *types.Header
+ byHash map[common.Hash]*types.Header
+ byNumber map[uint64]*types.Header
+}
+
+func (c *finalizedHeaderChain) Config() *params.ChainConfig {
+ return c.cfg
+}
+
+func (c *finalizedHeaderChain) CurrentHeader() *types.Header {
+ return c.current
+}
+
+func (c *finalizedHeaderChain) GetHeader(hash common.Hash, number uint64) *types.Header {
+ header := c.byHash[hash]
+ if header != nil && header.Number.Uint64() == number {
+ return header
+ }
+ return nil
+}
+
+func (c *finalizedHeaderChain) GetHeaderByNumber(number uint64) *types.Header {
+ return c.byNumber[number]
+}
+
+func (c *finalizedHeaderChain) GetHeaderByHash(hash common.Hash) *types.Header {
+ return c.byHash[hash]
+}
+
+func (c *finalizedHeaderChain) GenesisHeader() *types.Header {
+ return c.byNumber[0]
+}
+
+func (c *finalizedHeaderChain) GetTd(hash common.Hash, number uint64) *big.Int {
+ return big.NewInt(0)
+}
+
+func (c *finalizedHeaderChain) GetHighestVerifiedHeader() *types.Header {
+ return c.current
+}
+
+func (c *finalizedHeaderChain) GetVerifiedBlockByHash(hash common.Hash) *types.Header {
+ return c.byHash[hash]
+}
+
+func (c *finalizedHeaderChain) ChasingHead() *types.Header {
+ return c.current
+}
+
+type fixedVotePool struct {
+ n int
+}
+
+func (v *fixedVotePool) FetchVotesByBlockHash(targetBlockHash common.Hash, sourceBlockNum uint64) []*types.VoteEnvelope {
+ votes := make([]*types.VoteEnvelope, v.n)
+ for i := range votes {
+ votes[i] = &types.VoteEnvelope{}
+ }
+ return votes
+}
+
+func makeValidatorSet(size int) map[common.Address]*ValidatorInfo {
+ validators := make(map[common.Address]*ValidatorInfo, size)
+ for i := 0; i < size; i++ {
+ addr := common.BigToAddress(big.NewInt(int64(i + 1)))
+ validators[addr] = &ValidatorInfo{}
+ }
+ return validators
+}
+
+func TestGetFinalizedHeaderUsesParentSnapshotForFastFinalityQuorum(t *testing.T) {
+ cfg := ¶ms.ChainConfig{
+ ChainID: big.NewInt(56),
+ PlatoBlock: big.NewInt(0),
+ Parlia: ¶ms.ParliaConfig{},
+ }
+
+ genesis := &types.Header{
+ Number: big.NewInt(0),
+ }
+ targetParent := &types.Header{
+ Number: big.NewInt(10),
+ ParentHash: common.Hash{},
+ }
+ finalized := &types.Header{
+ Number: big.NewInt(9),
+ ParentHash: genesis.Hash(),
+ }
+ targetParent.ParentHash = finalized.Hash()
+ target := &types.Header{
+ Number: big.NewInt(11),
+ ParentHash: targetParent.Hash(),
+ }
+
+ chain := &finalizedHeaderChain{
+ cfg: cfg,
+ current: target,
+ byHash: map[common.Hash]*types.Header{
+ genesis.Hash(): genesis,
+ targetParent.Hash(): targetParent,
+ finalized.Hash(): finalized,
+ target.Hash(): target,
+ },
+ byNumber: map[uint64]*types.Header{
+ 0: genesis,
+ 9: finalized,
+ 10: targetParent,
+ 11: target,
+ },
+ }
+
+ parentSnap := &Snapshot{
+ config: cfg.Parlia,
+ Number: 10,
+ Hash: targetParent.Hash(),
+ Validators: makeValidatorSet(4),
+ Attestation: &types.VoteData{SourceNumber: 9, SourceHash: finalized.Hash(), TargetNumber: 9, TargetHash: finalized.Hash()},
+ Recents: make(map[uint64]common.Address),
+ RecentForkHashes: make(map[uint64]string),
+ }
+ headerSnap := &Snapshot{
+ config: cfg.Parlia,
+ Number: 11,
+ Hash: target.Hash(),
+ Validators: makeValidatorSet(2),
+ Attestation: &types.VoteData{SourceNumber: 9, SourceHash: finalized.Hash(), TargetNumber: 10, TargetHash: targetParent.Hash()},
+ Recents: make(map[uint64]common.Address),
+ RecentForkHashes: make(map[uint64]string),
+ }
+
+ engine := New(cfg, nil, nil, genesis.Hash())
+ engine.recentSnaps.Add(targetParent.Hash(), parentSnap)
+ engine.recentSnaps.Add(target.Hash(), headerSnap)
+ engine.VotePool = &fixedVotePool{n: 2}
+
+ finalizedHeader := engine.GetFinalizedHeader(chain, target)
+ if finalizedHeader == nil {
+ t.Fatal("expected finalized header, got nil")
+ }
+ if finalizedHeader.Number.Uint64() != finalized.Number.Uint64() {
+ t.Fatalf("expected fallback finalized block %d, got %d", finalized.Number.Uint64(), finalizedHeader.Number.Uint64())
+ }
+}
+
+var _ consensus.ChainHeaderReader = (*finalizedHeaderChain)(nil)
diff --git a/consensus/parlia/parlia.go b/consensus/parlia/parlia.go
index def4685524..5c1288fe47 100644
--- a/consensus/parlia/parlia.go
+++ b/consensus/parlia/parlia.go
@@ -265,10 +265,6 @@ type Parlia struct {
slashABI abi.ABI
stakeHubABI abi.ABI
- // finalizedNotified tracks blocks that have already triggered early finalization notification
- // to avoid duplicate notifications
- finalizedNotified *lru.Cache[common.Hash, struct{}]
-
// The fields below are for testing only
fakeDiff bool // Skip difficulty verifications
}
@@ -309,7 +305,6 @@ func New(
recentSnaps: lru.NewCache[common.Hash, *Snapshot](inMemorySnapshots),
recentHeaders: lru.NewCache[string, common.Hash](inMemoryHeaders),
signatures: lru.NewCache[common.Hash, common.Address](inMemorySignatures),
- finalizedNotified: lru.NewCache[common.Hash, struct{}](inMemorySnapshots),
validatorSetABIBeforeLuban: vABIBeforeLuban,
validatorSetABI: vABI,
slashABI: sABI,
@@ -1425,7 +1420,7 @@ func (p *Parlia) Finalize(chain consensus.ChainHeaderReader, header *types.Heade
if p.chainConfig.IsOnFeynman(header.Number, parent.Time, header.Time) {
err := p.initializeFeynmanContract(state, header, cx, txs, receipts, systemTxs, usedGas, false, tracer)
if err != nil {
- log.Error("init feynman contract failed", "error", err)
+ return fmt.Errorf("init feynman contract failed: %v", err)
}
}
@@ -1433,7 +1428,7 @@ func (p *Parlia) Finalize(chain consensus.ChainHeaderReader, header *types.Heade
if header.Number.Cmp(common.Big1) == 0 {
err := p.initContract(state, header, cx, txs, receipts, systemTxs, usedGas, false, tracer)
if err != nil {
- log.Error("init contract failed")
+ return errors.New("init contract failed")
}
}
if header.Difficulty.Cmp(diffInTurn) != 0 {
@@ -1458,7 +1453,6 @@ func (p *Parlia) Finalize(chain consensus.ChainHeaderReader, header *types.Heade
log.Trace("slash validator", "block hash", header.Hash(), "address", spoiledVal)
err = p.slash(spoiledVal, state, header, cx, txs, receipts, systemTxs, usedGas, false, tracer)
if err != nil {
- // it is possible that slash validator failed because of the slash channel is disabled.
log.Error("slash validator failed", "block hash", header.Hash(), "address", spoiledVal, "err", err)
}
}
@@ -1524,14 +1518,14 @@ func (p *Parlia) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *
if p.chainConfig.IsOnFeynman(header.Number, parent.Time, header.Time) {
err := p.initializeFeynmanContract(state, header, cx, &body.Transactions, &receipts, nil, &header.GasUsed, true, tracer)
if err != nil {
- log.Error("init feynman contract failed", "error", err)
+ return nil, nil, fmt.Errorf("init feynman contract failed: %v", err)
}
}
if header.Number.Cmp(common.Big1) == 0 {
err := p.initContract(state, header, cx, &body.Transactions, &receipts, nil, &header.GasUsed, true, tracer)
if err != nil {
- log.Error("init contract failed")
+ return nil, nil, errors.New("init contract failed")
}
}
if header.Difficulty.Cmp(diffInTurn) != 0 {
@@ -1555,7 +1549,6 @@ func (p *Parlia) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *
if !signedRecently {
err = p.slash(spoiledVal, state, header, cx, &body.Transactions, &receipts, nil, &header.GasUsed, true, tracer)
if err != nil {
- // it is possible that slash validator failed because of the slash channel is disabled.
log.Error("slash validator failed", "block hash", header.Hash(), "address", spoiledVal)
}
}
@@ -2235,6 +2228,8 @@ func (p *Parlia) applyTransaction(
return err
}
*txs = append(*txs, expectedTx)
+ // increment nonce only when tx is included
+ state.SetNonce(msg.From, nonce+1, tracing.NonceChangeEoACall)
var root []byte
if p.chainConfig.IsByzantium(header.Number) {
state.Finalise(true)
@@ -2301,48 +2296,48 @@ func (p *Parlia) GetFinalizedHeader(chain consensus.ChainHeaderReader, header *t
return chain.GetHeaderByNumber(0) // keep consistent with GetJustifiedNumberAndHash
}
- currentJustifiedNumber := snap.Attestation.TargetNumber
- currentJustifiedHash := snap.Attestation.TargetHash
+ finalizedHash := snap.Attestation.SourceHash
+ finalizedNumber := snap.Attestation.SourceNumber
+ currentJustifiedHash := snap.Attestation.TargetHash
+ currentJustifiedNumber := snap.Attestation.TargetNumber
// Try to check if currentJustifiedNumber can become finalized by checking VotePool.
// We only need to check currentJustifiedNumber + 1, since currentJustifiedNumber is already the latest justified.
if p.VotePool != nil && currentJustifiedNumber == header.Number.Uint64()-1 {
- // Check if the next block (direct child) has reached quorum in VotePool
- votes := p.VotePool.FetchVotesByBlockHash(header.Hash(), currentJustifiedNumber)
- quorum := cmath.CeilDiv(len(snap.Validators)*2, 3)
-
- if len(votes) >= quorum {
- return chain.GetHeader(currentJustifiedHash, currentJustifiedNumber)
+ parentSnap, err := p.snapshot(chain, header.Number.Uint64()-1, header.ParentHash, nil)
+ if err == nil {
+ // Check if the next block (direct child) has reached quorum in VotePool
+ votes := p.VotePool.FetchVotesByBlockHash(header.Hash(), currentJustifiedNumber)
+ quorum := cmath.CeilDiv(len(parentSnap.Validators)*2, 3)
+
+ if len(votes) >= quorum {
+ finalizedHash = currentJustifiedHash
+ finalizedNumber = currentJustifiedNumber
+ }
+ } else {
+ log.Error("Failed to get parent snapshot for finality check",
+ "error", err, "blockNumber", header.Number.Uint64()-1, "blockHash", header.ParentHash)
}
}
- // Fallback to the original logic: finalized is the source in attestation
- return chain.GetHeader(snap.Attestation.SourceHash, snap.Attestation.SourceNumber)
+ return chain.GetHeader(finalizedHash, finalizedNumber)
}
// CheckFinalityAndNotify checks if votes for the target block have reached quorum,
// and if so, notifies the blockchain of early finalization via the notifyFn callback.
func (p *Parlia) CheckFinalityAndNotify(chain consensus.ChainHeaderReader, targetBlockHash common.Hash, notifyFn func(finalizedHeader *types.Header)) {
- // Skip if already notified for this block
- if _, ok := p.finalizedNotified.Get(targetBlockHash); ok {
+ // Get target block header directly by hash (don't rely on currentHeader which may have moved forward)
+ targetHeader := chain.GetHeaderByHash(targetBlockHash)
+ if targetHeader == nil {
return
}
- // Get target block header
- currentHeader := chain.CurrentHeader()
- if currentHeader == nil || currentHeader.Hash() != targetBlockHash {
- return
- }
-
- finalizedHeader := p.GetFinalizedHeader(chain, currentHeader)
+ finalizedHeader := p.GetFinalizedHeader(chain, targetHeader)
if finalizedHeader == nil || finalizedHeader.Number.Uint64() == 0 {
return
}
- // Mark as notified to avoid duplicate notifications
- p.finalizedNotified.Add(targetBlockHash, struct{}{})
-
- // Notify via callback
+ // Notify via callback (NotifyFinalized has its own deduplication logic)
notifyFn(finalizedHeader)
}
@@ -2537,8 +2532,6 @@ func applyMessage(
} else {
state.ClearAccessList()
}
- // Increment the nonce for the next transaction
- state.SetNonce(msg.From, state.GetNonce(msg.From)+1, tracing.NonceChangeEoACall)
ret, returnGas, err := evm.Call(
msg.From,
diff --git a/consensus/parlia/parlia_test.go b/consensus/parlia/parlia_test.go
index e1ecccfb29..92b3691613 100644
--- a/consensus/parlia/parlia_test.go
+++ b/consensus/parlia/parlia_test.go
@@ -713,15 +713,15 @@ func TestParlia_applyTransactionTracing(t *testing.T) {
expectedRecords := []string{
"system tx start",
"tx [0xe9a5597c7f5a6a10a18959d262319fbf19cecb4d9d1ce8f2c990089bd88016fc] from [0x0000000000000000000000000000000000000000] start",
- "nonce change [0x0000000000000000000000000000000000000000]: 0 -> 1",
"call enter [0x0000000000000000000000000000000000000000] -> [0x0000000000000000000000000000000000001000] (type 241, gas 9223372036854775807, value 0)",
"call exit (depth 0, gas used 0, reverted false, err: )",
+ "nonce change [0x0000000000000000000000000000000000000000]: 0 -> 1",
"tx [0xe9a5597c7f5a6a10a18959d262319fbf19cecb4d9d1ce8f2c990089bd88016fc] end (log count 0, cumulative gas used 0, err: )",
"system tx end",
}
if !slices.Equal(recording.records, expectedRecords) {
- t.Errorf("expected \n%s\n\ngot\n\n%s", formatRecords(recording.records), formatRecords(expectedRecords))
+ t.Errorf("expected \n%s\n\ngot\n\n%s", formatRecords(expectedRecords), formatRecords(recording.records))
}
}
diff --git a/core/blockchain.go b/core/blockchain.go
index 0be8635acb..127bf78327 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -138,12 +138,11 @@ var (
const (
bodyCacheLimit = 256
blockCacheLimit = 256
- receiptsCacheLimit = 10000
- sidecarsCacheLimit = 1024
+ receiptsCacheLimit = 256
+ sidecarsCacheLimit = 256
txLookupCacheLimit = 1024
maxFutureBlocks = 256
maxTimeFutureBlocks = 30
- maxBeyondBlocks = 2048
prefetchTxNumber = 50
// BlockChainVersion ensures that an incompatible database forces a resync from scratch.
diff --git a/core/blockchain_reader.go b/core/blockchain_reader.go
index 4527766bbc..26ae7c7b8a 100644
--- a/core/blockchain_reader.go
+++ b/core/blockchain_reader.go
@@ -68,6 +68,12 @@ func (bc *BlockChain) CurrentFinalBlock() *types.Header {
return nil
}
+// HighestNotifiedFinal retrieves the highest finalized block that has been notified.
+// This is used for deduplication in early finalization checks.
+func (bc *BlockChain) HighestNotifiedFinal() *types.Header {
+ return bc.highestNotifiedFinal.Load()
+}
+
// CurrentSafeBlock retrieves the current safe block of the canonical
// chain. The block is retrieved from the blockchain's internal cache.
func (bc *BlockChain) CurrentSafeBlock() *types.Header {
diff --git a/core/filtermaps/checkpoints_bsc_chapel.json b/core/filtermaps/checkpoints_bsc_chapel.json
index 1b928147a1..35a30e181d 100644
--- a/core/filtermaps/checkpoints_bsc_chapel.json
+++ b/core/filtermaps/checkpoints_bsc_chapel.json
@@ -93,5 +93,17 @@
{"blockNumber": 73613573, "blockId": "0x49309309873548401b052d8e63130d308a926c23c44b93b66a3a4268bfe1a66b", "firstIndex": 6174013719},
{"blockNumber": 73620987, "blockId": "0x66aa30c386ecb1be45717b8c6e1276ed7582f97a875bc5184fb671ae44960512", "firstIndex": 6241117647},
{"blockNumber": 73628450, "blockId": "0x55ccb502864bf601a4782126708ad4f0c18304282d8c09a45a3536421f11797a", "firstIndex": 6308225769},
-{"blockNumber": 74624775, "blockId": "0x32c0e4faf55c4d8f130a8634cbdb329f00410f390952f7fcdd7cdbfd76d76556", "firstIndex": 6375342074}
+{"blockNumber": 74624775, "blockId": "0x32c0e4faf55c4d8f130a8634cbdb329f00410f390952f7fcdd7cdbfd76d76556", "firstIndex": 6375342074},
+{"blockNumber": 77880651, "blockId": "0x5ade176050bd90b20ec5d59f4d4a9f754fc649a743a4fc6f25cc7235a568de9b", "firstIndex": 6442450944},
+{"blockNumber": 82121677, "blockId": "0x591053ab4839751e191f3ace9f0745447d9f0d6bbf1277f49ed1f1649e3f2c88", "firstIndex": 6509559808},
+{"blockNumber": 85285200, "blockId": "0x72769fc0e2a4c137aa3b846f2c2ab13d4db13d899d86c99c05b08b6ee0b31fb7", "firstIndex": 6576668607},
+{"blockNumber": 86238610, "blockId": "0x464377ce13d642f7282568620866ff4ff2ac6520c7421f9511395bd3fa80ab02", "firstIndex": 6643777469},
+{"blockNumber": 86892882, "blockId": "0xf62b94eed0b91b4e47d610dff342bd4ce89a5ddb1317da16672678643d11a062", "firstIndex": 6710886335},
+{"blockNumber": 87539117, "blockId": "0xc8838ab0f1c907a04aa2ee125ca69e46240d0e5ccfa1d543741510bad484ba7c", "firstIndex": 6777995256},
+{"blockNumber": 88182733, "blockId": "0xe6677079c2013d7b2efbced43255f60d71629b795de0bb753bdf8500cbbbf3ed", "firstIndex": 6845104097},
+{"blockNumber": 89319796, "blockId": "0x3b981d23345b53fa46cf5609a3ef695e23134cc6e6bf56d5b3094fea4956c74f", "firstIndex": 6912212700},
+{"blockNumber": 90489920, "blockId": "0x8c166b1bebc06cebddaebfab6b9f23c91f2717e13592c8088deb2feeb383d484", "firstIndex": 6979320229},
+{"blockNumber": 91579915, "blockId": "0x1727b9ba01e3d549efd64af1803fcb8439456472953909a38a3a886813d5b1a4", "firstIndex": 7046430683},
+{"blockNumber": 92881810, "blockId": "0x9d68ba387390716870f79c427b621217b0854c2cc67ac64746f3d5f8286936c5", "firstIndex": 7113539555},
+{"blockNumber": 94193398, "blockId": "0x7860700355295f8ded2ff19bc9002cbf2921cbb9fe8d50c3ba2e3ddc02f006aa", "firstIndex": 7180648436}
]
\ No newline at end of file
diff --git a/core/filtermaps/checkpoints_bsc_mainnet.json b/core/filtermaps/checkpoints_bsc_mainnet.json
index 66e95da3a6..0312cc6d0c 100644
--- a/core/filtermaps/checkpoints_bsc_mainnet.json
+++ b/core/filtermaps/checkpoints_bsc_mainnet.json
@@ -2142,5 +2142,338 @@
{"blockNumber": 71033924, "blockId": "0x6968d18b513e6c1b453e42b50ede10ab8759c00f0b4f48350bfd515386b80d65", "firstIndex": 143680076464},
{"blockNumber": 71058065, "blockId": "0x215187a24624dc5a74b5054130e90f889ce79d13544e9a65e0a3f79f79bb8299", "firstIndex": 143747185513},
{"blockNumber": 71093909, "blockId": "0x7673f32a578440add0d15d230d848acf151be45ba68d57f7e7976047e05e0158", "firstIndex": 143814294904},
-{"blockNumber": 71126721, "blockId": "0x6eda9ef9677f72eda5ecabb66ccced4e6636c13836d5cbd0edbf1c937609c799", "firstIndex": 143881403864}
+{"blockNumber": 71126721, "blockId": "0x6eda9ef9677f72eda5ecabb66ccced4e6636c13836d5cbd0edbf1c937609c799", "firstIndex": 143881403864},
+{"blockNumber": 71154376, "blockId": "0x00f30e33ede6c9ded548a5b4feae2797f3296ded3576bdd629f10159f73d7baa", "firstIndex": 143948511789},
+{"blockNumber": 71180136, "blockId": "0x477ca446d140dfed514152dce9dfb6784101c61d5f2e5ccfd555808a0f11ec9c", "firstIndex": 144015621109},
+{"blockNumber": 71221755, "blockId": "0x12105027dc2032a0a636f326d9d65313b240420136a16b81469ae3b0a0c854b2", "firstIndex": 144082727393},
+{"blockNumber": 71251235, "blockId": "0x9abd0a7cd28bed9898d0599099920f3b080fcfc253547e32cb67149d3ba9ef2d", "firstIndex": 144149831984},
+{"blockNumber": 71273389, "blockId": "0xb260e3a6b455664c05a9e66537fafad5e5f428444deb6de1af4e8168323746b1", "firstIndex": 144216946970},
+{"blockNumber": 71302183, "blockId": "0xa01be548511bf838e39b33a32fba42078e3bb7d45bd99330332ee4658e8cd022", "firstIndex": 144284057092},
+{"blockNumber": 71346103, "blockId": "0x7997247ce80fe0068f66031840ee407bf9697f60478c53a0c4be4fd68b51b842", "firstIndex": 144351166140},
+{"blockNumber": 71376381, "blockId": "0x296e90c1976dee44e157ff87cdb3f2ebc0a70a33aa4b0a6e26b35e99ca7c3c81", "firstIndex": 144418274551},
+{"blockNumber": 71403005, "blockId": "0x205f5c58eab6ddb536556b1d4fcc51d1be108dabbef84d7efb8102a05603225b", "firstIndex": 144485382939},
+{"blockNumber": 71444207, "blockId": "0x7126c29c6bed2262641c8b8661329185a470c325f4703144c7b60529ab21691b", "firstIndex": 144552492520},
+{"blockNumber": 71480063, "blockId": "0x90adee7ddee8959e093309ac7c848f1ea15d83dd230b4ca9da541b623b67ad27", "firstIndex": 144619598149},
+{"blockNumber": 71508877, "blockId": "0x12f30d0457b05759d6f60e1b2eb5502bb770626d559fa17a8aee541b3dbef614", "firstIndex": 144686710296},
+{"blockNumber": 71547147, "blockId": "0xaddabf78ae81cbeb0798ebc0721b445c5c2be76352f4d41eb3612764c7b6d7e2", "firstIndex": 144753819488},
+{"blockNumber": 71587555, "blockId": "0xc211974f9b15dd8cffba32d1f4e6d1e6f2d8de19ebfc38cd77c6e0490192cef3", "firstIndex": 144820927519},
+{"blockNumber": 71618337, "blockId": "0x50fc24fb2033d6586c1b72b54f826f026ec82d35a5d30facb80e346c5021a43a", "firstIndex": 144888036618},
+{"blockNumber": 71648041, "blockId": "0xcf29a6c6da3af2a36c8926007cf80376593268faeffdce1f0c00044e13ae8244", "firstIndex": 144955143434},
+{"blockNumber": 71688662, "blockId": "0xaaa4cffc3e640f09a850b8011857f2059460af472091b1ad1842f73acc3fea35", "firstIndex": 145022253345},
+{"blockNumber": 71717538, "blockId": "0xd0f6af254429e8c6805939840afcaeb787c868fdbc1dbcfa5d00889453569d11", "firstIndex": 145089362918},
+{"blockNumber": 71742645, "blockId": "0xdadb10d60eaaf538d15c7c34fc26339987b7a3b3ddc593be10fc71a0116ab53e", "firstIndex": 145156471447},
+{"blockNumber": 71777091, "blockId": "0x8d6f1328b1aa92b4f7c048d94bfc79e92d588ace2442637810a60d36c6b4f6d6", "firstIndex": 145223581465},
+{"blockNumber": 71814973, "blockId": "0xadc235983bf7e2620d0c97a2a910fc0a42efc54fe622f3799506ef2de6b10dd8", "firstIndex": 145290688537},
+{"blockNumber": 71842802, "blockId": "0xcc4e91810a3515bbe644357e3a7ecbef7140cd2cf31d3cc2b0eb91020b510c60", "firstIndex": 145357798139},
+{"blockNumber": 71869449, "blockId": "0x0ef9f904bdb44a4324adb6f47133a0b47796e4b8dceaae7847355f09082d88b3", "firstIndex": 145424906221},
+{"blockNumber": 71914927, "blockId": "0x6377ad211d1ef39865e1d725dc238cd65f20fa097a285e3022b82c4443c54005", "firstIndex": 145492015079},
+{"blockNumber": 71943468, "blockId": "0x13107682b8d292f3911fd172fb7432dfb12c0245ba7044791c99a4878258b7e8", "firstIndex": 145559123579},
+{"blockNumber": 71969347, "blockId": "0x9bbbc35c9c93548f0f0d0195c3ef688c9fce60a9d1d986b8e7aa57660005e6b8", "firstIndex": 145626232699},
+{"blockNumber": 71999384, "blockId": "0x6495cb6e55ed7d0b15bf1b9833c642f182b77d3cfed36feab7adce80cd64f3c3", "firstIndex": 145693343085},
+{"blockNumber": 72038767, "blockId": "0x59000453f7a0859d2422211fcc3d45bcacbe7735095fc028aeacda59811bc6c6", "firstIndex": 145760450469},
+{"blockNumber": 72068143, "blockId": "0xab314cf52ebccf23ff0b749986a57187ac542ebe668be805fa7c501a83d6f21e", "firstIndex": 145827560319},
+{"blockNumber": 72093419, "blockId": "0x70db826fe972bc6cf729c34c41af84247f6ce7489354b37ecb4bce4fbeaacf32", "firstIndex": 145894670323},
+{"blockNumber": 72133767, "blockId": "0x989fb3dd6e8626230f5acf29ff8714489ff065812619d98b713a12cf49e3e071", "firstIndex": 145961778411},
+{"blockNumber": 72165324, "blockId": "0xa168455fd1160613fc40db4555463f072e70ed05521e950c5fc5fadd145f2624", "firstIndex": 146028887369},
+{"blockNumber": 72188085, "blockId": "0x3a783411e1d91f550b449a34dd42e249e602fc9deacab2356692b0fe3f3a9a68", "firstIndex": 146095995599},
+{"blockNumber": 72214780, "blockId": "0xace081a37e5175f5e346c3d39076b7c9206b85dcbd31c87e910f8424150d8d9c", "firstIndex": 146163105166},
+{"blockNumber": 72258833, "blockId": "0xb6f22592d8b20ed937d2febefcdca4f9b7ad06aa4d435599e831cd8541531b87", "firstIndex": 146230214005},
+{"blockNumber": 72292215, "blockId": "0xb0d668fe19bfb09605ea888e54ced5590b6ca7f19a22a66ae716f87edbbb8b4d", "firstIndex": 146297321950},
+{"blockNumber": 72322815, "blockId": "0x3c98fdb14360c284fbaa6c399c0a9eeeb7d6594fe0c81954c9398ca0de1631f9", "firstIndex": 146364431735},
+{"blockNumber": 72365833, "blockId": "0x7d4a67ecf07bba17916cc9ab428b8142eab77da988ea765ae409e912517fb59c", "firstIndex": 146431540759},
+{"blockNumber": 72402124, "blockId": "0x20d756bef9b74d9d5ae0be260e118c7a8cb0d2b5b58006ca1f1240a0efbaaf5d", "firstIndex": 146498650083},
+{"blockNumber": 72431756, "blockId": "0x35a44754d7ac97b8950b0de6084a385bbcd2d6bea896603787cc835f18cd82f2", "firstIndex": 146565758075},
+{"blockNumber": 72467592, "blockId": "0xa178431ede4ebc30acd0da6fa65a48d6071921174b16cfdda16d55a84c41bc69", "firstIndex": 146632867557},
+{"blockNumber": 72501477, "blockId": "0xf2ef56dfdc55aa80d193850bfe7e68e3531b7e82677c54feac589e67e74277ab", "firstIndex": 146699976480},
+{"blockNumber": 72526951, "blockId": "0x4f046373959e8b5fe187ab90cbbc667f45f0ea6c73ae13b05413444776eaaa12", "firstIndex": 146767083970},
+{"blockNumber": 72551770, "blockId": "0x741cb99e44b2342663e56bc3168114c3d72299054474c932f5a1e4406aef52c7", "firstIndex": 146834193876},
+{"blockNumber": 72582992, "blockId": "0x2a10c2d74696759e1341fa636f9648f1e93764628f3af6778f2739428dfcd717", "firstIndex": 146901299069},
+{"blockNumber": 72614537, "blockId": "0x32896947d49ddc30709cea9c23e9b1820b03374d6e26b5a9f9a04abe1dce27bc", "firstIndex": 146968411334},
+{"blockNumber": 72642256, "blockId": "0x0d035cc9ae79e940e24de3f027cf4b6b4336af839a9dd9f6af6724a5b2bef553", "firstIndex": 147035518213},
+{"blockNumber": 72668207, "blockId": "0x3d9ba15c7fadf2c49b216e58385b3069c2b371c0be6d226cd3d2729662a95fbe", "firstIndex": 147102628792},
+{"blockNumber": 72712386, "blockId": "0x9476cecf2e5f61d5914f79adfdd7fb80f5a81c06f179c8d2cd4426ae901cd68c", "firstIndex": 147169737811},
+{"blockNumber": 72744201, "blockId": "0x5afeb4c25c49a4a9f27317d3523d4e75601e739873528ed2fb926f3eaddf9b1c", "firstIndex": 147236843559},
+{"blockNumber": 72772294, "blockId": "0x893f7b791b1603699a67fac8698f88c6e47617b215bce014586b41ffb9a9d6a6", "firstIndex": 147303954540},
+{"blockNumber": 72804136, "blockId": "0xbb55be3e5a3245524c1a2e0f3bc1b81d53e4cd753b7ef36a207ab65befbf4084", "firstIndex": 147371064639},
+{"blockNumber": 72847120, "blockId": "0x142140e596d83c2cefcfc30bd4e6e356644ad5f8c77d69f3f11889c78b6a05a4", "firstIndex": 147438173626},
+{"blockNumber": 72876539, "blockId": "0x08f44efb9d12cbd7aac2e2ff224328e217d4474b7838836b42b282c6c00d47b2", "firstIndex": 147505281796},
+{"blockNumber": 72904593, "blockId": "0x6e8b0441f16cb8ff25853feec0470c7c89f27fd3753dfaf20b2bafbb7188018f", "firstIndex": 147572391251},
+{"blockNumber": 72949521, "blockId": "0x8ccf2849373b1f10c199d8f7205e993a3eb767c798ee0600b267bff49392cb4f", "firstIndex": 147639500076},
+{"blockNumber": 72978611, "blockId": "0x7cd170c936058cb6a8fcaf1845c02822eef59e199b995746d96dc2b14f0cd718", "firstIndex": 147706608736},
+{"blockNumber": 73008447, "blockId": "0x48b8c8a5c376b1ebd29a51d2d98dca00672bb1960115b86d4fa342cb36c26a20", "firstIndex": 147773718151},
+{"blockNumber": 73050418, "blockId": "0xf3258ec92755f68aa61eaaad04d6709f127b506a5961478d894de55a287abefc", "firstIndex": 147840826192},
+{"blockNumber": 73087219, "blockId": "0x4b523e5d45ec732a3dd42308ff661730589c2ecad6eb3807a60620da11e9de13", "firstIndex": 147907936154},
+{"blockNumber": 73114244, "blockId": "0xe0b8b555101069d3cd2e14ac451da27f1974e598110db52414e7a8478e27ef19", "firstIndex": 147975043585},
+{"blockNumber": 73146693, "blockId": "0x87baca49bfcfa2722f1ec4b73e96d2f59f24bbb07b913a43892bc88a16c984bd", "firstIndex": 148042151599},
+{"blockNumber": 73191701, "blockId": "0x17df35ad45a3a27cee5dda683fdf788cc5378702eb0e35ede5de96db0f62843f", "firstIndex": 148109262663},
+{"blockNumber": 73222972, "blockId": "0xa247b6bb90f84c4bc647dcff2ca82709d4fbe7edfcc2d4e5a873b3b6affbd199", "firstIndex": 148176369893},
+{"blockNumber": 73254270, "blockId": "0x045570b5131f7c051198c88c42228a868675d524fe5611884e49431da5b8c781", "firstIndex": 148243480211},
+{"blockNumber": 73298890, "blockId": "0x18af701bcd97760657aaa3da0e0d097d89ee631eaa4d3379a84c397502ab5dd9", "firstIndex": 148310589183},
+{"blockNumber": 73327445, "blockId": "0xc0c0737eab959b712f9f873b5b07c3d935b63d3bf6abc73e7fc119123e4f8b12", "firstIndex": 148377697073},
+{"blockNumber": 73353633, "blockId": "0x8b358812623318a101ebeafe9a5761240b28a1619f366964e7b84df51e09b9fb", "firstIndex": 148444806295},
+{"blockNumber": 73389395, "blockId": "0x47243e471d8b847dd0545db7c5f32a9ef946b1df39e9596da0e79717998d6aad", "firstIndex": 148511914124},
+{"blockNumber": 73425060, "blockId": "0xebe141f295636a7c3a577c3ed93ca8a7e6ed1bd3da05fb92def01e5b4b344360", "firstIndex": 148579024658},
+{"blockNumber": 73451155, "blockId": "0x177d42840845cc893c1cfaa7a359cef24345e24f3ab2006a2343c04fe5f10356", "firstIndex": 148646131298},
+{"blockNumber": 73478563, "blockId": "0x5b1f2e60fd481fbf80907a6613a19f740f3ba4bfeb81613fcd875bd5726be656", "firstIndex": 148713241369},
+{"blockNumber": 73524350, "blockId": "0xb9360ad88d169047394ea819575f7b5372e267044961f063b16bbdefe3a8af37", "firstIndex": 148780350511},
+{"blockNumber": 73554667, "blockId": "0xacabf726b2cc00d29163b80b48c1aecafe85e860947daf54814e2e45de32e08d", "firstIndex": 148847460133},
+{"blockNumber": 73581999, "blockId": "0xd645a7461646a69ebfb528296548584af179670f24109896725901ae061b5013", "firstIndex": 148914567039},
+{"blockNumber": 73617426, "blockId": "0x35061a04a851238c2ea3273969126287e93f8b5030dc850b362428164e02f756", "firstIndex": 148981677896},
+{"blockNumber": 73657451, "blockId": "0x1aca7cee13df23a0e5e0f1d4a15a63e9e2780eeb70f083aad5fc77ef4613e220", "firstIndex": 149048786283},
+{"blockNumber": 73688419, "blockId": "0x28300c41f4b9855f34d4c3265d712048f83df2ec33d8b63c76d2cb64af2fdb89", "firstIndex": 149115893091},
+{"blockNumber": 73718737, "blockId": "0xc569f827f3bb9d2e416b91dd59c182b84f6c66ad54feafd66cbe496221dc4483", "firstIndex": 149183003322},
+{"blockNumber": 73764235, "blockId": "0xe721061531a2cb9846178f4500f75c2dc6a41624936bc1948148c3a8e98fd1bf", "firstIndex": 149250112980},
+{"blockNumber": 73796783, "blockId": "0xaca96729ca5b87c282e34901807107eca1c36df38de14aeaef5410e192be9578", "firstIndex": 149317221200},
+{"blockNumber": 73826281, "blockId": "0x38958698ca6442bf73d530375c1bb3c9cc2c08de168fb6eac5d94b6fe0702c3b", "firstIndex": 149384330841},
+{"blockNumber": 73871782, "blockId": "0x2e0527c8c19e95d3e06a2c98ebc94d24f8e196ff62db7b4bf1dd78dca86bfae1", "firstIndex": 149451438626},
+{"blockNumber": 73901917, "blockId": "0x606c828df71c148ce701b915ba3454579d1421ca8e54afeac96703024a98cce1", "firstIndex": 149518546173},
+{"blockNumber": 73932239, "blockId": "0xe6fe1d8a0adafb50b79bc24e7c64c013ac78d4a658ede5c6da4d167eed4b1869", "firstIndex": 149585657307},
+{"blockNumber": 73978311, "blockId": "0x8427cbe694696bfc211c86d3c663b874914abb6a3964713865f78dcf27ffff89", "firstIndex": 149652765251},
+{"blockNumber": 74013064, "blockId": "0x64ae755ed07067c3984d779a56f35ba39754760d68065a133d8a3efbd864c84e", "firstIndex": 149719872922},
+{"blockNumber": 74043520, "blockId": "0x378a82789afd1f922844ebc3c6fe10b3d682540c5fec485f1e10da4202b024f4", "firstIndex": 149786981121},
+{"blockNumber": 74083774, "blockId": "0x94284fa8de7817f0ba9aa6674d9e111c6073853c7adc264b5ce87ce50c76087a", "firstIndex": 149854092829},
+{"blockNumber": 74121918, "blockId": "0x448ab92dbe0412d0acc6cae7a475785de798ffbbb4e08cda2a40f27b5035868c", "firstIndex": 149921201117},
+{"blockNumber": 74151238, "blockId": "0xbb156955236ef05140a7d5ca24736636c7fc3225a88af9a01d00344d2b0e5e4a", "firstIndex": 149988309217},
+{"blockNumber": 74182550, "blockId": "0xb48d72ebca1c969495c02244cc37ef63afb328072e91eeaee73389a771abfc14", "firstIndex": 150055419239},
+{"blockNumber": 74226190, "blockId": "0x850044dbc0a15c84385d41db865a6e11a06e5b5ccff1554bfb18cb594f1342ea", "firstIndex": 150122527804},
+{"blockNumber": 74258105, "blockId": "0xc9e6b7cb3e93b5f1acce1360ba9982b4ce41da71008669f7890c18329a73b943", "firstIndex": 150189636118},
+{"blockNumber": 74285222, "blockId": "0xd785ab87e6b7b8dacb72491bb70db5535f2c895f9d7769e9e6c7230abe8cdfae", "firstIndex": 150256744423},
+{"blockNumber": 74330597, "blockId": "0x9a508580da5202ae73701e2c9fc40496395debd8d55924bec2544b0d2ac1659a", "firstIndex": 150323854570},
+{"blockNumber": 74363245, "blockId": "0xb5a20a3dff2f9fa80713f95133c963ad36ded4c5c53cd578c93058edfe4fbbf3", "firstIndex": 150390963701},
+{"blockNumber": 74387540, "blockId": "0x9104c341883b139a7366e4668d5d3d09003e2bab9df3ca1a34fe80d7fe3bfa50", "firstIndex": 150458072244},
+{"blockNumber": 74422573, "blockId": "0xddec0a8c204099f4f7306cf92f61dcbb79601e3a6e71af63b4f74ec1b65aa4fa", "firstIndex": 150525181933},
+{"blockNumber": 74463213, "blockId": "0xd90e92a7005a7a54c392f4a04dd6f0e390094aefc19580568753f8bffdc041c0", "firstIndex": 150592289276},
+{"blockNumber": 74490954, "blockId": "0xe26ce1a98b226485a74d042874d75794ee9b0e8f6449914607bb086613ab6d38", "firstIndex": 150659398707},
+{"blockNumber": 74515536, "blockId": "0x0a9ac1005bc0bfb7429fb8485eaa0e55b16afaad3cd4fc3dd8e636a752ed9e03", "firstIndex": 150726507340},
+{"blockNumber": 74559923, "blockId": "0xa57f2a3b61fc94d18d3a6b69c7577c879e5b9aa870349527adf37564f1e059bb", "firstIndex": 150793617135},
+{"blockNumber": 74588306, "blockId": "0x4d8e1324c8270c0774e7e6f9c26874ddfb77f86f8f993b2804377e8433ea3d8d", "firstIndex": 150860719238},
+{"blockNumber": 74614110, "blockId": "0x1ae2f476a66a4c66efd1126debe4ca47eb3328b50bd0813b5cf6fbade95545fd", "firstIndex": 150927829674},
+{"blockNumber": 74638954, "blockId": "0xb9307392488a6b4cca2929900694746fcfa516af9927b4889f1f5c1d0ca29d30", "firstIndex": 150994941538},
+{"blockNumber": 74679063, "blockId": "0xb7315c48094ded0a447e8b7a3dcdd2d9c040ea28a2c69a7c8a874cb54bd344fb", "firstIndex": 151062049632},
+{"blockNumber": 74700246, "blockId": "0x59340112b9771a61501f02f3db03f30f66f40b4360c1b896168ae33cb209c9de", "firstIndex": 151129158921},
+{"blockNumber": 74721595, "blockId": "0xf5035300f5b25b5da958b0d474cce2e6c15a71bbd89d204d6c6893ee24108ba3", "firstIndex": 151196270400},
+{"blockNumber": 74741426, "blockId": "0xc5841c3a83aaf685cb27b49f88b68efeadf5f0f381128d0ffae73622d6741847", "firstIndex": 151263376917},
+{"blockNumber": 74769385, "blockId": "0x5022aac66b13074f3217952aa3fc652c298c919035669e95fc4f175532d8ab65", "firstIndex": 151330487701},
+{"blockNumber": 74799507, "blockId": "0x6714c79b40090e6f04cba005c2c5196f32f65140542265f01cb5758d990b6e10", "firstIndex": 151397594397},
+{"blockNumber": 74819455, "blockId": "0xe299cde81b5d240939cff3a54d7b6a86f75cdf44b2e16b064eba36f88b356c0c", "firstIndex": 151464704132},
+{"blockNumber": 74841934, "blockId": "0x2bbb1ecf1fd72487ed674a20e9bac031017fc8b1d97acaddd10278f2f88f78af", "firstIndex": 151531813974},
+{"blockNumber": 74864045, "blockId": "0xf01c04eb1e2eeb33a218a571b221c91cfbd62ba5cbe899e75ac74c0bb8fcdd5e", "firstIndex": 151598917470},
+{"blockNumber": 74906303, "blockId": "0x13f7e850c5d7b4daaac09860a77f289ece2bd949a5a0c772bdda15ee2546da92", "firstIndex": 151666031147},
+{"blockNumber": 74931108, "blockId": "0xda31a1d6b3c63dcf20f2e3f8b4a6142bf4d0929b485781e69abf17737176a369", "firstIndex": 151733141019},
+{"blockNumber": 74949918, "blockId": "0xdf0ebde8313a578a6a3f149e665152389b169e76da4998ec054398f379b1004a", "firstIndex": 151800249098},
+{"blockNumber": 74970727, "blockId": "0x1d58c7fdf18669026425f35b0448e1ca35f10a7c9a5b4b13e457954372e85252", "firstIndex": 151867357424},
+{"blockNumber": 75005271, "blockId": "0x2c6fd73461a71d273c4be2e22a4d247d0dea5c951d0f6acaa3ebdca58cf5b4d9", "firstIndex": 151934465100},
+{"blockNumber": 75037723, "blockId": "0x294bd5ea756459a7d5b31f532bab80ed4c2ed23087fa87f019676afaf3e6556d", "firstIndex": 152001576907},
+{"blockNumber": 75061612, "blockId": "0xa8b72962286bce927160155171a8b4254298a88e44c9ed5232c124456ccfe985", "firstIndex": 152068685644},
+{"blockNumber": 75083832, "blockId": "0x09efeb56d078880700cbc534d7e46c1e0d1681d557908bf922ecc3d8e58c6b81", "firstIndex": 152135793615},
+{"blockNumber": 75114203, "blockId": "0x13a9550d4dab3e2028241b7020308fdc3c9a9d8c22657df7025daf434097c1e7", "firstIndex": 152202901427},
+{"blockNumber": 75150739, "blockId": "0xc0749117049e546e0dcb158e6b98e2dd37a64dcad6f286245e8152a508390a94", "firstIndex": 152270012126},
+{"blockNumber": 75188471, "blockId": "0x72b63e29e83cc6a5b14a2b8d71ce9dfcbda0408cb6f7d8835b93d5c39c0c9b09", "firstIndex": 152337121052},
+{"blockNumber": 75222748, "blockId": "0xae7c477716bb5cc8d0c2e46b8f8b8c6949954817b1da3889fd4083a02bcb7805", "firstIndex": 152404229723},
+{"blockNumber": 75255537, "blockId": "0x2f1c6ce0e3e658b15e06c392b8c360010d2c06bd2d8e9825449f75618c64af79", "firstIndex": 152471336512},
+{"blockNumber": 75316632, "blockId": "0xfbde58152fb798d02a62c10f80c218c4866b26c3d33070141b101550531ad0ca", "firstIndex": 152538447375},
+{"blockNumber": 75361830, "blockId": "0x669991bcfad09f52359559592ab118ada559befc766c0243823911f728f81e07", "firstIndex": 152605556318},
+{"blockNumber": 75400671, "blockId": "0x1e34c68a148788e5638fd52cb07c35c8e530f9b8f433fe02a8f3c98a687644fb", "firstIndex": 152672663505},
+{"blockNumber": 75439541, "blockId": "0x9ec9fc4ea8a5bf0bd1d89462abec81935b2f1d5800d807d30ac9cfb3238ad1c4", "firstIndex": 152739773366},
+{"blockNumber": 75497630, "blockId": "0x2b59002c2589316424b252036bfaf782d135b4192da55d8c9a71b7c032b95aec", "firstIndex": 152806872595},
+{"blockNumber": 75545931, "blockId": "0x50c4c67c792403957b0087d4e98f034dd6bca239c3cf15521739b96dac7b4d84", "firstIndex": 152873991711},
+{"blockNumber": 75580999, "blockId": "0x83916494495df2717a6658ae2db6bcade9eed4180df6d00609eb449b8621d9f9", "firstIndex": 152941100555},
+{"blockNumber": 75617736, "blockId": "0x3f94fa6bfd71a9cdb82a5830552701eceb8759752c4d9215d6baf1f345fe2375", "firstIndex": 153008209654},
+{"blockNumber": 75670426, "blockId": "0x57df102c9b7be1f2e6a3a8ab4a91254c0d4bcb5865e3d8cb51edce3902980fe9", "firstIndex": 153075318153},
+{"blockNumber": 75729271, "blockId": "0xecb586974b4a8ea4093fec7999a5e6f3115f22f80a89df271a1dfd1a53ce7f87", "firstIndex": 153142427127},
+{"blockNumber": 75769024, "blockId": "0x091b9603ef2895a87bbdead01215e3dd7971a13d32ec3d6aa064cc003bce8782", "firstIndex": 153209527570},
+{"blockNumber": 75809787, "blockId": "0xc40aa1e664b5d3eb619c8c7b1d9de3b07df7b7e995eeff9a2787c5c96a728eb9", "firstIndex": 153276643463},
+{"blockNumber": 75858896, "blockId": "0x79610d8e7081b41d7062b8a0780b2f4ae5e3ccde0294454412c422595888a1ff", "firstIndex": 153343754192},
+{"blockNumber": 75919841, "blockId": "0x31c4ef19b2a929529825e8a96adae603129197cba9492be66405325919fd7659", "firstIndex": 153410862908},
+{"blockNumber": 75960002, "blockId": "0x969a81d337a3b9b20033433eb24ad7a575ede6c82d8edccd37583c087a164618", "firstIndex": 153477969628},
+{"blockNumber": 75997403, "blockId": "0x88eb3044d0977058489c0166bee4f0ff8f5ba0ddf830d66482489fbbf7f4af18", "firstIndex": 153545079697},
+{"blockNumber": 76042894, "blockId": "0x4a8c9feb014a6bbfd268b7c42d8093ce0729680cc032149199b736c230f6f610", "firstIndex": 153612189391},
+{"blockNumber": 76100231, "blockId": "0x97c9da2d0a9946f88dd9bdbfeeecfefe29f6f14157fe19db13bbf861a782d2b8", "firstIndex": 153679293007},
+{"blockNumber": 76140929, "blockId": "0x56876e661308227cb71bf6909eb00d2d505f39d1ba899149cbda2cffdfb27186", "firstIndex": 153746404802},
+{"blockNumber": 76177748, "blockId": "0x9d2c4f10d6d5c29dba2d615f615f199361e1cd4d66a5701c13ef2f6e5d60ca53", "firstIndex": 153813515415},
+{"blockNumber": 76214750, "blockId": "0xb585ccbb0f635a11a2d4a39c186ae834e79c666ff5ca129b96f3cc8b30286437", "firstIndex": 153880624170},
+{"blockNumber": 76286327, "blockId": "0x7e2ec10af9510c967c74c086e8358d7c05f6710c473ce3b3dd610adfbf4f7c77", "firstIndex": 153947733381},
+{"blockNumber": 76331363, "blockId": "0xdd53f1f159bcf3af0f6ca689653939c402c1b47165e8ab26d1e98b6cb926b95d", "firstIndex": 154014842837},
+{"blockNumber": 76368774, "blockId": "0x9829c9d943d21dfc6edb73980f414b78e2b71978626f2a27bb34f22a231e3d1a", "firstIndex": 154081950590},
+{"blockNumber": 76400095, "blockId": "0x32552eac348172f32bee275f2e0e9bf50106952a779cac671f3e11ada7b6ee73", "firstIndex": 154149059319},
+{"blockNumber": 76457474, "blockId": "0x1a7b6d6eb0d43466146a6f40ea090f3f6938581eb2d8499ce8971b5ff2e552bb", "firstIndex": 154216169192},
+{"blockNumber": 76502785, "blockId": "0x1d062cd062465597ab3dc45a51793234f1847b99174fdc9441e401e04edcb6da", "firstIndex": 154283278336},
+{"blockNumber": 76531876, "blockId": "0x99cc3f234811eab547e49376a6edb44a8507def96755bb49f3d37ca8518d8391", "firstIndex": 154350385092},
+{"blockNumber": 76565304, "blockId": "0x5023903929b09ef991fb04e5aaf2d58ab4e8145e85d1a184ec85488fc41e3294", "firstIndex": 154417495656},
+{"blockNumber": 76593637, "blockId": "0xd6cde77f64f76b2c25a811bd62f9d20b4001432180c95afca3e288b889a6cb2c", "firstIndex": 154484603983},
+{"blockNumber": 76641291, "blockId": "0xe8ea729a66257fdf192cbf6c78f2baa4a74d8ea40be9d161409ad15e58339ad3", "firstIndex": 154551710716},
+{"blockNumber": 76685488, "blockId": "0x06d4aa59cc132bbac2575f8b7c9ef62cf7ebdba0aaab8e8ca805e1cfd3a1f40d", "firstIndex": 154618821202},
+{"blockNumber": 76724544, "blockId": "0x82efdc063a4d9826d430d824635fe84761b3cd7938f9f438259cfa8ee06dd2a4", "firstIndex": 154685929979},
+{"blockNumber": 76757691, "blockId": "0xa2327238039c4dc18598858dc4a6a84fec16ea891e51fa94580828757967a0cd", "firstIndex": 154753038716},
+{"blockNumber": 76786602, "blockId": "0x6f0208a5f54b7af4ed25dd4462079e533099fc06571bf2e32a3126e12c605084", "firstIndex": 154820148835},
+{"blockNumber": 76840085, "blockId": "0xff72d907315f553750caf3ec99c1643eb2fa4ee7c3e670c64660856c0e85348a", "firstIndex": 154887256970},
+{"blockNumber": 76879884, "blockId": "0x6e03dcd1ae10ef9f2987befa4e90fe98ad4c743de30be52be2f5d61c662eb8a9", "firstIndex": 154954366468},
+{"blockNumber": 76912935, "blockId": "0xb0f57b8dc7c6e3a16118e75cabc517bfad8dae7aecf9ca9c28be9e0cdb21c97a", "firstIndex": 155021474297},
+{"blockNumber": 76944131, "blockId": "0xefffa9b70e05d8565d768c7a4a0c9791c732892e7d6e5a7a63067c0131943be7", "firstIndex": 155088584030},
+{"blockNumber": 76976103, "blockId": "0x343fcf3fe51eba276f92dcdef90f8f476e7d8e77775e1cb894980d165e8dcb44", "firstIndex": 155155691183},
+{"blockNumber": 77026485, "blockId": "0xcea0c1e6dc8c1c89e6fe473d7d3e7580ecfee2b1e0836c0fa9890a65f8fd8308", "firstIndex": 155222801885},
+{"blockNumber": 77074599, "blockId": "0x658ace21cc3a571bb50cd9aba5d95ccb90f328059c30776b683ab6462e3a5dbd", "firstIndex": 155289909791},
+{"blockNumber": 77115179, "blockId": "0x63ae5dcfd94632a8c601fdb1c6eb62e327276afc988234189b448b038e251157", "firstIndex": 155357019367},
+{"blockNumber": 77150898, "blockId": "0x08d7712b57f8834d789da0abf20a0f274a8da38ea711a379e1454afa45571f4d", "firstIndex": 155424127300},
+{"blockNumber": 77200013, "blockId": "0x0b627022d92407ca412f2f6cf51499543d33ce2b94e531c7a3b4d2c531ef70ac", "firstIndex": 155491237295},
+{"blockNumber": 77260920, "blockId": "0xfc721b6fac202c5289b6c8ee1c85fb3765b9dafcde4c48be5f2e4d0338c05b41", "firstIndex": 155558346179},
+{"blockNumber": 77308371, "blockId": "0x5d87104f7acc4917372c26c56071658d84f26c49fcd17e346e2631e728719f35", "firstIndex": 155625455267},
+{"blockNumber": 77352727, "blockId": "0xb30208f50697b849afb98b988e91aee19fa36a38a328080a3dd24a681402801f", "firstIndex": 155692564280},
+{"blockNumber": 77417266, "blockId": "0xd005136400ca61256627c2303ae9a971b04d87c70c3752be335f845cda050535", "firstIndex": 155759672799},
+{"blockNumber": 77471080, "blockId": "0x2a5669c5f2e6bfd29bb019f01841ed70b45f050bd8dbcd6d0fbe8125dd3b5881", "firstIndex": 155826781154},
+{"blockNumber": 77512962, "blockId": "0xcd81aacbee3b387e61a80954041e6f7deb02965ee162e0c8e966b09b81f29bc2", "firstIndex": 155893890400},
+{"blockNumber": 77552382, "blockId": "0x2e1fdef7d0ac1b3afe158221c4338a2d6df2071dde617fee018784efc74ef756", "firstIndex": 155960999446},
+{"blockNumber": 77619880, "blockId": "0xf68007ae554813615107cd98e0beeff1001a05a809cc0bb04044f173cf89f76e", "firstIndex": 156028108671},
+{"blockNumber": 77670535, "blockId": "0x661c7252be4e9996370afb1eff9adb7368c1ae0014ec82b3cecf49b256c77ad7", "firstIndex": 156095216746},
+{"blockNumber": 77713158, "blockId": "0xbfa1f91b9714481d3025a37003a705032e84c54863282a5d997c330b1727cca2", "firstIndex": 156162325761},
+{"blockNumber": 77754180, "blockId": "0x2b4a99a2347c5dfa0ce88ee2053c5b0d48b1bf01502d20cefce8a2e62c439631", "firstIndex": 156229433672},
+{"blockNumber": 77820169, "blockId": "0xa3899391bfbd4c37e31a31558194f1728c362813e4c04980d659b58c5625abc7", "firstIndex": 156296543739},
+{"blockNumber": 77865387, "blockId": "0x253711f691f03d16de9db6ed08e00d5d42fa02d69f63596e0e53e6d23543f0a4", "firstIndex": 156363652302},
+{"blockNumber": 77903703, "blockId": "0xfb7868ce2e8213a482bf35b13555a908f7ce4b5147ab869bfd193d36a17a1402", "firstIndex": 156430760392},
+{"blockNumber": 77935249, "blockId": "0xdc02af2109e7474d7e82cdd969bd47535f67cfd6582689d6459b063dcd86eecd", "firstIndex": 156497870100},
+{"blockNumber": 77978777, "blockId": "0x67d23cb795e6a3d90649c36d4806de30324ae934305ef5f9cc04ef6471652c21", "firstIndex": 156564978310},
+{"blockNumber": 78024234, "blockId": "0x8910ac35b37c3f6908abea79b2a284c0e8592faf1fd8804a60bbf29349b05b94", "firstIndex": 156632088010},
+{"blockNumber": 78061869, "blockId": "0xa41f8515d45415b2d38b460753c6775d1ecf9b2e8787d5c774d4733ef175d6ef", "firstIndex": 156699197083},
+{"blockNumber": 78093874, "blockId": "0x79a1f60dbd6aa2b79766db636610e67dada9ffb5d6b47f5d9f4fcd01da82d875", "firstIndex": 156766305437},
+{"blockNumber": 78128366, "blockId": "0x26649a44e1f7e52b6a2e0f435ee486920041f93451120bcbec4a9d4ccd4bfb9c", "firstIndex": 156833414685},
+{"blockNumber": 78187887, "blockId": "0x10ac9f704f518ee1c465432a0321f311a0f89a9d356d822a403e130f95df767d", "firstIndex": 156900523163},
+{"blockNumber": 78233146, "blockId": "0x03f5b4581a658f8b66e3d432f2d859c5cdf83dd7597ff3fcda11e78ed3fa455f", "firstIndex": 156967632635},
+{"blockNumber": 78272903, "blockId": "0x4b674a44783a3c5fac620a3c9b9938d45b05a6eaeb586434b258f9a26fe05f82", "firstIndex": 157034740860},
+{"blockNumber": 78307496, "blockId": "0x2425e778775164bc21cf3ee5dbb30968cf7ba25466956f6bb0f1ddb34a7c4c41", "firstIndex": 157101848302},
+{"blockNumber": 78355912, "blockId": "0x495656300e5e66457de11a78d0f70c560c57c7c4d1399be3d0e02169047cb1e9", "firstIndex": 157168958886},
+{"blockNumber": 78417085, "blockId": "0x3d574aeb021887e3150f6ea6f090652f5f499193a41f8efe5d01632a85fc5ac1", "firstIndex": 157236067852},
+{"blockNumber": 78464502, "blockId": "0x0987d8c9c897c07bd7f04634706bce02cd3171747bac064bb7aa2e07a7a07757", "firstIndex": 157303175141},
+{"blockNumber": 78503376, "blockId": "0x84aaa24f8c544bf944dfa420c284e1247cf511763853934af3cbfaf1a84a7faa", "firstIndex": 157370285186},
+{"blockNumber": 78543650, "blockId": "0xb1dfee649476b90ac8102333d774071f7c7a6db6911a91909c471ea7cf2dfb68", "firstIndex": 157437394103},
+{"blockNumber": 78599391, "blockId": "0x786d7fda77597404589aa4eca304d07e506327e57b5450e7a5f0ac9707565c5e", "firstIndex": 157504502336},
+{"blockNumber": 78645987, "blockId": "0x206d6899cddf1aac0a85283edbef2a1b5a9fd4f41c491511cbd579270df52132", "firstIndex": 157571611982},
+{"blockNumber": 78689670, "blockId": "0x43f4146faa170fd46f5b9db22dbcd1f7cc1e2732bd07edd9e71831cbaf4cf6b0", "firstIndex": 157638721139},
+{"blockNumber": 78733199, "blockId": "0x23a810c83a311ccabee2847f0d284aaa6356fc939b5916f6557a8629b75d2784", "firstIndex": 157705828779},
+{"blockNumber": 78790312, "blockId": "0x74bd49c9606fa1a8890b191087e9cd42c177304fedccab44c1133d6ee9032fd7", "firstIndex": 157772938521},
+{"blockNumber": 78831067, "blockId": "0x56cfa55cd9391009edf4b4975482b206b91a66c9b86d4db7053bc3af5685959d", "firstIndex": 157840046594},
+{"blockNumber": 78871446, "blockId": "0xba0b11fef3efdf3d8f826723018ce29fc9c775c11df58e4158bb677a4a29aba7", "firstIndex": 157907156884},
+{"blockNumber": 78914526, "blockId": "0xa3fb760abb743d58efdc00ef032271e379b2f46a674d41ba33f5d96ecc94553c", "firstIndex": 157974265388},
+{"blockNumber": 78986084, "blockId": "0x972e7b62a8c0f690ebfc3997cf3f54fe1e7f32c020091184100b0e58f758a2b0", "firstIndex": 158041372988},
+{"blockNumber": 79032124, "blockId": "0x768eb37fce1adeea437d4e11ecad75f5382e2782219ae87afab3296f0082cea0", "firstIndex": 158108483177},
+{"blockNumber": 79076791, "blockId": "0xf01f0c6cf99b548a4edb163493a47b1e5d929c79607ea4069fda4b3040f7c2fa", "firstIndex": 158175590436},
+{"blockNumber": 79127150, "blockId": "0xe6132f5017e475d19adc495aa834c77e98af7d447968f19dca558f6d6f941c72", "firstIndex": 158242700939},
+{"blockNumber": 79189215, "blockId": "0x9daf7730cd42a1ee21569cdbf0c18ff24899f2733f0f4690c4c2de79cd6aab40", "firstIndex": 158309809524},
+{"blockNumber": 79238648, "blockId": "0xe21f652fe365989b2e7518b7181fe68ef07085e1bc7c5bb42a53807159989052", "firstIndex": 158376917958},
+{"blockNumber": 79277374, "blockId": "0x610ff8bf318fb524165258703f9f370f8f3274979650228f23bdcff9b02fb39c", "firstIndex": 158444026639},
+{"blockNumber": 79330119, "blockId": "0x6f6a409e236e93b9f846edc7abad84f9ebc2cc6230e7f37389d3dce425b44dca", "firstIndex": 158511135999},
+{"blockNumber": 79381710, "blockId": "0xbb0b26de83f8355ec0e1411be1c40749a38b1a24ef0a749557aad9587cddfcb4", "firstIndex": 158578245264},
+{"blockNumber": 79425784, "blockId": "0x621c72230fd7971ce6114e4b028f6e8094af7c33f92604096e269aa3998bdf05", "firstIndex": 158645354104},
+{"blockNumber": 79463792, "blockId": "0xb59ea3105d958a353f267437522b22c0ac15fc8f67462ab1615c3bac503015b2", "firstIndex": 158712461972},
+{"blockNumber": 79503829, "blockId": "0x28f087edb2951573e09d74cf730ad2eb0eeaba58f87d2b6d4d9822cac9b47498", "firstIndex": 158779571867},
+{"blockNumber": 79544886, "blockId": "0x591677459a66843935a2c5bb9a18f58075d743bedfe77653a8a6c88acd4044a0", "firstIndex": 158846679540},
+{"blockNumber": 79584603, "blockId": "0x4fbca494ca298b520f713c67e11b6f116b2ca8520a35ed711596c5530f5f90af", "firstIndex": 158913789153},
+{"blockNumber": 79625545, "blockId": "0x2801a3c9f8267df94fd00cfc8cad592f2ddde4725ef4277c4766b537fcedce64", "firstIndex": 158980898462},
+{"blockNumber": 79668273, "blockId": "0xc80227c925059dc5168975ba206e71e7588cb187f32f1a96b10788f21c81ea2a", "firstIndex": 159048007328},
+{"blockNumber": 79733224, "blockId": "0x128b6497602c4c8ca7060d3e538cfecf6b441a22cbc9c2ec2c232df2008b5730", "firstIndex": 159115098651},
+{"blockNumber": 79787630, "blockId": "0xe6be1072555ac4f23e1b07250794f43c29802b2f25b1d483dbdaf99f7bfdfbbc", "firstIndex": 159182224722},
+{"blockNumber": 79840236, "blockId": "0x5cf7ba166582749f273b220d6e117da3c2446f2dbb89a41ef94add391b6d2c87", "firstIndex": 159249334183},
+{"blockNumber": 79898799, "blockId": "0xd7805e6e198cdbc590a79defd6d9acd1b3a5b0ff4e15631d5c7e5eec1f0dab1c", "firstIndex": 159316443062},
+{"blockNumber": 79968096, "blockId": "0xae2fd97d64fe4027a496ac2956125505ac3a7bd1229b5c3142f24fbf7535edd4", "firstIndex": 159383549649},
+{"blockNumber": 80022371, "blockId": "0xd26819b3f7818688f278ab77f7820d19185779335974150f0780b334c6f5196c", "firstIndex": 159450659626},
+{"blockNumber": 80079672, "blockId": "0x2f596123834d0574bba0f1d41a6031d2615354f1af17ac9ccb6114b8ccddb42c", "firstIndex": 159517769570},
+{"blockNumber": 80146303, "blockId": "0x6215e6fc4174d6ea83da66e3dd7069920a71e352dee1cd76a1fae6e6333552d5", "firstIndex": 159584877842},
+{"blockNumber": 80195911, "blockId": "0x67f9eaa39c916a11b9b65dbc744fe603f13912d7c1da7d1e98fa5342980cb3c2", "firstIndex": 159651986893},
+{"blockNumber": 80239935, "blockId": "0xa9fd38e5f2eb298a925706979137c7136e3b6a6528efdfc6b1e92433bb6c252c", "firstIndex": 159719095732},
+{"blockNumber": 80307356, "blockId": "0x5069ebda0e0230e8506dbfb4267783e80518147b9a9fcee5e596222bb68b0911", "firstIndex": 159786204178},
+{"blockNumber": 80357303, "blockId": "0x8756f8b0d2608bca2a584d2d4cd73b5cf51e818f49887278de85b7038de7b4e9", "firstIndex": 159853311288},
+{"blockNumber": 80398102, "blockId": "0x58f7154433c050e972e35c8588bdf9831b7f0503558813998a8a57c36dd3c0ff", "firstIndex": 159920406204},
+{"blockNumber": 80435932, "blockId": "0x2757b1d7e541fdc368a84129431a7f5d82a95ca221b9b89720e34be732ee52f1", "firstIndex": 159987530479},
+{"blockNumber": 80503792, "blockId": "0x9c5b04afea4f04b5e2f952a4e2121b9dbfd00612da1f7941b624a03b0da389cb", "firstIndex": 160054639681},
+{"blockNumber": 80551163, "blockId": "0x9d937d1c50fafb33c63cb0e2b0d55e83145c25c189184cc76e9ec960bfb5a567", "firstIndex": 160121748907},
+{"blockNumber": 80585665, "blockId": "0xb1d711a07771e381b8b2a498d86b591ddd0b30fe3bc2f1d7990f8d14e08ba81b", "firstIndex": 160188856251},
+{"blockNumber": 80619712, "blockId": "0xed2f52259e6fe3317a8a6f509bf350e07b8f207293580ffcbb96f7928d2221ec", "firstIndex": 160255967068},
+{"blockNumber": 80680664, "blockId": "0x5535df893f496a0fff5ef4aefb7a59c0dd199ea9433a19717d9dd9a8b6554ef7", "firstIndex": 160323075539},
+{"blockNumber": 80731126, "blockId": "0xba59459db41086e2822043f97dc8387be47463f446470ad9bf4046dae5d9f41e", "firstIndex": 160390184883},
+{"blockNumber": 80774973, "blockId": "0xd248bc072f1febf8861deb78fdcfd75173cbd03eb4a5ac947a17d80ae45b5a01", "firstIndex": 160457293541},
+{"blockNumber": 80816169, "blockId": "0xacb6cb22cb89dc495b71866990030f01a6d08af7870819efa1a9fa9ddd377c81", "firstIndex": 160524401701},
+{"blockNumber": 80880937, "blockId": "0xe1e1e0d42f4e9283bbddc5a205572cce04b52f81b6b060481f1275c952f626fb", "firstIndex": 160591510338},
+{"blockNumber": 80931220, "blockId": "0x987a226192cf201a9ad40c7f53985c4b4d3f9708c1395cceaeb0a7f159218527", "firstIndex": 160658619406},
+{"blockNumber": 80978152, "blockId": "0x6a456d0836ef06b06c501015ce8b2fdc6a57872e62a713c6c456913f1d45a1ec", "firstIndex": 160725729201},
+{"blockNumber": 81019216, "blockId": "0x983ea47383a2561bd8749eaf5190015dc8cf973d313e7f22a18c24472d351109", "firstIndex": 160792838116},
+{"blockNumber": 81088966, "blockId": "0xdf0842d3fab6bde54d03630609d0770a15618d555e5e8631d79ff25a7befb5fb", "firstIndex": 160859945799},
+{"blockNumber": 81140433, "blockId": "0x6875624b7b6e318440ceb4de143c581d7c4bcf5a809dafd2b5274ab24b6c6d81", "firstIndex": 160927055325},
+{"blockNumber": 81189128, "blockId": "0x6962666de1a3aff03d5522c7b569d1030ee14fb2fdc209bc528ad4205442399a", "firstIndex": 160994161583},
+{"blockNumber": 81251139, "blockId": "0x1d9fe36b855842a6499fb6f1e4596d3d6085a3b1555da81912bbe235aed5f501", "firstIndex": 161061273508},
+{"blockNumber": 81307825, "blockId": "0x883c2bcce822e6945ac866c1b7355044d6441c4c4cdea4880ba9a09382f358d6", "firstIndex": 161128380897},
+{"blockNumber": 81357614, "blockId": "0x61bfbb257789eb3d0e7802f56d67a09b91fd38a482d08371e29152a5b940f697", "firstIndex": 161195490859},
+{"blockNumber": 81404920, "blockId": "0xf0b8b3bb3676bfd3c70d4e539ee1d8a5f034c9a17612a934c96f7e3b24c14c03", "firstIndex": 161262599694},
+{"blockNumber": 81478630, "blockId": "0xceac42a005c21a8fb4b19cb74c655ca099e0143b5a941f5e7dccc37ea5a19fbd", "firstIndex": 161329708007},
+{"blockNumber": 81534057, "blockId": "0x17866a81027d325f9c582499a8e941be084ab858e9e3781660d17d84427380eb", "firstIndex": 161396817715},
+{"blockNumber": 81576242, "blockId": "0x9f5a307186d0047d00db987279ea484e6c1098cffa83677b5ea0e424dc50163d", "firstIndex": 161463925206},
+{"blockNumber": 81643455, "blockId": "0x479b21a337884f0afcddbc7b199a712e06cf09b6189c7794731602276e5b5c5d", "firstIndex": 161531035291},
+{"blockNumber": 81712138, "blockId": "0x123cb262c9c3cc41cb16c7fa95fd92722b751d83e7a3570d655a66d5f2a85ded", "firstIndex": 161598143534},
+{"blockNumber": 81768503, "blockId": "0xf2d5d89859abaadb34cdbfb042de2fdd05a7177417ae9be6e76c68c3c32e4aa2", "firstIndex": 161665251565},
+{"blockNumber": 81849796, "blockId": "0x2ea826ba64f6329fd57f5bd6f9936a97e04506d0a7f60a878f1adc945cba3688", "firstIndex": 161732361610},
+{"blockNumber": 81914259, "blockId": "0x51ea4689433fb616399a776400704386cee3bc54abce5a45d24eb62985978595", "firstIndex": 161799470977},
+{"blockNumber": 81969089, "blockId": "0x278e464038367c864df0053ff5d8a9b54546ff6d3ff8604af89194c7c218c226", "firstIndex": 161866579622},
+{"blockNumber": 82049283, "blockId": "0xd52703fc3c820dd2fc3496d6b97b017036ec160def3f8d2358090d0f153a0f00", "firstIndex": 161933688435},
+{"blockNumber": 82112351, "blockId": "0xf26393a5583240d5f588d828bf7e989d08e5a7cfd4668f78908e1bab6bc5782f", "firstIndex": 162000797610},
+{"blockNumber": 82165304, "blockId": "0x84344112f22b3ecb827bd346f8a6bbcd3ef36018eb9920d1668aa5785e6fd36b", "firstIndex": 162067905736},
+{"blockNumber": 82241979, "blockId": "0xdd03ab87b30ac811035b7159a4b82819fb5d06fa85a6a914cca7346b705b7262", "firstIndex": 162135014548},
+{"blockNumber": 82299387, "blockId": "0x6be99a70541daa0873ff7f04149806def24d5c862e4b072643728f4fcd5661eb", "firstIndex": 162202124223},
+{"blockNumber": 82352299, "blockId": "0xa301f4ff57c4521c5c4a10704f1286a5fc33c8e1670370d099556f3c82499204", "firstIndex": 162269232705},
+{"blockNumber": 82427023, "blockId": "0x785d17a1f938b1fc7d98fa2d66a66713eca04e0e3b67b2e8d8cf9b466e1c8450", "firstIndex": 162336341121},
+{"blockNumber": 82486687, "blockId": "0xe190571ebe605168fa6a7ac5f1dd43b98d751b33ca47693b16fcf2d93cfad238", "firstIndex": 162403450805},
+{"blockNumber": 82539252, "blockId": "0x4bb5b77eee1c386afbabd15d09edfce6a427d19a549a0626ea4501ac98725fde", "firstIndex": 162470559495},
+{"blockNumber": 82614345, "blockId": "0x4b349a86de03cbafe6b37260232d9f1187967cf0c7a89889032dfc70b35de1a7", "firstIndex": 162537668398},
+{"blockNumber": 82674851, "blockId": "0xa8c43d6a3650ea49d5e829c5657bf1557eeb9c0c9c153f2fcc959f9d9e7973d6", "firstIndex": 162604777265},
+{"blockNumber": 82728323, "blockId": "0x6deb0a6d8140ee794f81494f0c767dd73540e32e363d412df740375aca59a1bb", "firstIndex": 162671886296},
+{"blockNumber": 82801158, "blockId": "0x3b62a0e2e5457d00ecdc950cda1fb8432085a670c1a4bb81f7c72eedcd5c31a6", "firstIndex": 162738994490},
+{"blockNumber": 82852607, "blockId": "0x52593a1e358c310d811c21703201c8384a7c77505610250beef8f11e36914a2f", "firstIndex": 162806103739},
+{"blockNumber": 82901918, "blockId": "0x57ef288ba2f3707e7ec845b11ed6e7df02b2ad021fbe123f3ee7c404410e85d7", "firstIndex": 162873212755},
+{"blockNumber": 82952905, "blockId": "0xc61a7849fbfcc2ad775ded1cea5a76cb7fef20d844ae6ba003409edef3f44a66", "firstIndex": 162940320794},
+{"blockNumber": 83021585, "blockId": "0xbc068441fb4d38449a5522f56f7ddbef1df078a115999b117dfb72cd33e4b675", "firstIndex": 163007430479},
+{"blockNumber": 83070015, "blockId": "0xc8616746d6b715b93519a079828ae69993bc3e584711b373b66f179f39935bc5", "firstIndex": 163074538175},
+{"blockNumber": 83113456, "blockId": "0xe63cf066aa372069c967035e1623593f61e134003a8aaa2e2b32796db7f08425", "firstIndex": 163141647032},
+{"blockNumber": 83184559, "blockId": "0xfe6524b0e47f276345e07b9c36ea7be9c4d0809d70cfb4e4616c82cbd1fec4bc", "firstIndex": 163208756720},
+{"blockNumber": 83238801, "blockId": "0x008f1a874771faea5bb62847e3e04ff285e73f9ef53419785df5abaf7124fa2d", "firstIndex": 163275865831},
+{"blockNumber": 83286601, "blockId": "0x90df4ec875cb0512d33249f56fb44ec311824d1ed43e29dd1f7b75ea80e42bf0", "firstIndex": 163342974838},
+{"blockNumber": 83333791, "blockId": "0x3a5c7d28227601d2db944f47ab4a14406d60076359d0f1221e2f9d5f725576f0", "firstIndex": 163410083777},
+{"blockNumber": 83399897, "blockId": "0x61e4cfab8c4c0604eef9d4b1d474a55a5e71c062d372c3bbb8644db800518ff0", "firstIndex": 163477191836},
+{"blockNumber": 83450385, "blockId": "0x0b27aebd55292a80922dbe26e64f1af03ca05ca41e0c83ab3c202aba480ae877", "firstIndex": 163544300323},
+{"blockNumber": 83496551, "blockId": "0x5027ee0be63e4d7aecebdabe690135f91b89ed8a3b50124ab4a0894bd10cb987", "firstIndex": 163611410259},
+{"blockNumber": 83559400, "blockId": "0x0889a1fbc83a9189cf0581f5a707a97626d3014d63cb4bb6c40a2c6a89f490c4", "firstIndex": 163678519282},
+{"blockNumber": 83615318, "blockId": "0x7e56f4fdf4f19de5c980abc5b9adc18d17428cd07ac25e3953b49b5308e04b12", "firstIndex": 163745627434},
+{"blockNumber": 83655849, "blockId": "0xe0cd4212413793f6122e42cc6d3e4d73274d5ba7a78e9e981d02037db04bb955", "firstIndex": 163812737000},
+{"blockNumber": 83697529, "blockId": "0x563020715a26f2497f5245ba68c275ac3ca8752860d2e7ee9374b6ee67df1d95", "firstIndex": 163879845058},
+{"blockNumber": 83766435, "blockId": "0xcfcdca6e5f09051f4df7f820d7a78e0ee2f9f888e0db358af186117083948195", "firstIndex": 163946954422},
+{"blockNumber": 83812321, "blockId": "0x4544262e7ea612df925b19fb3d70646d950b3d0d1bbc125b953fc686a2bbdb95", "firstIndex": 164014062130},
+{"blockNumber": 83855225, "blockId": "0x174e72a923681bad93aaecb9f29bdb1ebffffa9b8b626a69fa51fec485b7d7a9", "firstIndex": 164081172277},
+{"blockNumber": 83898211, "blockId": "0x78162c06bbd94cbc84ae9cc5ac5aceec0a1350af66a35ab4ca6705bb2686906f", "firstIndex": 164148275658},
+{"blockNumber": 83946549, "blockId": "0xcb0306bcea86b750655075c535a8ccbfe5554d439166929a0569339464cef3b5", "firstIndex": 164215389717},
+{"blockNumber": 84000014, "blockId": "0x2ddebf9b00edab443a1e5e3c183ed1ab6486ee4e87cedda4b1c5185eeff0e751", "firstIndex": 164282498251},
+{"blockNumber": 84047121, "blockId": "0xc9cf0cffc4cd92a650fdab0ea3561aedb171f126ff6d7843393bd2474134cae6", "firstIndex": 164349607271},
+{"blockNumber": 84094325, "blockId": "0x59718d7203a9fd0d7639e8a6352c758eceb8ee8a647d88042af6923c4abfd494", "firstIndex": 164416713147},
+{"blockNumber": 84163118, "blockId": "0xf03b16c8213d23b5ed720847d2c822f0a2ebde41698d52434c365e9446e1ac5a", "firstIndex": 164483825350},
+{"blockNumber": 84207123, "blockId": "0xbc9ae0acffcd5996266f63cbb7f43f16214b7cb7d59672cfc8c12ae95b33283e", "firstIndex": 164550933675},
+{"blockNumber": 84254000, "blockId": "0x91700cd18ab53af09dc46986d1bb7fb676a1580d21ac5fae2dd1a8cee5f26b46", "firstIndex": 164618042658},
+{"blockNumber": 84304662, "blockId": "0x12812a5f54e2dee48911af89b6df9a8b7e7c933c7ada9cd4f421cc21edd6316e", "firstIndex": 164685151765},
+{"blockNumber": 84367212, "blockId": "0x919210eebdbee9a0004c5180d8baf21d90950489badfee47bfc1ec3b0a4cdd53", "firstIndex": 164752260772},
+{"blockNumber": 84417984, "blockId": "0x03fd8eb1b14eaee7c3baea633e14c54a8426c3c44a806ca21f34a5e1e2b2dc63", "firstIndex": 164819369865},
+{"blockNumber": 84463923, "blockId": "0x32b7e996dda11560708ee835bd9a867b9692855281ecf27bcfe869219feb026a", "firstIndex": 164886477000},
+{"blockNumber": 84537964, "blockId": "0x52bb5e361728ceedef3038a72809d97e8226561bb5328398fdb32fa094397822", "firstIndex": 164953587540},
+{"blockNumber": 84590231, "blockId": "0xc2339500da454eb3aeb66090cc5265a1f2279241e30af704172cc949c64563fc", "firstIndex": 165020696003},
+{"blockNumber": 84636277, "blockId": "0x4ff59bae8383d94c3157ed628f728188247fccd2ef3d011f4f2f57c4fb0bed0a", "firstIndex": 165087804080},
+{"blockNumber": 84698921, "blockId": "0xec5d1c58af56be2153cff7bea0e927ad4772dc687c608457e5547ff115fb68ba", "firstIndex": 165154913796},
+{"blockNumber": 84766402, "blockId": "0xfe43cf66d2925551a602299a5a4efa57e378b0c3ad007277a3b083dcf8682e40", "firstIndex": 165222021876},
+{"blockNumber": 84814643, "blockId": "0xfb681faa6b78b9894a03a7a7b27e0ae5d3f96d21581b4426c856505e253a9154", "firstIndex": 165289131858},
+{"blockNumber": 84864868, "blockId": "0x8975b01f94cdd994541696d86b082f1a22216b7d4623206242d81442b806e23d", "firstIndex": 165356240581},
+{"blockNumber": 84945893, "blockId": "0x645796dab80327adc8dac415cb25f11e61ee91b4bdd2ad132764401e3b823fed", "firstIndex": 165423349565},
+{"blockNumber": 85000780, "blockId": "0xc7074e7f02eed45c253497d4d866c142421bb2599610c040607282b3513816b2", "firstIndex": 165490456999},
+{"blockNumber": 85048023, "blockId": "0x48943a8ad44cc5d7d293002909cf4ebc2d27a439c5ebdca90a4f5cf7620f5e50", "firstIndex": 165557565449},
+{"blockNumber": 85132525, "blockId": "0x8e7212664c3aba3d04538508b2d9f93cfb7145533b7ddd074dcaf4aa9d47e7bc", "firstIndex": 165624676095},
+{"blockNumber": 85192629, "blockId": "0x334652ee97c0be52e2c08273b8137a1b06c8e493d271fb55e3735b78510cbd7e", "firstIndex": 165691784953},
+{"blockNumber": 85251053, "blockId": "0xe1090b8707f74507e70e6877afdb9ab00017e10acca0da9244c8c296a73bb9dd", "firstIndex": 165758894012},
+{"blockNumber": 85333314, "blockId": "0x171e1953ba0fcfaa24f3f5c05456c789c014a56f4c3f0f8a16633c3e72f935f9", "firstIndex": 165826001890},
+{"blockNumber": 85391632, "blockId": "0xd36b12637fd30f5f7bd04ef57b6295632a7e5f5b0ec4baf3ba48585cf5053670", "firstIndex": 165893110804},
+{"blockNumber": 85455028, "blockId": "0x97ac0ab268356740beb0eb63efa129de4bee3cd23ac88f75f6f1d25b7927b9a8", "firstIndex": 165960220599},
+{"blockNumber": 85523902, "blockId": "0xe70f9e9eacf4adff0ce3996d537c3e4018087f4bb8ea99aad6942f6df161669f", "firstIndex": 166027329462},
+{"blockNumber": 85572391, "blockId": "0xb1e951b89aa3c942663526d4323aea0443c029d53f8c0f654fe6c6cc70a246e2", "firstIndex": 166094437911},
+{"blockNumber": 85617252, "blockId": "0x15d4afb836901dc5c2ac982f1572be4125372d9e31610dde7f688bae2e371b98", "firstIndex": 166161547154},
+{"blockNumber": 85691799, "blockId": "0xa6d2f70352cf6df24aacc80d6be56139fd8bf126f2c25b43c29031e0c5ae3b26", "firstIndex": 166228654207}
]
\ No newline at end of file
diff --git a/core/genesis.go b/core/genesis.go
index 123f04d4b8..0fbabfeeb7 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -275,6 +275,7 @@ type ChainOverrides struct {
OverrideMendel *uint64
OverrideBPO1 *uint64
OverrideBPO2 *uint64
+ OverridePasteur *uint64
OverrideVerkle *uint64
}
@@ -316,6 +317,9 @@ func (o *ChainOverrides) apply(cfg *params.ChainConfig) error {
if o.OverrideBPO2 != nil {
cfg.BPO2Time = o.OverrideBPO2
}
+ if o.OverridePasteur != nil {
+ cfg.PasteurTime = o.OverridePasteur
+ }
if o.OverrideVerkle != nil {
cfg.VerkleTime = o.OverrideVerkle
}
diff --git a/core/incr_downloader.go b/core/incr_downloader.go
index a55021c074..12e992aeb8 100644
--- a/core/incr_downloader.go
+++ b/core/incr_downloader.go
@@ -1009,6 +1009,24 @@ func (d *IncrDownloader) verifyHash(file *IncrFileInfo) error {
return nil
}
+// sanitizeTarPath validates that a tar entry name is safe to extract under extractDir.
+// It rejects absolute paths, path traversal via ".." components, and any name that
+// would escape extractDir.
+func sanitizeTarPath(extractDir, name string) (string, error) {
+ if !filepath.IsLocal(name) {
+ return "", fmt.Errorf("unsafe tar entry name: %s", name)
+ }
+ target := filepath.Join(extractDir, name)
+ rel, err := filepath.Rel(extractDir, target)
+ if err != nil {
+ return "", fmt.Errorf("failed to compute relative path for %s: %v", name, err)
+ }
+ if strings.HasPrefix(rel, "..") {
+ return "", fmt.Errorf("tar entry %s escapes extract directory", name)
+ }
+ return target, nil
+}
+
// extractFile extracts tar.lz4 file
func (d *IncrDownloader) extractFile(file *IncrFileInfo) error {
// Extract directory
@@ -1040,8 +1058,11 @@ func (d *IncrDownloader) extractFile(file *IncrFileInfo) error {
return fmt.Errorf("failed to read tar header: %v", err)
}
- // Create the full path for the file
- targetPath := filepath.Join(extractDir, header.Name)
+ // Create the full path for the file, rejecting path traversal attempts
+ targetPath, err := sanitizeTarPath(extractDir, header.Name)
+ if err != nil {
+ return fmt.Errorf("invalid tar entry: %v", err)
+ }
// Ensure the target directory exists
if err = os.MkdirAll(filepath.Dir(targetPath), 0755); err != nil {
@@ -1068,10 +1089,9 @@ func (d *IncrDownloader) extractFile(file *IncrFileInfo) error {
}
outFile.Close()
case tar.TypeSymlink:
- // Create symbolic link
- if err = os.Symlink(header.Linkname, targetPath); err != nil {
- return fmt.Errorf("failed to create symlink %s: %v", targetPath, err)
- }
+ return fmt.Errorf("symlinks not allowed in incremental snapshot tar: %s", header.Name)
+ case tar.TypeLink:
+ return fmt.Errorf("hardlinks not allowed in incremental snapshot tar: %s", header.Name)
default:
log.Warn("Unsupported file type in tar", "name", header.Name, "type", header.Typeflag)
}
diff --git a/core/txpool/validation.go b/core/txpool/validation.go
index f906b35f6d..b7a712f0c0 100644
--- a/core/txpool/validation.go
+++ b/core/txpool/validation.go
@@ -104,7 +104,7 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
}
// Ensure the transaction doesn't exceed the current miner max acceptable limit gas
- if opts.MaxGas > 0 && opts.MaxGas < tx.Gas() {
+ if opts.MaxGas > 0 && tx.Gas() > opts.MaxGas {
return fmt.Errorf("%w (cap: %d, tx: %d)", core.ErrGasLimitTooHigh, opts.MaxGas, tx.Gas())
}
diff --git a/core/types/vote.go b/core/types/vote.go
index 8099a1dfcc..e5c7fd8525 100644
--- a/core/types/vote.go
+++ b/core/types/vote.go
@@ -107,7 +107,7 @@ type SlashIndicatorFinalityEvidenceWrapper struct {
}
func NewSlashIndicatorFinalityEvidenceWrapper(vote1, vote2 *VoteEnvelope) *SlashIndicatorFinalityEvidenceWrapper {
- if !bytes.Equal(vote1.VoteAddress[:], vote1.VoteAddress[:]) ||
+ if !bytes.Equal(vote1.VoteAddress[:], vote2.VoteAddress[:]) ||
vote1.Data == nil || vote2.Data == nil {
return nil
}
diff --git a/core/vm/contract.go b/core/vm/contract.go
index dae63fc84c..2f0eed5414 100644
--- a/core/vm/contract.go
+++ b/core/vm/contract.go
@@ -25,7 +25,7 @@ import (
"github.com/holiman/uint256"
)
-const codeBitmapCacheSize = 2000
+const codeBitmapCacheSize = 2048
var (
codeBitmapCache = lru.NewCache[common.Hash, BitVec](codeBitmapCacheSize)
diff --git a/core/vm/eips.go b/core/vm/eips.go
index e53fa8421b..ff4eb037bc 100644
--- a/core/vm/eips.go
+++ b/core/vm/eips.go
@@ -209,7 +209,7 @@ func opTload(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]by
// opTstore implements TSTORE opcode
func opTstore(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) {
- if interpreter.readOnly {
+ if interpreter.evm.readOnly {
return nil, ErrWriteProtection
}
loc := scope.Stack.pop()
diff --git a/core/vm/evm.go b/core/vm/evm.go
index 08a1a36e30..ad0377a2cf 100644
--- a/core/vm/evm.go
+++ b/core/vm/evm.go
@@ -123,6 +123,11 @@ type EVM struct {
// jumpDests stores results of JUMPDEST analysis.
jumpDests JumpDestCache
+ // readOnly is a call-stack property set by STATICCALL and inherited by all
+ // descendants. It must live on EVM (not interpreter) since the EVM may swap
+ // interpreter implementations during execution.
+ readOnly bool
+
// global (to this context) ethereum virtual machine used throughout
// the execution of the tx
interpreter *EVMInterpreter
diff --git a/core/vm/instructions.go b/core/vm/instructions.go
index b8139b6d75..9c94ddf6b2 100644
--- a/core/vm/instructions.go
+++ b/core/vm/instructions.go
@@ -524,7 +524,7 @@ func opSload(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]by
}
func opSstore(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) {
- if interpreter.readOnly {
+ if interpreter.evm.readOnly {
return nil, ErrWriteProtection
}
loc, val := scope.Stack.pop2()
@@ -658,7 +658,7 @@ func opSwap16(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]b
}
func opCreate(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) {
- if interpreter.readOnly {
+ if interpreter.evm.readOnly {
return nil, ErrWriteProtection
}
var (
@@ -701,7 +701,7 @@ func opCreate(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]b
}
func opCreate2(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) {
- if interpreter.readOnly {
+ if interpreter.evm.readOnly {
return nil, ErrWriteProtection
}
var (
@@ -747,7 +747,7 @@ func opCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byt
// Get the arguments from the memory.
args := scope.Memory.GetPtr(inOffset.Uint64(), inSize.Uint64())
- if interpreter.readOnly && !value.IsZero() {
+ if interpreter.evm.readOnly && !value.IsZero() {
return nil, ErrWriteProtection
}
if !value.IsZero() {
@@ -886,7 +886,7 @@ func opStop(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byt
}
func opSelfdestruct(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) {
- if interpreter.readOnly {
+ if interpreter.evm.readOnly {
return nil, ErrWriteProtection
}
beneficiary := scope.Stack.pop()
@@ -905,7 +905,7 @@ func opSelfdestruct(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext
}
func opSelfdestruct6780(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) {
- if interpreter.readOnly {
+ if interpreter.evm.readOnly {
return nil, ErrWriteProtection
}
beneficiary := scope.Stack.pop()
@@ -929,7 +929,7 @@ func opSelfdestruct6780(pc *uint64, interpreter *EVMInterpreter, scope *ScopeCon
// make log instruction function
func makeLog(size int) executionFunc {
return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) {
- if interpreter.readOnly {
+ if interpreter.evm.readOnly {
return nil, ErrWriteProtection
}
topics := make([]common.Hash, size)
diff --git a/core/vm/instructions_test.go b/core/vm/instructions_test.go
index 593cbfe32d..9a2998c168 100644
--- a/core/vm/instructions_test.go
+++ b/core/vm/instructions_test.go
@@ -1778,3 +1778,111 @@ func TestOpSwap2Swap1Dup3SubSwap2Dup3GtPush2(t *testing.T) {
require.Equal(t, pc1, pc2)
require.Equal(t, scope2.Memory.Data(), scope1.Memory.Data())
}
+
+// TestSuperInstructionStackBoundary verifies that every super-instruction in
+// createOptimizedOpcodeTable has the same minStack and maxStack as the tightest
+// intermediate constraint across its raw opcode sequence. A super-instruction
+// skips per-step stack checks, so its bounds must reflect the strictest
+// individual requirement; otherwise execution can diverge from the raw sequence
+// at stack boundaries (underflow or overflow), which is a consensus bug.
+//
+// For each raw op at cumulative stack delta d, the constraint on the initial
+// stack depth s is:
+//
+// minStack[op] - d <= s <= maxStack[op] - d
+//
+// The tightest bounds are the max of all lower constraints and the min of all
+// upper constraints across the sequence.
+func TestSuperInstructionStackBoundary(t *testing.T) {
+ // log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelDebug, true)))
+ baseTbl := newCancunInstructionSet()
+ optTbl := createOptimizedOpcodeTable(copyJumpTable(&baseTbl))
+
+ type seqEntry struct {
+ name string
+ superOp OpCode
+ rawOps []OpCode
+ }
+
+ // Ordered as they appear in createOptimizedOpcodeTable, excluding Nop.
+ cases := []seqEntry{
+ {"AndSwap1PopSwap2Swap1", AndSwap1PopSwap2Swap1, []OpCode{AND, SWAP1, POP, SWAP2, SWAP1}},
+ {"Swap2Swap1PopJump", Swap2Swap1PopJump, []OpCode{SWAP2, SWAP1, POP, JUMP}},
+ {"Swap1PopSwap2Swap1", Swap1PopSwap2Swap1, []OpCode{SWAP1, POP, SWAP2, SWAP1}},
+ {"PopSwap2Swap1Pop", PopSwap2Swap1Pop, []OpCode{POP, SWAP2, SWAP1, POP}},
+ {"Push2Jump", Push2Jump, []OpCode{PUSH2, JUMP}},
+ {"Push2JumpI", Push2JumpI, []OpCode{PUSH2, JUMPI}},
+ {"Push1Push1", Push1Push1, []OpCode{PUSH1, PUSH1}},
+ {"Push1Add", Push1Add, []OpCode{PUSH1, ADD}},
+ {"Push1Shl", Push1Shl, []OpCode{PUSH1, SHL}},
+ {"Push1Dup1", Push1Dup1, []OpCode{PUSH1, DUP1}},
+ {"Swap1Pop", Swap1Pop, []OpCode{SWAP1, POP}},
+ {"PopJump", PopJump, []OpCode{POP, JUMP}},
+ {"Pop2", Pop2, []OpCode{POP, POP}},
+ {"Swap2Swap1", Swap2Swap1, []OpCode{SWAP2, SWAP1}},
+ {"Swap2Pop", Swap2Pop, []OpCode{SWAP2, POP}},
+ {"Dup2LT", Dup2LT, []OpCode{DUP2, LT}},
+ {"JumpIfZero", JumpIfZero, []OpCode{ISZERO, PUSH2, JUMPI}},
+ {"IsZeroPush2", IsZeroPush2, []OpCode{ISZERO, PUSH2}},
+ {"Dup2MStorePush1Add", Dup2MStorePush1Add, []OpCode{DUP2, MSTORE, PUSH1, ADD}},
+ {"Dup1Push4EqPush2", Dup1Push4EqPush2, []OpCode{DUP1, PUSH4, EQ, PUSH2}},
+ {"Push1CalldataloadPush1ShrDup1Push4GtPush2", Push1CalldataloadPush1ShrDup1Push4GtPush2,
+ []OpCode{PUSH1, CALLDATALOAD, PUSH1, SHR, DUP1, PUSH4, GT, PUSH2}},
+ {"Push1Push1Push1SHLSub", Push1Push1Push1SHLSub, []OpCode{PUSH1, PUSH1, PUSH1, SHL, SUB}},
+ {"AndDup2AddSwap1Dup2LT", AndDup2AddSwap1Dup2LT, []OpCode{AND, DUP2, ADD, SWAP1, DUP2, LT}},
+ {"Swap1Push1Dup1NotSwap2AddAndDup2AddSwap1Dup2LT", Swap1Push1Dup1NotSwap2AddAndDup2AddSwap1Dup2LT,
+ []OpCode{SWAP1, PUSH1, DUP1, NOT, SWAP2, ADD, AND, DUP2, ADD, SWAP1, DUP2, LT}},
+ {"Dup3And", Dup3And, []OpCode{DUP3, AND}},
+ {"Swap2Swap1Dup3SubSwap2Dup3GtPush2", Swap2Swap1Dup3SubSwap2Dup3GtPush2,
+ []OpCode{SWAP2, SWAP1, DUP3, SUB, SWAP2, DUP3, GT, PUSH2}},
+ {"Swap1Dup2", Swap1Dup2, []OpCode{SWAP1, DUP2}},
+ {"SHRSHRDup1MulDup1", SHRSHRDup1MulDup1, []OpCode{SHR, SHR, DUP1, MUL, DUP1}},
+ {"Swap3PopPopPop", Swap3PopPopPop, []OpCode{SWAP3, POP, POP, POP}},
+ {"SubSLTIsZeroPush2", SubSLTIsZeroPush2, []OpCode{SUB, SLT, ISZERO, PUSH2}},
+ {"Dup11MulDup3SubMulDup1", Dup11MulDup3SubMulDup1, []OpCode{DUP11, MUL, DUP3, SUB, MUL, DUP1}},
+ }
+
+ for _, tc := range cases {
+ t.Run(tc.name, func(t *testing.T) {
+ // Simulate the raw sequence to find the tightest stack bounds.
+ // delta tracks the cumulative stack depth change from the initial depth.
+ // For each op, translate its per-step constraint to the initial depth:
+ // lower: initial >= baseOp.minStack - delta (take maximum across steps)
+ // upper: initial <= baseOp.maxStack - delta (take minimum across steps)
+ tightestMinStack := 0 // sentinel: smaller than any real constraint
+ tightestMaxStack := int(params.StackLimit) + 1024 // sentinel: larger than any real constraint
+ delta := 0
+ for _, op := range tc.rawOps {
+ baseOp := baseTbl[op]
+ require.NotNilf(t, baseOp, "base op %s not found", op)
+
+ if c := baseOp.minStack - delta; c > tightestMinStack {
+ tightestMinStack = c
+ }
+ if c := baseOp.maxStack - delta; c < tightestMaxStack {
+ tightestMaxStack = c
+ }
+
+ // Advance delta by net stack effect (pushes - pops).
+ // Derive pushes from: maxStack = StackLimit + pops - pushes
+ pops := baseOp.minStack
+ pushes := int(params.StackLimit) + pops - baseOp.maxStack
+ delta += pushes - pops
+ }
+
+ optOp := optTbl[tc.superOp]
+ require.NotNilf(t, optOp, "optimized op %s not found", tc.superOp)
+
+ if optOp.minStack != tightestMinStack {
+ t.Errorf("minStack %d != tightest raw constraint %d; super-instruction is more permissive than raw sequence at stack lower boundary",
+ optOp.minStack, tightestMinStack)
+ }
+ if optOp.maxStack != tightestMaxStack {
+ t.Errorf("maxStack %d != tightest raw constraint %d; super-instruction is more permissive than raw sequence at stack upper boundary",
+ optOp.maxStack, tightestMaxStack)
+ }
+
+ // log.Debug(tc.name, "minStack", tightestMinStack, "maxStack", tightestMaxStack)
+ })
+ }
+}
diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go
index 69d0a2493b..5bef1d166e 100644
--- a/core/vm/interpreter.go
+++ b/core/vm/interpreter.go
@@ -99,7 +99,6 @@ type EVMInterpreter struct {
hasher crypto.KeccakState // Keccak256 hasher instance shared across opcodes
hasherBuf common.Hash // Keccak256 hasher result array shared across opcodes
- readOnly bool // Whether to throw on stateful modifications
returnData []byte // Last CALL's return data for subsequent reuse
}
@@ -176,9 +175,9 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
// Make sure the readOnly is only set if we aren't in readOnly yet.
// This also makes sure that the readOnly flag isn't removed for child calls.
- if readOnly && !in.readOnly {
- in.readOnly = true
- defer func() { in.readOnly = false }()
+ if readOnly && !in.evm.readOnly {
+ in.evm.readOnly = true
+ defer func() { in.evm.readOnly = false }()
}
// Reset the previous call's return data. It's unimportant to preserve the old buffer
diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go
index b7de4b1c7b..f45966a9c8 100644
--- a/core/vm/jump_table.go
+++ b/core/vm/jump_table.go
@@ -1116,8 +1116,8 @@ func createOptimizedOpcodeTable(tbl *JumpTable) *JumpTable {
tbl[AndSwap1PopSwap2Swap1] = &operation{
execute: opAndSwap1PopSwap2Swap1,
constantGas: 4*GasFastestStep + GasQuickStep,
- minStack: minStack(2, 0),
- maxStack: maxStack(2, 0),
+ minStack: minStack(5, 0),
+ maxStack: maxStack(1, 0),
}
tbl[Swap2Swap1PopJump] = &operation{
@@ -1138,21 +1138,21 @@ func createOptimizedOpcodeTable(tbl *JumpTable) *JumpTable {
execute: opPopSwap2Swap1Pop,
constantGas: 2*GasFastestStep + 2*GasQuickStep,
minStack: minStack(4, 4),
- maxStack: maxStack(4, 4),
+ maxStack: maxStack(1, 0),
}
tbl[Push2Jump] = &operation{
execute: opPush2Jump,
constantGas: GasFastestStep + GasMidStep,
minStack: minStack(0, 0),
- maxStack: maxStack(0, 0),
+ maxStack: maxStack(0, 1), // intermediate PUSH2 requires stack_len <= 1023
}
tbl[Push2JumpI] = &operation{
execute: opPush2JumpI,
constantGas: GasFastestStep + GasSlowStep,
minStack: minStack(1, 0),
- maxStack: maxStack(1, 0),
+ maxStack: maxStack(0, 1), // intermediate PUSH2 requires stack_len <= 1023
}
tbl[Push1Push1] = &operation{
@@ -1166,14 +1166,14 @@ func createOptimizedOpcodeTable(tbl *JumpTable) *JumpTable {
execute: opPush1Add,
constantGas: 2 * GasFastestStep,
minStack: minStack(1, 1),
- maxStack: maxStack(1, 1),
+ maxStack: maxStack(0, 1), // intermediate PUSH1 requires stack_len <= 1023
}
tbl[Push1Shl] = &operation{
execute: opPush1Shl,
constantGas: 2 * GasFastestStep,
minStack: minStack(1, 1),
- maxStack: maxStack(1, 1),
+ maxStack: maxStack(0, 1), // intermediate PUSH1 requires stack_len <= 1023
}
tbl[Push1Dup1] = &operation{
@@ -1186,14 +1186,14 @@ func createOptimizedOpcodeTable(tbl *JumpTable) *JumpTable {
tbl[Swap1Pop] = &operation{
execute: opSwap1Pop,
constantGas: GasFastestStep + GasQuickStep,
- minStack: minStack(1, 0),
- maxStack: maxStack(1, 0),
+ minStack: minStack(2, 0),
+ maxStack: maxStack(0, 0),
}
tbl[PopJump] = &operation{
execute: opPopJump,
constantGas: GasQuickStep + GasMidStep,
- minStack: minStack(1, 0),
+ minStack: minStack(2, 0),
maxStack: maxStack(1, 0),
}
@@ -1201,7 +1201,7 @@ func createOptimizedOpcodeTable(tbl *JumpTable) *JumpTable {
execute: opPop2,
constantGas: 2 * GasQuickStep,
minStack: minStack(2, 0),
- maxStack: maxStack(2, 0),
+ maxStack: maxStack(1, 0),
}
tbl[Swap2Swap1] = &operation{
@@ -1215,28 +1215,28 @@ func createOptimizedOpcodeTable(tbl *JumpTable) *JumpTable {
execute: opSwap2Pop,
constantGas: GasFastestStep + GasQuickStep,
minStack: minStack(3, 2),
- maxStack: maxStack(3, 2),
+ maxStack: maxStack(3, 3),
}
tbl[Dup2LT] = &operation{
execute: opDup2LT,
constantGas: 2 * GasFastestStep,
minStack: minStack(2, 2),
- maxStack: maxStack(2, 2),
+ maxStack: maxStack(0, 1), // intermediate DUP2 requires stack_len <= 1023
}
tbl[JumpIfZero] = &operation{
execute: opJumpIfZero,
constantGas: 2*GasFastestStep + GasSlowStep,
minStack: minStack(1, 0),
- maxStack: maxStack(1, 0),
+ maxStack: maxStack(0, 1), // intermediate PUSH2 requires stack_len <= 1023
}
tbl[IsZeroPush2] = &operation{
execute: opIsZeroPush2,
constantGas: GasFastestStep + GasFastestStep,
minStack: minStack(1, 1),
- maxStack: maxStack(1, 1),
+ maxStack: maxStack(1, 2), // intermediate PUSH2 requires stack_len <= 1023
}
tbl[Dup2MStorePush1Add] = &operation{
@@ -1244,7 +1244,7 @@ func createOptimizedOpcodeTable(tbl *JumpTable) *JumpTable {
constantGas: 4 * GasFastestStep,
dynamicGas: gasMStore,
minStack: minStack(2, 1),
- maxStack: maxStack(2, 1),
+ maxStack: maxStack(0, 1), // intermediate DUP2 requires stack_len <= 1023
memorySize: memoryDup2MStorePush1Add,
}
@@ -1252,14 +1252,14 @@ func createOptimizedOpcodeTable(tbl *JumpTable) *JumpTable {
execute: opDup1Push4EqPush2,
constantGas: GasFastestStep + GasFastestStep + GasFastestStep + GasFastestStep,
minStack: minStack(1, 2),
- maxStack: maxStack(1, 2),
+ maxStack: maxStack(0, 2), // intermediate PUSH4 after DUP1 requires stack_len <= 1022
}
tbl[Push1CalldataloadPush1ShrDup1Push4GtPush2] = &operation{
execute: opPush1CalldataloadPush1ShrDup1Push4GtPush2,
constantGas: 8 * GasFastestStep,
minStack: minStack(0, 5),
- maxStack: maxStack(0, 5),
+ maxStack: maxStack(0, 3), // tightest intermediate: PUSH4 at stack S+2 requires S <= 1021
}
tbl[Push1Push1Push1SHLSub] = &operation{
@@ -1272,29 +1272,29 @@ func createOptimizedOpcodeTable(tbl *JumpTable) *JumpTable {
tbl[AndDup2AddSwap1Dup2LT] = &operation{
execute: opAndDup2AddSwap1Dup2LT,
constantGas: 6 * GasFastestStep,
- minStack: minStack(0, 3),
- maxStack: maxStack(0, 3),
+ minStack: minStack(3, 0),
+ maxStack: maxStack(0, 0), // tightest intermediate: DUP2 at stack S-1 requires S <= 1024
}
tbl[Swap1Push1Dup1NotSwap2AddAndDup2AddSwap1Dup2LT] = &operation{
execute: opSwap1Push1Dup1NotSwap2AddAndDup2AddSwap1Dup2LT,
constantGas: 12 * GasFastestStep,
- minStack: minStack(1, 4),
- maxStack: maxStack(1, 4),
+ minStack: minStack(2, 4),
+ maxStack: maxStack(0, 2), // tightest intermediate: DUP1 at stack S+1 requires S <= 1022
}
tbl[Dup3And] = &operation{
execute: opDup3And,
constantGas: 2 * GasFastestStep,
minStack: minStack(3, 0),
- maxStack: maxStack(0, 0),
+ maxStack: maxStack(0, 1), // intermediate DUP3 requires stack_len <= 1023
}
tbl[Swap2Swap1Dup3SubSwap2Dup3GtPush2] = &operation{
execute: opSwap2Swap1Dup3SubSwap2Dup3GtPush2,
constantGas: 8 * GasFastestStep,
minStack: minStack(3, 0),
- maxStack: maxStack(0, 2),
+ maxStack: maxStack(0, 1), // tightest intermediate: DUP3/PUSH2 require S <= 1023
}
tbl[Swap1Dup2] = &operation{
@@ -1308,7 +1308,7 @@ func createOptimizedOpcodeTable(tbl *JumpTable) *JumpTable {
execute: opSHRSHRDup1MulDup1,
constantGas: 4*GasFastestStep + GasFastStep,
minStack: minStack(3, 0),
- maxStack: maxStack(0, 1),
+ maxStack: maxStack(1, 0), // tightest intermediate: DUP1 at stack S-2 requires S <= 1025
}
tbl[Swap3PopPopPop] = &operation{
@@ -1322,7 +1322,7 @@ func createOptimizedOpcodeTable(tbl *JumpTable) *JumpTable {
execute: opSubSLTIsZeroPush2,
constantGas: 4 * GasFastestStep,
minStack: minStack(3, 0),
- maxStack: maxStack(0, 1),
+ maxStack: maxStack(1, 0), // tightest intermediate: PUSH2 at stack S-2 requires S <= 1025
}
tbl[Dup11MulDup3SubMulDup1] = &operation{
diff --git a/core/vm/lightclient/v2/lightclient.go b/core/vm/lightclient/v2/lightclient.go
index acdb95e15c..b531e29111 100644
--- a/core/vm/lightclient/v2/lightclient.go
+++ b/core/vm/lightclient/v2/lightclient.go
@@ -143,6 +143,9 @@ func DecodeConsensusState(input []byte) (ConsensusState, error) {
if inputLen <= minimumLength || (inputLen-minimumLength)%singleValidatorBytesLength != 0 {
return ConsensusState{}, fmt.Errorf("expected input size %d+%d*N, actual input size: %d", minimumLength, singleValidatorBytesLength, inputLen)
}
+ if inputLen > maxConsensusStateLength {
+ return ConsensusState{}, fmt.Errorf("consensus state too large: %d bytes exceeds maximum %d (max 99 validators)", inputLen, maxConsensusStateLength)
+ }
pos := uint64(0)
chainID := string(bytes.Trim(input[pos:pos+chainIDLength], "\x00"))
diff --git a/core/vote/vote_pool.go b/core/vote/vote_pool.go
index ae9f7b556e..462346e388 100644
--- a/core/vote/vote_pool.go
+++ b/core/vote/vote_pool.go
@@ -224,9 +224,10 @@ func (pool *VotePool) putVote(m map[common.Hash]*VoteBox, votesPq *votesPriority
localFutureVotesCounter.Inc(1)
} else {
localCurVotesCounter.Inc(1)
- // Use goroutine to avoid deadlock: CheckFinalityAndNotify -> GetFinalizedHeader -> FetchVotesByBlockHash
- // requires RLock, but we're holding Lock here.
- go pool.engine.CheckFinalityAndNotify(pool.chain, targetHash, pool.chain.NotifyFinalized)
+ // Skip if target block is already finalized and notified
+ if highestNotified := pool.chain.HighestNotifiedFinal(); highestNotified == nil || targetNumber > highestNotified.Number.Uint64()+1 {
+ go pool.engine.CheckFinalityAndNotify(pool.chain, targetHash, pool.chain.NotifyFinalized)
+ }
}
localReceivedVotesGauge.Update(int64(pool.receivedVotes.Cardinality()))
}
diff --git a/crypto/ecies/ecies.go b/crypto/ecies/ecies.go
index 9a892781f4..378d764a19 100644
--- a/crypto/ecies/ecies.go
+++ b/crypto/ecies/ecies.go
@@ -124,6 +124,9 @@ func (prv *PrivateKey) GenerateShared(pub *PublicKey, skLen, macLen int) (sk []b
if prv.PublicKey.Curve != pub.Curve {
return nil, ErrInvalidCurve
}
+ if pub.X == nil || pub.Y == nil || !pub.Curve.IsOnCurve(pub.X, pub.Y) {
+ return nil, ErrInvalidPublicKey
+ }
if skLen+macLen > MaxSharedKeyLength(pub) {
return nil, ErrSharedKeyTooBig
}
diff --git a/crypto/secp256k1/curve.go b/crypto/secp256k1/curve.go
index b82b147e3c..504602f5be 100644
--- a/crypto/secp256k1/curve.go
+++ b/crypto/secp256k1/curve.go
@@ -73,6 +73,10 @@ func (bitCurve *BitCurve) Params() *elliptic.CurveParams {
// IsOnCurve returns true if the given (x,y) lies on the BitCurve.
func (bitCurve *BitCurve) IsOnCurve(x, y *big.Int) bool {
+ if x.Cmp(bitCurve.P) >= 0 || y.Cmp(bitCurve.P) >= 0 {
+ return false
+ }
+
// y² = x³ + b
y2 := new(big.Int).Mul(y, y) //y²
y2.Mod(y2, bitCurve.P) //y²%P
diff --git a/crypto/secp256k1/ext.h b/crypto/secp256k1/ext.h
index 1c485e2603..baafb4404b 100644
--- a/crypto/secp256k1/ext.h
+++ b/crypto/secp256k1/ext.h
@@ -109,8 +109,10 @@ int secp256k1_ext_scalar_mul(const secp256k1_context* ctx, unsigned char *point,
ARG_CHECK(scalar != NULL);
(void)ctx;
- secp256k1_fe_set_b32_limit(&feX, point);
- secp256k1_fe_set_b32_limit(&feY, point+32);
+ if (!secp256k1_fe_set_b32_limit(&feX, point) ||
+ !secp256k1_fe_set_b32_limit(&feY, point+32)) {
+ return 0;
+ }
secp256k1_ge_set_xy(&ge, &feX, &feY);
secp256k1_scalar_set_b32(&s, scalar, &overflow);
if (overflow || secp256k1_scalar_is_zero(&s)) {
diff --git a/crypto/signature_nocgo.go b/crypto/signature_nocgo.go
index dd8afdaece..25ef01b3ed 100644
--- a/crypto/signature_nocgo.go
+++ b/crypto/signature_nocgo.go
@@ -163,6 +163,13 @@ type btCurve struct {
*secp256k1.KoblitzCurve
}
+func (curve btCurve) IsOnCurve(x, y *big.Int) bool {
+ if x.Cmp(secp256k1.Params().P) >= 0 || y.Cmp(secp256k1.Params().P) >= 0 {
+ return false
+ }
+ return curve.KoblitzCurve.IsOnCurve(x, y)
+}
+
// Marshal converts a point given as (x, y) into a byte slice.
func (curve btCurve) Marshal(x, y *big.Int) []byte {
byteLen := (curve.Params().BitSize + 7) / 8
diff --git a/eth/backend.go b/eth/backend.go
index 5679eaedb3..6650d1f238 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -269,6 +269,10 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
chainConfig.BPO2Time = config.OverrideBPO2
overrides.OverrideBPO2 = config.OverrideBPO2
}
+ if config.OverridePasteur != nil {
+ chainConfig.PasteurTime = config.OverridePasteur
+ overrides.OverridePasteur = config.OverridePasteur
+ }
if config.OverrideVerkle != nil {
chainConfig.VerkleTime = config.OverrideVerkle
overrides.OverrideVerkle = config.OverrideVerkle
diff --git a/eth/catalyst/simulated_beacon.go b/eth/catalyst/simulated_beacon.go
index a486120384..ee87301852 100644
--- a/eth/catalyst/simulated_beacon.go
+++ b/eth/catalyst/simulated_beacon.go
@@ -100,7 +100,7 @@ type SimulatedBeacon struct {
func payloadVersion(config *params.ChainConfig, time uint64) engine.PayloadVersion {
switch config.LatestFork(time) {
- case forks.BPO5, forks.BPO4, forks.BPO3, forks.BPO2, forks.BPO1, forks.Mendel, forks.Osaka,
+ case forks.Pasteur, forks.BPO5, forks.BPO4, forks.BPO3, forks.BPO2, forks.BPO1, forks.Mendel, forks.Osaka,
forks.Fermi, forks.Maxwell, forks.Lorentz, forks.Prague, forks.Cancun:
return engine.PayloadV3
case forks.Paris, forks.Shanghai:
diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go
index 06599b80ce..a2f8604dde 100644
--- a/eth/ethconfig/config.go
+++ b/eth/ethconfig/config.go
@@ -42,11 +42,13 @@ import (
// FullNodeGPO contains default gasprice oracle settings for full node.
var FullNodeGPO = gasprice.Config{
- Blocks: 20,
- Percentile: 60,
- MaxPrice: gasprice.DefaultMaxPrice,
- OracleThreshold: 1000,
- IgnorePrice: gasprice.DefaultIgnorePrice,
+ Blocks: 20,
+ Percentile: 60,
+ MaxHeaderHistory: 1024,
+ MaxBlockHistory: 1024,
+ MaxPrice: gasprice.DefaultMaxPrice,
+ OracleThreshold: 1000,
+ IgnorePrice: gasprice.DefaultIgnorePrice,
}
// Defaults contains default settings for use on the BSC main net.
@@ -72,8 +74,8 @@ var Defaults = Config{
RPCGasCap: 50000000,
RPCEVMTimeout: 5 * time.Second,
GPO: FullNodeGPO,
- TxSyncDefaultTimeout: 20 * time.Second,
- TxSyncMaxTimeout: 1 * time.Minute,
+ TxSyncDefaultTimeout: 5 * time.Second,
+ TxSyncMaxTimeout: 10 * time.Second,
RPCTxFeeCap: 1, // 1 ether
BlobExtraReserve: params.DefaultExtraReserveForBlobRequests, // Extra reserve threshold for blob, blob never expires when -1 is set, default 28800
EnableOpcodeOptimizing: false,
@@ -234,6 +236,9 @@ type Config struct {
// OverrideBPO2 (TODO: remove after the fork)
OverrideBPO2 *uint64 `toml:",omitempty"`
+ // OverridePasteur (TODO: remove after the fork)
+ OverridePasteur *uint64 `toml:",omitempty"`
+
// OverrideVerkle (TODO: remove after the fork)
OverrideVerkle *uint64 `toml:",omitempty"`
diff --git a/eth/ethconfig/gen_config.go b/eth/ethconfig/gen_config.go
index 57d0457aa7..613ef4c808 100644
--- a/eth/ethconfig/gen_config.go
+++ b/eth/ethconfig/gen_config.go
@@ -81,6 +81,7 @@ func (c Config) MarshalTOML() (interface{}, error) {
OverrideMendel *uint64 `toml:",omitempty"`
OverrideBPO1 *uint64 `toml:",omitempty"`
OverrideBPO2 *uint64 `toml:",omitempty"`
+ OverridePasteur *uint64 `toml:",omitempty"`
OverrideVerkle *uint64 `toml:",omitempty"`
TxSyncDefaultTimeout time.Duration `toml:",omitempty"`
TxSyncMaxTimeout time.Duration `toml:",omitempty"`
@@ -158,6 +159,7 @@ func (c Config) MarshalTOML() (interface{}, error) {
enc.OverrideMendel = c.OverrideMendel
enc.OverrideBPO1 = c.OverrideBPO1
enc.OverrideBPO2 = c.OverrideBPO2
+ enc.OverridePasteur = c.OverridePasteur
enc.OverrideVerkle = c.OverrideVerkle
enc.TxSyncDefaultTimeout = c.TxSyncDefaultTimeout
enc.TxSyncMaxTimeout = c.TxSyncMaxTimeout
@@ -239,6 +241,7 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
OverrideMendel *uint64 `toml:",omitempty"`
OverrideBPO1 *uint64 `toml:",omitempty"`
OverrideBPO2 *uint64 `toml:",omitempty"`
+ OverridePasteur *uint64 `toml:",omitempty"`
OverrideVerkle *uint64 `toml:",omitempty"`
TxSyncDefaultTimeout *time.Duration `toml:",omitempty"`
TxSyncMaxTimeout *time.Duration `toml:",omitempty"`
@@ -445,6 +448,9 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.OverrideBPO2 != nil {
c.OverrideBPO2 = dec.OverrideBPO2
}
+ if dec.OverridePasteur != nil {
+ c.OverridePasteur = dec.OverridePasteur
+ }
if dec.OverrideVerkle != nil {
c.OverrideVerkle = dec.OverrideVerkle
}
diff --git a/eth/protocols/snap/sync.go b/eth/protocols/snap/sync.go
index ede22c6eff..ec740b9eb0 100644
--- a/eth/protocols/snap/sync.go
+++ b/eth/protocols/snap/sync.go
@@ -1704,9 +1704,13 @@ func (s *Syncer) revertAccountRequest(req *accountRequest) {
}
close(req.stale)
- // Remove the request from the tracked set
+ // Remove the request from the tracked set and restore the peer to the
+ // idle pool so it can be reassigned work (skip if peer already left).
s.lock.Lock()
delete(s.accountReqs, req.id)
+ if _, ok := s.peers[req.peer]; ok {
+ s.accountIdlers[req.peer] = struct{}{}
+ }
s.lock.Unlock()
// If there's a timeout timer still running, abort it and mark the account
@@ -1745,9 +1749,13 @@ func (s *Syncer) revertBytecodeRequest(req *bytecodeRequest) {
}
close(req.stale)
- // Remove the request from the tracked set
+ // Remove the request from the tracked set and restore the peer to the
+ // idle pool so it can be reassigned work (skip if peer already left).
s.lock.Lock()
delete(s.bytecodeReqs, req.id)
+ if _, ok := s.peers[req.peer]; ok {
+ s.bytecodeIdlers[req.peer] = struct{}{}
+ }
s.lock.Unlock()
// If there's a timeout timer still running, abort it and mark the code
@@ -1786,9 +1794,13 @@ func (s *Syncer) revertStorageRequest(req *storageRequest) {
}
close(req.stale)
- // Remove the request from the tracked set
+ // Remove the request from the tracked set and restore the peer to the
+ // idle pool so it can be reassigned work (skip if peer already left).
s.lock.Lock()
delete(s.storageReqs, req.id)
+ if _, ok := s.peers[req.peer]; ok {
+ s.storageIdlers[req.peer] = struct{}{}
+ }
s.lock.Unlock()
// If there's a timeout timer still running, abort it and mark the storage
@@ -1831,9 +1843,13 @@ func (s *Syncer) revertTrienodeHealRequest(req *trienodeHealRequest) {
}
close(req.stale)
- // Remove the request from the tracked set
+ // Remove the request from the tracked set and restore the peer to the
+ // idle pool so it can be reassigned work (skip if peer already left).
s.lock.Lock()
delete(s.trienodeHealReqs, req.id)
+ if _, ok := s.peers[req.peer]; ok {
+ s.trienodeHealIdlers[req.peer] = struct{}{}
+ }
s.lock.Unlock()
// If there's a timeout timer still running, abort it and mark the trie node
@@ -1872,9 +1888,13 @@ func (s *Syncer) revertBytecodeHealRequest(req *bytecodeHealRequest) {
}
close(req.stale)
- // Remove the request from the tracked set
+ // Remove the request from the tracked set and restore the peer to the
+ // idle pool so it can be reassigned work (skip if peer already left).
s.lock.Lock()
delete(s.bytecodeHealReqs, req.id)
+ if _, ok := s.peers[req.peer]; ok {
+ s.bytecodeHealIdlers[req.peer] = struct{}{}
+ }
s.lock.Unlock()
// If there's a timeout timer still running, abort it and mark the code
diff --git a/eth/state_accessor.go b/eth/state_accessor.go
index 3f0f0a03aa..7c49491147 100644
--- a/eth/state_accessor.go
+++ b/eth/state_accessor.go
@@ -290,6 +290,9 @@ func (eth *Ethereum) stateAtTransaction(ctx context.Context, block *types.Block,
}
// Assemble the transaction call message and return if the requested offset
msg, _ := core.TransactionToMessage(tx, signer, block.BaseFee())
+ if !beforeSystemTx {
+ msg.SkipTransactionChecks = true
+ }
// Not yet the searched for transaction, execute on top of the current state
statedb.SetTxContext(tx.Hash(), idx)
diff --git a/eth/tracers/api.go b/eth/tracers/api.go
index 28f3276441..3efcc83667 100644
--- a/eth/tracers/api.go
+++ b/eth/tracers/api.go
@@ -598,6 +598,9 @@ func (api *API) IntermediateRoots(ctx context.Context, hash common.Hash, config
}
msg, _ := core.TransactionToMessage(tx, signer, block.BaseFee())
+ if !beforeSystemTx {
+ msg.SkipTransactionChecks = true
+ }
statedb.SetTxContext(tx.Hash(), i)
if _, err := core.ApplyMessage(evm, msg, new(core.GasPool).AddGas(msg.GasLimit)); err != nil {
log.Warn("Tracing intermediate roots did not complete", "txindex", i, "txhash", tx.Hash(), "err", err)
@@ -800,6 +803,9 @@ txloop:
// Generate the next state snapshot fast without tracing
msg, _ := core.TransactionToMessage(tx, signer, block.BaseFee())
+ if !beforeSystemTx {
+ msg.SkipTransactionChecks = true
+ }
statedb.SetTxContext(tx.Hash(), i)
if _, err := core.ApplyMessage(evm, msg, new(core.GasPool).AddGas(msg.GasLimit)); err != nil {
failed = err
@@ -905,6 +911,9 @@ func (api *API) standardTraceBlockToFile(ctx context.Context, block *types.Block
// Prepare the transaction for un-traced execution
msg, _ := core.TransactionToMessage(tx, signer, block.BaseFee())
+ if !beforeSystemTx {
+ msg.SkipTransactionChecks = true
+ }
if txHash != (common.Hash{}) && tx.Hash() != txHash {
// Process the tx to update state, but don't trace it.
_, err := core.ApplyMessage(evm, msg, new(core.GasPool).AddGas(msg.GasLimit))
@@ -1189,6 +1198,7 @@ func (api *API) traceTx(ctx context.Context, tx *types.Transaction, message *cor
// Run the transaction with tracing enabled.
if isSystemTx {
intrinsicGas, _ = core.IntrinsicGas(message.Data, message.AccessList, message.SetCodeAuthorizations, false, true, true, false)
+ message.SkipTransactionChecks = true
}
// Call Prepare to clear out the statedb access list
@@ -1303,6 +1313,18 @@ func overrideConfig(original *params.ChainConfig, override *params.ChainConfig)
copy.MendelTime = timestamp
canon = false
}
+ if timestamp := override.BPO1Time; timestamp != nil {
+ copy.BPO1Time = timestamp
+ canon = false
+ }
+ if timestamp := override.BPO2Time; timestamp != nil {
+ copy.BPO2Time = timestamp
+ canon = false
+ }
+ if timestamp := override.PasteurTime; timestamp != nil {
+ copy.PasteurTime = timestamp
+ canon = false
+ }
if timestamp := override.VerkleTime; timestamp != nil {
copy.VerkleTime = timestamp
canon = false
diff --git a/ethclient/simulated/rollback_test.go b/ethclient/simulated/rollback_test.go
index a06774fe57..16a8a62c92 100644
--- a/ethclient/simulated/rollback_test.go
+++ b/ethclient/simulated/rollback_test.go
@@ -26,6 +26,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/eth/ethconfig"
"github.com/ethereum/go-ethereum/node"
+ "github.com/ethereum/go-ethereum/params"
)
// TestTransactionRollbackBehavior tests that calling Rollback on the simulated backend doesn't prevent subsequent
@@ -55,6 +56,12 @@ func TestTransactionRollbackBehavior(t *testing.T) {
t.Fatalf("all transactions were not rolled back")
}
+ // BEP-657: blob txs only allowed in blocks where N % BlobEligibleBlockInterval == 0.
+ // Advance block number so the next commit lands on a blob-eligible block.
+ for i := uint64(1); i < params.BlobEligibleBlockInterval; i++ {
+ sim.Commit()
+ }
+
btx2 := testSendSignedTx(t, testKey, sim, true, 0)
tx2 := testSendSignedTx(t, testKey2, sim, false, 0)
tx3 := testSendSignedTx(t, testKey2, sim, false, 1)
diff --git a/go.mod b/go.mod
index 01dd841976..46fbfe05e2 100644
--- a/go.mod
+++ b/go.mod
@@ -69,7 +69,7 @@ require (
github.com/rs/cors v1.8.2
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/status-im/keycard-go v0.2.0
- github.com/stretchr/testify v1.10.0
+ github.com/stretchr/testify v1.11.1
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
github.com/tendermint/go-amino v0.14.1
@@ -84,7 +84,7 @@ require (
golang.org/x/crypto v0.45.0
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
golang.org/x/sync v0.18.0
- golang.org/x/sys v0.38.0
+ golang.org/x/sys v0.40.0
golang.org/x/text v0.31.0
golang.org/x/time v0.9.0
golang.org/x/tools v0.38.0
@@ -150,7 +150,7 @@ require (
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
- github.com/go-logr/logr v1.4.2 // indirect
+ github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
@@ -163,7 +163,7 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
- github.com/google/go-cmp v0.6.0 // indirect
+ github.com/google/go-cmp v0.7.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
@@ -270,7 +270,7 @@ require (
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
- github.com/rogpeppe/go-internal v1.13.1 // indirect
+ github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/schollz/progressbar/v3 v3.3.4 // indirect
@@ -295,14 +295,14 @@ require (
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.etcd.io/bbolt v1.3.9 // indirect
go.opencensus.io v0.24.0 // indirect
- go.opentelemetry.io/auto/sdk v1.1.0 // indirect
+ go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect
- go.opentelemetry.io/otel v1.34.0 // indirect
+ go.opentelemetry.io/otel v1.40.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 // indirect
- go.opentelemetry.io/otel/metric v1.34.0 // indirect
- go.opentelemetry.io/otel/sdk v1.34.0 // indirect
- go.opentelemetry.io/otel/trace v1.34.0 // indirect
+ go.opentelemetry.io/otel/metric v1.40.0 // indirect
+ go.opentelemetry.io/otel/sdk v1.40.0 // indirect
+ go.opentelemetry.io/otel/trace v1.40.0 // indirect
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/dig v1.18.0 // indirect
go.uber.org/fx v1.23.0 // indirect
diff --git a/go.sum b/go.sum
index 75fad8ccf3..bf83181536 100644
--- a/go.sum
+++ b/go.sum
@@ -362,8 +362,8 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG
github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
-github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
-github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
+github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
@@ -465,8 +465,8 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
-github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
+github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
@@ -1016,8 +1016,8 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
-github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
-github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
+github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
+github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U=
github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
@@ -1101,8 +1101,8 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
-github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
-github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
+github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe h1:nbdqkIGOGfUAD54q1s2YBcBz/WcsxCO9HUQ4aGV5hUw=
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
@@ -1195,24 +1195,24 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
-go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
-go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
+go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
+go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 h1:CV7UdSGJt/Ao6Gp4CXckLxVRRsRgDHoI8XjbL3PDl8s=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0/go.mod h1:FRmFuRJfag1IZ2dPkHnEoSFVgTVPUd2qf5Vi69hLb8I=
-go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
-go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
+go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms=
+go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 h1:BEj3SPM81McUZHYjRS5pEgNgnmzGJ5tRpU5krWnV8Bs=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0/go.mod h1:9cKLGBDzI/F3NoHLQGm4ZrYdIHsvGt6ej6hUowxY0J4=
-go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
-go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
-go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
-go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
-go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc=
-go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8=
-go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
-go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
+go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g=
+go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc=
+go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8=
+go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE=
+go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw=
+go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg=
+go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw=
+go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA=
go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4=
go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@@ -1481,8 +1481,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
-golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
+golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
+golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 h1:LvzTn0GQhWuvKH/kVRS3R3bVAsdQWI7hvfLHGgh9+lU=
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8/go.mod h1:Pi4ztBfryZoJEkyFTI5/Ocsu2jXyDr6iSdgJiYE/uwE=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
diff --git a/miner/bid_simulator.go b/miner/bid_simulator.go
index 0cf9bf0dc5..c46992ce1c 100644
--- a/miner/bid_simulator.go
+++ b/miner/bid_simulator.go
@@ -93,7 +93,7 @@ type bidSimulator struct {
config *minerconfig.MevConfig
delayLeftOver time.Duration
minGasPrice *big.Int
- txMaxGas uint64
+ txMaxGas uint64 // Maximum gas for per transaction(will be removed after Mendel hardfork)
chain *core.BlockChain
txpool *txpool.TxPool
chainConfig *params.ChainConfig
@@ -532,21 +532,29 @@ func (b *bidSimulator) getBlockInterval(parentHeader *types.Header) uint64 {
// checkIfBidExceedsTxGasLimit checks whether any transaction in the bid exceeds the max txn gas.
func (b *bidSimulator) checkIfBidExceedsTxGasLimit(bid *types.Bid) error {
- if b.txMaxGas < params.MaxTxGas {
- return nil
+ var gasLimitCap uint64
+ currentHeader := b.chain.CurrentBlock()
+ if b.chainConfig.IsOsaka(currentHeader.Number, currentHeader.Time) {
+ gasLimitCap = params.MaxTxGas
+ } else {
+ if b.txMaxGas == 0 {
+ return nil
+ }
+ gasLimitCap = b.txMaxGas
}
- // Scan all txs in the bid to check if any transaction exceeds txGasLimit.
+
+ // Scan all txs in the bid to check if any transaction exceeds the gas limit cap
for _, tx := range bid.Txs {
- if tx.Gas() > b.txMaxGas {
+ if tx.Gas() > gasLimitCap {
log.Debug("discard bid due to per-tx gas limit",
"block", bid.BlockNumber,
"bidHash", bid.Hash().TerminalString(),
"txHash", tx.Hash().TerminalString(),
"txGas", tx.Gas(),
- "txGasLimit", b.txMaxGas,
+ "txGasLimit", gasLimitCap,
)
- return fmt.Errorf("bid rejected: %w (cap: %d, tx: %d)", core.ErrGasLimitTooHigh, b.txMaxGas, tx.Gas())
+ return fmt.Errorf("bid rejected: %w (cap: %d, tx: %d)", core.ErrGasLimitTooHigh, gasLimitCap, tx.Gas())
}
}
return nil
@@ -1052,7 +1060,17 @@ func (r *BidRuntime) commitTransaction(chain *core.BlockChain, chainConfig *para
// Start executing the transaction
r.env.state.SetTxContext(tx.Hash(), r.env.tcount)
+ // if inclusion of the transaction would put the block size over the
+ // maximum we allow, don't add any more txs to the payload.
+ if !env.txFitsSize(tx) {
+ return core.ErrBlockOversized
+ }
+
if tx.Type() == types.BlobTxType {
+ if !eip4844.IsBlobEligibleBlock(chainConfig, r.env.header.Number.Uint64(), r.env.header.Time) {
+ return fmt.Errorf("blob transactions not allowed in block %d (N %% %d != 0)", r.env.header.Number.Uint64(), params.BlobEligibleBlockInterval)
+ }
+
sc = types.NewBlobSidecarFromTx(tx)
if sc == nil {
return errors.New("blob transaction without blobs in miner")
@@ -1084,10 +1102,12 @@ func (r *BidRuntime) commitTransaction(chain *core.BlockChain, chainConfig *para
env.receipts = append(env.receipts, receipt)
env.sidecars = append(env.sidecars, sc)
env.blobs += len(sc.Blobs)
+ env.size += tx.WithoutBlobTxSidecar().Size()
*env.header.BlobGasUsed += receipt.BlobGasUsed
} else {
env.txs = append(env.txs, tx)
env.receipts = append(env.receipts, receipt)
+ env.size += tx.Size()
}
r.env.tcount++
diff --git a/miner/minerconfig/config.go b/miner/minerconfig/config.go
index 4c021d5fd3..5b2df67696 100644
--- a/miner/minerconfig/config.go
+++ b/miner/minerconfig/config.go
@@ -68,7 +68,7 @@ type Config struct {
VoteEnable bool // Whether to vote when mining
MaxWaitProposalInSecs *uint64 `toml:",omitempty"` // The maximum time to wait for the proposal to be done, it's aimed to prevent validator being slashed when restarting
DisableVoteAttestation bool // Whether to skip assembling vote attestation
- TxGasLimit uint64 // Maximum gas for per transaction
+ TxGasLimit uint64 // Maximum gas for per transaction(will be removed after Mendel hardfork)
Mev MevConfig // Mev configuration
}
diff --git a/miner/worker.go b/miner/worker.go
index da9429fa8f..cfe9abb8d6 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -735,6 +735,7 @@ func (w *worker) commitBlobTransaction(env *environment, tx *types.Transaction,
env.sidecars = append(env.sidecars, sc)
env.blobs += len(sc.Blobs)
env.size += txNoBlob.Size()
+ env.tcount++
*env.header.BlobGasUsed += receipt.BlobGasUsed
return receipt.Logs, nil
}
@@ -1065,12 +1066,17 @@ func (w *worker) fillTransactions(interruptCh chan int32, env *environment, stop
pendingPlainTxs := w.eth.TxPool().Pending(filter)
pendingPlainTxsTimer.UpdateSince(plainTxsStart)
- filter.BlobTxs = true
- filter.BlobVersion = types.BlobSidecarVersion0
+ var pendingBlobTxs map[common.Address][]*txpool.LazyTransaction
+ if env.header.Number.Uint64()%params.BlobEligibleBlockInterval == 0 {
+ filter.BlobTxs = true
+ filter.BlobVersion = types.BlobSidecarVersion0
- blobTxsStart := time.Now()
- pendingBlobTxs := w.eth.TxPool().Pending(filter)
- pendingBlobTxsTimer.UpdateSince(blobTxsStart)
+ blobTxsStart := time.Now()
+ pendingBlobTxs = w.eth.TxPool().Pending(filter)
+ pendingBlobTxsTimer.UpdateSince(blobTxsStart)
+ } else {
+ pendingBlobTxs = make(map[common.Address][]*txpool.LazyTransaction)
+ }
if bidTxs != nil {
filterBidTxs := func(commonTxs map[common.Address][]*txpool.LazyTransaction) {
diff --git a/p2p/rlpx/rlpx_oracle_poc_test.go b/p2p/rlpx/rlpx_oracle_poc_test.go
new file mode 100644
index 0000000000..3497f0026e
--- /dev/null
+++ b/p2p/rlpx/rlpx_oracle_poc_test.go
@@ -0,0 +1,57 @@
+package rlpx
+
+import (
+ "bytes"
+ "errors"
+ "testing"
+
+ "github.com/ethereum/go-ethereum/crypto"
+ "github.com/ethereum/go-ethereum/crypto/ecies"
+)
+
+func TestHandshakeECIESInvalidCurveOracle(t *testing.T) {
+ initKey, err := crypto.GenerateKey()
+ if err != nil {
+ t.Fatal(err)
+ }
+ respKey, err := crypto.GenerateKey()
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ init := handshakeState{
+ initiator: true,
+ remote: ecies.ImportECDSAPublic(&respKey.PublicKey),
+ }
+ authMsg, err := init.makeAuthMsg(initKey)
+ if err != nil {
+ t.Fatal(err)
+ }
+ packet, err := init.sealEIP8(authMsg)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ var recv handshakeState
+ if _, err := recv.readMsg(new(authMsgV4), respKey, bytes.NewReader(packet)); err != nil {
+ t.Fatalf("expected valid packet to decrypt: %v", err)
+ }
+
+ tampered := append([]byte(nil), packet...)
+ if len(tampered) < 2+65 {
+ t.Fatalf("unexpected packet length %d", len(tampered))
+ }
+ tampered[2] = 0x04
+ for i := 1; i < 65; i++ {
+ tampered[2+i] = 0x00
+ }
+
+ var recv2 handshakeState
+ _, err = recv2.readMsg(new(authMsgV4), respKey, bytes.NewReader(tampered))
+ if err == nil {
+ t.Fatal("expected decryption failure for invalid curve point")
+ }
+ if !errors.Is(err, ecies.ErrInvalidPublicKey) {
+ t.Fatalf("unexpected error: %v", err)
+ }
+}
diff --git a/params/config.go b/params/config.go
index f5e22d5c20..a7378767d7 100644
--- a/params/config.go
+++ b/params/config.go
@@ -252,6 +252,10 @@ var (
FermiTime: newUint64(1768357800), // 2026-01-14 02:30:00 AM UTC
OsakaTime: nil,
MendelTime: nil,
+ BPO1Time: nil, // will be skipped in BSC
+ BPO2Time: nil, // will be skipped in BSC
+ AmsterdamTime: nil,
+ PasteurTime: nil,
Parlia: &ParliaConfig{},
BlobScheduleConfig: &BlobScheduleConfig{
@@ -300,8 +304,12 @@ var (
LorentzTime: newUint64(1744097580), // 2025-04-08 07:33:00 AM UTC
MaxwellTime: newUint64(1748243100), // 2025-05-26 07:05:00 AM UTC
FermiTime: newUint64(1762741500), // 2025-11-10 02:25:00 AM UTC
- OsakaTime: nil,
- MendelTime: nil,
+ OsakaTime: newUint64(1774319400), // 2026-03-24 02:30:00 AM UTC
+ MendelTime: newUint64(1774319400), // 2026-03-24 02:30:00 AM UTC
+ BPO1Time: nil, // will be skipped in BSC
+ BPO2Time: nil, // will be skipped in BSC
+ AmsterdamTime: nil,
+ PasteurTime: nil,
Parlia: &ParliaConfig{},
BlobScheduleConfig: &BlobScheduleConfig{
@@ -350,10 +358,14 @@ var (
PragueTime: newUint64(0),
LorentzTime: newUint64(0),
MaxwellTime: newUint64(0),
+ FermiTime: newUint64(0),
// TODO: set them to `0` when passed on the mainnet
- FermiTime: nil,
- OsakaTime: nil,
- MendelTime: nil,
+ OsakaTime: nil,
+ MendelTime: nil,
+ BPO1Time: nil, // will be skipped in BSC
+ BPO2Time: nil, // will be skipped in BSC
+ AmsterdamTime: nil,
+ PasteurTime: nil,
Parlia: &ParliaConfig{},
BlobScheduleConfig: &BlobScheduleConfig{
@@ -716,6 +728,7 @@ type ChainConfig struct {
BPO4Time *uint64 `json:"bpo4Time,omitempty"` // BPO4 switch time (nil = no fork, 0 = already on bpo4)
BPO5Time *uint64 `json:"bpo5Time,omitempty"` // BPO5 switch time (nil = no fork, 0 = already on bpo5)
AmsterdamTime *uint64 `json:"amsterdamTime,omitempty"` // Amsterdam switch time (nil = no fork, 0 = already on amsterdam)
+ PasteurTime *uint64 `json:"pasteurTime,omitempty"` // PasteurTime switch time (nil = no fork, 0 = already on pasteurTime)
VerkleTime *uint64 `json:"verkleTime,omitempty"` // Verkle switch time (nil = no fork, 0 = already on verkle)
// TerminalTotalDifficulty is the amount of total difficulty reached by
@@ -902,10 +915,25 @@ func (c *ChainConfig) String() string {
MendelTime = big.NewInt(0).SetUint64(*c.MendelTime)
}
+ var BPO1Time *big.Int
+ if c.BPO1Time != nil {
+ BPO1Time = big.NewInt(0).SetUint64(*c.BPO1Time)
+ }
+
+ var BPO2Time *big.Int
+ if c.BPO2Time != nil {
+ BPO2Time = big.NewInt(0).SetUint64(*c.BPO2Time)
+ }
+
+ var PasteurTime *big.Int
+ if c.PasteurTime != nil {
+ PasteurTime = big.NewInt(0).SetUint64(*c.PasteurTime)
+ }
+
return fmt.Sprintf("{ChainID: %v, Engine: %v, Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v Petersburg: %v Istanbul: %v, Muir Glacier: %v, Ramanujan: %v, Niels: %v, "+
"MirrorSync: %v, Bruno: %v, Berlin: %v, YOLO v3: %v, CatalystBlock: %v, London: %v, ArrowGlacier: %v, MergeFork:%v, Euler: %v, Gibbs: %v, Nano: %v, Moran: %v, Planck: %v,Luban: %v, Plato: %v, Hertz: %v, Hertzfix: %v, "+
"ShanghaiTime: %v, KeplerTime: %v, FeynmanTime: %v, FeynmanFixTime: %v, CancunTime: %v, HaberTime: %v, HaberFixTime: %v, BohrTime: %v, PascalTime: %v, PragueTime: %v, LorentzTime: %v, MaxwellTime: %v, FermiTime: %v, "+
- "OsakaTime: %v, MendelTime: %v}",
+ "OsakaTime: %v, MendelTime: %v, BPO1Time: %v, BPO2Time: %v, PasteurTime: %v}",
c.ChainID,
engine,
c.HomesteadBlock,
@@ -953,6 +981,9 @@ func (c *ChainConfig) String() string {
FermiTime,
OsakaTime,
MendelTime,
+ BPO1Time,
+ BPO2Time,
+ PasteurTime,
)
}
@@ -1443,6 +1474,20 @@ func (c *ChainConfig) IsAmsterdam(num *big.Int, time uint64) bool {
return c.IsLondon(num) && isTimestampForked(c.AmsterdamTime, time)
}
+// IsPasteur returns whether time is either equal to the Pasteur fork time or greater.
+func (c *ChainConfig) IsPasteur(num *big.Int, time uint64) bool {
+ return c.IsLondon(num) && isTimestampForked(c.PasteurTime, time)
+}
+
+// IsOnPasteur eturns whether currentBlockTime is either equal to the Pasteur fork time or greater firstly.
+func (c *ChainConfig) IsOnPasteur(currentBlockNumber *big.Int, lastBlockTime uint64, currentBlockTime uint64) bool {
+ lastBlockNumber := new(big.Int)
+ if currentBlockNumber.Cmp(big.NewInt(1)) >= 0 {
+ lastBlockNumber.Sub(currentBlockNumber, big.NewInt(1))
+ }
+ return !c.IsPasteur(lastBlockNumber, lastBlockTime) && c.IsPasteur(currentBlockNumber, currentBlockTime)
+}
+
// IsVerkle returns whether time is either equal to the Verkle fork time or greater.
func (c *ChainConfig) IsVerkle(num *big.Int, time uint64) bool {
return c.IsLondon(num) && isTimestampForked(c.VerkleTime, time)
@@ -1537,6 +1582,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
{name: "bpo4", timestamp: c.BPO4Time, optional: true},
{name: "bpo5", timestamp: c.BPO5Time, optional: true},
{name: "amsterdam", timestamp: c.AmsterdamTime, optional: true},
+ {name: "pasteurTime", timestamp: c.PasteurTime, optional: true},
} {
if lastFork.name != "" {
switch {
@@ -1779,6 +1825,9 @@ func (c *ChainConfig) checkCompatible(newcfg *ChainConfig, headNumber *big.Int,
if isForkTimestampIncompatible(c.AmsterdamTime, newcfg.AmsterdamTime, headTimestamp) {
return newTimestampCompatError("Amsterdam fork timestamp", c.AmsterdamTime, newcfg.AmsterdamTime)
}
+ if isForkTimestampIncompatible(c.PasteurTime, newcfg.PasteurTime, headTimestamp) {
+ return newTimestampCompatError("Pasteur fork timestamp", c.PasteurTime, newcfg.PasteurTime)
+ }
return nil
}
@@ -1799,6 +1848,8 @@ func (c *ChainConfig) LatestFork(time uint64) forks.Fork {
london := c.LondonBlock
switch {
+ case c.IsPasteur(london, time):
+ return forks.Pasteur
case c.IsAmsterdam(london, time):
return forks.Amsterdam
case c.IsBPO5(london, time):
@@ -1886,6 +1937,10 @@ func (c *ChainConfig) ActiveSystemContracts(time uint64) map[string]common.Addre
// the fork isn't defined or isn't a time-based fork.
func (c *ChainConfig) Timestamp(fork forks.Fork) *uint64 {
switch {
+ case fork == forks.Pasteur:
+ return c.PasteurTime
+ case fork == forks.Amsterdam:
+ return c.AmsterdamTime
case fork == forks.BPO5:
return c.BPO5Time
case fork == forks.BPO4:
@@ -2067,7 +2122,8 @@ type Rules struct {
IsHertzfix bool
IsShanghai, IsKepler, IsFeynman, IsCancun, IsHaber bool
IsBohr, IsPascal, IsPrague, IsLorentz, IsMaxwell bool
- IsFermi, IsOsaka, IsMendel, IsAmsterdam, IsVerkle bool
+ IsFermi, IsOsaka, IsMendel bool
+ IsAmsterdam, IsPasteur, IsVerkle bool
}
// Rules ensures c's ChainID is not nil.
@@ -2114,6 +2170,7 @@ func (c *ChainConfig) Rules(num *big.Int, isMerge bool, timestamp uint64) Rules
IsOsaka: (isMerge || c.IsInBSC()) && c.IsOsaka(num, timestamp),
IsMendel: c.IsMendel(num, timestamp),
IsAmsterdam: (isMerge || c.IsInBSC()) && c.IsAmsterdam(num, timestamp),
+ IsPasteur: c.IsPasteur(num, timestamp),
IsVerkle: c.IsVerkle(num, timestamp),
IsEIP4762: isVerkle,
}
diff --git a/params/forks/forks.go b/params/forks/forks.go
index 742ea809ef..cc35fd5d3a 100644
--- a/params/forks/forks.go
+++ b/params/forks/forks.go
@@ -45,6 +45,7 @@ const (
Fermi
Osaka
Mendel
+ Pasteur // BOP1 will be skipped in BSC, so let Pasteur be the next to Mendel
BPO1
BPO2
BPO3
@@ -93,4 +94,5 @@ var forkToString = map[Fork]string{
BPO4: "BPO4",
BPO5: "BPO5",
Amsterdam: "Amsterdam",
+ Pasteur: "Pasteur",
}
diff --git a/params/protocol_params.go b/params/protocol_params.go
index 24d66b4e68..d41af34e81 100644
--- a/params/protocol_params.go
+++ b/params/protocol_params.go
@@ -190,6 +190,7 @@ const (
BlobTxPointEvaluationPrecompileGas = 50000 // Gas price for the point evaluation precompile.
BlobTxMaxBlobs = 6
BlobBaseCost = 1 << 13 // Base execution gas cost for a blob.
+ BlobEligibleBlockInterval = 5 // BEP-657: Blob transactions are only allowed in blocks where N % 5 == 0
HistoryServeWindow = 8191 // Number of blocks to serve historical block hashes for, EIP-2935.
diff --git a/rlp/iterator.go b/rlp/iterator.go
index 95bd3f2582..05567fa05b 100644
--- a/rlp/iterator.go
+++ b/rlp/iterator.go
@@ -37,15 +37,24 @@ func NewListIterator(data RawValue) (*listIterator, error) {
return it, nil
}
-// Next forwards the iterator one step, returns true if it was not at end yet
+// Next forwards the iterator one step.
+// Returns true if there is a next item or an error occurred on this step (check Err()).
+// On parse error, the iterator is marked finished and subsequent calls return false.
func (it *listIterator) Next() bool {
if len(it.data) == 0 {
return false
}
_, t, c, err := readKind(it.data)
+ if err != nil {
+ it.next = nil
+ it.err = err
+ // Mark iteration as finished to avoid potential infinite loops on subsequent Next calls.
+ it.data = nil
+ return true
+ }
it.next = it.data[:t+c]
it.data = it.data[t+c:]
- it.err = err
+ it.err = nil
return true
}
diff --git a/tests/init.go b/tests/init.go
index 705e929ae9..20d09077aa 100644
--- a/tests/init.go
+++ b/tests/init.go
@@ -723,15 +723,15 @@ var Forks = map[string]*params.ChainConfig{
}
var bpo1BlobConfig = ¶ms.BlobConfig{
- Target: 9,
- Max: 14,
- UpdateFraction: 8832827,
+ Target: 10,
+ Max: 15,
+ UpdateFraction: 8346193,
}
var bpo2BlobConfig = ¶ms.BlobConfig{
Target: 14,
Max: 21,
- UpdateFraction: 13739630,
+ UpdateFraction: 11684671,
}
// AvailableForks returns the set of defined fork names
diff --git a/tests/run-evm-tests.sh b/tests/run-evm-tests.sh
index 0595044307..0da66754b1 100755
--- a/tests/run-evm-tests.sh
+++ b/tests/run-evm-tests.sh
@@ -5,7 +5,7 @@ git apply tests/0001-diff-go-ethereum.patch
git apply tests/0002-diff-go-ethereum.patch
cd tests
rm -rf spec-tests && mkdir spec-tests && cd spec-tests
-wget https://github.com/ethereum/execution-spec-tests/releases/download/v5.1.0/fixtures_develop.tar.gz
+wget https://github.com/ethereum/execution-spec-tests/releases/download/v5.4.0/fixtures_develop.tar.gz
tar xzf fixtures_develop.tar.gz && rm -f fixtures_develop.tar.gz
cd ..
go test -run . -v -short >test.log
diff --git a/version/version.go b/version/version.go
index bf6856e80c..e6bc50c436 100644
--- a/version/version.go
+++ b/version/version.go
@@ -19,6 +19,6 @@ package version
const (
Major = 1 // Major version component of the current release
Minor = 7 // Minor version component of the current release
- Patch = 0 // Patch version component of the current release
+ Patch = 1 // Patch version component of the current release
Meta = "" // Version metadata to append to the version string
)