Skip to content

Conversation

magicxyyz
Copy link
Contributor

@magicxyyz magicxyyz commented Sep 24, 2025

Resolves NIT-3912

This PR adds tooling for benchmarking purposes. All the experimental features added are guarded by debugblock build tag.

When debugblock tag is used following configs options are exposed:

  • node.dangerous.debug-block.overwrite-chain-config - when set triggers chain config overwrite in database on startup, setting ArbitrumChainParams.AllowDebugPrecompiles to true and configuring ArbitrumChainParams.DebugBlock and ArbitrumChainParams.DebugAddress to values specified by configs described below
  • node.dangerous.debug-block.debug-blocknum - specifies the block number of the debug block we want to inject
  • node.dangerous.debug-block.debug-address - specifies the address of account that will be funded in the debug block

Pulls: OffchainLabs/go-ethereum#548

Copy link

github-actions bot commented Oct 3, 2025

❌ 6 Tests Failed:

Tests completed Failed Passed Skipped
2191 6 2185 0
View the top 3 failed tests by shortest run time
TestValidationInputsAtWithWasmTarget
Stack Traces | 2.610s run time
=== RUN   TestValidationInputsAtWithWasmTarget
=== PAUSE TestValidationInputsAtWithWasmTarget
=== CONT  TestValidationInputsAtWithWasmTarget
    validation_inputs_at_test.go:70: goroutine 1498916 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.2/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x4082bd0, 0xc0d1f301c0}, {0x40409a0, 0xc0e5cc2120}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc0d1f301c0, {0x40409a0, 0xc0e5cc2120}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:1763 +0x5d
        github.com/offchainlabs/nitro/system_tests.TestValidationInputsAtWithWasmTarget(0xc0d1f301c0)
        	/home/runner/work/nitro/nitro/system_tests/validation_inputs_at_test.go:70 +0x970
        testing.tRunner(0xc0d1f301c0, 0x3ccafd0)
        	/opt/hostedtoolcache/go/1.25.2/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.2/x64/src/testing/testing.go:1997 +0x465
        
    validation_inputs_at_test.go:70: �[31;1m [] failed calculating position for validation: batch not found on L1 yet �[0;0m
--- FAIL: TestValidationInputsAtWithWasmTarget (2.61s)
TestOutOfGasInStorageCacheFlush
Stack Traces | 4.760s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
=== PAUSE TestOutOfGasInStorageCacheFlush
=== CONT  TestOutOfGasInStorageCacheFlush
    program_test.go:2813: goroutine 685536 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.2/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x4082bd0, 0xc0e57e2c40}, {0x40409a0, 0xc1081f4f60}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc0e57e2c40, {0x40409a0, 0xc1081f4f60}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:1763 +0x5d
        github.com/offchainlabs/nitro/system_tests.TestOutOfGasInStorageCacheFlush(0xc0e57e2c40)
        	/home/runner/work/nitro/nitro/system_tests/program_test.go:2813 +0xfe6
        testing.tRunner(0xc0e57e2c40, 0x3ccab20)
        	/opt/hostedtoolcache/go/1.25.2/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.2/x64/src/testing/testing.go:1997 +0x465
        
    program_test.go:2813: �[31;1m [] failed calculating position for validation: batch not found on L1 yet �[0;0m
INFO [10-10|14:32:13.120] HTTP server stopped                      endpoint=127.0.0.1:40955
TRACE[10-10|14:32:13.120] P2P networking is spinning down
--- FAIL: TestOutOfGasInStorageCacheFlush (4.76s)
TestVersion30
Stack Traces | 7.850s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
TRACE[10-10|14:32:42.104] P2P networking is spinning down
�[90mpanic-after-write: deployed to 0x209A869BA8373Fc47655D22Ee00e38B6Bf159f0F�[0;0m
    precompile_inclusion_test.go:90: goroutine 455298 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.2/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x4082bd0, 0xc09fcd6fc0}, {0x4040e20, 0xc04c3dac30}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc09fcd6fc0, {0x4040e20, 0xc04c3dac30}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:1763 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc09fcd6fc0, 0x1e, {0xc0925b3db0, 0x6, 0x0?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:90 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion30(0xc09fcd6fc0?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:67 +0x798
        testing.tRunner(0xc09fcd6fc0, 0x3ccafe8)
        	/opt/hostedtoolcache/go/1.25.2/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.2/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:90: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
--- FAIL: TestVersion30 (7.85s)

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@magicxyyz magicxyyz requested review from KolbyML and gligneul October 9, 2025 00:14
@magicxyyz magicxyyz marked this pull request as ready for review October 9, 2025 13:29
@magicxyyz magicxyyz assigned magicxyyz and KolbyML and unassigned magicxyyz Oct 9, 2025
KolbyML
KolbyML previously approved these changes Oct 9, 2025
Copy link
Member

@KolbyML KolbyML left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on my end

Comment on lines +24 to +30
func (c *Config) Apply(_ *params.ChainConfig) {
// do nothing
}

func ConfigAddOptions(_ string, _ *pflag.FlagSet) {
// don't add any of debug block options
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (c *Config) Apply(_ *params.ChainConfig) {
// do nothing
}
func ConfigAddOptions(_ string, _ *pflag.FlagSet) {
// don't add any of debug block options
}

if these don't do anything shouldn't we just not add them? if we need them in the future we can add them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually need those defined for the the production builds that are without debugblock build flag. Then we want those to be just stubs and have no effect.

@KolbyML KolbyML assigned gligneul and unassigned KolbyML Oct 9, 2025
Co-authored-by: Kolby Moroz Liebl <[email protected]>
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.

3 participants