Skip to content

Conversation

Tristan-Wilson
Copy link
Member

This commit moves the ReferenceDAProofValidator contract and tests from nitro-contracts to contracts-local, as this is a reference implementation that doesn't need to be part of the core nitro-contracts package. The solidity contract was already reviewed in OffchainLabs/nitro-contracts#357

Since the Reference DA contract is now available, this commit activates contract-based certificate validation by uncommenting the ValidateWithContract calls in certificate.go, reference_reader.go, and reference_validator.go. These were previously disabled with TODO comments waiting for contract merge.

This commit also includes some changes required for nitro-testnode to work in CustomDA mode with Reference DA. It Ensures contracts are available in Docker builds by copying both contracts/ and contracts-local/ directories. It also adds ReferenceDA signing key to config dump exclusion list to prevent accidental exposure of private keys.
This change was merged into the custom-da branch in: #3803

Other changes required that were needed for the standalone daprovider to work with nitro-testnode were:

  • New parent-chain-node-url and parent-chain-connection-attempts config
  • L1 client creation in daprovider startup for ReferenceDA mode

This change was merged into the custom-da branch in: #3819

This commit moves the ReferenceDAProofValidator contract and tests from
nitro-contracts to contracts-local, as this is a reference
implementation that doesn't need to be part of the core nitro-contracts
package. The solidity contract was already reviewed in
OffchainLabs/nitro-contracts#357

Since the Reference DA contract is now available, this commit
activates contract-based certificate validation by uncommenting the
ValidateWithContract calls in certificate.go, reference_reader.go, and
reference_validator.go. These were previously disabled with TODO
comments waiting for contract merge.

This commit also includes some changes required for nitro-testnode to
work in CustomDA mode with Reference DA. It Ensures contracts are
available in Docker builds by copying both contracts/ and
contracts-local/ directories. It also adds ReferenceDA signing key to
config dump exclusion list to prevent accidental exposure of private
keys.  This change was merged into the custom-da branch in:
#3803

Other changes required that were needed for the standalone daprovider to
work with nitro-testnode were:
   - New parent-chain-node-url and parent-chain-connection-attempts
     config
   - L1 client creation in daprovider startup for ReferenceDA mode
This change was merged into the custom-da branch in:
#3819
Copy link

