mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-02 03:15:11 -05:00
fix custody bit calculation format
This commit is contained in:
@@ -194,8 +194,8 @@ def compute_custody_bit(key: BLSSignature, data: bytes) -> bit:
|
||||
s = full_G2_element[0].coeffs
|
||||
custody_atoms = get_custody_atoms(data)
|
||||
n = len(custody_atoms)
|
||||
return legendre_bit(sum(s[i % 2]**i * int.from_bytes(atom, "little"))
|
||||
for i, atom in enumerate(custody_atoms) + s[n % 2]**n, BLS12_381_Q)
|
||||
a = sum(s[i % 2]**i * int.from_bytes(atom, "little") for i, atom in enumerate(custody_atoms) + s[n % 2]**n)
|
||||
return legendre_bit(a, BLS12_381_Q)
|
||||
```
|
||||
|
||||
### `get_randao_epoch_for_custody_period`
|
||||
|
||||
Reference in New Issue
Block a user