-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/seq 725 assertion poster tests #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/seq 725 assertion poster tests #359
Conversation
SEQ-725 add tests for AssertionPoster.sol
This contract is used for withdrawals, so it needs to be secure formal verification of the contract would be amazing as well! |
| // SPDX-License-Identifier: UNLICENSED | ||
| pragma solidity 0.8.28; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this interface was deleted. If you merge main, this should get removed
| /// @dev Provided data was too large | ||
| /// @param dataLength The length of the data that is too large | ||
| /// @param maxDataLength The max length the data can be | ||
| error DataTooLarge(uint256 dataLength, uint256 maxDataLength); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where's this being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added to fix compilation issues at first but then after the refactor this may not be needed anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove it then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually being used in the Rollup.sol contract:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ericvelazquez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✅ ! But lets merge/rebase main first! Thanks for doing this 🙏
tsite
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small comment about the initialization guard, but other than that, lgtm - the tests look great!
…licts Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
| not(feature = "env-tests"), | ||
| ignore = "Counter contract has been removed from arbitrum bindings" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed Counter.sol which a template SC from when on boostrap Foundry. I removed it.
I think Devin wanted to explicitly warn about this in the this file which used it before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am removing it
ericvelazquez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix all the CI issues before merging this. I'm also not sure why changes in full_meta_node.rs and environemtn_tests.rs were needed. Please revert them if not related to this PR.
…n name from initialize to configure Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
* set tx gas limit to block gas limit * set tx gas limit to block gas limit
* translator now handles reorgs gracefully * remove all sleeps on integration_tests and use wait_until! instead * Update metabased-translator/crates/common/src/tracing.rs Co-authored-by: Daniil R <daniil@syndicate.io> * PR comments * fix reth version --------- Co-authored-by: Daniil R <daniil@syndicate.io>
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
* fix cargo test -- --test-threads=1 * add linear ticket
* TC sequencer initial setup * Fix clippy * Fix some comments * Fix some bugs in TC setup * Fix tests * Updates from PR comments: refactor url in config, documentation, comments, and todos * Add import to fix PR checks
* attempt to make tests less flaky * extra batch checks
* add feature for calldata check modules * create module for dream chain calldata usecase * add test for CalldataAlwaysAllwedModule * rust bindings * Add test for DreamChainCheckCallerFromCalldataModule * fix ftm error * Fix merge conflicts in PR #346 (#351) * remove unused RESTORE_FROM_SAFE_STATE flag (#338) * remove _CHAIN_ from env vars (#340) * docs: Add documentation for forge doc command (#341) * Add documentation for forge doc command Co-Authored-By: will@syndicate.io <will@syndicate.io> * Update forge doc documentation with default behavior Co-Authored-By: will@syndicate.io <will@syndicate.io> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: will@syndicate.io <will@syndicate.io> * Remove BLOCK_BUILDER_ and SLOTTER_ prefixes from config values (#339) * Remove BLOCK_BUILDER_ and SLOTTER_ prefixes from config values Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update variable names to match environment variable names Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update references to renamed variables Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update test cases to use renamed variables Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Apply cargo fmt to fix formatting issues Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update variable references in arbitrum_adapter.rs Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update variable references in full_meta_node.rs test file Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update ignore_delayed_messages to arbitrum_ignore_delayed_messages in tests Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update owner_address to rollup_owner_address in integration_tests.rs Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Add empty rustfmt config to fix formatting Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update rustfmt config to specify edition Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update rustfmt config with max_width Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update rustfmt config with additional settings Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Remove .rustfmt.toml as requested Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Run cargo +nightly fmt directly as requested Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * fix tests * ROLLUP_TYPE -> TARGET_ROLLUP_TYPE --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jorge@syndicate.io <jorge@syndicate.io> * Update pr template to indicate metrics changes (#342) * feat: maestro skeleton (#344) * feat: maestro skeleton * feat: metabased-poster v1 (#337) * feat: metabased poster scaffolding * feat: metabased-poster poller * poller working * update contract * submitter working * update submitter * update config * update submitter * test * rm rusttool * update logger * simple poster * simple poster * simplify poster * simplify poster * SEQ-694: update test to use assertion poster contract (#343) Ticket Related Linear Ticket: SEQ-694 What does this PR do? Summary: add a contract for posting assertions that the assertion poster (feat: metabased-poster v1 #337) uses Key Changes: remove unused forge-std submodule reorganize contracts folder layout to separate the arbitrum interfaces from our contracts Breaking changes? Yes/No: No Metrics changes? Yes/No: No Anything interesting? All existing metabased rollups can be upgraded to support withdrawals by deploying & initializing the AssertionPoster contract! How can this PR be tested? ci tests * update test to check for config changes (#349) Ticket Related Linear Ticket: SEQ-723 What does this PR do? Summary: update withdrawal test to check that config changes are handled correctly Breaking changes? Yes/No: No How can this PR be tested? manually tested to make sure the test fails if the config values are not updated in the contract ci tests * feat: poster docker & deployment scripts (#350) * feat: poster doker & deployment scripts * typo * Fix remaining merge conflicts in arbitrum binding files Co-Authored-By: gus@syndicate.io <gus@syndicate.io> * Update Rust contract bindings from feature branch Co-Authored-By: gus@syndicate.io <gus@syndicate.io> * Fix missing iassertionposter module in arbitrum bindings Co-Authored-By: gus@syndicate.io <gus@syndicate.io> * Add missing module declarations to arbitrum/mod.rs Co-Authored-By: gus@syndicate.io <gus@syndicate.io> --------- Co-authored-by: Jorge Silva <jorge@syndicate.io> Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: will@syndicate.io <will@syndicate.io> Co-authored-by: Kristina Fischer <158780688+squibwarb@users.noreply.github.com> Co-authored-by: Daniil R <daniil@syndicate.io> Co-authored-by: Eric Velazquez <ericvelmar95@gmail.com> Co-authored-by: tsite <stubydent@gmail.com> Co-authored-by: gus@syndicate.io <gus@syndicate.io> * rust bindings * Fix missing forge-std submodule URL for metabased-translator/contracts (#353) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: gus@syndicate.io <gus@syndicate.io> * update Certora * fix MetabasedSequencerChain certora spec * Certora fixez for RequireAllModule * add spec for RequireAnyModule * revert certora version to see if it works * downgrade python version * rust bindings * Fix CI pipeline: update Rust contract bindings and fix Certora installation (#354) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: gus@syndicate.io <gus@syndicate.io> * install setuptools==75.8.2 before certora * fix spec * delete superfluous file --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Jorge Silva <jorge@syndicate.io> Co-authored-by: will@syndicate.io <will@syndicate.io> Co-authored-by: Kristina Fischer <158780688+squibwarb@users.noreply.github.com> Co-authored-by: Daniil R <daniil@syndicate.io> Co-authored-by: Eric Velazquez <ericvelmar95@gmail.com> Co-authored-by: tsite <stubydent@gmail.com> Co-authored-by: gus@syndicate.io <gus@syndicate.io>
* add feature for calldata check modules * create module for dream chain calldata usecase * add test for CalldataAlwaysAllwedModule * rust bindings * Add test for DreamChainCheckCallerFromCalldataModule * fix ftm error * Fix merge conflicts in PR #346 (#351) * remove unused RESTORE_FROM_SAFE_STATE flag (#338) * remove _CHAIN_ from env vars (#340) * docs: Add documentation for forge doc command (#341) * Add documentation for forge doc command Co-Authored-By: will@syndicate.io <will@syndicate.io> * Update forge doc documentation with default behavior Co-Authored-By: will@syndicate.io <will@syndicate.io> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: will@syndicate.io <will@syndicate.io> * Remove BLOCK_BUILDER_ and SLOTTER_ prefixes from config values (#339) * Remove BLOCK_BUILDER_ and SLOTTER_ prefixes from config values Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update variable names to match environment variable names Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update references to renamed variables Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update test cases to use renamed variables Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Apply cargo fmt to fix formatting issues Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update variable references in arbitrum_adapter.rs Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update variable references in full_meta_node.rs test file Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update ignore_delayed_messages to arbitrum_ignore_delayed_messages in tests Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update owner_address to rollup_owner_address in integration_tests.rs Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Add empty rustfmt config to fix formatting Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update rustfmt config to specify edition Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update rustfmt config with max_width Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Update rustfmt config with additional settings Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Remove .rustfmt.toml as requested Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * Run cargo +nightly fmt directly as requested Co-Authored-By: jorge@syndicate.io <jorge@syndicate.io> * fix tests * ROLLUP_TYPE -> TARGET_ROLLUP_TYPE --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jorge@syndicate.io <jorge@syndicate.io> * Update pr template to indicate metrics changes (#342) * feat: maestro skeleton (#344) * feat: maestro skeleton * feat: metabased-poster v1 (#337) * feat: metabased poster scaffolding * feat: metabased-poster poller * poller working * update contract * submitter working * update submitter * update config * update submitter * test * rm rusttool * update logger * simple poster * simple poster * simplify poster * simplify poster * SEQ-694: update test to use assertion poster contract (#343) Ticket Related Linear Ticket: SEQ-694 What does this PR do? Summary: add a contract for posting assertions that the assertion poster (feat: metabased-poster v1 #337) uses Key Changes: remove unused forge-std submodule reorganize contracts folder layout to separate the arbitrum interfaces from our contracts Breaking changes? Yes/No: No Metrics changes? Yes/No: No Anything interesting? All existing metabased rollups can be upgraded to support withdrawals by deploying & initializing the AssertionPoster contract! How can this PR be tested? ci tests * update test to check for config changes (#349) Ticket Related Linear Ticket: SEQ-723 What does this PR do? Summary: update withdrawal test to check that config changes are handled correctly Breaking changes? Yes/No: No How can this PR be tested? manually tested to make sure the test fails if the config values are not updated in the contract ci tests * feat: poster docker & deployment scripts (#350) * feat: poster doker & deployment scripts * typo * Fix remaining merge conflicts in arbitrum binding files Co-Authored-By: gus@syndicate.io <gus@syndicate.io> * Update Rust contract bindings from feature branch Co-Authored-By: gus@syndicate.io <gus@syndicate.io> * Fix missing iassertionposter module in arbitrum bindings Co-Authored-By: gus@syndicate.io <gus@syndicate.io> * Add missing module declarations to arbitrum/mod.rs Co-Authored-By: gus@syndicate.io <gus@syndicate.io> --------- Co-authored-by: Jorge Silva <jorge@syndicate.io> Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: will@syndicate.io <will@syndicate.io> Co-authored-by: Kristina Fischer <158780688+squibwarb@users.noreply.github.com> Co-authored-by: Daniil R <daniil@syndicate.io> Co-authored-by: Eric Velazquez <ericvelmar95@gmail.com> Co-authored-by: tsite <stubydent@gmail.com> Co-authored-by: gus@syndicate.io <gus@syndicate.io> * rust bindings * Fix missing forge-std submodule URL for metabased-translator/contracts (#353) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: gus@syndicate.io <gus@syndicate.io> * update Certora * fix MetabasedSequencerChain certora spec * Certora fixez for RequireAllModule * add spec for RequireAnyModule * revert certora version to see if it works * downgrade python version * rust bindings * Fix CI pipeline: update Rust contract bindings and fix Certora installation (#354) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: gus@syndicate.io <gus@syndicate.io> * install setuptools==75.8.2 before certora * fix spec * delete superfluous file * create ConfigManager and ChainConfig contracts * rust bindings * Update contract bindings for ChainConfig and ConfigManager contracts Co-Authored-By: gus@syndicate.io <gus@syndicate.io> * refactor ChainConfig proxy creation. Remove need to add init data * prefix contract name with "Arb" * remove TARGET_ROLLUP_TYPE from ArbChainConfig * rb * Update contract bindings using make command Co-Authored-By: gus@syndicate.io <gus@syndicate.io> * add PR suggestions * rb * rb * Update contract bindings using make command Co-Authored-By: gus@syndicate.io <gus@syndicate.io> --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Jorge Silva <jorge@syndicate.io> Co-authored-by: will@syndicate.io <will@syndicate.io> Co-authored-by: Kristina Fischer <158780688+squibwarb@users.noreply.github.com> Co-authored-by: Daniil R <daniil@syndicate.io> Co-authored-by: Eric Velazquez <ericvelmar95@gmail.com> Co-authored-by: tsite <stubydent@gmail.com> Co-authored-by: gus@syndicate.io <gus@syndicate.io>
* Update contract to fix tests * fix binding
* feat: use `shared` lib across repo * feat: `tc-client` using shared `json_rpc` * feat: `tc-client` using shared `json_rpc` * feat: use `shared` txn validation in sequencers * feat: check txn size in `validation` - use `Byte-Unit` lib for displaying txn sizes * feat: check txn size in `validation` - use `Byte-Unit` lib for displaying txn sizes * feat: remove dep * feat: move `test_utils` and `test_tracing` to `/shared` * feat: move `test_utils` and `test_tracing` to `/shared` - removes `metabased-translator/crates/test-utils` crate
* feat: maestro Docker image * feat: maestro Docker image * feat: maestro Docker image * feat: maestro Docker image
Co-Authored-By: gus@syndicate.io <gus@syndicate.io>
|
Close this PR in preference of #395 |
Ticket
What does this PR do?
Refactor
AssertPosterand add tests to itBreaking changes?
How can this PR be tested?
Go to
metabase-translator/contractsand runforge test