Skip to content

Conversation

@lumtis
Copy link
Contributor

@lumtis lumtis commented Feb 17, 2021

Features:

Flag --advanced for starport relayer configure allows to customize:

  • Source port
  • Source version
  • Target port
  • Target version
  • Channel ordering

Can configure any option with a flag

Add acknowledgment relaying in xrelayer

To test locally:

starport app github.com/ltacker/mars
cd mars
starport module create foo --ibc
starport packet bar --module foo

Create the file config2.yml:

accounts:
  - name: alice
    coins: ["1000token", "1000000000stake"]
  - name: bob
    coins: ["500token"]
validator:
  name: alice
  staked: "100000000stake"
faucet:
  port: 4501
  name: bob
  coins:
    - "5token"
servers:
  rpc-address: "0.0.0.0:26659"
  p2p-address: "0.0.0.0:26658"
  prof-address: "0.0.0.0:6061"
  grpc-address: "0.0.0.0:9091"
  api-address: "0.0.0.0:1318"
  frontend-address: "0.0.0.0:8081"
  dev-ui-address: "0.0.0.0:12346"
genesis:
  chain_id: "foo2"
init:
  home: "$HOME/foo2"

Start the chains in two terminals:

starport serve -c config2.yml -r       <--- Important: the command with the custom config must be run first and you must wait for this blockchain being ready before starting the second command because of a bug (tracked on another issue because it is not related to this feature)

starport serve -r

Initialize the relayer:

starport relayer configure --advanced
? Source RPC http://0.0.0.0:26657
? Source Faucet (optional)
? Source Port foo
? Source Version foo-1
? Target RPC http://0.0.0.0:26659
? Target Faucet (optional) http://0.0.0.0:4501
? Target Port foo
? Target Version foo-1
? Ordered Channel (yes/no) no

Or directly with the command:

starport relayer configure -a --source-rpc "http://0.0.0.0:26657" --source-faucet "http://0.0.0.0:4500" --source-port "foo" --source-version "foo-1" --target-rpc "http://0.0.0.0:26659" --target-faucet "http://0.0.0.0:4501" --target-port "foo" --target-version "foo-1"

Start the relayer and send packets:

starport relayer connect
marsd tx foo send-bar foo channel-0 --from alice --chain-id mars
marsd tx foo send-bar foo channel-0 --from alice  --home ~/foo2 --chain-id foo2 --node tcp://localhost:26659

@lumtis lumtis linked an issue Feb 17, 2021 that may be closed by this pull request
@lumtis lumtis marked this pull request as ready for review February 22, 2021 10:41
@lumtis lumtis requested review from fadeev and ilgooz as code owners February 22, 2021 10:41
Copy link
Contributor

@fadeev fadeev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in Gitpod, works great!

Copy link
Member

@ilgooz ilgooz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful work, and really nice addition!

@ilgooz ilgooz merged commit 5de0aa7 into develop Feb 22, 2021
@ilgooz ilgooz deleted the feat/relayer-advanced branch February 22, 2021 14:52
Jchicode pushed a commit to Jchicode/cli that referenced this pull request Aug 9, 2023
* Make channel configurable

* Advanced questions

* lint

* Update gomod

* Relay acknowledgement

* Flag option for relayer configuration

* One little change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

starport relayer: support any IBC module

4 participants