remove remaining Crosslink and CompactCommittee vestiges

This commit is contained in:
Dustin Brody 2019-11-08 02:06:55 +01:00
parent 61c2cf9415
commit 3bb95f571f
3 changed files with 0 additions and 38 deletions

View File

@ -612,7 +612,6 @@ proc makeAttestationData*(
epoch_boundary_block_root =
if start_slot == state.slot: beacon_block_root
else: get_block_root_at_slot(state, start_slot)
parent_crosslink_end_epoch = state.current_crosslinks[shard].end_epoch
(a_slot, a_index) = get_slot_and_index(state, current_epoch, shard)
AttestationData(

View File

@ -186,11 +186,6 @@ type
signature*: ValidatorSig ##\
## Proposer signature
# https://github.com/ethereum/eth2.0-specs/blob/v0.8.4/specs/core/0_beacon-chain.md#compactcommittee
CompactCommittee* = object
pubkeys*: seq[ValidatorPubKey]
compact_validators*: seq[uint64]
# https://github.com/ethereum/eth2.0-specs/blob/v0.9.0/specs/core/0_beacon-chain.md#beaconblockheader
BeaconBlockHeader* = object
slot*: Slot
@ -323,12 +318,6 @@ type
previous_epoch_attestations*: seq[PendingAttestation]
current_epoch_attestations*: seq[PendingAttestation]
# Crosslinks
previous_crosslinks*: array[SHARD_COUNT, Crosslink] ##\
## Previous epoch snapshot
current_crosslinks*: array[SHARD_COUNT, Crosslink]
# Finality
justification_bits*: uint8 ##\
## Bit set for every recent justified epoch
@ -364,17 +353,6 @@ type
withdrawable_epoch*: Epoch ##\
## When validator can withdraw or transfer funds
# https://github.com/ethereum/eth2.0-specs/blob/v0.8.4/specs/core/0_beacon-chain.md#crosslink
Crosslink* = object
shard*: Shard
parent_root*: Eth2Digest
start_epoch*: Epoch
end_epoch*: Epoch ##\
## Crosslinking data
data_root*: Eth2Digest
# https://github.com/ethereum/eth2.0-specs/blob/v0.9.0/specs/core/0_beacon-chain.md#pendingattestation
PendingAttestation* = object
aggregation_bits*: CommitteeValidatorsBits
@ -675,15 +653,6 @@ func shortLog*(v: BeaconBlock): auto =
signature: shortLog(v.signature)
)
func shortLog*(v: Crosslink): auto =
(
shard: v.shard,
parent_root: shortLog(v.parent_root),
start_epoch: shortLog(v.start_epoch),
end_epoch: shortLog(v.end_epoch),
data_root: shortLog(v.data_root)
)
func shortLog*(v: AttestationData): auto =
(
beacon_block_root: shortLog(v.beacon_block_root),
@ -697,7 +666,6 @@ chronicles.formatIt Slot: it.shortLog
chronicles.formatIt Epoch: it.shortLog
chronicles.formatIt BeaconBlock: it.shortLog
chronicles.formatIt AttestationData: it.shortLog
chronicles.formatIt CrossLink: it.shortLog
static:
# Ensure that get_crosslink_committee(...) can access all committees, which

View File

@ -46,11 +46,6 @@ proc mockAttestationData(
result.source = state.current_justified_checkpoint
let target_epoch = compute_epoch_at_slot(slot)
let parent_crosslink = block:
if target_epoch == get_current_epoch(state):
state.current_crosslinks[shard]
else:
state.previous_crosslinks[shard]
# Constructed to be provide exact equivalent index... to compute_committee(...)
# as using epoch/shard.