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

[Consensus] New signatures for network messages #1024

Merged
merged 45 commits into from
Oct 21, 2019

Conversation

random-zebra
Copy link

@random-zebra random-zebra commented Sep 26, 2019

Sign the following messages based on the hash of their binary content instead of their string representation:

  • masternode payment winner
  • masternode ping
  • budget vote
  • finalized budget vote
  • consensus vote
  • masternode broadcast
  • obfuscation relay
  • spork message

@random-zebra random-zebra added P2P Needs Release Notes Placeholder tag for anything needing mention in the "Notable Changes" section of release notes Protocol-Update Consensus labels Sep 26, 2019
@random-zebra random-zebra added this to the 4.0.0 milestone Sep 26, 2019
@random-zebra random-zebra self-assigned this Sep 26, 2019
@random-zebra random-zebra force-pushed the 2019_new_mess_sigs branch 6 times, most recently from 1af0a9b to d37a0de Compare September 26, 2019 23:48
@random-zebra random-zebra force-pushed the 2019_new_mess_sigs branch 3 times, most recently from 7c48935 to f47447a Compare October 3, 2019 20:03
@random-zebra random-zebra force-pushed the 2019_new_mess_sigs branch 4 times, most recently from 813857e to 14f5d67 Compare October 12, 2019 13:04
src/masternode-payments.cpp Outdated Show resolved Hide resolved
src/spork.cpp Show resolved Hide resolved
Copy link

@Mrs-X Mrs-X left a comment

Choose a reason for hiding this comment

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

I have created some masternodes, budget proposals and checked if they were properly created, voted on and finalized for some budget-cycles.
Everything went well, just some minor hickups which aren't related to this PR and will be addressed separately,

Summary:

  • masternode payment winner -> works
  • masternode ping -> works
  • budget vote -> works
  • finalized budget vote -> works
  • consensus vote -> works
  • masternode broadcast -> works
  • obfuscation relay -> this seems to be dead code
  • spork message -> not tested because I don't have the latest spork-key

ACK from my side.

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

ACK 7f93bd9

random-zebra added a commit that referenced this pull request Oct 21, 2019
7f93bd9 [Trivial] Fix error messages: Setkey -> GetKeysFromSecret (random-zebra)
152d384 [Trivial][Cleanup] fix a few log lines (random-zebra)
d7b8db0 [RPC] decodemasternodebroadcast: add nMessVersion field for MNB and MNP (random-zebra)
640c3c1 [Bug] Fix messages serialization for version MESS_VER_STRMESS (random-zebra)
1d54b41 [Core] mnb: sign the hex representation of the double hash of the data (random-zebra)
e4099bd [RPC] Refactor masternode start/broadcast (random-zebra)
d6eb7a4 [RPC] fix startmasternode "alias/missing" relay (random-zebra)
9ab844a [Fix] mnp sigtime and signature check for mnb in CheckAndUpdate (random-zebra)
1db4fe2 [Trivial] better log for CHashSigner::VerifyHash failures (random-zebra)
0c86ed6 [Fix] default public key for mnb (random-zebra)
d4b0d9d [Fix] remove CMasternode explicit constructor from mnb (random-zebra)
8d04cd5 [Fix] Double signatures swap in CMasternode (random-zebra)
f01e28e [Consensus] fNewSigs always defaults to false (random-zebra)
294ab82 [Refactor] CSignedMessage parent of CSporkMessage (random-zebra)
9e77217 [Refactor] CSignedMessage parent of CObfuscationRelay (random-zebra)
3b4f2ed [Refactor] CSignedMessage parent of CConsensusVote (random-zebra)
d0c1215 [Refactor] Abstract GetPublicKey in CSignedMessage (random-zebra)
37f8629 [Refactor] CSignedMessage parent of CBudgetVote/CFinalizedBudgetVote (random-zebra)
a36db49 [Refactor] CSignedMessage parent of CMasternodePaymentWinner (random-zebra)
73bc65f [Refactor] CSignedMessage parent of CMasternode and CMasternodePing (random-zebra)
a4cee54 [Refactor] define CSignedMessage parent class (random-zebra)
d091f25 [Consensus] Reject old message versions for CSporkMessage (random-zebra)
95689d4 [Consensus] Reject old message versions for CMasternodePaymentWinner (random-zebra)
c752a96 [Consensus] add nMessVersion to signature hash (random-zebra)
4051846 [Core] Add a field 'nMessVersion' to signed messages (random-zebra)
75f24d3 [Refactor] CFinalizedBudget/Broadcast cleanup constructors (random-zebra)
e45836d [Core] make signatures private variables in their classes (random-zebra)
34d59e8 [Consensus] New signature for CSporkMessage (random-zebra)
228b783 [Consensus] New signature for CObfuScationRelay (random-zebra)
b3bce53 [Trivial] rename mnb: sig --> vchSig, VerifySignature --> CheckSignature (random-zebra)
e2a6ae2 [Consensus] New signature for CMasternodeBroadcast (random-zebra)
567b4b1 [Trivial] Align the format of the log messages (random-zebra)
3535544 [Trivial] CConsensusVote: rename SignatureValid() to CheckSignature() (random-zebra)
3916a0c [Consensus] New signature for CConsensusVote (SwiftX) (random-zebra)
a4ac445 [Trivial] constructors with arg list for BV and FBV (random-zebra)
f8966a7 [Trivial] FBV: rename SignatureValid() to CheckSignature() (random-zebra)
61b1824 [Consensus] New signature for CFinalizedBudgetVote (random-zebra)
ac517dc [Trivial] CBudgetVote: rename SignatureValid() to CheckSignature() (random-zebra)
0171209 [Consensus] New signature for CBudgetVote (random-zebra)
b30da1c [Consensus] Include blockhash in CMasternodePing hash (random-zebra)
44edf2d [Consensus] New signature for CMasternodePing (random-zebra)
722af5a [Trivial] MPW: rename SignatureValid() to CheckSignature() (random-zebra)
161392c [Consensus] New signature for CMasternodePaymentWinner (random-zebra)
171c56c [Refactor] Define messageSigner and hashSigner classes (random-zebra)
8550898 [Core] Placeholder block height for activation of new signatures (random-zebra)

Pull request description:

  Sign the following messages based on the hash of their binary content instead of their string representation:

  * masternode payment winner
  * masternode ping
  * budget vote
  * finalized budget vote
  * consensus vote
  * masternode broadcast
  * obfuscation relay
  * spork message

ACKs for top commit:
  Fuzzbawls:
    ACK 7f93bd9

Tree-SHA512: 6ccd83934f9a64210bc64fb78ce349e7de5e82a66c4be5209c4a9a242d69aea1027772771dee4a9c260388131f049bfc84d37acdb7471d4d6e1520ed3ffea0b6
@random-zebra random-zebra merged commit 7f93bd9 into PIVX-Project:master Oct 21, 2019
random-zebra added a commit to PIVX-Project/PIVX-SPMT that referenced this pull request Oct 21, 2019
random-zebra added a commit to PIVX-Project/PIVX-SPMT that referenced this pull request Nov 18, 2019
random-zebra added a commit to PIVX-Project/PIVX-SPMT that referenced this pull request Nov 18, 2019
@Fuzzbawls Fuzzbawls removed the Needs Release Notes Placeholder tag for anything needing mention in the "Notable Changes" section of release notes label Dec 14, 2019
@random-zebra random-zebra deleted the 2019_new_mess_sigs branch September 24, 2020 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants