-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add sequencing section * add a diagram * v0.14.0 * update ignite tutorial with sequencer * minor fixes * minor * meh * fix * Delete ~/.celestia-light-mocha-4/config/app.toml * Delete ~/.celestia-light-mocha-4/config/client.toml * Delete ~/.celestia-light-mocha-4/config/config.toml
- Loading branch information
1 parent
99fb831
commit 908e95d
Showing
10 changed files
with
127 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
echo "Downloading local sequencer source code..." | ||
git clone https://github.com/rollkit/go-sequencing.git | ||
cd go-sequencing || { echo "Failed to find the downloaded repository"; exit 1; } | ||
git fetch --all --tags | ||
git checkout $1 | ||
echo "Building and installing Local Sequencer..." | ||
make build | ||
echo "Starting Local Sequencer..." | ||
./build/local-sequencer -rollup-id $2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Astria Sequencing | ||
|
||
Coming soon ... |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Based Sequencing | ||
|
||
Coming soon ... |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Centralized Sequencer | ||
|
||
A centralized sequencer is a sequencing middleware that receives rollup transactions and provides a local sequencing capabilities. Meaning, the transactions are ordered in the order they are received by the sequencer without any censorship. Further, the sequenced batches are made available in the DA network (such as Celestia). Under the hood, the centralized sequencer is a GRPC server that implements `go-sequencing` interface and the server is hosted by the same node that is running the aggregator for the Rollkit rollup. | ||
|
||
 | ||
|
||
### Installation and Use | ||
|
||
```sh | ||
git clone https://github.com/rollkit/centralized-sequencer.git | ||
cd centralized-sequencer | ||
make build | ||
./build/centralized-sequencer -h | ||
``` | ||
|
||
|
||
```sh | ||
Usage: | ||
-host string | ||
centralized sequencer host (default "localhost") | ||
-port string | ||
centralized sequencer port (default "50051") | ||
-listen-all | ||
listen on all network interfaces (0.0.0.0) instead of just localhost | ||
-rollup-id string | ||
rollup id (default "rollupId") | ||
-batch-time duration | ||
time in seconds to wait before generating a new batch (default 2s) | ||
-da_address string | ||
DA address (default "http://localhost:26658") | ||
-da_auth_token string | ||
auth token for the DA | ||
-da_namespace string | ||
DA namespace where the sequencer submits transactions | ||
-db_path string | ||
path to the database | ||
``` | ||
|
||
As shown by the help command, a centralized sequencer is configured to serve a rollup (via `rollup_id`). The DA network to persist the sequenced batches are specified using `da_address`, `da_auth_token` and `da_namespace`. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Forced Inclusion | ||
|
||
Coming soon ... |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Sequencing | ||
|
||
## Rollkit prior to Sequencing | ||
Rollkit's aggregator node was responsible for selecting and ordering transactions for including in the rollup blocks. The Rollkit aggregator used to follow a FCFS strategy, where every transaction submitted gets included in the block in order without any censorship. Use of a different sequencing strategy or connecting to a sequencing network (e.g., Astria) was not possible. Rollkit [v0.14.0](https://github.com/rollkit/rollkit/releases/tag/v0.14.0) onwards makes it possible for rollkit to connect to a sequencing network and communicate via grpc. | ||
|
||
### Sequencing Interface | ||
|
||
[go-sequencing](https://github.com/rollkit/go-sequencing) defines a sequencing interface for communicating between any sequencing network and Rollkit. The key functions of the interface are defined as shown below. | ||
|
||
```go | ||
SubmitRollupTransaction(rollupId, data) returns (error) | ||
|
||
GetNextBatch(rollupId, lastBatchHash, maxBytes) returns (batch, timestamp) | ||
|
||
VerifyBatch(rollupId, batchHash) returns (status) | ||
``` | ||
|
||
It mainly consists of: | ||
* `SubmitRollupTransaction` relays the rollup transactions from Rollkit rollup to the sequencing network | ||
* `GetNextBatch` returns the next batch of transactions along with a deterministic timestamp | ||
* `VerifyBatch` validates the sequenced batch | ||
|
||
### Sequencing Implementations | ||
|
||
An implementation of the sequencing interface mainly acts as a middleware that connects Rollkit rollup and the sequencing layer. It implements the sequencing interface functions described above. For example, [centralized-sequencer](https://github.com/rollkit/centralized-sequencer) is the refactored functionality from the Rollkit prior to `v0.14.0`. The centralized sequencer is the middleware run by the aggregator node of the Rollkit rollup. The aggregator node relays rollup transactions to centralized sequencer which then submits them to the DA network (such as Celestia). The header producer node then retrieves (via `GetNextBatch`) the batched transaction from the centralized sequencer to execute the transactions and produce the updated rollup state. Similarly, there are other sequencing middlewares which can be built for various sequencing strategies or even for connecting to different third-party sequencing networks. | ||
|
||
The sequencing implementations that are currently work in progress: | ||
* [centralized-sequencer](https://github.com/rollkit/centralized-sequencer) | ||
* [based-sequencer](https://github.com/rollkit/based-sequencer) | ||
* [forced-inclusion-sequencer]() | ||
* [astria-sequencer](https://github.com/rollkit/astria-sequencer) |