github-actions bot commented Oct 17, 2025

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
2150 3 2147 0
View the top 3 failed tests by shortest run time
TestVersion40
Stack Traces | 5.370s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [10-17|16:42:05.018] HTTP server stopped                      endpoint=127.0.0.1:42071
TRACE[10-17|16:42:05.018] P2P networking is spinning down
    precompile_inclusion_test.go:90: goroutine 455210 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.3/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x40a9870, 0xc0767abc00}, {0x4067ac0, 0xc05b92cb70}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc0767abc00, {0x4067ac0, 0xc05b92cb70}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:1723 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc0767abc00, 0x28, {0xc0ae707df8, 0x5, 0x39?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:90 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion40(0xc0767abc00?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:71 +0x64b
        testing.tRunner(0xc0767abc00, 0x3cf1f68)
        	/opt/hostedtoolcache/go/1.25.3/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.3/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:90: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
--- FAIL: TestVersion40 (5.37s)
TestTimeboostTxsTimeoutByBlock
Stack Traces | 31.890s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
DEBUG[10-17|16:40:25.494] Dereferenced trie from memory database   nodes=16  size=3.21KiB   time="35.696µs"  gcnodes=780  gcsize=148.55KiB  gctime=1.988939ms  livenodes=192   livesize=38.40KiB
DEBUG[10-17|16:40:25.494] Dereferenced trie from memory database   nodes=16  size=3.25KiB   time="58.388µs"  gcnodes=796  gcsize=151.80KiB  gctime=2.047187ms  livenodes=176   livesize=35.15KiB
DEBUG[10-17|16:40:25.494] Dereferenced trie from memory database   nodes=16  size=3.25KiB   time="41.988µs"  gcnodes=812  gcsize=155.05KiB  gctime=2.089035ms  livenodes=160   livesize=31.89KiB
DEBUG[10-17|16:40:25.494] Dereferenced trie from memory database   nodes=16  size=3.32KiB   time="45.194µs"  gcnodes=828  gcsize=158.37KiB  gctime=2.134059ms  livenodes=144   livesize=28.58KiB
DEBUG[10-17|16:40:25.494] Dereferenced trie from memory database   nodes=24  size=4.65KiB   time="64.831µs"  gcnodes=852  gcsize=163.02KiB  gctime=2.19873ms   livenodes=120   livesize=23.92KiB
DEBUG[10-17|16:40:25.494] Dereferenced trie from memory database   nodes=19  size=3.60KiB   time="46.347µs"  gcnodes=871  gcsize=166.62KiB  gctime=2.244926ms  livenodes=101   livesize=20.33KiB
DEBUG[10-17|16:40:25.494] Dereferenced trie from memory database   nodes=18  size=3.50KiB   time="44.493µs"  gcnodes=889  gcsize=170.12KiB  gctime=2.289208ms  livenodes=83    livesize=16.83KiB
DEBUG[10-17|16:40:25.494] Dereferenced trie from memory database   nodes=16  size=3.25KiB   time="38.191µs"  gcnodes=905  gcsize=173.37KiB  gctime=2.327259ms  livenodes=67    livesize=13.58KiB
DEBUG[10-17|16:40:25.494] Dereferenced trie from memory database   nodes=16  size=3.38KiB   time="59.611µs"  gcnodes=921  gcsize=176.75KiB  gctime=2.38667ms   livenodes=51    livesize=10.20KiB
DEBUG[10-17|16:40:25.494] Dereferenced trie from memory database   nodes=17  size=3.38KiB   time="41.307µs"  gcnodes=938  gcsize=180.14KiB  gctime=2.427807ms  livenodes=34    livesize=6.81KiB
DEBUG[10-17|16:40:25.494] Dereferenced trie from memory database   nodes=18  size=3.53KiB   time="44.172µs"  gcnodes=956  gcsize=183.66KiB  gctime=2.471798ms  livenodes=16    livesize=3.29KiB
DEBUG[10-17|16:40:25.495] Dereferenced trie from memory database   nodes=16  size=3.29KiB   time="42.91µs"   gcnodes=972  gcsize=186.95KiB  gctime=2.514568ms  livenodes=0     livesize=0.00B
DEBUG[10-17|16:40:25.495] Dereferenced trie from memory database   nodes=0   size=0.00B     time=320ns       gcnodes=972  gcsize=186.95KiB  gctime=2.514738ms  livenodes=0     livesize=0.00B
DEBUG[10-17|16:40:25.495] Dereferenced trie from memory database   nodes=0   size=0.00B     time=220ns       gcnodes=972  gcsize=186.95KiB  gctime=2.514798ms  livenodes=0     livesize=0.00B
INFO [10-17|16:40:25.495] Blockchain stopped
DEBUG[10-17|16:40:25.498] redis producer: check responses starting
DEBUG[10-17|16:40:25.498] checkResponses                           responded=0 errored=0 checked=0
TRACE[10-17|16:40:25.498] Refreshing our lock                      id=auctioneer-c848517e-1760719195387823683
TRACE[10-17|16:40:25.499] P2P networking is spinning down
--- FAIL: TestTimeboostTxsTimeoutByBlock (31.89s)
TestEthSyncing
Stack Traces | 41.540s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
DEBUG[10-17|16:38:18.601] Executing EVM call finished              runtime="357.766µs"
DEBUG[10-17|16:38:18.602] Served eth_call                          reqid=1547  duration="409.321µs"
DEBUG[10-17|16:38:18.602] Served eth_call                          reqid=2560  duration="396.848µs"
TRACE[10-17|16:38:18.602] Handled RPC response                     reqid=2560  duration="2.344µs"
TRACE[10-17|16:38:18.602] Handled RPC response                     reqid=1547  duration="1.693µs"
DEBUG[10-17|16:38:18.602] Served eth_estimateGas                   reqid=119   duration="682.169µs"
DEBUG[10-17|16:38:18.602] Served eth_getBlockByNumber              reqid=685   duration=1.049605ms
TRACE[10-17|16:38:18.602] Handled RPC response                     reqid=119   duration="2.405µs"
INFO [10-17|16:38:18.602] State snapshot generator is not found
INFO [10-17|16:38:18.602] Starting snapshot generation             root=56e81f..63b421 accounts=0  slots=0     storage=0.00B   dangling=0 elapsed="3.226µs"
TRACE[10-17|16:38:18.602] Handled RPC response                     reqid=685   duration="1.703µs"
DEBUG[10-17|16:38:18.602] Served eth_getLogs                       reqid=576   duration="432.675µs"
DEBUG[10-17|16:38:18.602] Served eth_maxPriorityFeePerGas          reqid=686   duration="20.488µs"
DEBUG[10-17|16:38:18.602] Executing EVM call finished              runtime="309.356µs"
DEBUG[10-17|16:38:18.602] Served eth_call                          reqid=5383  duration="443.816µs"
TRACE[10-17|16:38:18.602] Handled RPC response                     reqid=686   duration=751ns
TRACE[10-17|16:38:18.602] Handled RPC response                     reqid=5383  duration="3.086µs"
DEBUG[10-17|16:38:18.603] Executing EVM call finished              runtime="178.863µs"
DEBUG[10-17|16:38:18.603] Served eth_call                          reqid=5384  duration="310.909µs"
TRACE[10-17|16:38:18.603] Handled RPC response                     reqid=5384  duration="1.242µs"

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

Copy link
Contributor

@ganeshvanahalli ganeshvanahalli left a comment

Choose a reason for hiding this comment

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

LGTM

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