-
Notifications
You must be signed in to change notification settings - Fork 67
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
fix: ibc clients creation stuck #639
Conversation
…ng using tx send commands
…tion to match new optimistic ibc.
@@ -69,64 +112,49 @@ func (r *Relayer) CreateIBCChannel(override bool, logFileOption utils.CommandOpt | |||
}, nil | |||
} | |||
|
|||
// waitForValidRollappHeight waits for the rollapp height to be greater than 2 otherwise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for the rollapp height on the hub to be greater than initial height
not needed anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. because we open a connection optimistically so only the rollapp height is important.
relayer/create_ibc_channel.go
Outdated
@@ -34,15 +44,48 @@ func (r *Relayer) CreateIBCChannel(override bool, logFileOption utils.CommandOpt | |||
return ConnectionChannels{}, err | |||
} | |||
|
|||
// We always pass override otherwise this commands hangs if there are too many clients |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what the difference with previous version?
it worked without hanging, and without override=true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it did only if you run it against local hub without thousands of ibc clients. if you run it against froopyland it hangs. the difference i the data on the hub which makes this command hangs as it searches first to see if an ibc client already exists on the hub and when it needs to iterates thousands of clients and consensus states it takes forever.
time.Sleep(10 * time.Second) | ||
|
||
connectionID, _ := r.GetActiveConnection() | ||
if connectionID == "" || override { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if u set override=true
in the createClients, this check is wrong.
if creating new client, u will must to create new connection as well
relayer/create_ibc_channel.go
Outdated
if !override { | ||
// Check if clients exist | ||
clientsExist, err = r.CheckClientsExist() | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore err as u don't won't to return here
…e may cause channel creation to hang as it doesn't find a connection.
relayer/clients.go
Outdated
} | ||
clientIDRollapp_raw, err := roller_utils.GetNestedValue(rlyCfg, []string{"paths", consts.DefaultRelayerPath, "dst", "client-id"}) | ||
if err != nil { | ||
return false, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to return the err, and ignore it by the caller
keep same standard as in GetActiveConnection
…'re using now optimistic creation so not necessary.
This PR improves substantially the channel creation.
Channel creation is now done < 3 mins.
It removes unnecessary code which used the old assumption of the forked ibc and changed the chain block production to use send fund commands from sequencer to itself vs update-client which would introduce problems such as account sequence mismatch and header heights coordination between received ibc packet header and already existing ibc header sent using the update command.
PR Standards
Opening a pull request should be able to meet the following requirements
For Author:
godoc
commentsFor Reviewer:
After reviewer approval: