-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Add validator option not to submit attestation early #3944
Add validator option not to submit attestation early #3944
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3944 +/- ##
==========================================
+ Coverage 36.33% 36.77% +0.44%
==========================================
Files 324 325 +1
Lines 9063 9223 +160
Branches 1455 1498 +43
==========================================
+ Hits 3293 3392 +99
- Misses 5597 5640 +43
- Partials 173 191 +18 |
Performance Report✔️ no performance regression detected Full benchmark results
|
@@ -61,6 +62,12 @@ export const validatorOptions: ICliCommandOptions<IValidatorCliArgs> = { | |||
type: "string", | |||
}, | |||
|
|||
dontSubmitAttestationEarly: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we hidden:true this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the option to earlyAttestationDelayMs
and use hidden:true
for it
Checkout this PR by Nimbus, they do a happy medium, wait at least 2 seconds but still get ahead status-im/nimbus-eth2#3518 |
// for early attestations, wait until now + 2000ms, or 1/3 of slot, whichever comes first | ||
await sleep(Math.min(msToOneThirdSlot, this.earlyAttestationDelayMs)); | ||
} | ||
this.metrics?.attesterStepCallPublishAttestation.observe(this.clock.secFromSlot(slot + 1 / 3)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it is this.earlyAttestationDelayMs
that comes first, won't this metric be wrong?
edit: No. Metric tracks now (whenever that might be) up till slot + 1/3
Looking at the Nimbus PR here, initially the wait was 250ms, then it was changed to 1000ms and now 2000ms due to the latency introduced as the network grows. Won't a more robust approach be to have beacon clients cache early attestations instead? Not sure if doing this won't conflict with other parts of the spec/implementations |
This is from the spec
so we still follow the spec. I don't think we want to introduce another cache at beacon node side unnecessarily |
Motivation
As monitored in hetzner-c0, there are 2 missed attestations with:
It's possible that the missed attestations were because we submit them too early, and peers ignore them (maybe due to unknown block root?). Note that lighthouse does not submit attestations early at this time
Description
Add an option to submit attestations right at 1/3 of slot so that we can test in mainnet nodes
part of #3943