test(l2): add state reconstruction test to the CI#2255
Merged
Conversation
Remove redundant nextBlockToCommit
Include header info to reconstruct blocks
e1f2cad to
610fc21
Compare
fkrause98
approved these changes
Mar 20, 2025
fborello-lambda
approved these changes
Mar 20, 2025
fborello-lambda
left a comment
Contributor
There was a problem hiding this comment.
Amazing! Left one minor comment
Comment on lines
+182
to
+188
| rm -rf $$PWD/store | ||
| cargo run --release --manifest-path ../../cmd/ethrex_l2/Cargo.toml --bin ethrex_l2 -- config create ci --default | ||
| cargo run --release --manifest-path ../../cmd/ethrex_l2/Cargo.toml --bin ethrex_l2 -- config set ci | ||
| cargo run --release --manifest-path ../../cmd/ethrex_l2/Cargo.toml --bin ethrex_l2 -- stack reconstruct -g ../../test_data/genesis-l2.json -b ../../test_data/blobs/ -s $$PWD/store -c 0x0007a881CD95B1484fca47615B64803dad620C8d | ||
| cargo b --manifest-path ../../Cargo.toml --release | ||
| make init-l2 ethrex_L2_DEV_LIBMDBX=$$PWD/store 2>&1 >/dev/null & | ||
| cargo test state_reconstruct --release |
Contributor
There was a problem hiding this comment.
I've tested it out locally, but i had to wait for the l2 to start.
I've used a sleep after the make init-l2 which is not ideal.
In this case, i wouldn't init the metrics. I would comment the init-metrics target:
init-l2: # init-metrics ## 🚀 Initializes an L2 Lambda ethrex ClientI would also add a target to run the state_reconstruction test locally, just copying that part.
What do you think?
Contributor
There was a problem hiding this comment.
When i've tested it locally i had another chain, which produced some conflicts, i thought it was a timing issue.
However, i would remove the init-metrics target when using init-l2 anyway.
Co-authored-by: Federico Borello <156438142+fborello-lambda@users.noreply.github.com>
Oppen
reviewed
Mar 20, 2025
Oppen
reviewed
Mar 20, 2025
Oppen
approved these changes
Mar 20, 2025
ilitteri
reviewed
Mar 20, 2025
ilitteri
approved these changes
Mar 20, 2025
Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com>
pedrobergamini
pushed a commit
to pedrobergamini/ethrex
that referenced
this pull request
Aug 24, 2025
**Motivation** <!-- Why does this pull request exist? What are its goals? --> We want to check that the state diff reconstruction doesn't break on PRs. **Description** <!-- A clear and concise general description of the changes this PR introduces --> Added some tests that reconstruct the state from 3 blobs, which include balance and nonce diffs, and an ERC20 contract "deployment" with balance diffs. <!-- Link to issues: Resolves lambdaclass#111, Resolves lambdaclass#222 --> --------- Co-authored-by: Federico Borello <156438142+fborello-lambda@users.noreply.github.com> Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com> Co-authored-by: Javier Chatruc <jrchatruc@gmail.com>
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.
Motivation
We want to check that the state diff reconstruction doesn't break on PRs.
Description
Added some tests that reconstruct the state from 3 blobs, which include balance and nonce diffs, and an ERC20 contract "deployment" with balance diffs.