[go: up one dir, main page]

Follow-up from "Proto/validate: update sig check of DAL attestation with BLS key"

The following discussion from !17642 (merged) should be addressed:

  • @4dam started a discussion: (+1 comment)

    It seems that the Dal_dependent_signing functions are specializations of Bls.aggregate_public_key_weighted_opt and Bls.aggregate_signature_weighted_opt for the specific case a * x + y. In this respect, it would make more sense to place them in the BLS module — for example, as Bls.public_key_weighted_add_opt and Bls.signature_weighted_add_opt.

    Their implementations could be optimized for the case a = 1, as you've already done, and might even benefit from using low-level primitives like Bls12_381.G2.add and Bls12_381.G2.mul, if relevant.

    With these functions, the consensus/companion aggregation logic becomes more straightforward, and we can keep everything self-contained in validate, without needing to touch dal_attestation_repr.ml.