-
Notifications
You must be signed in to change notification settings - Fork 593
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
backport-v7.8.x: self client/consensus state removal from connection handshake #7128
backport-v7.8.x: self client/consensus state removal from connection handshake #7128
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
LGTM!
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.
Thank you for managing the back port, @colin-axner!
I guess we could also do a bit more of clean up in endpoint.go
in ConnOpenTry
and ConnOpenAck
.
We could also _ the not used arguments of NewMsgConnectionOpenTry
and NewMsgConnectionOpenAck
. And we could also do a bit of clean up in TestNewMsgConnectionOpenTry
and TestNewMsgConnectionOpenAck
.
Anyway, it's all just cleanup in a release branch, so fine leaving it all as is.
if _, err := k.ConnectionKeeper.ConnOpenTry( | ||
ctx, msg.Counterparty, msg.DelayPeriod, msg.ClientId, targetClient, | ||
ctx, msg.Counterparty, msg.DelayPeriod, msg.ClientId, nil, | ||
connectiontypes.ProtoVersionsToExported(msg.CounterpartyVersions), msg.ProofInit, msg.ProofClient, msg.ProofConsensus, |
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.
We can leave it as is, but I guess we could also pass default zero values for proof client, proof consensus and consensus height, since they are not used anymore.
if err := k.ConnectionKeeper.ConnOpenAck( | ||
ctx, msg.ConnectionId, targetClient, msg.Version, msg.CounterpartyConnectionId, | ||
ctx, msg.ConnectionId, nil, msg.Version, msg.CounterpartyConnectionId, | ||
msg.ProofTry, msg.ProofClient, msg.ProofConsensus, |
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.
Same thing here. Fine to leave as is though!
string signer = 12; | ||
// optional proof data for host state machines that are unable to introspect their own consensus state | ||
bytes host_consensus_state_proof = 13; | ||
bytes host_consensus_state_proof = 13 [deprecated = 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.
For all these deprecated fields, I can share a message with hermes team to let them know that from v7.8.0, v8.5.0 and v9.0.0 they don't need to fill them in anymore, right? Not urgent that they change it, but they can do it when it fits them.
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.
Yup exactly!
@@ -281,15 +281,10 @@ func (solo *Solomachine) ConnOpenAck(chain *TestChain, clientID, connectionID st | |||
proofTry := solo.GenerateConnOpenTryProof(clientID, connectionID) | |||
|
|||
clientState := ibctm.NewClientState(chain.ChainID, DefaultTrustLevel, TrustingPeriod, UnbondingPeriod, MaxClockDrift, chain.LastHeader.GetHeight().(clienttypes.Height), commitmenttypes.GetSDKSpecs(), UpgradePath) |
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.
I guess we could also remove this and pass nil
to NewMsgConnectionOpenAck
.
Merging, I'm opting for least effort on this backport. If someone wants to do additional changes they can. All the changes made were required for tests to pass |
Description
A selection of changes from #6931 and #6937
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.