Skip to content

ci: run testnode jobs on arbitrum-litro - #484

Open
douglance wants to merge 11 commits into
chore/audit-check-2026-11from
ci/litro-testnode
Open

douglance wants to merge 11 commits into
chore/audit-check-2026-11from
ci/litro-testnode

Conversation

@douglance

@douglance douglance commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Moves the four testnode jobs in contract-tests.yml from nitro-testnode to arbitrum-litro v0.5.1. Job names and coverage don't change.

Each job runs one container from a prebaked test image (test/e2e/litro/Dockerfile): litro plus Foundry, Node 24, the yarn packages and develop's compiled contracts. litro-tests-image.yml publishes it to ghcr.io/offchainlabs/nitro-contracts-litro-tests on every push to develop. test/e2e/litro/ci.bash copies the PR's source into the container and compiles there; hardhat and forge recompile only files whose content changed, so tests always run the PR's contracts. If package.json, yarn.lock or patches/ changed, it runs yarn install. If the image can't be pulled, it builds it. test/e2e/litro/l3.bash deploys this PR's RollupCreator and an L3 rollup on litro's L2 and runs the L3 node in the same container.

Changes outside CI:

  • patches/@arbitrum+sdk+3.7.3.patch: 3.7.3 queries BoLD AssertionCreated from createdAtBlock, which is an L1 block number when the parent chain is Arbitrum. The withdraw test fails with "invalid block range params". The patch backports 4.x's mapping through NodeInterface.l2BlockRangeForL1.
  • orbitChain.ts: filters RollupCreated by our rollup, because litro's L2 already has one.
  • 4844: blobs go to Anvil via cast send --blob (exact blob count asserted) instead of goomy-blob on geth.

Before merge

  • The nitro-contracts-litro-tests ghcr package needs to be readable by this repo's workflows. Until the publish workflow has run on develop, each job builds the image itself (slower, same result).

Test

Job time under act (Colima, Apple silicon), image already local:

Job testnode litro, prebaked
Test e2e 190s 21-36s
Test e2e custom fee token 179s 26-35s
Test e2e fee token with 6 decimals and pricer 196s 49-51s
4844 tests 166s 14-26s

Results: 11 passing + 1 pending (ETH, fee token 18), 12 passing (fee token 6 + pricer), 2 passing (4844).

Checks:

  • A revert added to StylusDeployer.deploy recompiles 1 file and fails the 3 Stylus tests that call it.
  • Changing Bridge.sol recompiles 4 files in 35s; a full compile takes 92s on the same host.
  • Changing package.json triggers the in-container yarn install.

CI

First run on this PR. The image isn't published yet, so each job built it (114-151s) before running:

Job develop this PR after the image build
Test e2e 735s 177s 28s
Test e2e custom fee token 797s 197s 34s
Test e2e fee token with 6 decimals and pricer 879s 168s 40s
4844 tests 621s 152s 14s

develop numbers are from run 42641808825. Once the image is published, the build step becomes a pull; that time isn't measured yet. Audit (24) fails on every branch right now (new follow-redirects and fast-uri advisories), not from this change.

litro v0.6.9

The test image now builds on arbitrum-litro:v0.6.9-nc3.2-l2 (Nitro v3.12.4) (362 MB instead of 1,568 MB). litro's 250ms parent-chain poll is now its default, so the override is gone. v0.6 no longer ships yarn, so the image installs yarn 1.22.22 next to Node 24. v0.6.2 raised the L1 block gas limit to 100M, so anvil no longer drops a sender's later transactions in large batches. ci.bash starts the container with TESTNODE_L1_BLOCK_TIME=0.25, so anvil mines every 250ms instead of litro's 1s default.

Image built in-job, seconds after the image is up (v0.6.1 is run 44223999646, v0.6.2 is 44233052225, v0.6.5 is three attempts of 44311068595):

Job v0.5.1 v0.6.1 v0.6.2 v0.6.5, 250ms L1 blocks
Test e2e 28s 29s 29s 23s, 26s, 24s
Test e2e custom fee token 34s 35s 31s 28s, 27s, 27s
Test e2e fee token with 6 decimals and pricer 40s 33s 45s 45s, 43s, 45s
4844 tests 14s 14s 12s 12s, 11s, 11s

The 250ms block time saves 3-5s on the ETH and fee token 18 jobs, in both the L3 deployment and the tests. The fee token 6 + pricer job's 20s L3 deployment and 22s of tests don't change. v0.6.7 strips Nitro's debug symbols (amd64 base 155 MB compressed instead of 226 MB, same Nitro v3.12.2). Over three attempts each (runs 44311068595 and 44372134655), the base pull inside the image build took 3.6-7.5s instead of 4.1-8.2s, and whole jobs took 102-154s instead of 112-145s. The difference is within runner noise. v0.6.9 moves Nitro from v3.12.2 to v3.12.4: no test changes were needed, and three attempts of run 44776114221 pass with the same counts and job times of 106-183s. The smaller base pays off in the image pull once litro-tests-image.yml publishes from develop.

test/e2e/litro/l3.bash deploys this checkout's RollupCreator and an L3
rollup on litro's L2 and runs the L3 node as a sidecar from the same
litro image, replacing nitro-testnode's l3node.

- testSetup reads the L3 deployment from L3_DEPLOYMENT_PATH when set.
- orbitChain finds our RollupCreated log by rollup address; litro's L2
  already holds its own L3 rollup.
- @arbitrum/sdk 3.7.3 reads BoLD assertion events from createdAtBlock,
  an L1 block number when the parent chain is Arbitrum; the patch maps
  it to the parent chain's block range, as 4.x does.
- 4844 blob txs go to Anvil with cast instead of goomy-blob on geth,
  still with exactly the requested blob count. The funding key moves
  off litro's L2 batch poster, which sends from it on L1.

customFeeRollup checks the batch poster's refund for one batch to the
wei, which held on nitro-testnode because of how its L3 had been run:
- Batches wait 30s, as nitro-testnode's do. At litro's 100ms the next
  spending report lands before the test reads the one it measured.
- A fresh L3 owes its batch poster more than the test's one clearing
  batch pays, so the rest is paid with the measured batch. Setup raises
  the L1 price per unit, sends traffic until the L1 pricing surplus is
  non-negative, and restores the price.
The four testnode jobs keep their names and coverage: ETH, 18-decimal
fee token, and 6-decimal fee token with pricer L3s, plus 4844 on L1.
litro v0.5.1 is the first release with offchain Stylus activation
(OffchainLabs/arbitrum-litro#63), which StylusDeployer needs.
Measured locally per row (chain ready + tests): ETH 150s -> 24s, 18-decimal fee
token 240s -> 28s, 6-decimal fee token 387s -> 38s, 4844 179s -> 10s.

- L3 polls the L2 every 250ms instead of Nitro's 15s default, so deposits and
  spending reports land in about a second.
- litro's L2 polls L1 every 250ms (derived image setting
  TESTNODE_PARENT_CHAIN_POLL_INTERVAL); L3 assertions are confirmable only once
  the L2 has seen a newer L1 block.
- The validator wallet is created, wrapped and approved before the L3 node
  starts. The node queues those steps together, each estimate reverts until the
  previous one is mined, and it retries every 30s, so the first assertion came
  a minute after start.
- L3 batches post after 2s instead of 30s; customFeeRollup passed 9 of 9 runs.
- Tests poll receipts every 250ms instead of ethers' 4s, and the withdrawal
  test checks every 1s instead of every 60s.
- The 4844 job mines L1 transactions immediately; it only uses L1.
- The e2e and 4844 jobs skip the full forge build, which they don't read.
Each litro job now pulls one image (test/e2e/litro/Dockerfile): the
arbitrum-litro image plus Foundry, Node 24, the yarn packages and
develop's compiled contracts. litro-tests-image.yml publishes it on every
push to develop. The jobs drop setup-node, the Foundry install, yarn
install and the full compile.

test/e2e/litro/ci.bash starts the container and copies the checkout's
source over the image's, deleting files the checkout doesn't have. It
then compiles inside the container. Hardhat and forge recompile only the
files whose content changed, so tests always run the checkout's
contracts. If package.json, yarn.lock or patches/ differ from the
image's, it runs yarn install. If the image can't be pulled, it builds
it. The L3 node now runs as a process in the same container, not as a
second container.

Job time under act, image already local:
- Test e2e: 190s -> 21-36s
- Test e2e custom fee token: 179s -> 26-35s
- Test e2e fee token with 6 decimals and pricer: 196s -> 49-51s
- 4844 tests: 166s -> 14-26s
Old and new back to back on a loaded host: Test e2e 262s -> 90s,
4844 tests 228s -> 31s. The new jobs download nothing; with the VM
offline, all 8 old runs failed fetching Foundry or the solc list and
all 8 new runs passed.

Checks:
- All four rows pass in the image: 11 + 1 pending (ETH, 18-decimal),
  12 (6-decimal with pricer), 2 (4844).
- A revert added to StylusDeployer.deploy in the checkout recompiles 1
  file and fails the 3 Stylus tests that call it.
- Changing Bridge.sol recompiles 4 files in 35s. A full compile takes
  92s on the same host, and an unchanged checkout takes 2s.
- Changing package.json triggers the in-container yarn install.
v0.6.1's image is 362 MB instead of 1,568 MB, polls the parent chain every
250ms by default, and is healthy in under 2s. The 250ms override here is now
litro's default, so it goes.

The slim image no longer ships yarn, so the test image installs yarn 1.22.22
next to Node 24.
A PATH= prefix doesn't change where dash looks up the command, so npm was
not found (run 44223501888).
@douglance
douglance marked this pull request as ready for review November 18, 2026 03:41
v0.6.2 raises the L1 block gas limit to 100M, so anvil no longer drops a
sender's later transactions in large batches.
@douglance
douglance changed the base branch from develop to chore/audit-check-2026-11 November 18, 2026 20:35
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.

1 participant