celestiaorg / orchestrator-relayer

Go implementation of the Blobstream orchestrator and relayer
Apache License 2.0
29 stars 17 forks source link

Developer test environment #613

Open rach-id opened 11 months ago

rach-id commented 11 months ago

Summary

Create a Blobstream environment that rollup developers can use to speed up the process of getting started with Blobstream.

Context

Currently, we have the E2E test environment that can also be used as a development environment by running the whole cluster: https://github.com/celestiaorg/orchestrator-relayer/blob/0508c24058c1267e8dc5640db07de01b590f17a1/e2e/docker-compose.yml#L1-L315

cd e2e
docker-compose up -d

This environment contains the following resources:

And when you run it, it will start the Celestia validators, these validators will create attestations. The orchestrators will pick up those attestations, sign them, and then push the signatures to the Blobstream P2P network (DHT). Finally, the relayer will query those signatures from the P2P network, and submit them to the Blobstream contract deployed in the ganache instance.

This can be used by rollup developers as a cluster containing a Celestia testnet with Blobstream deployed on it, and they can run their rollup sequencer next to it and test it.

Proposal

We can create an even better environment developer-oriented. This environment would imitate most of the configuration used in the E2E one but will add a simple sequencer to it, and verification logic.

The topology can look as follows:

Sequencer

The sequencer can be thought of as a simple for loop that does the following:

Verifier

We can even think of adding malicious events where fraud proofs will be emitted, but that can be done afterward.

Conclusion

Having a test environment like this one would help rollup developers to see the E2E flow that they would need to implement, and also give them an idea of the creation of the proofs in a project that works and where they can make simple changes and interact with it.

rach-id commented 11 months ago

I think it would be best if we could prioritize implementing the proofs in Celestia-node so that we can get proofs using a light client without connecting with an RPC. Also, it would be good to implement the subtree roots verification in Blobstream contract so that users don't have to send the data to see if it was posted or not.

cc @evan-forbes

evan-forbes commented 11 months ago

prioritizing other things first definitely makes sense to me, thanks for documenting this!