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

core/tracker: detect inconsistent partial signed data #1343

Merged
merged 3 commits into from
Oct 25, 2022

Conversation

corverroos
Copy link
Contributor

@corverroos corverroos commented Oct 24, 2022

Track inconsistent partial signature data in tracker.

  • Distinguish between insufficient and inconsistent partial signatures when duty failed in parsigdb.
  • Log and instrument when multiple partial signed datas detected.

category: feature
ticket: #1342

@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Base: 53.59% // Head: 53.75% // Increases project coverage by +0.16% 🎉

Coverage data is based on head (3a0791e) compared to base (a4833bd).
Patch coverage: 86.51% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1343      +/-   ##
==========================================
+ Coverage   53.59%   53.75%   +0.16%     
==========================================
  Files         143      142       -1     
  Lines       17034    17099      +65     
==========================================
+ Hits         9129     9192      +63     
+ Misses       6633     6632       -1     
- Partials     1272     1275       +3     
Impacted Files Coverage Δ
core/tracker/tracker.go 73.57% <86.51%> (+1.52%) ⬆️
app/peerinfo/peerinfo.go 54.48% <0.00%> (-3.45%) ⬇️
core/priority/prioritiser.go 61.65% <0.00%> (-3.11%) ⬇️
app/vmock.go 72.72% <0.00%> (-1.07%) ⬇️
core/qbft/qbft.go 81.54% <0.00%> (-0.43%) ⬇️
p2p/relay.go 0.00% <0.00%> (ø)
core/scheduler/scheduler.go 73.47% <0.00%> (+0.53%) ⬆️
core/dutydb/memory.go 68.06% <0.00%> (+1.68%) ⬆️
app/eth2wrap/eth2wrap_gen.go 7.87% <0.00%> (+3.00%) ⬆️
app/eth2wrap/eth2wrap.go 68.80% <0.00%> (+7.80%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

// expectInconsistentParSigs returns true if the duty type is expected to sometimes
// produce inconsistent partial signed data.
func expectInconsistentParSigs(duty core.DutyType) bool {
return duty == core.DutySyncMessage || duty == core.DutySyncContribution
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be

Suggested change
return duty == core.DutySyncMessage || duty == core.DutySyncContribution
return duty == core.DutySyncMessage || duty == core.DutyPrepareSyncContribution

??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, SyncCommitteeSelection should always be consistent, whlie ContributionAndProof contains the beaconblockroot that VC pick themselves.

Copy link
Contributor

Choose a reason for hiding this comment

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

true

core/tracker/tracker.go Outdated Show resolved Hide resolved
@@ -287,15 +327,49 @@ func analyseDutyFailed(duty core.Duty, allEvents map[core.Duty][]event) (bool, c
return true, comp, msg
}

// analyseParSigs returns a mapping partial signed data messages by peers (share index).
func analyseParSigs(duty core.Duty, allEvents map[core.Duty][]event) parsigsByMsg {
Copy link
Contributor

Choose a reason for hiding this comment

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

also curious as to why this function needs all the events and not just the events for the duty?
will this work?

Suggested change
func analyseParSigs(duty core.Duty, allEvents map[core.Duty][]event) parsigsByMsg {
func analyseParSigs(duty core.Duty, events []event) parsigsByMsg {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed, good catch

corverroos and others added 2 commits October 25, 2022 11:22
Co-authored-by: Abhishek Kumar <43061995+xenowits@users.noreply.github.com>
@corverroos corverroos added the merge when ready Indicates bulldozer bot may merge when all checks pass label Oct 25, 2022
@obol-bulldozer obol-bulldozer bot merged commit 830613d into main Oct 25, 2022
@obol-bulldozer obol-bulldozer bot deleted the corver/inconsistent branch October 25, 2022 09:28
obol-bulldozer bot pushed a commit that referenced this pull request Oct 27, 2022
)

Verify inner attestation aggregation selection proof, not just the aggregation signature. This should fix the sporadic aggregation failures which I suspect is due to the cluster running both validatormock and teku, and that teku is per-chance submitting aggregation using legacy selection proofs in the same slot. It is also good practice to verify all signatures.

category: bug
ticket: #1343
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.

None yet

2 participants