Skip to content

Bump rollups-contracts to 3.0.0-alpha.9 - #281

Open
guidanoli wants to merge 3 commits into
mainfrom
feature/update-rollups-contracts-3.0.0-alpha.9
Open

Bump rollups-contracts to 3.0.0-alpha.9#281
guidanoli wants to merge 3 commits into
mainfrom
feature/update-rollups-contracts-3.0.0-alpha.9

Conversation

@guidanoli

Copy link
Copy Markdown
Collaborator

Bumps rollups-contracts from 3.0.0-alpha.6 to 3.0.0-alpha.9 and adapts the project to the upstream changes, plus a couple of small unrelated fixes bundled in.

Key changes:

  • Adds DaveConsensus.wasInputFinalized, required by the updated IOutputsMerkleRootValidator interface (used for deposit refunds). Compares inputIndex against the current sealed epoch's input index lower bound; ignores the block-number argument. Covered by new unit tests.
  • DaveAppFactory now passes IInputBox directly to IApplicationFactory instead of encoding a DA blob — internal simplification, no API or behavior change for users of DaveAppFactory or DaveConsensus.
  • BaseDeploymentScript now also stores deployments in TXT format (JSON deployment artifacts are kept temporarily to help clients migrate but are deprecated); internal consumers switched to reading TXT, letting blockchain-reader drop its serde dependency.
  • Renames ERC*Erc* to match upstream renaming (e.g. ERC20PortalErc20Portal).
  • Tests now use rollups-contracts' deployment fixture directly (required an upstream import-path fix and local always_use_create_2_factory configuration).
  • Formatting cleanup: single-line imports across contracts, enabled by a new Foundry 1.5.0 option — no logic changes.
  • Docker fix: test image was missing contract-bindings.sh copy, breaking just bind; gave binding generation its own layer. Unrelated to the version bump, and untested by CI since it does not build this image.

Review guidance

  • Focus on wasInputFinalized and its tests.
  • Skim the rename/formatting changes — mechanical, low risk.
  • Double-check the TXT/JSON dual-write in BaseDeploymentScript doesn't break existing JSON consumers during the deprecation window.
  • The Docker fix is worth a manual build check since CI doesn't cover it.

The image never copied script/contract-bindings.sh, which both contract
justfiles have shelled out to since binding generation moved out of
them, so `just bind` would die with exit 127 before reaching Forge.
No CI workflow builds this image, so the gap survived the move.

Give binding generation its own layer, without the artifact cache
mounts. It runs `forge bind --force`, which clears out/ and cache/
before recompiling: removing a mount point fails with EBUSY, and the
reduced compile would otherwise evict the artifacts the preceding step
just built.
Foundry 1.5.0 introduced the `fmt.single_line_imports` Boolean
configuration option. When set, imports of at most one item suffer no
line breaks, even if they extend beyond the configured line length. This
makes imports more readable.
This commit bumps rollups-contracts from 3.0.0-alpha.6 to 3.0.0-alpha.9
and makes the necessary adjustments on the contracts side.

Implement DaveConsensus.wasInputFinalized, which is necessary under the
new IOutputsMerkleRootValidator interface and used in deposit refunds.
This commit also adds unit tests for this new function. The
implementation is trivial, as it only needs to compare the provided
input index with the input index inclusive lower bound of the current
sealed epoch. The provided input block number is discarded entirely by
DaveConsensus, similar to how the provided input index is discarded
entirely by both Authority and Quorum, since they delimit epochs based
on input block numbers rather than input indices.

Adapt DaveAppFactory implementation to changes in IApplicationFactory
interface relative to the data availability blob being replaced by
IInputBox. The DaveAppFactory contract already stored an immutable
IInputBox value, and encoded the DA blob at runtime. Now, it just needs
to forward this immutable value to IApplicationFactory. This is an
internal change. Users of the IDaveAppFactory interface should not
notice any difference (if not for the new ApplicationCreated event).

Adapt contract deployment artifact loading/storing utilities to store
deployments in both TXT and JSON formats for now (JSON is deprecated for
now so that clients can smoothly migrate to TXT), load individual
deployments from TXT artifacts, and import project deployments in both
formats. These changes are internal to BaseDeploymentScript. The
signature of the store/load/import functions haven't changed. We also
took the opportunity to edit the is-contract-name-valid function so that
it uses literal character strings rather than hard-coded ASCII codes.

It also adapts internal clients of deployment artifacts, giving
preference to TXT deployment artifacts (given that JSON deployment
artifacts are currently deprecated and will be removed in the future).
So, instead of doing `jq -r .address`, you'd just `cat` the file.
In the blockchain-reader tests, we can now load deployments without
serde, which allowed us to remove it as dependency from that crate.

This commit also makes the necessary ERC to Erc renamings. For example,
the ERC20Portal was renamed to Erc20Portal, and its depositERC20Tokens
was renamed to depositErc20Tokens.

Internally, we now use rollups-contracts deployment fixture, so that we
don't have to repeat ourselves on the test contracts. This required an
upstream fix on rollups-contracts regarding import paths being absolute
(like `src/`) rather than relative (like `../../src/`). We also had to
set always_use_create_2_factory so that the fixture would work in tests.
@guidanoli
guidanoli marked this pull request as ready for review August 21, 2026 19:11
@guidanoli guidanoli self-assigned this Aug 21, 2026
@guidanoli guidanoli added this to the 3.0.0 milestone Aug 21, 2026
@guidanoli guidanoli moved this to Waiting review in Rollups SDK Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting review

Development

Successfully merging this pull request may close these issues.

1 participant