Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge/foundation release/1.13.4 to 1.13.1 #575

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
90d5bd8
params: begin Geth v1.13.2 release cycle
karalabe Sep 17, 2023
e9f78db
cmd/evm: fix some issues with the evm run command (#28109)
fjl Sep 19, 2023
ef76afa
core/rawdb: fix typo in comment (#28140)
jsvisa Sep 19, 2023
4b748b7
eth: fix typo in comment (#28146)
bnovil Sep 19, 2023
41a0ad9
cmd/devp2p: use bootnodes as crawl input (#28139)
jsvisa Sep 19, 2023
30d5d7c
go.mod: use existing version of karalabe/usb (#28127)
holiman Sep 19, 2023
7ed5bc0
trie: add getter for preimage store in trie.Database (#28155)
gballet Sep 19, 2023
5c6f4b9
cmd/utils: fix typo in comment (#28159)
phenix3443 Sep 19, 2023
5b9cbe3
cmd/clef: suppress fsnotify error if keydir not exists (#28160)
jsvisa Sep 20, 2023
545f4c5
core/rawdb: no need to run truncateFile for readonly mode (#28145)
jsvisa Sep 21, 2023
4773dcb
trie: remove internal nodes between shortNode and child in path mode …
rjl493456442 Sep 22, 2023
03c2176
trie/triedb/pathdb: improve error log (#28177)
rjl493456442 Sep 22, 2023
83f3fc2
core/state/snapshot: be very noisy if the generator hits a trie error…
karalabe Sep 22, 2023
d135baf
cmd/geth: print progress logs when iterating large contracts too (#28…
karalabe Sep 22, 2023
f1b2ec0
core/rawdb: use readonly file lock in readonly mode (#28180)
jsvisa Sep 22, 2023
82ec555
cmd: add state.scheme to the database flag group for local flag handl…
karalabe Sep 22, 2023
323542a
core, params: update Holesky testnet to relaunched spec (#28191)
karalabe Sep 25, 2023
d051ea5
params: update hash for Holesky relaunch (#28192)
karalabe Sep 25, 2023
c2cfe35
core/bloombits: fix deadlock when matcher session hits an error (#28184)
msmania Sep 25, 2023
1fa3362
core/forkid: add forkid test for holesky (#28193)
MariusVanDerWijden Sep 25, 2023
c3742a9
internal/debug: add --log.rotate to the logging category (#28190)
fjl Sep 25, 2023
3d297fc
cmd/geth: ensure db is closed before exit (#28150)
jsvisa Sep 25, 2023
f6f64cc
cmd/utils: fix bootnodes config priority (#28095)
buddh0 Sep 25, 2023
4985d83
ethclient: fix BlockReceipts parameter encoding (#28087)
kandrianov Sep 25, 2023
4de89e9
core/vm: minor code formatting (#28199)
hzysvilla Sep 26, 2023
4021910
eth/downloader: typo in comment (#28196)
phenix3443 Sep 26, 2023
2b7bc2c
eth/fetcher: allow underpriced transactions in after timeout (#28097)
MariusVanDerWijden Sep 26, 2023
adb9b31
internal/ethapi: eth_call block parameter is optional (#28165)
s1na Sep 26, 2023
b85c183
eth/downloader: remove header rollback mechanism (#28147)
rjl493456442 Sep 26, 2023
614804b
core/txpool: fix typos (#28208)
bnovil Sep 27, 2023
a081130
core/txpool: fix typos (#28213)
0xbstn Sep 28, 2023
73f5bcb
core, accounts, eth, trie: handle genesis state missing (#28171)
rjl493456442 Sep 28, 2023
dc34fe8
params: release Geth v1.13.2
karalabe Sep 28, 2023
3dc45a3
params: begin v1.13.3 release cycle
karalabe Sep 28, 2023
37a2d91
params: update 4788 beacon roots contract addr (#28205)
lightclient Sep 28, 2023
46c850a
internal/ethapi: compact db missing key starts with 0xff (#28207)
jsvisa Sep 28, 2023
b9450bf
core, eth: typos and some code formatting (#28201)
phenix3443 Sep 28, 2023
f988b23
ethdb, internal/ethapi: support exposing Pebble stats too, beside Lev…
karalabe Sep 28, 2023
1f6e639
core: fix typos (#28218)
0xbstn Sep 29, 2023
0ded110
core: infer blobGasUsed in chain maker (#28212)
s1na Sep 29, 2023
c5ff839
core/state: small trie prefetcher nits (#28183)
aaronbuchwald Sep 29, 2023
1f9d672
common: remove address.Hash footgun (#28228)
karalabe Sep 29, 2023
22dcb7a
ethdb/pebble: upgrade pebble to master (aa077af62593) (#28070)
rjl493456442 Sep 29, 2023
966e50b
ethdb/pebble: luv you linter
karalabe Sep 29, 2023
a408e37
eth/catalyst: add validation error in new paylaod hash mismatch (#28226)
lightclient Sep 29, 2023
7b6ff52
cmd, eth: switch the dev synctarget to hash from block (#28209)
karalabe Sep 29, 2023
c39cbc1
core: implement BLOBBASEFEE opcode (0x4a) (#28098)
MariusVanDerWijden Oct 2, 2023
705a51e
eth, rpc: add configurable option for wsMessageSizeLimit (#27801)
tylerni7 Oct 3, 2023
07dec7a
cmd/evm: cancun-updates for b11r and t8n -tools (#28195)
lightclient Oct 3, 2023
339a4cf
core: fix typos (#28238)
0xbstn Oct 3, 2023
2091ebd
trie: fix benchmark by ensuring key immutability (#28221)
DeVil2O Oct 3, 2023
7963c4e
rpc: fix erroneous error-message in test (#28227)
hyunchel Oct 3, 2023
bc6d184
cmd/devp2p, eth: drop eth/66 (#28239)
karalabe Oct 3, 2023
a8a9c8e
core, eth, miner: start propagating and consuming blob txs (#28243)
karalabe Oct 4, 2023
95b0555
eth: when snap is complaining for missing eth, be verbose about the d…
karalabe Oct 4, 2023
052355f
cmd/evm/internal/t8ntoo: tiny bugfix for difficulty field (#28245)
tactical-retreat Oct 4, 2023
4e1e373
core/txpool/legacypool: fix typo (#28258)
hyunchel Oct 7, 2023
0832679
trie: refactor stacktrie (#28233)
holiman Oct 10, 2023
fa6107c
core: fix typos (#28255)
0xbstn Oct 10, 2023
db9afae
eth, params: fix typos (#28286)
hyunchel Oct 10, 2023
6b1e4f4
all: move light.NodeSet to trienode.ProofSet (#28287)
holiman Oct 10, 2023
6505297
trie: fix a typo, use correct docstrings (#28302)
bnovil Oct 10, 2023
8afbcf4
eth: enforce announcement metadatas and drop peers violating the prot…
karalabe Oct 10, 2023
5e43ed0
git: ignore tests/spec-tests folder (#28254)
lightclient Oct 10, 2023
2c007cf
accounts/abi/bind/backend: use requested header for gas prices and ga…
karalabe Oct 10, 2023
8976a0c
trie: remove owner and binary marshaling from stacktrie (#28291)
holiman Oct 11, 2023
7776a32
ethdb/pebble: add level file metrics (#28271)
rjl493456442 Oct 11, 2023
a6deb2d
eth/fetcher: throttle tx fetches to 128KB responses (#28304)
karalabe Oct 11, 2023
13d1d42
eth/fetcher: fix typo
karalabe Oct 11, 2023
eeb5dc3
cmd, core: resolve scheme from a read-write database (#28313)
rjl493456442 Oct 11, 2023
0004c6b
accounts, cmd: fix typos (#28300)
vuittont60 Oct 11, 2023
d2c0bed
cmd/geth: fix failing test (#28322)
holiman Oct 12, 2023
0d45d72
params: release Geth v.1.13.3
karalabe Oct 12, 2023
2f66d7c
params: begin v1.13.4 release cycle
karalabe Oct 12, 2023
1cb3b6a
eth/protocols/snap: fix snap sync failure on empty storage range (#28…
rjl493456442 Oct 13, 2023
1f30cae
go.mod, internal/build: update Azure dependencies (#28329)
karalabe Oct 13, 2023
78c8e10
go.mod: update gnark lib to fix a malleability issue (#28333)
karalabe Oct 13, 2023
660cbe4
go.mod: update fastcache to latest (#28334)
karalabe Oct 13, 2023
ed5da55
build: move version-info into checksum file (#28324)
holiman Oct 13, 2023
31b566f
go.mod: update AWS APIs to latest heads (#28332)
karalabe Oct 13, 2023
f62c58f
trie: make rhs-proof align with last key in range proofs (#28311)
holiman Oct 13, 2023
425cb6f
go.mod: pull in the latest cloudflare API libs (#28336)
karalabe Oct 13, 2023
509a64f
cmd, core, ethdb: enable Pebble on 32 bits and OpenBSD too (#28335)
karalabe Oct 13, 2023
f999b72
Merge branch 'master' into merge/foundation-release/1.13.1
meowsbits Oct 16, 2023
38267be
go.mod,go.sum: go mod tidy
meowsbits Oct 16, 2023
09b71f5
Merge branch 'release/1.13' into merge/foundation-release/1.13.3
meowsbits Oct 16, 2023
8ac2a6d
cmd/evm,cmd/utils,core,core/vm,eth/ethconfig,eth,go.sum: auto-optimiz…
meowsbits Oct 16, 2023
48aede8
go.mod,go.sum: go mod tidy
meowsbits Oct 16, 2023
90e0e61
params/types/coregeth,params/types/ctypes,params/types/genesisT,param…
meowsbits Oct 16, 2023
a01f89e
core: "github.com/ethereum/go-ethereum/consensus/misc" imported and n…
meowsbits Oct 16, 2023
037aa2a
cmd/evm/internal/t8ntool: undefined: params (typecheck)
meowsbits Oct 16, 2023
f288b36
cmd/evm/internal/t8ntool: chainConfig.ChainID undefined
meowsbits Oct 16, 2023
b0e556f
eth/downloader: not enough arguments in call to d.processHeaders
meowsbits Oct 16, 2023
c4f987f
eth/downloader: assignment mismatch: 3 variables but p.peer.Head retu…
meowsbits Oct 16, 2023
c6defda
Revert "eth/downloader: remove header rollback mechanism (#28147)"
meowsbits Oct 16, 2023
4632b7b
tests: update execution-spec-tests to 1.0.5 (#28337)
holiman Oct 16, 2023
141df14
eth/downloader: fetchTotalDifficulty method comment
meowsbits Oct 16, 2023
af9c0ef
Revert "eth/downloader: assignment mismatch: 3 variables but p.peer.H…
meowsbits Oct 16, 2023
7bd2915
eth/downloader: p.peer.SetHead undefined (type Peer has no field or m…
meowsbits Oct 16, 2023
69e39f2
miner: undefined: params
meowsbits Oct 16, 2023
9baded8
miner: invalid operation: cannot call non-function ltx.Hash (variable…
meowsbits Oct 16, 2023
a9b066a
eth: not enough arguments in call to downloader.New
meowsbits Oct 16, 2023
a2a7017
eth: cannot convert *res.Res.(*eth.BlockHeadersPacket)
meowsbits Oct 16, 2023
8ac01a0
eth: h.acceptTxs undefined
meowsbits Oct 16, 2023
2e478aa
eth/fetcher: only make noise big mismatches (#28356)
karalabe Oct 16, 2023
a5544d3
fix: broken url link (#28342)
phenix3443 Oct 17, 2023
8b99ad4
internal/ethapi: fix codehash lookup in eth_getProof (#28357)
holiman Oct 17, 2023
00c6383
cmd: fix typos (#28323)
xiaolou86 Oct 17, 2023
667966c
eth/fetcher: fix fetcher timeout (#28220)
MariusVanDerWijden Oct 17, 2023
3f907d6
params: release Geth v1.13.4
karalabe Oct 17, 2023
6b217e2
cmd/evm: undefined: core.Genesis
meowsbits Oct 17, 2023
840bcee
core/forkid: undefined: core.DefaultHoleskyGenesisBlock
meowsbits Oct 17, 2023
dff9171
cmd/evm: genesisConfig.MustCommit undefined
meowsbits Oct 17, 2023
e3cc1d9
eth: undefined: eth.ETH66
meowsbits Oct 17, 2023
fc9f1bf
eth/downloader: undefined: eth.ETH66
meowsbits Oct 17, 2023
8ae7fae
eth/fetcher: undefined: params.MaxBlobGasPerBlock
meowsbits Oct 17, 2023
a434050
les/downloader: undefined: eth.ETH66
meowsbits Oct 17, 2023
06ecb00
les/downloader: undefined: eth.NodeDataMsg (rm -rf les/downloader)
meowsbits Oct 17, 2023
dfa3921
miner: undefined: params.ChainConfig
meowsbits Oct 17, 2023
10585ca
les: undefined: eth.ETH66
meowsbits Oct 17, 2023
b478a07
les: b.eth.handler.downloader undefined
meowsbits Oct 17, 2023
523271b
les: rm sync files
meowsbits Oct 17, 2023
579473e
Merge branch 'release/1.13' into merge/foundation-release/1.13.4
meowsbits Oct 17, 2023
21cfcda
go.mod,go.sum,les: go mod tidy
meowsbits Oct 17, 2023
ffb7cd1
les: fix typo
meowsbits Oct 17, 2023
69c4fb7
les/catalyst,les/checkpointoracle,les/fetcher: tons of errors in less
meowsbits Oct 17, 2023
9e2b869
les: undefined types; move to match go-ethereum
meowsbits Oct 17, 2023
2c37a97
les: b.eth.Downloader undefined
meowsbits Oct 17, 2023
ff9de30
les: c.handler.fetcher undefined
meowsbits Oct 17, 2023
8781310
les: could not load export data: no export data for "github.com/ether…
meowsbits Oct 17, 2023
828981f
les: remove oracle
meowsbits Oct 17, 2023
bcc01f7
les: api.backend.oracle undefined
meowsbits Oct 17, 2023
e0c2035
les: server.oracle undefined
meowsbits Oct 17, 2023
e161bc9
les: remove more checkpoint and oracle logic
meowsbits Oct 17, 2023
5277a05
les: unknown field oracle in struct literal of type lesCommons
meowsbits Oct 17, 2023
44c6390
les: unnecessary conversion (unconvert)
meowsbits Oct 17, 2023
d9db6b2
les: var `errNoCheckpoint` is unused
meowsbits Oct 17, 2023
ead81ee
les: func `(*pruner).close` is unused
meowsbits Oct 17, 2023
c8742b7
les: undefined: pruner
meowsbits Oct 17, 2023
871bf1e
les: var `oracleAddr` is unused
meowsbits Oct 17, 2023
5e7128a
les: undefined: oracleAddr
meowsbits Oct 17, 2023
602216b
les: unused: var auth (no deploy checkpoint contract)
meowsbits Oct 17, 2023
886c65d
Revert "les: remove obsolete code related to PoW header syncing (#277…
meowsbits Oct 17, 2023
45ef39a
eth/ethconfig: problem: duplicate fields
meowsbits Oct 17, 2023
e6457a2
eth/protocols/eth: maintain ETH66
meowsbits Oct 17, 2023
44d88ef
les/catalyst,les/downloader,les/fetcher,les: undefined: params.XXX ->…
meowsbits Oct 17, 2023
d0127d6
les/downloader: not enough arguments in call to chain.InsertHeaderChain
meowsbits Oct 17, 2023
46d7358
les: not enough arguments in call to chain.InsertHeaderChain
meowsbits Oct 17, 2023
1e386c0
les/downloader: not enough arguments in call to trie.NewDatabase
meowsbits Oct 17, 2023
ae70941
les/catalyst: TerminalTotalDifficulty undefined
meowsbits Oct 17, 2023
3740d80
les/catalyst,les/downloader,les/fetcher: undefined: core.Genesis
meowsbits Oct 17, 2023
893a06d
les/catalyst: not enough arguments in call to engine.ExecutableDataTo…
meowsbits Oct 17, 2023
3762e3b
les/catalyst: not enough arguments in call to lesService.BlockChain()
meowsbits Oct 17, 2023
2b24fb3
les/downloader,les/fetcher: gspec.MustCommit undefined
meowsbits Oct 17, 2023
e3d802f
les/downloader: cannot use tester (variable of type *downloadTester) …
meowsbits Oct 17, 2023
d7b29df
les: remove unused vars
meowsbits Oct 17, 2023
fd100f3
tests/spec-tests/fixtures/berlin/eip2930_access_list/acl,tests/spec-t…
meowsbits Oct 18, 2023
819c967
core/state: fix a panic in tests caused by a nil balance in gen accnt
meowsbits Oct 18, 2023
d52c5d9
params: fix holesky genesis params (first testnet failed)
meowsbits Oct 18, 2023
15debab
params/types/genesisT: problem: TestCreation fails
meowsbits Oct 18, 2023
450631a
les/downloader: re-implement frequency condition for rollback
meowsbits Oct 19, 2023
f8b786c
les: disable checkfreq if ULC
meowsbits Oct 19, 2023
3b510d2
les: re-install les API methods and service
meowsbits Oct 19, 2023
c75de93
params/confp: guard uint64 undeflow for rewindto target
meowsbits Oct 25, 2023
656390e
core/vm: reorder eip4844 in precompileds logic
meowsbits Oct 26, 2023
ab981ce
consensus/ethash: add EIP-4844 verification support to ethash header …
meowsbits Oct 26, 2023
37439dc
consensus/ethash: add EIP-4788 header verification
meowsbits Oct 26, 2023
bb90c94
core: differentiate 4844/4788 in Genesis block method
meowsbits Oct 26, 2023
3a1135f
core: differentiate 4844/4788 in header maker fn
meowsbits Oct 26, 2023
f71b936
miner: differentiate 4844/4788 in prepareWork fn
meowsbits Oct 26, 2023
057d2e1
tests: debugging: match test T encodings to release/1.13
meowsbits Oct 26, 2023
e85716e
tests/spec-tests/fixtures/berlin/eip2930_access_list/acl,tests/spec-t…
meowsbits Oct 26, 2023
ec3e059
core/forkid,go.mod,go.sum,params: Merge branch 'merge/foundation-rele…
ziogaschr Oct 27, 2023
9f52cc5
Release/v1.12.15 (#572)
diega Oct 27, 2023
dd25262
core/forkid: fix missing test field (genesis block)
meowsbits Oct 27, 2023
c81670d
build(deps): bump github.com/docker/docker
dependabot[bot] Oct 30, 2023
2713495
node: return an error when node.startRPC returns one
meowsbits Nov 1, 2023
41af9e9
Merge pull request #577 from etclabscore/dependabot/go_modules/github…
meowsbits Nov 1, 2023
7674a13
build(deps): bump github.com/consensys/gnark-crypto
dependabot[bot] Nov 1, 2023
159fe87
go.mod,go.sum: go get -u github.com/consensys/gnark-crypto
meowsbits Nov 1, 2023
4e2284e
Merge pull request #578 from etclabscore/rpc-startup-error-handling
meowsbits Nov 1, 2023
5e0cca0
core/forkid: implement GatherForks test for time-based forks
meowsbits Nov 2, 2023
3de7c55
core/forkid: add GatherForks test cases for goerli, sepolia
meowsbits Nov 2, 2023
d406fd3
Merge pull request #579 from etclabscore/dependabot/go_modules/github…
meowsbits Nov 2, 2023
a216b4f
build(deps): bump golang.org/x/image from 0.7.0 to 0.10.0
dependabot[bot] Nov 2, 2023
bd227f2
Merge pull request #581 from etclabscore/dependabot/go_modules/golang…
meowsbits Nov 3, 2023
e5ae648
Merge pull request #580 from etclabscore/forkid-tests
meowsbits Nov 7, 2023
f19e04f
bump version from v1.12.16-unstable to v1.12.16-stable
meowsbits Nov 8, 2023
7b62eef
bump version from v1.12.16-stable to v1.12.17-unstable
meowsbits Nov 8, 2023
51c70ad
Merge branch 'master' into merge/foundation-release/1.13.4
meowsbits Nov 16, 2023
de0e288
cmd/evm/internal/t8ntool,consensus/beacon,consensus/clique,consensus/…
ziogaschr Feb 8, 2024
38a2051
core/forkid: forkid_test.go:563:40: not enough arguments in call to g…
ziogaschr Feb 8, 2024
ab5e96f
core/txpool/blobpool: 🧹
ziogaschr Feb 12, 2024
f0a2b4c
Bump go version for linting GHA (#618)
diega Feb 12, 2024
b7be02e
params/types/goethereum: fix go_ethereum configurator for Cancun by b…
ziogaschr Feb 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/evm/internal/t8ntool/transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ func applyMergeChecks(env *stEnv, chainConfig ctypes.ChainConfigurator) error {
}

func applyCancunChecks(env *stEnv, chainConfig ctypes.ChainConfigurator) error {
if !chainConfig.IsEnabledByTime(chainConfig.GetEIP4788TransitionTime, &env.Timestamp) {
eip4788Enabled := chainConfig.IsEnabledByTime(chainConfig.GetEIP4788TransitionTime, &env.Timestamp) || chainConfig.IsEnabled(chainConfig.GetEIP4788Transition, new(big.Int).SetUint64(env.Number))
if !eip4788Enabled {
env.ParentBeaconBlockRoot = nil // un-set it if it has been set too early
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion consensus/beacon/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func (beacon *Beacon) verifyHeader(chain consensus.ChainHeaderReader, header, pa
return fmt.Errorf("invalid withdrawalsHash: have %x, expected nil", header.WithdrawalsHash)
}
// Verify the existence / non-existence of excessDataGas
cancun := chain.Config().IsEnabledByTime(chain.Config().GetEIP4844TransitionTime, &header.Time)
cancun := chain.Config().IsEnabledByTime(chain.Config().GetEIP4844TransitionTime, &header.Time) || chain.Config().IsEnabled(chain.Config().GetEIP4844Transition, header.Number)
if !cancun {
switch {
case header.ExcessBlobGas != nil:
Expand Down
2 changes: 1 addition & 1 deletion consensus/clique/clique.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (c *Clique) verifyHeader(chain consensus.ChainHeaderReader, header *types.H
if chain.Config().IsEnabledByTime(chain.Config().GetEIP3855TransitionTime, &header.Time) || chain.Config().IsEnabled(chain.Config().GetEIP3855Transition, header.Number) {
return fmt.Errorf("clique does not support shanghai fork")
}
if chain.Config().IsEnabledByTime(chain.Config().GetEIP4844TransitionTime, &header.Time) {
if chain.Config().IsEnabledByTime(chain.Config().GetEIP4844TransitionTime, &header.Time) || chain.Config().IsEnabled(chain.Config().GetEIP4844Transition, header.Number) {
return fmt.Errorf("clique does not support cancun fork")
}
// All basic checks passed, verify cascading fields
Expand Down
4 changes: 2 additions & 2 deletions consensus/ethash/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainHeaderReader, header, pa
// Verify the header's EIP-1559 attributes.
return err
}
eip4844Enabled := chain.Config().IsEnabledByTime(chain.Config().GetEIP4844TransitionTime, &header.Time)
eip4844Enabled := chain.Config().IsEnabledByTime(chain.Config().GetEIP4844TransitionTime, &header.Time) || chain.Config().IsEnabled(chain.Config().GetEIP4844Transition, header.Number)
if !eip4844Enabled {
switch {
case header.ExcessBlobGas != nil:
Expand All @@ -292,7 +292,7 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainHeaderReader, header, pa
return err
}
}
eip4788Enabled := chain.Config().IsEnabledByTime(chain.Config().GetEIP4788TransitionTime, &header.Time)
eip4788Enabled := chain.Config().IsEnabledByTime(chain.Config().GetEIP4788TransitionTime, &header.Time) || chain.Config().IsEnabled(chain.Config().GetEIP4788Transition, header.Number)
if !eip4788Enabled {
if header.ParentBeaconRoot != nil {
return fmt.Errorf("invalid parentBeaconRoot, have %#x, expected nil", header.ParentBeaconRoot)
Expand Down
4 changes: 2 additions & 2 deletions core/chain_makers.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ func makeHeader(chain consensus.ChainReader, parent *types.Block, state *state.S
header.GasLimit = CalcGasLimit(parentGasLimit, parentGasLimit)
}
}
if chain.Config().IsEnabledByTime(chain.Config().GetEIP4844TransitionTime, &header.Time) {
if chain.Config().IsEnabledByTime(chain.Config().GetEIP4844TransitionTime, &header.Time) || chain.Config().IsEnabled(chain.Config().GetEIP4844Transition, header.Number) {
var (
parentExcessBlobGas uint64
parentBlobGasUsed uint64
Expand All @@ -414,7 +414,7 @@ func makeHeader(chain consensus.ChainReader, parent *types.Block, state *state.S
header.ExcessBlobGas = &excessBlobGas
header.BlobGasUsed = new(uint64)
}
if chain.Config().IsEnabledByTime(chain.Config().GetEIP4788TransitionTime, &header.Time) {
if chain.Config().IsEnabledByTime(chain.Config().GetEIP4788TransitionTime, &header.Time) || chain.Config().IsEnabled(chain.Config().GetEIP4788Transition, header.Number) {
header.ParentBeaconRoot = new(common.Hash)
}
return header
Expand Down
4 changes: 2 additions & 2 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ func GenesisToBlock(g *genesisT.Genesis, db ethdb.Database) *types.Block {
withdrawals = make([]*types.Withdrawal, 0)
}
// EIP4844 and EIP4788 are Cancun features.
isEIP4844 := conf.IsEnabledByTime(g.Config.GetEIP4844TransitionTime, &g.Timestamp)
isEIP4844 := conf.IsEnabledByTime(g.Config.GetEIP4844TransitionTime, &g.Timestamp) || conf.IsEnabled(conf.GetEIP4844Transition, new(big.Int).SetUint64(g.Number))
if isEIP4844 {
// EIP-4844 fields
head.ExcessBlobGas = g.ExcessBlobGas
Expand All @@ -463,7 +463,7 @@ func GenesisToBlock(g *genesisT.Genesis, db ethdb.Database) *types.Block {
head.BlobGasUsed = new(uint64)
}
}
isEIP4788 := conf.IsEnabledByTime(g.Config.GetEIP4788TransitionTime, &g.Timestamp)
isEIP4788 := conf.IsEnabledByTime(g.Config.GetEIP4788TransitionTime, &g.Timestamp) || conf.IsEnabled(g.Config.GetEIP4788Transition, new(big.Int).SetUint64(g.Number))
if isEIP4788 {
// EIP-4788: The parentBeaconBlockRoot of the genesis block is always
// the zero hash. This is because the genesis block does not have a parent
Expand Down
2 changes: 1 addition & 1 deletion core/state_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ func GenerateBadBlock(parent *types.Block, engine consensus.Engine, txs types.Tr
nBlobs += len(tx.BlobHashes())
}
header.Root = common.BytesToHash(hasher.Sum(nil))
isEip4844 := config.IsEnabledByTime(config.GetEIP4844TransitionTime, &header.Time)
isEip4844 := config.IsEnabledByTime(config.GetEIP4844TransitionTime, &header.Time) || config.IsEnabled(config.GetEIP4844Transition, header.Number)
if isEip4844 {
var pExcess, pUsed = uint64(0), uint64(0)
if parent.ExcessBlobGas() != nil {
Expand Down
4 changes: 2 additions & 2 deletions core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (st *StateTransition) buyGas() error {
balanceCheck = balanceCheck.Mul(balanceCheck, st.msg.GasFeeCap)
balanceCheck.Add(balanceCheck, st.msg.Value)
}
if st.evm.ChainConfig().IsEnabledByTime(st.evm.ChainConfig().GetEIP4844TransitionTime, &st.evm.Context.Time) {
if st.evm.ChainConfig().IsEnabledByTime(st.evm.ChainConfig().GetEIP4844TransitionTime, &st.evm.Context.Time) || st.evm.ChainConfig().IsEnabled(st.evm.ChainConfig().GetEIP4844Transition, st.evm.Context.BlockNumber) {
if blobGas := st.blobGasUsed(); blobGas > 0 {
// Check that the user has enough funds to cover blobGasUsed * tx.BlobGasFeeCap
blobBalanceCheck := new(big.Int).SetUint64(blobGas)
Expand Down Expand Up @@ -325,7 +325,7 @@ func (st *StateTransition) preCheck() error {
}
}

if st.evm.ChainConfig().IsEnabledByTime(st.evm.ChainConfig().GetEIP4844TransitionTime, &st.evm.Context.Time) {
if st.evm.ChainConfig().IsEnabledByTime(st.evm.ChainConfig().GetEIP4844TransitionTime, &st.evm.Context.Time) || st.evm.ChainConfig().IsEnabled(st.evm.ChainConfig().GetEIP4844Transition, st.evm.Context.BlockNumber) {
if st.blobGasUsed() > 0 {
// Check that the user is paying at least the current blob fee
blobFee := st.evm.Context.BlobBaseFee
Expand Down
2 changes: 1 addition & 1 deletion core/txpool/blobpool/blobpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ func (p *BlobPool) Reset(oldHead, newHead *types.Header) {
}
}
// Flush out any blobs from limbo that are older than the latest finality
isEIP4844 := p.chain.Config().IsEnabledByTime(p.chain.Config().GetEIP4844TransitionTime, &p.head.Time)
isEIP4844 := p.chain.Config().IsEnabledByTime(p.chain.Config().GetEIP4844TransitionTime, &p.head.Time) || p.chain.Config().IsEnabled(p.chain.Config().GetEIP4844Transition, p.head.Number)
if isEIP4844 {
p.limbo.finalize(p.chain.CurrentFinalBlock())
}
Expand Down
5 changes: 3 additions & 2 deletions core/txpool/blobpool/blobpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ func (bc *testBlockChain) CurrentBlock() *types.Header {
// mainnet ether existence, use that as a cap for the tests.
var (
blockNumber = new(big.Int).Add(new(big.Int).SetUint64(*bc.config.GetEIP1559Transition()), big.NewInt(1))
blockTime = *bc.config.GetEIP4844TransitionTime() + 1
gasLimit = uint64(30_000_000)
// TODO @ziogaschr: consider what to put here using the block number. We can leave it as is, as it's been using in tests only
meowsbits marked this conversation as resolved.
Show resolved Hide resolved
blockTime = *bc.config.GetEIP4844TransitionTime() + 1
gasLimit = uint64(30_000_000)
)
lo := new(big.Int)
hi := new(big.Int).Mul(big.NewInt(5714), new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil))
Expand Down
3 changes: 2 additions & 1 deletion core/txpool/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
if !opts.Config.IsEnabled(opts.Config.GetEIP1559Transition, head.Number) && tx.Type() == types.DynamicFeeTxType {
return fmt.Errorf("%w: type %d rejected, pool not yet in London", core.ErrTxTypeNotSupported, tx.Type())
}
if !opts.Config.IsEnabledByTime(opts.Config.GetEIP4844TransitionTime, &head.Time) && tx.Type() == types.BlobTxType {
eip4844Enabled := opts.Config.IsEnabledByTime(opts.Config.GetEIP4844TransitionTime, &head.Time) || opts.Config.IsEnabled(opts.Config.GetEIP4844Transition, head.Number)
if !eip4844Enabled && tx.Type() == types.BlobTxType {
return fmt.Errorf("%w: type %d rejected, pool not yet in Cancun", core.ErrTxTypeNotSupported, tx.Type())
}
// Check whether the init code size has been exceeded
Expand Down
4 changes: 2 additions & 2 deletions core/types/transaction_signing.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type sigCache struct {
func MakeSigner(config ctypes.ChainConfigurator, blockNumber *big.Int, blockTime uint64) Signer {
var signer Signer
switch {
case config.IsEnabledByTime(config.GetEIP4844TransitionTime, &blockTime):
case config.IsEnabledByTime(config.GetEIP4844TransitionTime, &blockTime), config.IsEnabled(config.GetEIP4844Transition, blockNumber):
signer = NewCancunSigner(config.GetChainID())
case config.IsEnabled(config.GetEIP1559Transition, blockNumber):
signer = NewEIP1559Signer(config.GetChainID())
Expand All @@ -65,7 +65,7 @@ func MakeSigner(config ctypes.ChainConfigurator, blockNumber *big.Int, blockTime
// have the current block number available, use MakeSigner instead.
func LatestSigner(config ctypes.ChainConfigurator) Signer {
if chainID := config.GetChainID(); chainID != nil {
if config.GetEIP4844TransitionTime() != nil {
if config.GetEIP4844TransitionTime() != nil || config.GetEIP4844Transition() != nil {
return NewCancunSigner(chainID)
}
if config.GetEIP1559Transition() != nil {
Expand Down
2 changes: 1 addition & 1 deletion core/vm/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func PrecompiledContractsForConfig(config ctypes.ChainConfigurator, bn *big.Int,
// 10-18 are BLS12-381 precompiles
mergeContracts(precompileds, PrecompiledContractsBLS)
}
if config.IsEnabledByTime(config.GetEIP4844TransitionTime, bt) {
if config.IsEnabledByTime(config.GetEIP4844TransitionTime, bt) || config.IsEnabled(config.GetEIP4844Transition, bn) {
precompileds[common.BytesToAddress([]byte{0x0a})] = &kzgPointEvaluation{}
}

Expand Down
10 changes: 5 additions & 5 deletions core/vm/jump_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,19 +222,19 @@ func instructionSetForConfig(config ctypes.ChainConfigurator, isPostMerge bool,
return validate(instructionSet)
}
*/
if config.IsEnabledByTime(config.GetEIP4844TransitionTime, bt) {
if config.IsEnabledByTime(config.GetEIP4844TransitionTime, bt) || config.IsEnabled(config.GetEIP4844Transition, bn) {
enable4844(instructionSet) // EIP-4844 (BLOBHASH opcode)
}
if config.IsEnabledByTime(config.GetEIP7516TransitionTime, bt) { // TODO(meowsbits): create EIP7516 configurator interface method
if config.IsEnabledByTime(config.GetEIP7516TransitionTime, bt) || config.IsEnabled(config.GetEIP7516Transition, bn) { // TODO(meowsbits): create EIP7516 configurator interface method
enable7516(instructionSet) // EIP-7516 (BLOBBASEFEE opcode)
}
if config.IsEnabledByTime(config.GetEIP1153TransitionTime, bt) {
if config.IsEnabledByTime(config.GetEIP1153TransitionTime, bt) || config.IsEnabled(config.GetEIP1153Transition, bn) {
enable1153(instructionSet) // EIP-1153 "Transient Storage"
}
if config.IsEnabledByTime(config.GetEIP5656TransitionTime, bt) {
if config.IsEnabledByTime(config.GetEIP5656TransitionTime, bt) || config.IsEnabled(config.GetEIP5656Transition, bn) {
enable5656(instructionSet) // EIP-5656 (MCOPY opcode)
}
if config.IsEnabledByTime(config.GetEIP6780TransitionTime, bt) {
if config.IsEnabledByTime(config.GetEIP6780TransitionTime, bt) || config.IsEnabled(config.GetEIP6780Transition, bn) {
enable6780(instructionSet) // EIP-6780 SELFDESTRUCT only in same transaction
}

Expand Down
12 changes: 7 additions & 5 deletions eth/catalyst/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ func (api *ConsensusAPI) verifyPayloadAttributes(attr *engine.PayloadAttributes)

// Verify withdrawals attribute for Shanghai.
withdrawalsCheck := func(b *big.Int, t uint64) bool {
return c.IsEnabledByTime(c.GetEIP4895TransitionTime, &t)
return c.IsEnabledByTime(c.GetEIP4895TransitionTime, &t) || c.IsEnabled(c.GetEIP4895Transition, b)
ziogaschr marked this conversation as resolved.
Show resolved Hide resolved
}
if err := checkAttribute(withdrawalsCheck, attr.Withdrawals != nil, eip1559BlockBig, attr.Timestamp); err != nil {
return fmt.Errorf("invalid withdrawals: %w", err)
}
// Verify beacon root attribute for Cancun.
beaconRootCheck := func(b *big.Int, t uint64) bool {
return c.IsEnabledByTime(c.GetEIP4788TransitionTime, &t) // TODO(meowsbits)
return c.IsEnabledByTime(c.GetEIP4788TransitionTime, &t) || c.IsEnabled(c.GetEIP4788Transition, b)
}
if err := checkAttribute(beaconRootCheck, attr.BeaconRoot != nil, eip1559BlockBig, attr.Timestamp); err != nil {
return fmt.Errorf("invalid parent beacon block root: %w", err)
Expand Down Expand Up @@ -481,7 +481,7 @@ func (api *ConsensusAPI) NewPayloadV2(params engine.ExecutableData) (engine.Payl
} else if params.Withdrawals != nil {
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("non-nil withdrawals pre-shanghai"))
}
is4844 := api.eth.BlockChain().Config().IsEnabledByTime(api.eth.BlockChain().Config().GetEIP4844TransitionTime, &params.Timestamp)
is4844 := api.eth.BlockChain().Config().IsEnabledByTime(api.eth.BlockChain().Config().GetEIP4844TransitionTime, &params.Timestamp) || api.eth.BlockChain().Config().IsEnabled(api.eth.BlockChain().Config().GetEIP4844Transition, new(big.Int).SetUint64(params.Number))
if is4844 {
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("newPayloadV2 called post-cancun"))
}
Expand All @@ -504,11 +504,13 @@ func (api *ConsensusAPI) NewPayloadV3(params engine.ExecutableData, versionedHas
}

// Since both 4844 (blob txes) and 4788 (beacon root) features are checked, we assert BOTH config values.
if !api.eth.BlockChain().Config().IsEnabledByTime(api.eth.BlockChain().Config().GetEIP4844TransitionTime, &params.Timestamp) {
eip4844Enabled := api.eth.BlockChain().Config().IsEnabledByTime(api.eth.BlockChain().Config().GetEIP4844TransitionTime, &params.Timestamp) || api.eth.BlockChain().Config().IsEnabled(api.eth.BlockChain().Config().GetEIP4844Transition, new(big.Int).SetUint64(params.Number))
if !eip4844Enabled {
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.UnsupportedFork.With(errors.New("newPayloadV3 called pre-cancun"))
}

if !api.eth.BlockChain().Config().IsEnabledByTime(api.eth.BlockChain().Config().GetEIP4788TransitionTime, &params.Timestamp) {
eip4788Enabled := api.eth.BlockChain().Config().IsEnabledByTime(api.eth.BlockChain().Config().GetEIP4788TransitionTime, &params.Timestamp) || api.eth.BlockChain().Config().IsEnabled(api.eth.BlockChain().Config().GetEIP4788Transition, new(big.Int).SetUint64(params.Number))
if !eip4788Enabled {
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.UnsupportedFork.With(errors.New("newPayloadV3 called pre-cancun"))
}

Expand Down
3 changes: 2 additions & 1 deletion eth/protocols/eth/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ func MakeProtocols(backend Backend, network uint64, protocolVersions []uint, dns

// TODO(meowsbits): FIXME re: Cancun config/time/enabled check
// Blob transactions require eth/68 announcements, disable everything else
if version <= ETH67 && backend.Chain().Config().GetEIP4844TransitionTime() != nil {
eip4844Enabled := backend.Chain().Config().GetEIP4844TransitionTime() != nil || backend.Chain().Config().GetEIP4844Transition() != nil
if version <= ETH67 && eip4844Enabled {
continue
}

Expand Down
6 changes: 3 additions & 3 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1087,9 +1087,9 @@ func (w *worker) prepareWork(genParams *generateParams) (*environment, error) {
}
}
// Apply EIP-4844.
if w.chainConfig.IsEnabledByTime(w.chainConfig.GetEIP4844TransitionTime, &header.Time) {
if w.chainConfig.IsEnabledByTime(w.chainConfig.GetEIP4844TransitionTime, &header.Time) || w.chainConfig.IsEnabled(w.chainConfig.GetEIP4844Transition, header.Number) {
var excessBlobGas uint64
if w.chainConfig.IsEnabledByTime(w.chainConfig.GetEIP4844TransitionTime, &parent.Time) {
if w.chainConfig.IsEnabledByTime(w.chainConfig.GetEIP4844TransitionTime, &parent.Time) || w.chainConfig.IsEnabled(w.chainConfig.GetEIP4844Transition, parent.Number) {
excessBlobGas = eip4844.CalcExcessBlobGas(*parent.ExcessBlobGas, *parent.BlobGasUsed)
} else {
// For the first post-fork block, both parent.data_gas_used and parent.excess_data_gas are evaluated as 0
Expand All @@ -1099,7 +1099,7 @@ func (w *worker) prepareWork(genParams *generateParams) (*environment, error) {
header.ExcessBlobGas = &excessBlobGas
}
// Apply EIP-4788.
if w.chainConfig.IsEnabledByTime(w.chainConfig.GetEIP4788TransitionTime, &header.Time) {
if w.chainConfig.IsEnabledByTime(w.chainConfig.GetEIP4788TransitionTime, &header.Time) || w.chainConfig.IsEnabled(w.chainConfig.GetEIP4788Transition, header.Number) {
header.ParentBeaconRoot = genParams.beaconRoot
}
// Run the consensus preparation with the default or customized consensus engine.
Expand Down
8 changes: 8 additions & 0 deletions params/types/coregeth/chain_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,14 @@ type CoreGethChainConfig struct {
EIP6780FTime *uint64 `json:"eip6780FTime,omitempty"` // EIP-6780: SELFDESTRUCT only in same transaction https://eips.ethereum.org/EIPS/eip-6780
EIP4788FTime *uint64 `json:"eip4788FTime,omitempty"` // EIP-4788: Beacon block root in the EVM https://eips.ethereum.org/EIPS/eip-4788

// Cancun with block activations
EIP4844FBlock *big.Int `json:"eip4844FBlock,omitempty"` // EIP-4844: Shard Blob Transactions https://eips.ethereum.org/EIPS/eip-4844
EIP7516FBlock *big.Int `json:"eip7516FBlock,omitempty"` // EIP-7516: Blob Base Fee Opcode https://eips.ethereum.org/EIPS/eip-7516
EIP1153FBlock *big.Int `json:"eip1153FBlock,omitempty"` // EIP-1153: Transient Storage opcodes https://eips.ethereum.org/EIPS/eip-1153
EIP5656FBlock *big.Int `json:"eip5656FBlock,omitempty"` // EIP-5656: MCOPY - Memory copying instruction https://eips.ethereum.org/EIPS/eip-5656
EIP6780FBlock *big.Int `json:"eip6780FBlock,omitempty"` // EIP-6780: SELFDESTRUCT only in same transaction https://eips.ethereum.org/EIPS/eip-6780
EIP4788FBlock *big.Int `json:"eip4788FBlock,omitempty"` // EIP-4788: Beacon block root in the EVM https://eips.ethereum.org/EIPS/eip-4788

MergeNetsplitVBlock *big.Int `json:"mergeNetsplitVBlock,omitempty"` // Virtual fork after The Merge to use as a network splitter

DisposalBlock *big.Int `json:"disposalBlock,omitempty"` // Bomb disposal HF block
Expand Down
Loading
Loading