[go: up one dir, main page]

Proto/validate: update sig check of DAL attestation with BLS key

What

Under the aggregation feature flag, for attestations with a BLS consensus key, the DAL content has been removed from the signed bytes in !17728 (merged). The present MR changes the key used to sign these DAL-free bytes from companion_key to (DAL_content_as_integer + 1) * companion_key + consensus_key.

Why

So that the signed content is the same for all BLS attestations (making their aggregation possible), but the signature still guarantees that the DAL content cannot be falsified because the key used to sign depends on the DAL content.

How

  1. Introduce a helper function to efficiently compute (DAL_content_as_integer + 1) * companion_key + consensus_key. At the same time, introduce a similar function to aggregate signatures (even if that function not used yet in this MR), in order to guarantee that the aggregations of public keys and signatures will always be consistent.

  2. In Validate.check_attestation, change the key used in the signature check.

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Diane Gallois-Wong

Merge request reports

Loading