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/bcast: make lighthouse submit attestations idempotent #813

Merged
merged 4 commits into from
Jul 19, 2022

Conversation

corverroos
Copy link
Contributor

@corverroos corverroos commented Jul 19, 2022

Catch and ignore lighthouse non-idempotent error. This follows the example set inside goeth2client (but only used for failover in multi-client setup).

category: bug
ticket: #777

@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #813 (d991f86) into main (588181d) will decrease coverage by 0.29%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #813      +/-   ##
==========================================
- Coverage   54.87%   54.57%   -0.30%     
==========================================
  Files         109      109              
  Lines       10772    10785      +13     
==========================================
- Hits         5911     5886      -25     
- Misses       3997     4037      +40     
+ Partials      864      862       -2     
Impacted Files Coverage Δ
core/bcast/bcast.go 55.00% <100.00%> (+19.00%) ⬆️
core/qbft/qbft.go 71.67% <0.00%> (-10.31%) ⬇️
core/types.go 23.85% <0.00%> (-0.42%) ⬇️
app/app.go 55.05% <0.00%> (ø)
dkg/dkg.go 47.75% <0.00%> (ø)
p2p/bootnode.go 35.59% <0.00%> (+2.25%) ⬆️
core/bcast/metrics.go 100.00% <0.00%> (+100.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 588181d...d991f86. Read the comment docs.

@@ -81,6 +82,12 @@ func (b Broadcaster) Broadcast(ctx context.Context, duty core.Duty,
}

err = b.eth2Cl.SubmitAttestations(ctx, []*eth2p0.Attestation{&att.Attestation})
if err != nil && (strings.Contains(err.Error(), "PriorAttestationKnown") ||
strings.Contains(err.Error(), "No peers on libp2p topic")) {
Copy link
Contributor Author

@corverroos corverroos Jul 19, 2022

Choose a reason for hiding this comment

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

@corverroos corverroos added the merge when ready Indicates bulldozer bot may merge when all checks pass label Jul 19, 2022
@obol-bulldozer obol-bulldozer bot merged commit cdbf821 into main Jul 19, 2022
@obol-bulldozer obol-bulldozer bot deleted the corver/idempotentsubmit branch July 19, 2022 14:55
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