Merge pull request #2014 from ethereum/vbuterin-patch-1
Remove AttestationCustodyBitWrapper
This commit is contained in:
commit
3a21fc1fc4
|
@ -35,7 +35,6 @@
|
||||||
- [`ShardState`](#shardstate)
|
- [`ShardState`](#shardstate)
|
||||||
- [`ShardTransition`](#shardtransition)
|
- [`ShardTransition`](#shardtransition)
|
||||||
- [`CompactCommittee`](#compactcommittee)
|
- [`CompactCommittee`](#compactcommittee)
|
||||||
- [`AttestationCustodyBitWrapper`](#attestationcustodybitwrapper)
|
|
||||||
- [Helper functions](#helper-functions)
|
- [Helper functions](#helper-functions)
|
||||||
- [Misc](#misc-1)
|
- [Misc](#misc-1)
|
||||||
- [`compute_previous_slot`](#compute_previous_slot)
|
- [`compute_previous_slot`](#compute_previous_slot)
|
||||||
|
@ -408,15 +407,6 @@ class CompactCommittee(Container):
|
||||||
compact_validators: List[uint64, MAX_VALIDATORS_PER_COMMITTEE]
|
compact_validators: List[uint64, MAX_VALIDATORS_PER_COMMITTEE]
|
||||||
```
|
```
|
||||||
|
|
||||||
### `AttestationCustodyBitWrapper`
|
|
||||||
|
|
||||||
```python
|
|
||||||
class AttestationCustodyBitWrapper(Container):
|
|
||||||
attestation_data_root: Root
|
|
||||||
block_index: uint64
|
|
||||||
bit: boolean
|
|
||||||
```
|
|
||||||
|
|
||||||
## Helper functions
|
## Helper functions
|
||||||
|
|
||||||
### Misc
|
### Misc
|
||||||
|
|
|
@ -193,19 +193,6 @@ def sign_indexed_attestation(spec, state, indexed_attestation):
|
||||||
indexed_attestation.signature = sign_aggregate_attestation(spec, state, data, participants)
|
indexed_attestation.signature = sign_aggregate_attestation(spec, state, data, participants)
|
||||||
|
|
||||||
|
|
||||||
def get_attestation_custody_signature(spec, state, attestation_data, block_index, bit, privkey):
|
|
||||||
domain = spec.get_domain(state, spec.DOMAIN_BEACON_ATTESTER, attestation_data.target.epoch)
|
|
||||||
signing_root = spec.compute_signing_root(
|
|
||||||
spec.AttestationCustodyBitWrapper(
|
|
||||||
attestation_data_root=attestation_data.hash_tree_root(),
|
|
||||||
block_index=block_index,
|
|
||||||
bit=bit,
|
|
||||||
),
|
|
||||||
domain,
|
|
||||||
)
|
|
||||||
return bls.Sign(privkey, signing_root)
|
|
||||||
|
|
||||||
|
|
||||||
def sign_attestation(spec, state, attestation):
|
def sign_attestation(spec, state, attestation):
|
||||||
participants = spec.get_attesting_indices(
|
participants = spec.get_attesting_indices(
|
||||||
state,
|
state,
|
||||||
|
|
Loading…
Reference in New Issue