starship
starship copied to clipboard
Registry reports wrong connection_id
I have a config with 4 chains and 3 relayers between them and /ibc/{chain_1}/{chain_2}
request returns incorrect connection id randomly.
For reproduction here's the config I'm using:
chains:
- id: juno-1
name: juno
numValidators: 1
ports:
rest: 1313
rpc: 26653
grpc: 30658
faucet: 8000
- id: junotwo-1
name: juno
numValidators: 1
ports:
rest: 1317
rpc: 26659
grpc: 30660
faucet: 8004
- id: junothree-1
name: juno
numValidators: 1
ports:
rest: 1323
rpc: 26657
grpc: 30657
faucet: 8001
- id: junofour-1
name: juno
numValidators: 1
ports:
rest: 1328
rpc: 26658
grpc: 30659
faucet: 8003
relayers:
- name: juno-juno2
type: hermes
replicas: 1
chains:
- juno-1
- junotwo-1
config:
event_source:
mode: "pull"
- name: juno2-juno3
type: hermes
replicas: 1
chains:
- junotwo-1
- junothree-1
config:
event_source:
mode: "pull"
- name: juno3-juno4
type: hermes
replicas: 1
chains:
- junothree-1
- junofour-1
config:
event_source:
mode: "pull"
registry:
enabled: true
ports:
rest: 8081
When it's running I create one channel betwenn each of them:
kubectl exec hermes-juno-juno2-0 -- hermes create channel --order unordered --a-chain juno-1 --a-connection connection-0 --a-port transfer --b-port transfer
kubectl exec hermes-juno2-juno3-0 -- hermes create channel --order unordered --a-chain junotwo-1 --a-connection connection-0 --a-port transfer --b-port transfer
kubectl exec hermes-juno3-juno4-0 -- hermes create channel --order unordered --a-chain junothree-1 --a-connection connection-0 --a-port transfer --b-port transfer
After that I'm doing couple of GET requests to get connection_id between chains:
$ curl -s GET 'http://localhost:8081/ibc/juno-1/junotwo-1' | jq ".chain_1.connection_id" && curl -s GET 'http://localhost:8081/ibc/junotwo-1/junothree-1' | jq ".chain_1.connection_id" && curl -s GET 'http://localhost:8081/ibc/junothree-1/junofour-1' | jq ".chain_1.connection_id"
"connection-0"
"connection-0"
"connection-0"
If you repeat running this command eventually you will get something like that instead of correct result:
"connection-0"
"connection-0"
"connection-1"
Where one of the connection ids incorrect.
Why it's bad: We use this endpoint to determine command for opening channels in hermes and when incorrect connection_id passed inside hermes it errors that it does not have config for the chain_b