Closed schroedingerscode closed 5 years ago
whoops. nice catch!
No worries, just kind of double checking out loud myself. Perhaps I'll bring it one step further: while a BLS implementation may be internal to the Beacon Chain spec itself, how the specific BLS library each implementer uses should handle all of the BLS arithmetic, meaning the Beacon Chain itself does not have to worry with much more than storing and comparing BLS pubkeys/sigs. Therefore:
why are the BLS types defined as uint384's as opposed to bytes48 in the Beacon Chain spec?
uint384
and bytes48
are exactly the same wrt SSZ serialization. You are correct that there is no big integer arithmetic being performed on these values outside of the BLS curve operations.
Elliptic curves are usually concerned with the bit values (bn256, bls12-381). uint384
more clearly ties the datatype to the BLS12-381 curve than bytes48
Yep, makes sense. Better be more verbose than underexplain and cause confusion. Thanks.
The newly defined data structure
DepositParameterRecord
defines 2 fields (among others):pubkey
andproof_of_possession
, both of which are implemented byint384
primitives.While these BLS types are effectively no different than a theoretical
bytes48
type, spec implementers have assumably used integers instead, anticipating arithmetic operations.To be consistent with the rest of the spec, the 2 BLS fields named above should be updated to be of type
uint384
, as there is no need for underlying implementations to explicitly use a signed type.