Skip to content
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

Update example to the latest #71

Merged
merged 10 commits into from
Oct 22, 2024
Merged

Update example to the latest #71

merged 10 commits into from
Oct 22, 2024

Conversation

Sneh1999
Copy link
Contributor

@Sneh1999 Sneh1999 commented Oct 1, 2024

Closes #241
EspressoSystems/nitro-espresso-integration#241
This PR updates this example repo to make it compatible with latest changes

As the image indicates there was a applied transaction Applied transaction 1 for 0xf236…69ca and Proof was submitted successfully

image

Important places to review

Note: contract-bindings folder is auto generated so no need to review those files

  • executor.rs
  • main.rs
  • ExampleRollup.sol
  • state.rs
  • transaction.rs

How to run locally

On one terminal:

git clone https://github.com/EspressoSystems/espresso-sequencer
cd espresso-sequencer
docker compose pull
docker compose up -d --wait

On another terminal:

nix develop
just dev-demo

On another terminal:

curl -X POST -H "Content-Type: application/json" http://0.0.0.0:8084/v0/rollup/submit -d "{\"transaction\":{\"amount\":100,\"destination\":\"0x885ee92eebda03540066a25a57cc625bbee15d5a\",\"nonce\":1},\"signature\":{\"r\":\"0x61395b25cf41321bc1242ec301c0aa5a5e5ff47b697f80119a20ce3e5be66f9e\",\"s\":\"0x447cf03a5ddb28b9a189d108a8e91efa523fd3fb37cebab1cad610d82a8edbb0\",\"v\":27}}"

TODO

  • Fix tests
  • Update documentation
  • Fix Nix setup

@Sneh1999 Sneh1999 marked this pull request as ready for review October 10, 2024 00:34
.env Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Member

@zacshowa zacshowa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can add replacements for every remaining test that was removed then this would be ready to merge!

src/state.rs Outdated Show resolved Hide resolved
src/executor.rs Show resolved Hide resolved
contracts/src/ExampleRollup.sol Outdated Show resolved Hide resolved
Copy link
Member

@zacshowa zacshowa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!


To run natively a rust toolchain is required. We provide a nix shell to install
all dependencies. Nix can be installed via the
[nix-installer](https://github.com/DeterminateSystems/nix-installer). Once
installed run
installed run the following from the root of the project:

nix develop
just dev-demo

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say adding the screenshots to show the user what they expect to see after a successful run, as well as indicating which log should be present before they check for the balance, would be a nice add-on and can help the user understand espresso in a more meaningful way.

@alysiahuggins
Copy link

great work Sneh!

@Sneh1999 Sneh1999 force-pushed the fix-example-l2 branch 2 times, most recently from a057bae to 71a8c4e Compare October 22, 2024 18:53
@Sneh1999 Sneh1999 merged commit ab5ff7b into main Oct 22, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants