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

refactor: solomachine generic verification methods and signbytes simplification #1687

Merged
merged 16 commits into from
Aug 2, 2022

Conversation

damiannolan
Copy link
Member

@damiannolan damiannolan commented Jul 11, 2022

Description

  • Adding new SignBytes message type ( note V2 suffix will be dropped when PRs are upstreamed to this branch)
  • Adding generic VerifyMembership implementation
  • Updating tests

needs:

closes: #1292 #1295 #1141


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.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

damiannolan and others added 6 commits July 19, 2022 14:50
* adding SignatureAndDataV2 proto message type

* updating misbehaviour checking

* removing dead solomachine code (#1716)
* adding verification of non-membership with tests

* refactor common code to produceVerificationArgs

* removing unused produce args func

* Update modules/light-clients/06-solomachine/client_state_test.go

Co-authored-by: colin axnér <[email protected]>

Co-authored-by: colin axnér <[email protected]>
@damiannolan damiannolan changed the title [WIP] refactor: solomachine generic VerifyMembership refactor: solomachine generic verification methods and signbytes simplification Jul 27, 2022
@damiannolan damiannolan marked this pull request as ready for review July 27, 2022 21:08
@damiannolan damiannolan requested a review from chatton July 27, 2022 21:08
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

I love these changes so much ❤️ Cleans up a lot of unnecessary code. Thanks for handling these changes and splitting them up in a very digestible way. The code is very clean!

Everything LGTM, the only change I'd block merge on is I believe we need to bump the proto version for the structs which have changed

modules/light-clients/06-solomachine/update.go Outdated Show resolved Hide resolved
proto/ibc/lightclients/solomachine/v2/solomachine.proto Outdated Show resolved Hide resolved
@colin-axner colin-axner mentioned this pull request Aug 1, 2022
9 tasks
* add test for successful new diversifier

* add changelog entry

* fix tests
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Wahoo! Excellent!

ConsensusState consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""];
// when set to true, will allow governance to update a solo machine client.
// The client will be unfrozen if it is frozen.
bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""];
Copy link
Contributor

Choose a reason for hiding this comment

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

are we actually checking this bool anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

@colin-axner and I actually spoke about potentially removing this yesterday. It could be done in a follow up

Copy link
Contributor

Choose a reason for hiding this comment

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

we are. I think we should just remove it for the same reasoning we did in 07-tendermint (gov always can do a migration if they really want to). Agreed?

I can do it in a followup if we agree

@damiannolan damiannolan enabled auto-merge (squash) August 2, 2022 15:13
@colin-axner colin-axner merged commit b0a58a8 into 02-client-refactor Aug 2, 2022
@colin-axner colin-axner deleted the damian/solomachine-generic-verify branch August 2, 2022 15:30
@colin-axner colin-axner mentioned this pull request Aug 3, 2022
9 tasks
oshorefueled pushed a commit to ComposableFi/ibc-go that referenced this pull request Aug 9, 2022
…lification (cosmos#1687)

* adding new SignBytes type, generic membership verification implementation and tests

* adding protodocs

* updating comment

* refactor: solomachine misbehaviour checking (cosmos#1715)

* adding SignatureAndDataV2 proto message type

* updating misbehaviour checking

* removing dead solomachine code (cosmos#1716)

* updating tests with concrete ibc core types

* refactor: solomachine generic VerifyNonMembership (cosmos#1720)

* adding verification of non-membership with tests

* refactor common code to produceVerificationArgs

* removing unused produce args func

* Update modules/light-clients/06-solomachine/client_state_test.go

Co-authored-by: colin axnér <[email protected]>

Co-authored-by: colin axnér <[email protected]>

* removing V2 suffix from SignBytes and SignatureAndData types

* use current diversifier when verifying header details

* Add test for new diversifier for solomachine (cosmos#1860)

* add test for successful new diversifier

* add changelog entry

* fix tests

* restoring solomachine/v2 protos, updadting v2 codegen path and adding solomachine/v3 protobuf defs

* adding changelog entries

Co-authored-by: colin axnér <[email protected]>
@damiannolan damiannolan mentioned this pull request Jul 17, 2023
4 tasks
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.

3 participants