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

Differentiate close and update signature checks #1150

Merged

Conversation

pirapira
Copy link
Contributor

with different MessageTypeId's. This closes #1149.

@codecov
Copy link

codecov bot commented Jul 30, 2019

Codecov Report

Merging #1150 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1150   +/-   ##
=======================================
  Coverage   81.14%   81.14%           
=======================================
  Files          21       21           
  Lines        1453     1453           
  Branches      191      191           
=======================================
  Hits         1179     1179           
  Misses        231      231           
  Partials       43       43
Impacted Files Coverage Δ
raiden_contracts/utils/proofs.py 92.3% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9d4875...f2102a0. Read the comment docs.

raiden_contracts/utils/proofs.py Outdated Show resolved Hide resolved
@pirapira

This comment has been minimized.

@pirapira pirapira force-pushed the differentiate-close-and-update branch from 4a2f9bc to b4dfc4c Compare August 13, 2019 15:30
@pirapira pirapira force-pushed the differentiate-close-and-update branch 2 times, most recently from 83b62b9 to 4001f97 Compare August 15, 2019 11:52
Now `pack_balance_proof` is used as often for the updating as
the closing, so the default value makes less sense now.
Pylint doesn't understand balance_proof[:3] correctly, and
it complained that msg_type argument appears twice.
There were two very similar functions sign_balance_proof_close_message()
and sign_balance_proof_update_message(). These two are combined into
sign_balance_proof_message().
create_balance_proof_closing_countersignature() and
create_balance_proof_updating_countersignature()
into create_balance_proof_countersignature()
for closeChannel() and updateNonClosingBalanceProof().
@pirapira pirapira force-pushed the differentiate-close-and-update branch from f74f665 to 6bb17c9 Compare August 15, 2019 12:53
Copy link
Contributor

@palango palango left a comment

Choose a reason for hiding this comment

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

Solves the signature problem mentioned in the issue. The refactoring Karl talked about can happen later in my eyes.

@pirapira pirapira merged commit a858013 into raiden-network:master Aug 15, 2019
@pirapira pirapira deleted the differentiate-close-and-update branch August 15, 2019 13:46
@LefterisJP LefterisJP mentioned this pull request Aug 16, 2019
pirapira added a commit to pirapira/spec that referenced this pull request Sep 3, 2019
This follows the implementation change in
raiden-network/raiden-contracts#1150

Since Balance Proof Update message is used both for closeChnanel()
and updateNonClosingBalanceProof() call, the signature must be
differentiated using different message IDs.
pirapira added a commit to pirapira/spec that referenced this pull request Sep 5, 2019
This follows the implementation change in
raiden-network/raiden-contracts#1150

Since Balance Proof Update message is used both for closeChnanel()
and updateNonClosingBalanceProof() call, the signature must be
differentiated using different message IDs.
palango pushed a commit to raiden-network/spec that referenced this pull request Sep 6, 2019
This follows the implementation change in
raiden-network/raiden-contracts#1150

Since Balance Proof Update message is used both for closeChnanel()
and updateNonClosingBalanceProof() call, the signature must be
differentiated using different message IDs.
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.

The signatures for closeChannel() and updateBalanceProof() should use different message IDs
3 participants