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

dkg: lock hash k1 signature in lock file #2224

Merged
merged 7 commits into from
May 24, 2023

Conversation

gsora
Copy link
Collaborator

@gsora gsora commented May 23, 2023

This commit ensures all node operators individually sign the agreed lock hash with their K1 private keys, and stores the resulting signature in the lock file itself.

category: feature
ticket: #2204

This commit ensures all node operators individually sign the agreed lock hash with their K1 private keys, and stores the resulting signature in the lock file itself.
@@ -172,6 +177,29 @@ func (l Lock) VerifySignatures() error {
return errors.Wrap(err, "verify lock signature aggregate")
}

if len(l.NodeSignatures) != 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

please move this to Lock.VerifySignatures remove implicit verification from marshalling, only do explicit verification via VerifySignatures

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not sure I got what you mean, this check is already in Lock.VerifySignature

dkg/dkg.go Outdated Show resolved Hide resolved
dkg/dkgpb/v1/lockhashk1.proto Outdated Show resolved Hide resolved
dkg/lockhashk1.go Outdated Show resolved Hide resolved
dkg/lockhashk1.go Outdated Show resolved Hide resolved
dkg/lockhashk1.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 23, 2023

Codecov Report

Patch coverage: 75.64% and project coverage change: -0.02 ⚠️

Comparison is base (bea7dc4) 53.79% compared to head (45225a2) 53.77%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2224      +/-   ##
==========================================
- Coverage   53.79%   53.77%   -0.02%     
==========================================
  Files         187      188       +1     
  Lines       25059    25191     +132     
==========================================
+ Hits        13480    13547      +67     
- Misses       9917     9975      +58     
- Partials     1662     1669       +7     
Impacted Files Coverage Δ
cluster/lock.go 57.14% <28.00%> (-3.32%) ⬇️
dkg/dkg.go 57.42% <72.72%> (+0.17%) ⬆️
dkg/bcast/server.go 70.42% <78.94%> (+3.14%) ⬆️
dkg/nodesigs.go 79.24% <79.24%> (ø)
dkg/bcast/impl.go 71.01% <93.93%> (+11.01%) ⬆️
cluster/distvalidator.go 91.96% <100.00%> (+0.45%) ⬆️
dkg/frostp2p.go 75.30% <100.00%> (+0.22%) ⬆️

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

…ly, without middleware handlers

Instead of initializing a bcast.BroadcastFunc with bcast.New, return a bcast.Component on which callers can register handlers after initialization.
dkg/bcast/impl.go Outdated Show resolved Hide resolved
dkg/bcast/server.go Show resolved Hide resolved
dkg/bcast/server.go Outdated Show resolved Hide resolved
dkg/dkg.go Outdated Show resolved Hide resolved
dkg/dkg.go Outdated Show resolved Hide resolved
dkg/dkg.go Outdated Show resolved Hide resolved
dkg/dkg.go Outdated Show resolved Hide resolved
dkg/bcast/server.go Outdated Show resolved Hide resolved
dkg/bcast/impl.go Outdated Show resolved Hide resolved
dkg/bcast/impl.go Outdated Show resolved Hide resolved
@gsora gsora requested a review from corverroos May 24, 2023 09:53
dkg/nodesigs.go Outdated Show resolved Hide resolved
dkg/dkgpb/v1/lockhashk1.proto Outdated Show resolved Hide resolved
dkg/nodesigs.go Outdated Show resolved Hide resolved
dkg/nodesigs.go Outdated Show resolved Hide resolved
dkg/nodesigs.go Outdated Show resolved Hide resolved
dkg/nodesigs.go Outdated Show resolved Hide resolved
dkg/dkg.go Outdated Show resolved Hide resolved
dkg/dkg.go Outdated Show resolved Hide resolved
dkg/nodesigs.go Outdated Show resolved Hide resolved
dkg/nodesigs.go Outdated Show resolved Hide resolved
@gsora gsora added the merge when ready Indicates bulldozer bot may merge when all checks pass label May 24, 2023
@obol-bulldozer obol-bulldozer bot merged commit f3b5d3b into main May 24, 2023
@obol-bulldozer obol-bulldozer bot deleted the gsora/lockhash_k1_signature branch May 24, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants