Simple implementation of based sequencer generic over batch builder and DA service.
Exposes 2 RPC methods:
sequencer_acceptTx
where input is supposed to be signed and serialized transaction. This transaction is stored in mempoolsequencer_publishBatch
without any input, which builds the batch using batch builder and publishes it on DA layer.sov-cli
sov-cli
from demo-stf
crate has support for interacting with sov-sequencer.
Make sure that this tool is build
bash
cd examples/demo-stf
cargo build --bin sov-cli
This command is similar to serialize call from demo-rollup
README, with one last parameter, RPC endpoint for sov-sequencer.
When demo-rollup with enabled sequencer starts, it prints on which endpoint it listens:
bash
2023-07-07T14:53:02.280562Z INFO sov_demo_rollup: Starting RPC server at 127.0.0.1:12345
Let's submit 3 transactions: create token
, mint
and transfer
:
```bash
./target/debug/sov-cli submit-transaction examples/demo-stf/src/sov-cli/testdata/tokendeployerprivatekey.json Bank examples/demo-stf/src/sov-cli/testdata/createtoken.json 0 http://127.0.0.1:12345
./target/debug/sov-cli submit-transaction examples/demo-stf/src/sov-cli/testdata/minterprivatekey.json Bank examples/demo-stf/src/sov-cli/testdata/mint.json 0 http://127.0.0.1:12345
./target/debug/sov-cli submit-transaction examples/demo-stf/src/sov-cli/testdata/minterprivatekey.json Bank examples/demo-stf/src/sov-cli/testdata/transfer.json 1 http://127.0.0.1:12345
```
Now these transactions are in the mempool
In order to submit transactions to DA layer, sequencer needs to publish them. This can be done by triggering publishBatch
endpooint:
bash
./target/debug/sov-cli publish-batch http://127.0.0.1:12345
After some time, processed transaction should appear in logs of running rollup