Skip to content

Commit f40705f

Browse files
authored
Update gm-world tutorial (#575)
* Update gm-world tutorial * remove toml part
1 parent 690e278 commit f40705f

File tree

3 files changed

+70
-134
lines changed

3 files changed

+70
-134
lines changed

guides/ignite-rollkit.md

Lines changed: 0 additions & 96 deletions
This file was deleted.

public/install-local-da.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#!/bin/bash
22

33
echo "Downloading Local-DA source code..."
4-
git clone https://github.com/rollkit/rollkit.git
5-
cd local-da || { echo "Failed to find the downloaded repository"; exit 1; }
6-
git checkout $1
7-
echo "Building and installing Local DA..."
4+
git clone --depth=1 https://github.com/rollkit/rollkit.git
5+
# TODO : replace with go install once the repo is tagged
6+
cd rollkit || { echo "Failed to find the downloaded repository"; exit 1; }
87
make build-da
98
echo "Starting Local DA..."
109
./build/local-da

tutorials/gm-world.md

Lines changed: 67 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,14 @@ Is on Gitpod: false
5555
## Generate your App {#generate-your-app}
5656

5757
```bash
58-
ignite s chain gm --address-prefix gm
58+
ignite scaffold chain gm --address-prefix gm
5959
cd gm
6060
```
6161

62-
```bas
6362
Install a specific version of ignite to use rollkit
64-
```
6563

6664
```bash
67-
ignite app install -g github.com/ignite/apps/rollkit@9d51c52305be37356a1ecadab8733b77842e1c37
65+
ignite app install -g github.com/ignite/apps/rollkit
6866
```
6967

7068
Install your app locally:
@@ -73,14 +71,42 @@ Install your app locally:
7371
make install
7472
```
7573

74+
## Add Rollkit Features {#add-rollkit-features}
75+
76+
Enhance your blockchain by adding Rollkit features. Use the following command:
77+
78+
```bash
79+
ignite rollkit add
80+
```
81+
82+
## Build your chain {#build-your-chain}
83+
84+
Build your chain using the following command:
85+
86+
```bash
87+
ignite chain build
88+
```
89+
90+
This will create a `~/.gm` folder with all the necessary files to run a chain.
91+
92+
## Initialize Your Blockchain {#initialize-your-blockchain}
93+
94+
Before starting your blockchain, you need to initialize it with Rollkit support. Initialize the blockchain with Local DA as follows:
95+
96+
```bash
97+
ignite rollkit init
98+
```
99+
100+
It will also initialize 2 accounts `alice` and `bob`:
101+
76102
## 🚀 Starting your rollup {#start-your-rollup}
77103

78104
Now that we have our gm app generated and installed, we can launch our GM rollup along with the local DA by running the following command:
79105

80106
First lets start the local DA network:
81107

82108
```bash
83-
curl -sSL https://rollkit.dev/install-local-da.sh | bash -s {{constants.localDALatestTag}}
109+
curl -sSL https://rollkit.dev/install-local-da.sh | bash
84110
```
85111

86112
you should see logs like:
@@ -100,30 +126,37 @@ gmd start --rollkit.node.aggregator
100126
You should see an output like this:
101127

102128
```bash
103-
5:02PM INF Rollkit node run loop launched in background goroutine module=server
104-
5:02PM INF Attempting to start Rollkit node run loop module=server
105-
5:02PM INF serving HTTP listen address=[::]:26657 module=rollkit
106-
5:02PM INF Started RPC server addr=127.0.0.1:7331 module=rollkit
107-
5:02PM INF starting P2P client module=rollkit
108-
5:02PM INF listening on address=/ip4/10.36.65.125/tcp/7676/p2p/12D3KooWCZ4oCNDkxisUWD9CbB5yEmSmjaTEtLLySk3Sccy4Vb8m module=p2p
109-
5:02PM INF listening on address=/ip4/127.0.0.1/tcp/7676/p2p/12D3KooWCZ4oCNDkxisUWD9CbB5yEmSmjaTEtLLySk3Sccy4Vb8m module=p2p
110-
5:02PM INF no peers - only listening for connections module=p2p
111-
5:02PM INF working in aggregator mode block time=1s module=rollkit
112-
5:02PM INF Reaper started interval=1000 module=Reaper
113-
5:02PM INF Using pending block height=1 module=BlockManager
114-
5:02PM INF Executing block height=1 module=rollkit num_txs=0 timestamp=2025-04-28T11:21:24-04:00
115-
5:02PM INF Block executed successfully appHash=6AE75B65CDFE504876AC392554E16065C7C3699FFC99E6C4AA5FEB13B49CFB2D height=1 module=rollkit
116-
5:02PM ERR failed to start syncer after initializing the store: error getting latest head during Start: header: not found module=rollkit
117-
5:02PM ERR failed to start syncer after initializing the store: error getting latest head during Start: header: not found module=rollkit
118-
5:02PM INF Attempting to start executor (Adapter.Start) module=server
119-
5:02PM INF Executor started successfully module=server
120-
5:02PM INF Waiting for services to complete... module=server
121-
5:02PM INF starting API server... address=tcp://0.0.0.0:1317 module=api-server
122-
5:02PM INF serve module=api-server msg="Starting RPC HTTP server on [::]:1317"
123-
5:02PM INF starting gRPC server... address=localhost:9090 module=grpc-server
124-
5:02PM INF Creating empty block height=2 module=BlockManager
125-
5:02PM INF Executing block height=2 module=rollkit num_txs=0 timestamp=2025-05-13T17:02:14-04:00
126-
5:02PM INF Block executed successfully appHash=CACB5B55477E8813D93A29CF25BA5DB8AD4A51992D96A72CF9A4E83D47F4FAAA height=2 module=rollkit
129+
2:50PM INF creating new client module=rollkit namespace=
130+
2:50PM INF No state found in store, initializing new state module=BlockManager
131+
2:50PM INF Initializing chain chainID=gm genesisTime=2025-06-26T12:50:11Z initialHeight=1 module=rollkit
132+
2:50PM INF InitChain chainID=gm initialHeight=1 module=baseapp
133+
2:50PM INF initializing blockchain state from genesis.json module=baseapp
134+
2:50PM INF chain initialized successfully appHash=E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 module=rollkit
135+
2:50PM INF using default mempool ttl MempoolTTL=25 module=BlockManager
136+
2:50PM INF service start impl=EventBus module=events msg="Starting EventBus service"
137+
2:50PM INF service start impl=PubSub module=pubsub msg="Starting PubSub service"
138+
2:50PM INF service start impl=IndexerService module=txindex msg="Starting IndexerService service"
139+
2:50PM INF rollkit node run loop launched in background goroutine module=server
140+
2:50PM INF serving HTTP listen address=[::]:26657 module=rollkit
141+
2:50PM INF starting P2P client module=rollkit
142+
2:50PM INF started RPC server addr=127.0.0.1:7331 module=rollkit
143+
2:50PM INF listening on address=/ip4/127.0.0.1/tcp/7676/p2p/12D3KooWPN1jqkgZcuF8UMZEa7nSjoF7zPmGHRrCDVrXrpfTLpfJ module=p2p
144+
2:50PM INF listening on address=/ip4/192.168.0.54/tcp/7676/p2p/12D3KooWPN1jqkgZcuF8UMZEa7nSjoF7zPmGHRrCDVrXrpfTLpfJ module=p2p
145+
2:50PM INF no peers - only listening for connections module=p2p
146+
2:50PM INF working in aggregator mode block time=1s module=rollkit
147+
2:50PM INF Reaper started interval=1000 module=Reaper
148+
2:50PM INF using pending block height=1 module=BlockManager
149+
2:50PM INF Executing block height=1 module=rollkit num_txs=0 timestamp=2025-06-26T14:50:11+02:00
150+
2:50PM INF block executed successfully appHash=678DE6BBA6E23B000DC5AC86B60245E6EAC503C5C7085495F3B71B22A762EB19 height=1 module=rollkit
151+
2:50PM INF indexed block events height=1 module=txindex
152+
2:50PM INF attempting to start executor (Adapter.Start) module=server
153+
2:50PM INF executor started successfully module=server
154+
2:50PM INF creating empty block height=2 module=BlockManager
155+
2:50PM INF Executing block height=2 module=rollkit num_txs=0 timestamp=2025-06-26T14:50:30+02:00
156+
2:50PM INF starting API server... address=tcp://0.0.0.0:1317 module=api-server
157+
2:50PM INF serve module=api-server msg="Starting RPC HTTP server on [::]:1317"
158+
2:50PM INF starting gRPC server... address=localhost:9090 module=grpc-server
159+
2:50PM INF block executed successfully appHash=0B3973A50C42D0184FB86409FC427BD528A790FA45BA2C9E20FDF14A3628CEC8 height=2 module=rollkit
127160
```
128161

129162
Ignite has successfully launched the GM rollup and the local DA network. The GM rollup is running on port `7331` and the local DA network is running on port `7980`.
@@ -154,14 +187,14 @@ You should see an output like the following
154187
For convenience we export two of our keys like this:
155188

156189
```bash
157-
export KEY1=gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
158-
export KEY2=gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3
190+
export ALICE=gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
191+
export BOB=gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3
159192
```
160193

161194
Now let's submit a transaction that sends coins from one account to another (don't worry about all the flags, for now, we just want to submit transaction from a high-level perspective):
162195

163196
```bash
164-
gmd tx bank send $KEY2 $KEY1 42069stake --keyring-backend test --chain-id gm --fees 5000stake
197+
gmd tx bank send $BOB $ALICE 42069stake --keyring-backend test --chain-id gm --fees 5000stake
165198
```
166199

167200
You'll be prompted to accept the transaction:
@@ -204,7 +237,7 @@ txhash: 677CAF6C80B85ACEF6F9EC7906FB3CB021322AAC78B015FA07D5112F2F824BFF
204237
Query balances after the transaction:
205238

206239
```bash
207-
gmd query bank balances $KEY1
240+
gmd query bank balances $ALICE
208241
```
209242

210243
The receiver’s balance should show an increase.
@@ -221,7 +254,7 @@ pagination:
221254
For the sender’s balance:
222255

223256
```bash
224-
gmd query bank balances $KEY2
257+
gmd query bank balances $BOB
225258
```
226259

227260
Output:

0 commit comments

Comments
 (0)