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

Pedersen commitments #78

Merged
merged 64 commits into from
Aug 20, 2018
Merged

Pedersen commitments #78

merged 64 commits into from
Aug 20, 2018

Conversation

loongy
Copy link
Contributor

@loongy loongy commented Aug 7, 2018

Description

Pedersen commitments are introduced to enforce correct computations between the Darknodes.

Motivation

This prevents Byzantine Darknodes from producing false negatives. Previously, the system could only prevent false positives by slashing bonds when a bad confirmation was detected.

Design

The Blinding exponents are added to the shamir package, along with the Commitment object with a basic constructor.

The Fragment object in the order package uses a Blinding exponent to obfuscate its own shamir.Shares and also stores a set of Commitments for other fragments. These values are used by the smpc package and ome package to verify shares that are embedded in smpc.Join objects.

The verification process happens inside the smpc package.

Packages modified:

  • shamir introduces the new Pedersen structures
  • order uses the new Pedersen structures within the order fragments
  • smpc introduces new fields to the Join object for storing Pedersen structures and implements the verification logic
  • ome extracts the Pedersen structures from the order fragments and sends them to the smpc
  • grpc is updated to support the new order fragment layout

Unresolved Issues

Tokens are not verified in this PR, nor is the functionality to check off-chain for false positives.

@coveralls
Copy link

coveralls commented Aug 7, 2018

Pull Request Test Coverage Report for Build 3392

  • 85 of 313 (27.16%) changed or added relevant lines in 11 files are covered.
  • 208 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-4.8%) to 68.41%

Changes Missing Coverage Covered Lines Changed/Added Lines %
orderbook/sync.go 0 1 0.0%
ome/matcher.go 31 32 96.88%
order/fragment.go 10 16 62.5%
smpc/message.go 0 13 0.0%
grpc/orderbook.go 14 32 43.75%
smpc/joiner.go 6 26 23.08%
shamir/shamir.go 1 44 2.27%
smpc/network.go 0 45 0.0%
smpc/smpc.go 0 81 0.0%
Files with Coverage Reduction New Missed Lines %
swarm/swarm.go 1 75.55%
smpc/message.go 22 31.78%
smpc/smpc.go 80 0.0%
smpc/network.go 105 0.0%
Totals Coverage Status
Change from base Build 3380: -4.8%
Covered Lines: 4695
Relevant Lines: 6863

💛 - Coveralls

@tok-kkk tok-kkk mentioned this pull request Aug 7, 2018
@tok-kkk
Copy link
Member

tok-kkk commented Aug 10, 2018

Merge round-robin-scheduling branch into pedersen-commitments branch

@divyakoshy divyakoshy merged commit 5c7ecf5 into nightly Aug 20, 2018
@divyakoshy divyakoshy deleted the pedersen-commitments branch August 20, 2018 06:01
@tok-kkk tok-kkk mentioned this pull request Aug 24, 2018
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.

None yet

4 participants