Skip to content

Conversation

@pmikolajczyk41
Copy link
Member

@pmikolajczyk41 pmikolajczyk41 commented Dec 23, 2025

  1. Move arbostypes.DefaultInitialL1BaseFee to go-ethereum/params
  2. Extend L2Config with InitialL1BaseFee field. Since the fee might exceed 1<<64, the field type is string and we have a getter InitialL1BaseFeeParsed that returns:
  • DefaultInitialL1BaseFee when the string is empty or it cannot be parsed in decimal system
  • parsed value (in decimal system)
  1. In the cmd/nitro/init.go resolve† the initial L1 base fee from either CLI flag or genesis configuration. Ensure it matches what was in the parsed init message on the parent chain.

† config resolution:

  • in case genesis.json is absent, use the --chain.initial-l1base-fee flag value
  • in case genesis.json is present and --chain.initial-l1base-fee is not empty, ensure the values match
  • use genesis.json

closes NIT-4242
pulls in OffchainLabs/go-ethereum#603

@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

❌ Patch coverage is 4.00000% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.14%. Comparing base (416e512) to head (e6feb25).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4171      +/-   ##
==========================================
+ Coverage   33.01%   33.14%   +0.13%     
==========================================
  Files         459      459              
  Lines       55830    55853      +23     
==========================================
+ Hits        18430    18512      +82     
+ Misses      34185    34091      -94     
- Partials     3215     3250      +35     

@github-actions
Copy link

github-actions bot commented Dec 23, 2025

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
4458 3 4455 0
View the top 3 failed tests by shortest run time
TestSetLatestSnapshotUrl
Stack Traces | 0.120s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
    init_test.go:300: running test case latest file with http url
INFO [12-30|19:05:01.958] Set latest snapshot url                  url=http://some.domain.com/arb1/2024/21/archive.tar.gz
    init_test.go:300: running test case latest file with https url
INFO [12-30|19:05:01.961] Set latest snapshot url                  url=https://some.domain.com/arb1/2024/21/archive.tar.gz
    init_test.go:300: running test case chain and contents with upper case
INFO [12-30|19:05:01.963] Set latest snapshot url                  url=http://127.0.0.1:36257/arb1/2024/21/archive.tar.gz
    init_test.go:353: goroutine 47 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.5/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x2e5f6f0, 0xc0003f6e00}, {0x2e32400, 0x41b4460}, {0xc000707bb0, 0x1, 0x1})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/cmd/nitro.Require(0xc0003f6e00, {0x2e32400, 0x41b4460}, {0xc000707bb0, 0x1, 0x1})
        	/home/runner/work/nitro/nitro/cmd/nitro/config_test.go:378 +0x5d
        github.com/offchainlabs/nitro/cmd/nitro.startFileServer.func2()
        	/home/runner/work/nitro/nitro/cmd/nitro/init_test.go:353 +0xa5
        created by github.com/offchainlabs/nitro/cmd/nitro.startFileServer in goroutine 67
        	/home/runner/work/nitro/nitro/cmd/nitro/init_test.go:350 +0x285
        
    init_test.go:353: �[31;1m [failed to shutdown server] context canceled �[0;0m
--- FAIL: TestSetLatestSnapshotUrl (0.12s)
TestAnyTrustRekey
Stack Traces | 52.880s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
        	/opt/hostedtoolcache/go/1.25.5/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x43fe870, 0xc000232a80}, {0x43bb140, 0xc20ac968a0}, {0xc0ba3ad310, 0x1, 0x1})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x9f
        github.com/offchainlabs/nitro/system_tests.Require(0xc000232a80, {0x43bb140, 0xc20ac968a0}, {0xc0ba3ad310, 0x1, 0x1})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:2034 +0x5d
        github.com/offchainlabs/nitro/system_tests.(*NodeBuilder).BuildL2OnL1(0xc0004b39e0, 0xc000232a80)
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:909 +0x5ae
        github.com/offchainlabs/nitro/system_tests.TestAnyTrustRekey(0xc000232a80)
        	/home/runner/work/nitro/nitro/system_tests/anytrust_test.go:162 +0xeaa
        testing.tRunner(0xc000232a80, 0x4039b08)
        	/opt/hostedtoolcache/go/1.25.5/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.5/x64/src/testing/testing.go:1997 +0x465
        
    common_test.go:909: �[31;1m [failed to deploy ArbDebug] nonce too low: address 0x26E554a8acF9003b83495c7f45F06edCB803d4e3, tx: 2 state: 3 �[0;0m
--- FAIL: TestAnyTrustRekey (52.88s)
ERROR[12-30|17:06:12.261] Delayed sequencer error                  err="context canceled"
�[34;1mInitial values�[0;0m
�[34;1m    L1 base fee 1886566592�[0;0m
�[34;1m    L1 estimate 5000000000�[0;0m
TestFastConfirmationWithSafe
Stack Traces | 71.710s run time
=== RUN   TestFastConfirmationWithSafe
=== PAUSE TestFastConfirmationWithSafe
=== CONT  TestFastConfirmationWithSafe
    common_test.go:711: BuildL1 deployConfig: DeployBold=false, DeployReferenceDAContracts=false
ERROR[12-30|17:06:18.769] latest L1 block is old                   l1Block=0 l1Timestamp=1970-01-01T00:00:00+0000 age=490865h6m18.769666178s
    common_test.go:1181: �[31;1m [bridging failed] �[0;0m
--- FAIL: TestFastConfirmationWithSafe (71.71s)
ERROR[12-30|17:07:15.101] Error getting finality msg count         scenario=safe err="context canceled"

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

bragaigor
bragaigor previously approved these changes Dec 24, 2025
@bragaigor
Copy link
Contributor

LGTM

Copy link
Contributor

@diegoximenes diegoximenes left a comment

Choose a reason for hiding this comment

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

As you mentioned in a meeting, since there are multiple valid ways to serialize chain config, in order to Execution build parsedInitMessage only through its local config, users will also need to have a way to provide the serialized chain config.
This can be done in this PR, a new PR, or even a new linear task can be created for that, up to you to decide the best path to move forward 🙂

@pmikolajczyk41
Copy link
Member Author

@diegoximenes regarding serialized chain config I'd go with another linear ticket (I'm about to create it)

@diegoximenes diegoximenes assigned tsahee and unassigned diegoximenes Dec 31, 2025
Name string `koanf:"name"`
InfoFiles []string `koanf:"info-files"`
InfoJson string `koanf:"info-json"`
InitialL1BaseFee string `koanf:"initial-l1base-fee"`
Copy link
Contributor

@diegoximenes diegoximenes Dec 31, 2025

Choose a reason for hiding this comment

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

Something that I didn't notice in previous reviews.
This flag will be better placed at the InitConfig instead of L2Config.

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.

5 participants