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

Validator submits attestations after 1/3 of slot #3906

Closed
twoeths opened this issue Apr 11, 2022 · 1 comment · Fixed by #3908
Closed

Validator submits attestations after 1/3 of slot #3906

twoeths opened this issue Apr 11, 2022 · 1 comment · Fixed by #3908
Assignees

Comments

@twoeths
Copy link
Contributor

twoeths commented Apr 11, 2022

Describe the bug

When chain head comes late, validator does not submit attestations at 1/3 of slot

Apr-11 09:07:36.004[CHAIN]         ^[[36mverbose^[[39m: Clock slot slot=2762738
Apr-11 09:07:40.640[NETWORK]       ^[[36mverbose^[[39m: Received gossip block slot=2762738, root=0xcba7…c125, curentSlot=2762738, peerId=bafzaajiiaijcca7wtcs7spj2x2gr2xu5ersemiffsaejho5kkltxg4tizd72ltevoq
Apr-11 09:07:42.570[CHAIN]         ^[[36mverbose^[[39m: Block processed slot=2762738, root=0xcba7118064edba66d70c41c51c430452f7d4ff2f36ac9f599e91fd4d3bc1c125

at 09:07:40, validator should submit attestation but it keeps waiting for the new chain head

Apr-11 09:07:42.580[]              ^[[36mverbose^[[39m: Found new chain head slot=2762738, head=0xcba7118064edba66d70c41c51c430452f7d4ff2f36ac9f599e91fd4d3bc1c125, previouDuty=0xfcf446a30a758ed61d01303e13e06380174229c12416daed03f9ec7ad3c4acbf, currentDuty=0x6702d79fb792ebea57e3fc47b1b1329275d19da117e276122ea51c4b0c8e29c4
Apr-11 09:07:43.697[]                ^[[34mdebug^[[39m: Signed attestation slot=2762738, index=27, head=0xcba7118064edba66d70c41c51c430452f7d4ff2f36ac9f599e91fd4d3bc1c125, validatorIndex=200305
Apr-11 09:07:44.382[]                 ^[[32minfo^[[39m: Published attestations slot=2762738, index=27, count=1

Expected behavior

Validator should submit attestation when it either see new block, or 1/3 of slot, whichever comes first

This could be one of the causes of #3527

@twoeths
Copy link
Contributor Author

twoeths commented Apr 11, 2022

Screen Shot 2022-04-11 at 15 11 20

at some points, this was called after 1/3 of the slot

await Promise.race([sleep(this.clock.msToSlotFraction(slot, 1 / 3), signal), this.waitForBlockSlot(slot)]);

so AttestationService keeps waiting for the block to come since it passes 1/3 of slot

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 a pull request may close this issue.

1 participant