From 1f767ca8b9e7f16f1940eebd6cafe4690f21e110 Mon Sep 17 00:00:00 2001 From: vbuterin Date: Tue, 11 Aug 2020 12:35:31 +0800 Subject: [PATCH 1/2] Remove AttestationCustodyBitWrapper Seems like this class is extraneous ever since we added Dankrad's 0.001 bit custody game. --- specs/phase1/beacon-chain.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/specs/phase1/beacon-chain.md b/specs/phase1/beacon-chain.md index 6f40e5081..049edce8e 100644 --- a/specs/phase1/beacon-chain.md +++ b/specs/phase1/beacon-chain.md @@ -35,7 +35,6 @@ - [`ShardState`](#shardstate) - [`ShardTransition`](#shardtransition) - [`CompactCommittee`](#compactcommittee) - - [`AttestationCustodyBitWrapper`](#attestationcustodybitwrapper) - [Helper functions](#helper-functions) - [Misc](#misc-1) - [`compute_previous_slot`](#compute_previous_slot) @@ -408,15 +407,6 @@ class CompactCommittee(Container): compact_validators: List[uint64, MAX_VALIDATORS_PER_COMMITTEE] ``` -### `AttestationCustodyBitWrapper` - -```python -class AttestationCustodyBitWrapper(Container): - attestation_data_root: Root - block_index: uint64 - bit: boolean -``` - ## Helper functions ### Misc From 7ce10dd2108dc1cbfd39b95c01e85bbf478ab82f Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Tue, 11 Aug 2020 12:48:13 +0800 Subject: [PATCH 2/2] Remove unused `get_attestation_custody_signature` --- .../pyspec/eth2spec/test/helpers/attestations.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/helpers/attestations.py b/tests/core/pyspec/eth2spec/test/helpers/attestations.py index ae90fc808..b924da378 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/attestations.py +++ b/tests/core/pyspec/eth2spec/test/helpers/attestations.py @@ -193,19 +193,6 @@ def sign_indexed_attestation(spec, state, indexed_attestation): 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): participants = spec.get_attesting_indices( state,