cosmos / relayer

An IBC relayer for ibc-go
Apache License 2.0
380 stars 1.7k forks source link

Re-add support for upgrading light clients #751

Open jtieri opened 2 years ago

jtieri commented 2 years ago

This code used to be present before refactoring to account for the Provider abstraction.

We should get this added back asap and start building out testing coverage in ibctest

jtieri commented 2 years ago

A lot of the pieces for this are there but there is some uncertainty around whether or not the relayer should be responsible for submitting the on-chain governance proposals via implementing an UpgradeChain function.

We could add a function to the Provider interface that looks like:

UpgradeChain(ctx context.Context, dst ChainProvider, srcClientID string, upgradePlan []byte, deposit sdk.Coin, unbondingPeriod time.Duration) error

where upgradePlan is the byte representation of some upgrade file that would be read off disk and then marshaled into an appropriate data type to submit on chain e.g. https://github.com/cosmos/ibc-go/blob/5e5e2cd2b904738266b06b3fc63a744fe6c7eeab/modules/core/02-client/types/proposal.go#L21-L23

jtieri commented 1 year ago

https://ibc.cosmos.network/main/ibc/upgrades/quick-guide.html#step-by-step-upgrade-process-for-relayers-upgrading-counterparty-clients