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

Only send a single sync committee signature per validator #2697

Merged
merged 2 commits into from
Jun 15, 2021

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Jun 15, 2021

Motivation

If a validator is assigned multiple sync committee indexes they will sign and send multiple sync committee signatures. This is unnecessary and will cause a ton of errors in the beacon node side.

Eph 3/6 1.644 [API]             error: Error on publishContributionAndProofs [12] slot=101, subCommitteeIndex=2 code=SYNC_COMMITTEE_ERROR_NOT_CURRENT_SLOT, currentSlot=102, slot=101                                                                                           Error: SYNC_COMMITTEE_ERROR_NOT_CURRENT_SLOT                                                                                                at validateGossipSyncCommitteeExceptSig (/home/cayman/Code/lodestar/packages/lodestar/src/chain/validation/syncCommittee.ts:85:11)      at validateSyncCommitteeGossipContributionAndProof (/home/cayman/Code/lodestar/packages/lodestar/src/chain/validation/syncCommitteeC
ontributionAndProof.ts:30:3)                                                                                                            
    at map (/home/cayman/Code/lodestar/packages/lodestar/src/api/impl/validator/index.ts:370:19)                                        
    at Array.map (<anonymous>)                                                                                                          
    at Object.publishContributionAndProofs (/home/cayman/Code/lodestar/packages/lodestar/src/api/impl/validator/index.ts:367:31)        
    at Object.handler (/home/cayman/Code/lodestar/packages/api/src/server/utils/server.ts:70:29)                                        
    at preHandlerCallback (/home/cayman/Code/lodestar/node_modules/fastify/lib/handleRequest.js:124:28)                                 
    at preValidationCallback (/home/cayman/Code/lodestar/node_modules/fastify/lib/handleRequest.js:107:5)                                   at handler (/home/cayman/Code/lodestar/node_modules/fastify/lib/handleRequest.js:70:7)                                              
    at done (/home/cayman/Code/lodestar/node_modules/fastify/lib/contentTypeParser.js:151:7) 

Description

  • Sign and send a single sync committee signature per validator.
  • Update the types to make this easier to track manage.
  • Change the data ordering the sync committee nested Maps data structure to make pruning easier

@codeclimate
Copy link

codeclimate bot commented Jun 15, 2021

Code Climate has analyzed commit 67b3a46 and detected 0 issues on this pull request.

View more on Code Climate.

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 this pull request may close these issues.

None yet

2 participants