Bump rollups-contracts to 3.0.0-alpha.9 - #281
Open
guidanoli wants to merge 3 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps
rollups-contractsfrom 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:
DaveConsensus.wasInputFinalized, required by the updatedIOutputsMerkleRootValidatorinterface (used for deposit refunds). ComparesinputIndexagainst the current sealed epoch's input index lower bound; ignores the block-number argument. Covered by new unit tests.DaveAppFactorynow passesIInputBoxdirectly toIApplicationFactoryinstead of encoding a DA blob — internal simplification, no API or behavior change for users ofDaveAppFactoryorDaveConsensus.BaseDeploymentScriptnow 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, lettingblockchain-readerdrop itsserdedependency.ERC*→Erc*to match upstream renaming (e.g.ERC20Portal→Erc20Portal).always_use_create_2_factoryconfiguration).contract-bindings.shcopy, breakingjust 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
wasInputFinalizedand its tests.BaseDeploymentScriptdoesn't break existing JSON consumers during the deprecation window.