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

Add fields to NewBalanceProofReceived event #373

Merged
merged 9 commits into from
Dec 17, 2018

Conversation

karlb
Copy link
Contributor

@karlb karlb commented Dec 10, 2018

as suggested in
#360 (comment) .

`raiden_libs.utils.signing.eth_sign` includes the "\x19Ethereum Signed
Message" prefix while `raiden_contracts.utils.sign_utils.sign` doesn’t.
@pirapira suggested that including the prefix is usually a good idea
because some clients can only create signatures including it.
We might want to add these inside the sign and verify functions, but
let's make the behaviour consistent first and the refactor, if we really
want the prefix in all cases.
Avoids duplication of message prefix.
@loredanacirstea
Copy link
Contributor

Some notes:

  1. About commit messages - referencing the comment here is good. But please also add a small description, as the PRs and issues are kept separately by github and are more difficult to transfer.
    @hackaugusto made this point a couple of times and he is right.
  2. I see there are a lot of event arguments. It would be nice to document why we need each of them, for multiple reasons:
  • they add gas cost, especially if they are indexed
  • we need to see what we need to actually index (indexing makes event filtering faster)
  • we need to see if we have redundant arguments
    You can document this directly in the code or start adding these contracts in the spec repo (if so, they should be in a different file than the core ones). I would recommend that you start with the spec first, so you have an overview of what needs to be built.
  1. Please add a test for the event - see

@karlb
Copy link
Contributor Author

karlb commented Dec 10, 2018

2. I see there are a lot of event arguments. It would be nice to document why we need each of them, for multiple reasons.

Yes, good idea. My current focus is to get the MS working again, at all. I've just kept the events and parameters without checking the reason for their existence. I'll do so, but it's not something I'll do right now.

Events are an important part of the SC functionality, so they should be
tested!

Requested in
raiden-network#373 (comment).
@karlb
Copy link
Contributor Author

karlb commented Dec 14, 2018

  1. Please add a test for the event - see raiden-contracts/raiden_contracts/tests/test_token_network_registry.py

Done in f5d81a4.

@@ -92,6 +92,14 @@ class MessageTypeId(IntEnum):
COOPERATIVE_SETTLE = 4


# Message types used my MonitoringService contract
Copy link
Contributor

Choose a reason for hiding this comment

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

/s/my/by

Copy link
Contributor

@loredanacirstea loredanacirstea left a comment

Choose a reason for hiding this comment

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

Looks good.
I would like to keep the logic separate for core and services -> different files & folders for tests, constants & fixtures, but this can be discussed separately.

Please fix the conflict on contracts.json and we can merge this.

@karlb karlb merged commit 20f91ab into raiden-network:master Dec 17, 2018
@karlb karlb deleted the add-to-event branch December 17, 2018 10:14
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