-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat(fevm): L3 testing #1084
Draft
maximopalopoli
wants to merge
68
commits into
main
Choose a base branch
from
levm/feat/l3-testing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat(fevm): L3 testing #1084
Conversation
This file contains 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
…reum_rust into levm/refactor/db
…reum_rust into levm/refactor/db
…reum_rust into levm/refactor/db
…reum_rust into levm/refactor/db
…to levm-ethereum-rust-integration
**Motivation** <!-- Why does this pull request exist? What are its goals? --> fix some things generic_call in l1 integration because of merge. **Description** <!-- A clear and concise general description of the changes this PR introduces --> <!-- Link to issues: Resolves #111, Resolves #222 --> Closes #issue_number
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
The goal is to make a test with a real use case, plugging an L2 to another L2 to do a further testing of Levm. Currently is failing because of levm.
Description
The changes are the result of debugging the execution.
How to Reproduce It
Deploy L2
First, you have to set up your L2. That can be done with a normal procedure of set up, but we'll start in main branch.
Once you clone the repo, and you're on the main branch, go to crates/l2 and create a .env file, you can take the .envexample as a sample. Then you can run
make restart
. That will do a docker compose up to the L1 image and run the L2.Here you can verify a few things to make sure everything is alright:
Invalid params: duplicate field input
. This happened to me, and i fixed it by changing a flag in a type's attribute, removing in /crates/common/types/transactions.rs on the GenericTransaction type thealias = "data"
on theinput
attribute.From now on, instead of the previous one, we will use this execution command:
rm /Users/<your-username>/Library/Application\ Support/ethereum_rust/mdbx.*; make restart-local-l1 && make deploy-l1 && make down-l2 && RUST_LOG=info,ethereum_rust_blockchain::payload=debug cargo run --release --manifest-path ../../Cargo.toml --bin ethereum_rust --features l2 -- --network ../../test_data/genesis-l2.json --http.port 1729
If you want, you can try to send a transaction to try the system, maybe it's failing at this steps and you don't really know. Try it with:
cast send --private-key 0x63b8139bbf84a5a65613e544be239f59f884434462598bd8bfe9f2c9045aa336 --value 10 0x0004ad0D0823e3d31C6ECA2A3495373fA76c43aC --rpc-url http://localhost:1729/
If it fails, check the above verifications.
Now, you can change the branch of the L2 to this, or the branch you want to test.
Deploy L3
First, we need to clone again the repo in another directory. Ten, we'll have to change some parameters to make the L3 to plug in the L2. We'll need a new rich account, you can find one in the test_data folder (from the root of the project).
The parameters we'll need to change are:
The other parameters can be taken from L2's .env file.
Now we will try to deploy the contracts of the bridge and on chain proposer, with this command:
cargo run --release --bin ethereum_rust_l2_l1_deployer --manifest-path contracts/Cargo.toml
This will can fail or not, but the problems will be probably from Levm execution, so that's what we have to work on.
After fixing that you wold execute the L3 with the following command:
cargo run --release --manifest-path ../../Cargo.toml --bin ethereum_rust --features l2 -- --network ../../test_data/genesis-l2.json --http.port 3458 --authrpc.port 8552 --datadir ./ethereum_rust_l3
And if it runs, try to run some transactions, maybe one can be the cast send that I mentioned above.