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

Create cartesi-rollups devnet in Go #289

Merged
merged 4 commits into from
Feb 19, 2024
Merged

Conversation

marcelstanley
Copy link
Collaborator

@marcelstanley marcelstanley commented Jan 29, 2024

Tasks:

  • Deploy contracts deterministically
  • Download and deploy rollups-contracts in Go
  • Start anvil in Go
  • Create Application in Go
  • Replace heatlhcheck script with inline code
  • Clean up/streamline error handling

New

  • add rollups-contracts as submodule
  • use internal Service

Closes #229

@marcelstanley marcelstanley added the no changelog PRs that don't require changes in changelog label Jan 29, 2024
@marcelstanley marcelstanley force-pushed the feature/devnet-deterministic branch 8 times, most recently from 25c7f09 to 43ee543 Compare February 6, 2024 02:17
@marcelstanley marcelstanley force-pushed the feature/devnet-deterministic branch 12 times, most recently from 49d6d53 to 46ff27e Compare February 6, 2024 17:45
@marcelstanley marcelstanley marked this pull request as ready for review February 6, 2024 18:02
@marcelstanley marcelstanley force-pushed the feature/devnet-deterministic branch 5 times, most recently from 5972357 to feaeed5 Compare February 9, 2024 11:33
build/Dockerfile Show resolved Hide resolved
build/Dockerfile Outdated Show resolved Hide resolved
build/Dockerfile Outdated Show resolved Hide resolved
build/Dockerfile Outdated Show resolved Hide resolved
build/Dockerfile Outdated Show resolved Hide resolved
build/Dockerfile Show resolved Hide resolved
endersonmaia
endersonmaia previously approved these changes Feb 9, 2024
Copy link
Contributor

@gligneul gligneul left a comment

Choose a reason for hiding this comment

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

Looks great, just minor comments.

build/Dockerfile Outdated Show resolved Hide resolved
build/Dockerfile Outdated Show resolved Hide resolved
cmd/gen-devnet/deployer.go Outdated Show resolved Hide resolved
Copy link
Contributor

@torives torives left a comment

Choose a reason for hiding this comment

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

I'd also recommend adding anvil_state.json and deployment.json to the gitignore, in case the command is run locally.

I couldn't read deployment.json because of a permission error, It would be interesting to understand what is going on.

build/Dockerfile Outdated Show resolved Hide resolved
build/Dockerfile Outdated Show resolved Hide resolved
cmd/gen-devnet/main.go Outdated Show resolved Hide resolved
cmd/gen-devnet/rollups.go Outdated Show resolved Hide resolved
cmd/gen-devnet/rollups.go Outdated Show resolved Hide resolved
@marcelstanley
Copy link
Collaborator Author

I'd also recommend adding anvil_state.json and deployment.json to the gitignore, in case the command is run locally.

I couldn't read deployment.json because of a permission error, It would be interesting to understand what is going on.

Both changes were also made at c08ab3a

Create a devnet docker image for local development.
It uses rollups-contracts own deployment scripts instead of foundry-rs
and replaces the shell script previously developed for the same purpose.
With deterministic deployment in place, the address book must be updated to
the actual addresses generated by cmd/gen-devnet. This change is
two-part:
- it restores the original rollups-contracts addresses (see 946767b), which
are now being deployed deterministically
- is sets new addresses for the Authority/History pair and the Cartesi
Application itself, which, as opposed to what happens to sunodo/devnet,
are being deployed using the deterministically deployed factories (item above)
@marcelstanley
Copy link
Collaborator Author

marcelstanley commented Feb 19, 2024

@torives, I just had to perform a push-force after removing some dead code from build/Dockerfile

@marcelstanley marcelstanley merged commit 47ef114 into main Feb 19, 2024
6 checks passed
@marcelstanley marcelstanley deleted the feature/devnet-deterministic branch February 19, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog PRs that don't require changes in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploy Rollups contracts deterministically on devnet in Go
4 participants