Skip to content

Conversation

@jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Oct 24, 2025

Run the tests locally, sometimes one or test tests failed as below:

--- FAIL: TestProcessVerkleInvalidContractCreation (0.00s)
panic: invalid chain id for signer: have 69420 want 69421 [recovered, repanicked]

goroutine 1050165 [running]:
testing.tRunner.func1.2({0xfcc920, 0xc019b9a880})
        /usr/local/go/src/testing/testing.go:1872 +0x237
testing.tRunner.func1()
        /usr/local/go/src/testing/testing.go:1875 +0x35b
panic({0xfcc920?, 0xc019b9a880?})
        /usr/local/go/src/runtime/panic.go:783 +0x132
github.com/ethereum/go-ethereum/core.(*BlockGen).addTx(0xc02261c500, 0xc01bf94388?, {0x0, 0x0, 0x0, {0x0, 0x0, 0x0}, 0x0, 0x0}, ...)
        /root/code/go-ethereum/core/chain_makers.go:123 +0x5a9
github.com/ethereum/go-ethereum/core.(*BlockGen).AddTx(...)
        /root/code/go-ethereum/core/chain_makers.go:148
github.com/ethereum/go-ethereum/core.TestProcessVerkleInvalidContractCreation.func1(0x0, 0xc02261c500)
        /root/code/go-ethereum/core/verkle_witness_test.go:316 +0x1fb
github.com/ethereum/go-ethereum/core.GenerateVerkleChain.func1(0x0, 0xc012f2a240, 0xc01bf0a150, 0xc012f4b080)
        /root/code/go-ethereum/core/chain_makers.go:509 +0x29f
github.com/ethereum/go-ethereum/core.GenerateVerkleChain(0xc01bf0a150?, 0xc012f2a240, {0x13cf290, 0xc01bb14630}, {0xc00159c9e8?, 0xc00159c9d0?}, 0xc01bf0a150, 0x2, 0xc01c51bee8)
        /root/code/go-ethereum/core/chain_makers.go:550 +0x29b
github.com/ethereum/go-ethereum/core.GenerateVerkleChainWithGenesis(0xc027ade750, {0x13cf290, 0xc01bb14630}, 0x2, 0xc01c51bee8)
        /root/code/go-ethereum/core/chain_makers.go:592 +0x47e
github.com/ethereum/go-ethereum/core.TestProcessVerkleInvalidContractCreation(0xc01be80700)
        /root/code/go-ethereum/core/verkle_witness_test.go:300 +0x22e
testing.tRunner(0xc01be80700, 0x127ee70)
        /usr/local/go/src/testing/testing.go:1934 +0xea
created by testing.(*T).Run in goroutine 1
        /usr/local/go/src/testing/testing.go:1997 +0x465
FAIL    github.com/ethereum/go-ethereum/core    181.630s

After reviewing the code, seems as the config is a copy of the testKaustinenLikeChainConfig, but the config.ChainID is a pointer to testKaustinenLikeChainConfig's, so in the testcases, after config.ChainID.SetUint64(69421), it will change the origin's value.

@jsvisa jsvisa requested a review from rjl493456442 as a code owner October 24, 2025 16:32
@jsvisa jsvisa changed the title core: don't modify the shared chainId in tests core: don't modify the shared chainId between tests Oct 24, 2025
@rjl493456442 rjl493456442 added this to the 1.16.6 milestone Oct 27, 2025
@rjl493456442 rjl493456442 merged commit 447b5f7 into ethereum:master Oct 27, 2025
6 of 7 checks passed
@jsvisa jsvisa deleted the verkle-share-chainid branch October 27, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants