Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tunnel] implement route - router #495

Open
wants to merge 23 commits into
base: tunnel-ibc-hook
Choose a base branch
from

Conversation

satawatnack
Copy link
Member

@satawatnack satawatnack commented Nov 27, 2024

Implementation details

  • Add router route

Please ensure the following requirements are met before submitting a pull request:

  • The pull request is targeted against the correct target branch
  • The pull request is linked to an issue with appropriate discussion and an accepted design OR is linked to a spec that describes the work.
  • The pull request includes a description of the implementation/work done in detail.
  • The pull request includes any and all appropriate unit/integration tests
  • You have added a relevant changelog entry to CHANGELOG_UNRELEASED.md
  • You have re-reviewed the files affected by the pull request (e.g. using the Files changed tab in the Github PR explorer)

@satawatnack satawatnack requested a review from RogerKSI November 27, 2024 11:01
@RogerKSI RogerKSI changed the title [Tunnel] Add Router route [Tunnel] implement route - router Jan 9, 2025
@satawatnack satawatnack changed the base branch from master to tunnel-ibc-hook January 27, 2025 09:24
@satawatnack satawatnack marked this pull request as ready for review January 27, 2025 09:59
@@ -0,0 +1 @@
bandd tx tunnel create-tunnel router router17c2txg2px6vna8a6v4ql4eh4ruvprerhytxvwt2ugp4qr473pajsyj9pgm 17000 0xDFCfEbF22e85193eDc37b8b136d4F3394987d1AE 300000 10000000 1000000000uband 1000 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to update this? look like router contract should not be used anymore?

Comment on lines +21 to +22
DefaultRouterIBCChannel = "channel-0"
DefaultRouterIntegrationContract = "router17c2txg2px6vna8a6v4ql4eh4ruvprerhytxvwt2ugp4qr473pajsyj9pgm"
Copy link
Contributor

Choose a reason for hiding this comment

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

  • remove default for channel
  • contract will be the same for both testnet and mainnet? if not, please remove it.

Comment on lines +83 to +95
message RouterRoute {
option (cosmos_proto.implements_interface) = "RouteI";

// destination_chain_id is the destination chain ID
string destination_chain_id = 3 [(gogoproto.customname) = "DestinationChainID"];
// destination_contract_address is the destination contract address
string destination_contract_address = 4;
// destination_gas_limit is the destination gas limit
uint64 destination_gas_limit = 5;
// destination_gas_price is the destination gas price
uint64 destination_gas_price = 6;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

start running number from 1

func GetTxCmdUpdateRouterRoute() *cobra.Command {
cmd := &cobra.Command{
Use: "router [tunnel-id] [destination-chain-id] [destination-contract-address] [destination-gas-limit] [destination-gas-price]",
Short: "Update router route of a router tunnel",
Copy link
Contributor

Choose a reason for hiding this comment

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

should we use Router (big R) instead when we mention the name?

Comment on lines +75 to +79
case *types.RouterRoute:
_, found := k.channelKeeper.GetChannel(ctx, ibctransfertypes.PortID, routerIBCChannel)
if !found {
return nil, types.ErrInvalidChannelID
}
Copy link
Contributor

Choose a reason for hiding this comment

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

don't think need to check it for Router. it should always be available.
Also, if it's not, it can't be reliable and it can be changed later from params.

wdyt?.

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.

2 participants