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

chore: solomachine mock channel handshake, allow zero-height in channel handshake msgs #2776

Conversation

damiannolan
Copy link
Member

@damiannolan damiannolan commented Nov 15, 2022

Description

  • Allow zero-height in channel handshake msgs
    • MsgChannelOpenTry
    • MsgChannelOpenAck
    • MsgChannelOpenConfirm
    • MsgChannelCloseConfirm
  • Adding mock channel handshake to 06-solomachine

closes: #2749 #2750

Commit Message / Changelog Entry

type: commit message

see the guidelines for commit messages. (view raw markdown for examples)


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.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

… non-zero proof height in channel handshake msgs
@damiannolan
Copy link
Member Author

Left changelog section empty as this is being upstreamed to @colin-axner's branch at the moment.
We can change things if needs be!

@codecov-commenter
Copy link

Codecov Report

Merging #2776 (4dea53f) into colin/1874-sm-proof-height (abbaeef) will decrease coverage by 0.03%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@                      Coverage Diff                       @@
##           colin/1874-sm-proof-height    #2776      +/-   ##
==============================================================
- Coverage                       78.73%   78.69%   -0.04%     
==============================================================
  Files                             178      178              
  Lines                           12295    12283      -12     
==============================================================
- Hits                             9680     9666      -14     
- Misses                           2188     2190       +2     
  Partials                          427      427              
Impacted Files Coverage Δ
modules/core/04-channel/types/msgs.go 76.17% <ø> (-0.93%) ⬇️
...dules/light-clients/06-solomachine/client_state.go 86.61% <0.00%> (-1.58%) ⬇️

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

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

LGTM just had a few suggestions/questions 👍

testing/solomachine.go Show resolved Hide resolved
testing/solomachine.go Show resolved Hide resolved
modules/core/04-channel/types/msgs_test.go Show resolved Hide resolved
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.

Excellent! You were lighting quick with this one! ⚡

Comment on lines +68 to +70
// close init is not necessary as the solomachine implementation is mocked

suite.solomachine.ChanCloseConfirm(suite.chainA, channelID)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we turn the setup into a reusable func for testing receives and acks, we might want this last section to be a separate test

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree, I think we can do that in the next series of PRs for packet lifecycle stuff. I'll merge this to your branch now

@damiannolan damiannolan merged commit b6dc225 into colin/1874-sm-proof-height Nov 16, 2022
@damiannolan damiannolan deleted the damian/2749-allow-zero-proof-height-on-chan-handshake branch November 16, 2022 15:56
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.

5 participants