<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Deepak on Medium]]></title>
        <description><![CDATA[Stories by Deepak on Medium]]></description>
        <link>https://medium.com/@deepak_53613?source=rss-4e9115e54697------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*a_roF2hRuQQQzWqD</url>
            <title>Stories by Deepak on Medium</title>
            <link>https://medium.com/@deepak_53613?source=rss-4e9115e54697------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 16:45:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@deepak_53613/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Unlocking the Power of Rollups using Rollkit and Avail DA]]></title>
            <link>https://medium.com/vitwit/unlocking-the-power-of-rollups-using-rollkit-and-avail-da-86018d4e84d6?source=rss-4e9115e54697------2</link>
            <guid isPermaLink="false">https://medium.com/p/86018d4e84d6</guid>
            <category><![CDATA[rollkit]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[rollup]]></category>
            <category><![CDATA[avail]]></category>
            <category><![CDATA[layer-2]]></category>
            <dc:creator><![CDATA[Deepak]]></dc:creator>
            <pubDate>Wed, 27 Mar 2024 09:42:03 GMT</pubDate>
            <atom:updated>2024-03-27T09:42:03.674Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*am9BxIZU6mjmM94sWIqWUA.png" /></figure><p>This article illustrates how one can make a Cosmos appchain using Rollkit framework and Avail as a data availability layer.</p><p>Any Cosmos appchain can be made into a rollup using Rollkit framework. Below is an example of how a Cosmos chain can be made into a rollup.</p><p>The following software versions has been used in making this video</p><ul><li>rust — v1.74.0</li><li>go-1.21.5</li></ul><p>Let us make our hands dirty by making Paloma chain into a rollup on top of Avail-DA.</p><p>Let us start running Avail nodes in order to have Avail as a DA layer. We are supposed to run three nodes and the DA server</p><ul><li><strong>Avail DA node</strong> — official client for the Avail blockchain</li><li><strong>Avail light node </strong>— DA light client which listens on Avail network for finalized blocks</li><li><strong>Avail light Bootstrap node</strong> — Bootstrap node for Avail light client</li><li><strong>Avail DA server</strong></li></ul><h3><strong>Setting up Local Avail DA</strong></h3><p>To setup local Avail nodes, you can follow the given steps below or refer this readme file <a href="https://github.com/rollkit/avail-da/blob/main/README.md#avail-light-installation-for-local-development-environment">here</a>.</p><p>Clone Avail DA from <a href="https://github.com/availproject/avail.git">here</a></p><p>Run the following command in your desired directory</p><pre>git clone https://github.com/availproject/avail.git</pre><p>After cloning the Avail node, open the directory by running the following command</p><pre>cd avail</pre><p>Checkout to the following branch</p><pre>git fetch &amp;&amp; git checkout v1.10.0.0</pre><p>We can start the Avail node by the following command</p><pre>cargo run --locked --release -- --dev --enable-kate-rpc</pre><p>You can see the following once the Avail DA starts running successfully</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7vnGeZT-79XljHpeGQn8JA.png" /></figure><h3>Avail light bootstrap node</h3><p>While the Avail node is up and running, let us start Avail light bootstrap node.</p><p>Clone the Avail light bootstrap node from <a href="https://github.com/availproject/avail-light-bootstrap.git">here</a></p><p>From the directory of your choice, run the following command</p><pre>git clone https://github.com/availproject/avail-light-bootstrap.git</pre><p>Let us get into the Avail light bootstrap with the following command</p><pre>cd avail-light-bootstrap</pre><p>Start the Avail light bootstrap node with the following command</p><pre>cargo run --release</pre><p>Upon successfully running, you can view the log as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i76trgYruiVWKQTyZT5IiA.png" /><figcaption>Avail light bootstrap node</figcaption></figure><p>While the Avail node is up and running, let us start Avail light node.</p><h3>Avail light node</h3><p>Clone the Avail light node from <a href="https://github.com/availproject/avail-light.git">here</a></p><p>From the directory of your choice, clone Avail light node using the following command</p><pre>git clone https://github.com/availproject/avail-light.git</pre><p>open the Avail light node by executing the following command</p><pre>cd avail-light</pre><p>checkout to the following branch</p><pre>git fetch &amp;&amp; checkout v1.7.8</pre><p>Let us create a <em>config.yaml</em> file in the root folder</p><pre>touch config.yaml</pre><p>Copy the following file and paste it in the <em>config.yaml</em> file</p><pre>http_server_host = &#39;127.0.0.1&#39;<br>http_server_port = 8000<br>port = 38000<br>tcp_port_reuse = false<br>autonat_only_global_ips = false<br>autonat_throttle = 1<br>autonat_retry_interval = 10<br>autonat_refresh_interval = 30<br>autonat_boot_delay = 5<br>identify_protocol = &#39;/avail_kad/id/1.0.0&#39;<br>identify_agent = &#39;avail-light-client/rust-client&#39;<br>bootstraps = [[&quot;12D3KooWStAKPADXqJ7cngPYXd2mSANpdgh1xQ34aouufHA2xShz&quot;, &quot;/ip4/127.0.0.1/udp/39000&quot;]]<br>bootstrap_period = 300<br>relays = []<br>full_node_ws = [&#39;ws://127.0.0.1:9944&#39;]<br>confidence = 92.0<br>avail_path = &#39;avail_path&#39;<br>log_level = &#39;INFO&#39;<br>log_format_json = false<br>ot_collector_endpoint = &#39;http://otelcollector.avail.tools:4317&#39;<br>disable_rpc = false<br>disable_proof_verification = false<br>dht_parallelization_limit = 20<br>put_batch_size = 1000<br>query_proof_rpc_parallel_tasks = 8<br>max_cells_per_rpc = 30<br>threshold = 5000<br>kad_record_ttl = 86400<br>publication_interval = 43200<br>replication_interval = 10800<br>replication_factor = 20<br>connection_idle_timeout = 30<br>query_timeout = 60<br>query_parallelism = 3<br>caching_max_peers = 1<br>disjoint_query_paths = false<br>max_kad_record_number = 2400000<br>max_kad_record_size = 8192<br>max_kad_provided_keys = 1024<br>app_id=1</pre><p>We need to add the mnemonic in <em>identity.toml.</em> Make sure that it has sufficient balance to make transactions</p><p>Let us start the Avail light by the following command</p><pre>cargo run --release -- --network local -c config.yaml --clean</pre><p>Upon successfully running the light node, you can view the logs as follow</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nSf4s5yBjVdTljGCTrK7Pw.png" /><figcaption>Avail light client</figcaption></figure><p>All the required Avail nodes are up and running. We need to start the Avail-DA server in order to submit transactions. This can be done using Avail DA</p><h3>Avail DA server</h3><p>Clone Avail-DA from <a href="https://github.com/rollkit/avail-da.git">here</a></p><p>From the directory of your choice, run the following command</p><pre>git clone https://github.com/rollkit/avail-da.git</pre><p>Get into the root directory by the following command</p><pre>cd avail-da</pre><p>Start the server by the following command</p><pre>go run cmd/avail-da/main.go</pre><p>Server gets started as below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*nWtGLIlP1r4jfpeoCg1X0w.png" /></figure><p>We have done the setup required to submit transactions to Avail DA</p><p>The setup is ready, palomachain has been considered in this article as a Cosmos chain, any Cosmos chain can be made into a rollup in a similar fashion</p><p><em>Palomachain</em> is a rapid and decentralized blockchain built on the Cosmos-SDK framework, facilitating the secure transmission of messages across various blockchains.</p><h3>Transforming Cosmos chain into rollup</h3><p>Clone palomachain from <a href="https://github.com/palomachain/paloma.git">here</a> in the desired directory</p><pre>git clone https://github.com/palomachain/paloma.git</pre><p>Checkout to <em>fix-build </em>branch with the help of the following command</p><pre>git checkout fix-build</pre><p>Now that we have paloma chain let us add few dependencies so that we can make use of rollkit. To add rollkit dependency in paloma chain we need to replace Cosmos-sdk with the rollkit enabled Cosmos-sdk in go.mod file</p><pre>github.com/cosmos/cosmos-sdk =&gt; github.com/rollkit/cosmos-sdk v0.50.1-rollkit-v0.11.9-no-fraud-proofs</pre><p>Once the dependency has been added into the go.mod file, we need to make sure that the dependency has been installed using the following command</p><pre>go mod tidy</pre><p>To avoid the semantic error while running the chain add the following line in makefile</p><pre>VERSION=2.3.1</pre><p><em>go mod tidy</em> updates the go.mod file and downloads all dependencies mentioned in the go.mod file</p><p>Now from the root directory of palomachain create a file named as <em>init-local.sh </em>by the following command</p><pre>touch init-local.sh</pre><p>Copy the following script in that file and save the file</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b961259adc76b5e782da404f29f7271a/href">https://medium.com/media/b961259adc76b5e782da404f29f7271a/href</a></iframe><p>From the root directory, run the following command to start the paloma chain as a rollup</p><pre>bash init-local.sh</pre><p>Upon successfully running the following command, you can view the logs as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7qe3z0HD7s1v6LLNVmLI3w.png" /><figcaption>paloma chain as a rollup</figcaption></figure><p>The script starts of with the DA block height from the Avail DA node running in background and generates the metadata. It also generates two keys as mentioned in the script. We can make use of those keys for doing a transaction where the tokens for those keys will be generated in the script</p><p>You can view the rollup chain logs as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U-j9kKyxkbYKYeiSGASJBw.png" /><figcaption>rollup chain logs</figcaption></figure><p>Now that the paloma rollup chain is up and running let us make a transaction.</p><p>We can view the keys generated by the script using the following command</p><pre>palomad keys list --keyring-backend test</pre><p>The keys will be shown as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CstSv1Ckfj3bngXgaz9IWA.png" /></figure><p>Before making a transaction, let us check the balance of both the keys by the follwing command</p><pre>palomad q bank balances &lt;address-of-the-key&gt; </pre><p>This is how the balances will look like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fW9tugYunV2rpks-Jji09g.png" /></figure><p>Let us make a transaction between two keys by the following command</p><pre>palomad tx bank send &lt;from-address&gt; &lt;to-address&gt; &lt;amount&gt;ugrain --chain-id &lt;chain-id name&gt;--keyring-backend test -y</pre><p><em>ugrain</em> is the denom for paloma chain. The transaction has been made using bank module <em>-y </em>is the flag to confirm the transaction before signing and broadcasting. The following logs will appear if the transaction is successful (code 0)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-DyG7WqhBqJ2FkVGXEb_yg.png" /><figcaption>Transaction</figcaption></figure><p>We can query the transaction using the tx hash that has been generated using the following command</p><pre>palomad q tx &lt;tx-hash&gt;</pre><p>We can view the transaction metadata as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eWMQmqFsAoFzX-OdOrFm_Q.jpeg" /><figcaption>Transaction metadata</figcaption></figure><p>We can now check the balances of the accouns to make sure that the money got debited from one account and credited to another account by using the following command</p><pre>palomad q bank balances &lt;key-address&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4DWPwdS7zKsiKcl4UZTmQA.png" /></figure><p>The transaction is successfully submitted to Avail DA, we can check this by looking the logs in Avail-DA server which looks as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*HQJGWEVRTjppmqELktB0wg.png" /></figure><p>That’s it, This is how we can have a roll on rollups on top of Avail DA :) 🥳</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86018d4e84d6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vitwit/unlocking-the-power-of-rollups-using-rollkit-and-avail-da-86018d4e84d6">Unlocking the Power of Rollups using Rollkit and Avail DA</a> was originally published in <a href="https://medium.com/vitwit">Vitwit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rolling Across Blockchains: Exploring IBC Transfers Between Two Rollups]]></title>
            <link>https://medium.com/vitwit/rolling-across-blockchains-exploring-ibc-transfers-between-two-rollups-1b5f83f88539?source=rss-4e9115e54697------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b5f83f88539</guid>
            <category><![CDATA[cosmos-sdk]]></category>
            <category><![CDATA[ibc]]></category>
            <category><![CDATA[cosmos]]></category>
            <category><![CDATA[avail]]></category>
            <category><![CDATA[rollup]]></category>
            <dc:creator><![CDATA[Deepak]]></dc:creator>
            <pubDate>Tue, 26 Mar 2024 12:22:12 GMT</pubDate>
            <atom:updated>2024-03-27T09:45:30.766Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_5aXHf9DOUSRpC_t3y7n_A.png" /></figure><p>This article is a part of a series Unlocking the power of rollups using rollkit and Avail DA</p><ul><li><a href="https://medium.com/@deepak_53613/unlocking-the-power-of-rollups-using-rollkit-and-avail-da-86018d4e84d6">Unlocking the power of rollups using Rollkit framework and Avail DA</a></li></ul><p>please refer the above article which is a prerequisite for this article</p><h3>Whats is IBC</h3><p>The Inter-Blockchain Communication Protocol (IBC) serves as a foundational protocol facilitating authentication and data transport between distinct blockchains. With IBC, developers gain access to a permissionless framework for securely relaying data packets across blockchains. This protocol effectively tackles a common challenge in the realm of public blockchains: enabling seamless communication between different chains.</p><p>In this article we will be doing a IBC transfer between two rollup chains</p><p>In the article mentioned above, We have made a Cosmos app chain into a rollup and submitted the data to Avail. In this article we will be running two rollup chains and making a IBC transfer through go-relayer.</p><p>Note: we are using gm chains (the chains generated by scaffolding tool <a href="https://rollkit.dev/tutorials/gm-world#building-your-sovereign-rollup">here</a>) as a rollup chains</p><p>Once you have done with the setup and make sure that gm chain is up and running as a rollup chain, follow these steps to make an IBC transfer between them.</p><p>The following software versions has been used in making this video</p><ul><li>rust — v1.74.0</li><li>go-1.21.5</li></ul><p>Run the following scripts to run two different rollup chains</p><p><strong>Note</strong>: these scripts are used while writing this article, you can modify the scripts accordingly.</p><p>script-1: init-testnet1.sh</p><pre>#!/bin/sh<br># set variables for the chain<br>VALIDATOR_NAME=t1validator-1<br>CHAIN_ID=testnet-1<br>KEY_NAME=t1-key-1<br>KEY_2_NAME=t1-key-2<br>CHAINFLAG=&quot;--chain-id ${CHAIN_ID}&quot;<br>TOKEN_AMOUNT=&quot;10000000000000000000000000stake&quot;<br>STAKING_AMOUNT=&quot;1000000000stake&quot;<br>MNEMONIC_1=&quot;----paste your mnemonic here----&quot;<br>MNEMONIC_2=&quot;----paste your mnemonic here----&quot;<br># network. The default port is 26657.<br>DA_BLOCK_HEIGHT=$(curl http://localhost:8000/v1/latest_block | jq -r &#39;.latest_block&#39;)<br>gmd tendermint unsafe-reset-all<br>gmd init $VALIDATOR_NAME --chain-id $CHAIN_ID<br>echo $MNEMONIC_1 | gmd keys add $KEY_NAME --recover --keyring-backend=test<br>echo $MNEMONIC_2 | gmd keys add $KEY_2_NAME --recover --keyring-backend=test<br># add these as genesis accounts<br>gmd genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test<br>gmd genesis add-genesis-account $KEY_2_NAME $TOKEN_AMOUNT --keyring-backend test<br>sed -i &#39;s/&quot;max_expected_time_per_block&quot;: &quot;30000000000&quot;/&quot;max_expected_time_per_block&quot;: &quot;75000000000&quot;/&#39; ~/.gm/config/genesis.json<br># set the staking amounts in the genesis transaction<br>gmd genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test<br># collect genesis transactions<br>gmd genesis collect-gentxs<br># copy centralized sequencer address into genesis.json<br># Note: validator and sequencer are used interchangeably here<br>ADDRESS=$(jq -r &#39;.address&#39; ~/.gm/config/priv_validator_key.json)<br>PUB_KEY=$(jq -r &#39;.pub_key&#39; ~/.gm/config/priv_validator_key.json)<br>jq --argjson pubKey &quot;$PUB_KEY&quot; &#39;.consensus[&quot;validators&quot;]=[{&quot;address&quot;: &quot;&#39;$ADDRESS&#39;&quot;, &quot;pub_key&quot;: $pubKey, &quot;power&quot;: &quot;1000&quot;, &quot;name&quot;: &quot;Rollkit Sequencer&quot;}]&#39; ~/.gm/config/genesis.json &gt; temp.json &amp;&amp; mv temp.json ~/.gm/config/genesis.json<br>echo &quot;DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT&quot; &gt;&gt; restart-local.sh<br>echo &quot;gmd start --rollkit.aggregator true --rollkit.da_address=&quot;:26650&quot; --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr \&quot;0.0.0.0:36656\&quot; --minimum-gas-prices=&quot;0.025stake&quot;&quot; &gt;&gt; restart-local.sh<br># start the chain<br>gmd start --rollkit.aggregator true --rollkit.da_address=&quot;:26650&quot; --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr &quot;0.0.0.0:36656&quot; --minimum-gas-prices=&quot;0.0stake&quot;</pre><p>script-2: init-testnet2.sh</p><pre>#!/bin/sh<br># set variables for the chain<br>VALIDATOR_NAME=t2validator-1<br>CHAIN_ID=testnet-2<br>KEY_NAME=t2-key-1<br>KEY_2_NAME=t2-key-2<br>CHAINFLAG=&quot;--chain-id ${CHAIN_ID}&quot;<br>TOKEN_AMOUNT=&quot;10000000000000000000000000stake&quot;<br>STAKING_AMOUNT=&quot;1000000000stake&quot;<br>MNEMONIC_1=&quot;----paste your mnemonic here----&quot;<br>MNEMONIC_2=&quot;----paste your mnemonic here----&quot;<br>DA_BLOCK_HEIGHT=$(curl http://localhost:8000/v1/latest_block | jq -r &#39;.latest_block&#39;)<br># echo variables for the chain<br>echo -e &quot;\n Your DA_BLOCK_HEIGHT is $DA_BLOCK_HEIGHT \n&quot;<br>gmd tendermint unsafe-reset-all --home /home/vitwit/.gm1<br># initialize the validator with the chain ID you set<br>gmd init $VALIDATOR_NAME --chain-id $CHAIN_ID --home /home/vitwit/.gm1<br># # add keys for key 1 and key 2 to keyring-backend test<br>echo $MNEMONIC_1 | gmd keys add $KEY_NAME --recover --keyring-backend=test --home /home/vitwit/.gm1<br>echo $MNEMONIC_2 | gmd keys add $KEY_2_NAME --recover --keyring-backend=test --home /home/vitwit/.gm1<br># # add these as genesis accounts<br>gmd genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test --home /home/vitwit/.gm1<br>gmd genesis add-genesis-account $KEY_2_NAME $TOKEN_AMOUNT --keyring-backend test --home /home/vitwit/.gm1<br>echo &quot;----------update config--------------&quot;<br>GRPC=&quot;9092&quot;<br>sed -i &#39;s#localhost:9090#localhost:&#39;${GRPC}&#39;#g&#39; ~/.gm1/config/app.toml<br>sed -i &#39;s/laddr = \&quot;tcp:\/\/127.0.0.1:26657\&quot;/laddr = \&quot;tcp:\/\/0.0.0.0:16657\&quot;/&#39; ~/.gm1/config/config.toml<br>sed -i &#39;s/laddr = \&quot;tcp:\/\/127.0.0.1:26656\&quot;/laddr = \&quot;tcp:\/\/0.0.0.0:16656\&quot;/&#39; ~/.gm1/config/config.toml<br>sed -i &#39;s/&quot;max_expected_time_per_block&quot;: &quot;30000000000&quot;/&quot;max_expected_time_per_block&quot;: &quot;75000000000&quot;/&#39; ~/.gm1/config/genesis.json<br># # set the staking amounts in the genesis transaction<br>gmd genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test --home /home/vitwit/.gm1<br># collect genesis transactions<br>gmd genesis collect-gentxs --home /home/vitwit/.gm1<br>ADDRESS=$(jq -r &#39;.address&#39; ~/.gm1/config/priv_validator_key.json)<br>PUB_KEY=$(jq -r &#39;.pub_key&#39; ~/.gm1/config/priv_validator_key.json)<br>jq --argjson pubKey &quot;$PUB_KEY&quot; &#39;.consensus[&quot;validators&quot;]=[{&quot;address&quot;: &quot;&#39;$ADDRESS&#39;&quot;, &quot;pub_key&quot;: $pubKey, &quot;power&quot;: &quot;1000&quot;, &quot;name&quot;: &quot;Rollkit Sequencer&quot;}]&#39; ~/.gm1/config/genesis.json &gt; temp.json &amp;&amp; mv temp.json ~/.gm1/config/genesis.json<br>echo &quot;DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT&quot; &gt;&gt; restart2-local.sh<br>echo &quot;gmd start --rollkit.aggregator true --rollkit.da_address=&quot;:26650&quot; --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --p2p.laddr \&quot;0.0.0.0:36656\&quot; --minimum-gas-prices=&quot;0.025stake&quot;&quot; &gt;&gt; restart-local.sh<br># start the chain<br>gmd start --home /home/vitwit/.gm1 --rollkit.aggregator true --rollkit.da_address=&quot;:26650&quot; --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:16657 --p2p.laddr &quot;0.0.0.0:16656&quot; --minimum-gas-prices=&quot;0.0stake&quot;<br></pre><p>Run the chain-1 by the following command</p><pre>bash init-testnet1.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JrckkJZXyq2nV1_5NCFGQg.png" /></figure><p>you can view the following logs once the chain is up and running</p><p>Run the chain-2 by the following command</p><pre>bash init-testnet2.sh</pre><p>you can view the following logs once the chain is up and running</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*geq0gYIHqxGqlxVTX9jW9g.png" /></figure><p>We are supposed to establish a relayer conncetion between the two rollup chains. To do so, we will be using go-relayer. The setup and documentation for go-relayer is available <a href="https://github.com/cosmos/relayer.git">here</a></p><p>Once the installation is done, you can use the below script as an example setup.</p><p>create a file for the relayer-script</p><pre>touch relayer-script.sh</pre><p>copy and paste the following script</p><pre>#!/bin/bash<br>RELAYER_PATH=&quot;/home/vitwit/.relayer&quot;<br>CONFIG_FILE=&quot;$RELAYER_PATH/config/config.yaml&quot;<br>CHAIN_ID_1=&quot;testnet-1&quot;<br>KEY_1=&quot;t1-key-1&quot;<br>RPC_1=&quot;http://localhost:36657&quot;<br>PREFIX_1=&quot;gm&quot;<br>GAS_PRICES_1=&quot;1000stake&quot;<br>MNEMONIC_1=&quot;----paste your mnemonic here----&quot;<br>CHAIN_ID_2=&quot;testnet-2&quot;<br>KEY_2=&quot;t2-key-1&quot;<br>RPC_2=&quot;http://localhost:16657&quot;<br>PREFIX_2=&quot;gm&quot;<br>GAS_PRICES_2=&quot;1000stake&quot;<br>MNEMONIC_2=&quot;----paste your mnemonic here----&quot;<br># Remove existing config.yaml<br>rm -f &quot;$CONFIG_FILE&quot;<br># Run rly config init to generate a new config.yaml<br>rly config init<br># Define the new chains information<br>NEW_CHAINS=$(cat &lt;&lt;EOF<br>chains:<br>    $CHAIN_ID_1:<br>        type: cosmos<br>        value:<br>            key-directory: $RELAYER_PATH/keys/$CHAIN_ID_1<br>            key: $KEY_1<br>            chain-id: $CHAIN_ID_1<br>            rpc-addr: $RPC_1<br>            account-prefix: $PREFIX_1<br>            keyring-backend: test<br>            gas-adjustment: 2<br>            gas-prices: $GAS_PRICES_1<br>            min-gas-amount: 0<br>            max-gas-amount: 1000000000<br>            debug: false<br>            timeout: 20s<br>            block-timeout: &quot;&quot;<br>            output-format: json<br>            sign-mode: direct<br>            extra-codecs: []<br>            coin-type: 118<br>            signing-algorithm: &quot;&quot;<br>            broadcast-mode: batch<br>            min-loop-duration: 0s<br>            extension-options: []<br>            feegrants: null<br>    $CHAIN_ID_2:<br>        type: cosmos<br>        value:<br>            key-directory: $RELAYER_PATH/keys/$CHAIN_ID_2<br>            key: $KEY_2<br>            chain-id: $CHAIN_ID_2<br>            rpc-addr: $RPC_2<br>            account-prefix: $PREFIX_2<br>            keyring-backend: test<br>            gas-adjustment: 2<br>            gas-prices: $GAS_PRICES_2<br>            min-gas-amount: 0<br>            max-gas-amount: 100000000<br>            debug: false<br>            timeout: 20s<br>            block-timeout: &quot;&quot;<br>            output-format: json<br>            sign-mode: direct<br>            extra-codecs: []<br>            coin-type: 118<br>            signing-algorithm: &quot;&quot;<br>            broadcast-mode: batch<br>            min-loop-duration: 0s<br>            extension-options: []<br>            feegrants: null<br>paths:<br>EOF<br>)<br># Update the chains section in the configuration file<br>sed &#39;/^chains:/,/^[a-zA-Z]*:/d&#39; &quot;$CONFIG_FILE&quot; &gt; &quot;$CONFIG_FILE.tmp&quot;<br>echo &quot;$NEW_CHAINS&quot; &gt;&gt; &quot;$CONFIG_FILE.tmp&quot;<br>mv &quot;$CONFIG_FILE.tmp&quot; &quot;$CONFIG_FILE&quot;<br>echo &quot;Configuration file updated successfully.&quot;<br>rly keys restore $CHAIN_ID_1 $KEY_1 &quot;$MNEMONIC_1&quot;<br>rly keys restore $CHAIN_ID_2 $KEY_2 &quot;$MNEMONIC_2&quot;<br>rly paths new testnet-1 testnet-2 transfer-path<br>rly tx link transfer-path --src-port transfer --dst-port transfer<br>rly start</pre><p>Do not forgot to change the <em>chain-id, mnemonic, key-name </em>etc..<em> </em>as per your chain configurations accordingly</p><p>You can find following logs once the relayer connection has been established</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*afjVCkNEJTLsai9eu369Cg.png" /><figcaption>Relayer</figcaption></figure><p>Now, we are good to go for making a transfer between two IBC rollups</p><p>Let us query the balance of the key to make sure we had enough stake with the below command</p><pre>gmd q bank balances gm1huqkhe8nyvqumq62flfan2uzl57gg7w98m78kd  --node tcp://localhost:16657</pre><p>You can view the following log which shows the account balance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nu9TS06C4ckAVFmPsyISFg.png" /></figure><p>With the following command, IBC transfer can be done from testnet1(sender) to testnet2 (receiver)</p><pre>gmd tx ibc-transfer transfer transfer channel-0 gm1huqkhe8nyvqumq62flfan2uzl57gg7w98m78kd 100000stake --from t1-key-1 --keyring-backend test --node tcp://localhost:36657 --chain-id testnet-1 -y</pre><p>You can view the following log once after executing the following command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uFoxGV-wXxf0u8ASn59kzw.png" /></figure><p><em>code-0 </em>indicates that the transfer has been successful</p><p>We can query the tx using the following command</p><pre>gmd q tx &lt;tx-hash&gt;</pre><p>Let us check the balance on receiver rollup chain</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SBy7z5IRBkyQEf0El8DRhQ.png" /></figure><p>We can check the received amount of 10000 denom which got credited into the receiver rollup chain</p><p>With this, we have successfully made an IBC transfer between two rollups 🎉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b5f83f88539" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vitwit/rolling-across-blockchains-exploring-ibc-transfers-between-two-rollups-1b5f83f88539">Rolling Across Blockchains: Exploring IBC Transfers Between Two Rollups</a> was originally published in <a href="https://medium.com/vitwit">Vitwit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>