Skip to content

#80 implementation for proof of ownership #90

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

Merged
merged 28 commits into from
Aug 5, 2019

Conversation

komodo2662
Copy link
Contributor

@komodo2662 komodo2662 commented Jul 22, 2019

Description

implementation for proof of ownership as stated in #80

Breakdown

  • Implemented and tested GenerateProofOfOwnership: generates a proof of ownership message to be exchanged with the client
  • Implemented and tested ValidateProofOfOwnership: validates a proof of ownership message coming from the client

Reference Issue

Close #80

@komodo2662 komodo2662 added the WIP label Jul 22, 2019
@komodo2662 komodo2662 requested a review from iltoga August 2, 2019 00:51
komodo2662 and others added 7 commits August 2, 2019 16:59
Refactored signature.go: changed method name from SignBlock  to SignByNode (to generalise message that are signed using node pri key)
Added GetBlockHash to blockUtil.go
Refactored nodeAdminCoreService.GenerateProofOfOwnership: now reusing methods from other service and packages to reduce duplication of business logic
added helpers interface and injected into NodeAdmin stuct to make its methods mockable
refactored unit test for GenerateProofOfOwnership
refactored ValidateProofOfOwnership method to reuse already (previously) implemented methods
moved all helper (mockable) methods to NodeAdminServiceHelpersInterface
fixed bug in GetSize for accountType (min size in bytes for an integer in protobuf v3 is 4, so we cannot have 2 or 1 byte fields)
@iltoga iltoga added FEATURE New feature or request and removed WIP labels Aug 3, 2019
@iltoga iltoga added this to the Sprint 3 milestone Aug 3, 2019
@iltoga iltoga requested a review from andy-shi88 August 3, 2019 07:22
Copy link
Contributor

@iltoga iltoga left a comment

Choose a reason for hiding this comment

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

I've refactored directly the code fixing a few things (all written in git commit log)
all tests pass and for me this branch is ready to be merged with develop

Copy link
Contributor

@capt4ce capt4ce left a comment

Choose a reason for hiding this comment

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

LGTM

@andy-shi88
Copy link
Contributor

please let's know if changes are updated, [excluding the marshal one 👍 ]

stefano galassi added 2 commits August 5, 2019 13:49
…w we mock direclty the blockservice, which is the one where queries needed to be mocked)
@astaphobia astaphobia merged commit 86c9e9b into develop Aug 5, 2019
@astaphobia astaphobia deleted the 80-tech-proofofownership branch August 5, 2019 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FEATURE New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tech: proof of ownership implementation
5 participants