/thrumdev-blobs

Blobchains on Polkadot and Kusama

Primary LanguageRustApache License 2.0Apache-2.0

Blobs

Blobchains on Polkadot and Kusama

Project Structure

blobs: The blobs monorepo.
├──adapters: Adapters for various rollup development kits (RDK).
│   ├── rollkit: An adapter connecting Rollkit to Sugondat
│   ├── sovereign: An adapter connecting Sovereign to Sugondat.
├──demo: Projects showcasing integration of RDKs with Sugondat.
│   ├── rollkit: Rollkit's GM rollup.
│   ├── sovereign: Sovereign Demo Rollup.
├──sugondat-chain: Implementation of sugondat parachain.
├──sugondat-shim: Shim between sugondat parachain RPC and RDK adapters.
├──sugondat-subxt: Bindings to Sugondat RPC.

Running Demos

Prerequisites

In general you need to have the following components running:

build sugondat-chain:

cd sugondat-chain
cargo build --release

Make sure that zombienet binary and sugondat-chain binary are in your PATH.

Now you can launch 2 polkadot validators and one sugondat-chain collator

./zombienet.sh

Then launch the sugondat-shim with:

cd sugondat-shim/
cargo run -p sugondat-shim -- serve --submit-dev-alice

Sovereign Demo

launch the demo rollup with:

cd demo/sovereign/demo-rollup
cargo run

execute the test

cd demo/sovereign/demo-rollup
./test_create_token.sh

You should see at the end that a batch of two transactions was correctly pushed in the DA, fetched back and then executed in the rollup to create and mint 4000 new tokens

If you want to re-run zombienet and the demo rollup remember token

rm -r zombienet
cd demo/sovereign/demo-rollup
# clean the ledger db
make clean

Rollkit Demo

Original instructions should work. Make sure to check them out for prerequisites and other details. Below is a quick summary for reference.

Make sure that go bin folder is in path.

export PATH=$PATH:$(go env GOPATH)/bin

go to the rollkit demo folder and launch ./init-local.sh

cd demo/rollkit
./init-local.sh

Then use the following command to get the demo keys:

gmd keys list --keyring-backend test

save them into environment variables:

export KEY1=gm1sa3xvrkvwhktjppxzaayst7s7z4ar06rk37jq7
export KEY2=gm13nf52x452c527nycahthqq4y9phcmvat9nejl2

then you can send a transaction and check the results:

# it will ask for confirmation, type "y" and press enter
gmd tx bank send $KEY1 $KEY2 42069stake --keyring-backend test \
--node tcp://127.0.0.1:36657


gmd query bank balances $KEY2 --node tcp://127.0.0.1:36657
gmd query bank balances $KEY1 --node tcp://127.0.0.1:36657

If you see the amounts:

10000000000000000000042069
9999999999999999999957931

that means it worked!

To reset the chain

rm -r zombienet
cd demo/rollkit
gmd unsafe-reset-all