Git Product home page Git Product logo

sov-rollup-starter's Introduction

This package is a convenient starting point for building a rollup using the Sovereign SDK:

The repo structure:

  • crates/stf: The STF is derived from the Runtime and is used in the rollup and provers crates.
  • crates/provers: This crate is responsible for creating proofs for the STF.
  • crates/rollup: This crate runs the STF and offers additional full-node functionalities.

How to run the sov-rollup-starter:

1. Change the working directory:

$ cd crates/rollup/

2. If you want to run a fresh rollup, clean the database:

$ make clean-db

3. Start the rollup node:

This will compile and start the rollup node:

$ cargo run --bin node

4. Submit a token creation transaction to the bank module:

$ make test-create-token

5. Wait for the transaction to be submitted.

$ make wait-ten-seconds

6. Test if token creation succeeded:

$ make test-bank-supply-of

7. The output of the above script:

$ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":{"token_address":"sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"},"id":1}' http://127.0.0.1:12345
{"jsonrpc":"2.0","result":{"amount":1000},"id":1}

How to run the sov-rollup-starter using celestia-da:

1. Change the working directory:

$ cd crates/rollup/

2. If you want to run a fresh rollup, clean the database:

$ make clean

3. Start the Celestia local docker service:

$ make start

4. Start the rollup node with the feature flag building with the celestia adapter:

This will compile and start the rollup node:

$ cargo run --bin node --no-default-features --features celestia_da

5. Submit a token creation transaction to the bank module:

Using CELESTIA=1 will enable the client to be built with Celestia support and submit the test token

$ CELESTIA=1 make test-create-token

6. Test if token creation succeeded:

$ make test-bank-supply-of

7. The output of the above script:

$ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":{"token_address":"sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"},"id":1}' http://127.0.0.1:12345
{"jsonrpc":"2.0","result":{"amount":1000},"id":1}

sov-rollup-starter's People

Contributors

bkolad avatar citizen-stig avatar dubbelosix avatar neysofu avatar vlopes11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sov-rollup-starter's Issues

Failed to compile

Hey,

Trying to run this repo as mentioned in the README:

โžœ cargo run --bin node
    Updating git repository `https://github.com/neysofu/risc0-hotfixes`
    Updating crates.io index
    Updating git repository `https://github.com/Sovereign-Labs/sovereign-sdk.git`
    Updating git repository `https://github.com/eigerco/celestia-node-rs.git`
    Updating git repository `https://github.com/Sovereign-Labs/nmt-rs.git`
    Updating git repository `https://github.com/eigerco/celestia-tendermint-rs.git`
    Updating git repository `https://github.com/penumbra-zone/jmt.git`
error: failed to select a version for `tendermint`.
    ... required by package `celestia-types v0.1.0 (https://github.com/eigerco/celestia-node-rs.git?rev=66b7c6c#66b7c6cd)`
    ... which satisfies git dependency `celestia-types` of package `celestia-rpc v0.1.0 (https://github.com/eigerco/celestia-node-rs.git?rev=66b7c6c#66b7c6cd)`
    ... which satisfies git dependency `celestia-rpc` of package `sov-celestia-adapter v0.3.0 (https://github.com/Sovereign-Labs/sovereign-sdk.git?rev=13e4077c329ff14954b32e3180d43a6d86fa3172#13e4077c)`
    ... which satisfies git dependency `sov-celestia-adapter` of package `sov-rollup-starter v0.3.0 (/home/rakan/Work/Sovereign/sov-rollup-starter/crates/rollup)`
versions that meet the requirements `*` are: 0.32.0

the package `celestia-types` depends on `tendermint`, with features: `instant` but `tendermint` does not have these features.
 It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.


failed to select a version for `tendermint` which could resolve this conflict

I'll try to look into this but thought i would report this error as well.

`mock_da` feature is required to run tests for `sov-rollup-starter`

The feature mock_da is enabled by default in the sov-rollup-starter template. When trying to change the default feature to celestia_da, it would result in various compile errors in the test crate.

Some adjustments should be made so that disabling mock_da won't result in compile failure of the tests. For example, the tests can require the sov-mock-da crate non-optionally, or mock tests are made to only compile behind cfg flag if the mock_da feature is enabled.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.