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

feat: CON-1422 Implement the VetKd payload builder and validator #3613

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

eichhorl
Copy link
Contributor

@eichhorl eichhorl commented Jan 25, 2025

This PR implements the VetKd payload builder and validator.

VetKd requests in the state are answered by executing the following operations:

  1. Collect all VetKd shares in the pool for which no agreement has been created yet
  2. Iterate over all VetKd requests without agreement
  3. Reject the request if it is expired or requesting an invalid key ID
  4. Otherwise, combine VetKd shares created for this request and include a success agreement.

We will stop adding more agreements to the payload as soon as the next candidate no longer fits into the payload size limit.

Received block proposals are declared invalid, if they contain a VetKD agreement that:

  1. was already delivered
  2. does not correspond to an open VetKD request
  3. was rejected for the wrong reason
  4. wasn't rejected when it should have been
  5. contains a success response that cannot be decoded
  6. the combined key is invalid according to crypto.

TODOs to complete in subsequent PRs:

  • Implement unit tests
  • Add metrics and logging
  • Call crypto endpoints to create/validated combined shares

@github-actions github-actions bot added the feat label Jan 25, 2025
@eichhorl eichhorl changed the title feat: vetkd builder verifier feat: CON-1422 Implement the VetKd payload builder and validator Jan 27, 2025
@eichhorl eichhorl marked this pull request as ready for review January 27, 2025 08:10
@eichhorl eichhorl requested a review from a team as a code owner January 27, 2025 08:10
@eichhorl eichhorl self-assigned this Jan 27, 2025
@eichhorl eichhorl requested a review from Sawchord January 27, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant