Eth2.0-specs: Misc renamings

Created on 23 Dec 2018  路  12Comments  路  Source: ethereum/eth2.0-specs

(Work in progress!)

  • [x] 1. poc_ to custody_ (#381)

    • poc_seed_changes => custody_reseeds

    • poc_challenges => custody_challenges

    • poc_responses => custody_responses

    • poc_bit => custody_bit

    • ProofOfCustodySeedChange => CustodyReseed

    • ProofOfCustodyChallenge => CustodyChallenge

    • ProofOfCustodyResponse => CustodyResponse

    • poc_commitment => custody_commitment

    • last_poc_change_slot=> latest_custody_reseed_slot

    • second_last_poc_change_slot => penultimate_custody_reseed_slot

    • aggregate_signature_poc_0_indices => custody_bit_0_indices (notice '[uint24]' should be ['uint24'])

    • aggregate_signature_poc_1_indices => custody_bit_1_indices

  • [x] 2. INITIAL_ to GENESIS_ (#374)

    • INITIAL_FORK_VERSION => GENESIS_FORK_VERSION

    • INITIAL_SLOT_NUMBER => GENESIS_SLOT

  • [x] 3. pow_receipt_ to deposit_ (#383)

    • POW_RECEIPT_ROOT_VOTING_PERIOD => DEPOSIT_ROOT_VOTING_PERIOD

    • CandidatePoWReceiptRootRecord => DepositRootVote

    • candidate_pow_receipt_root => deposit_root_vote

    • processed_pow_receipt_root => processed_deposit_root

  • [x] 4. Remove Record suffix

    • ValidatorRecord => Validator

    • CrosslinkRecord => Crosslink

    • ShardReassignmentRecord => ShardReassignment

    • PendingAttestationRecord => PendingAttestation

  • [x] 5. min_empty_validator_index => get_min_empty_validator_index
  • [x] 6. Committees (#443)

    • shard_committee => crosslink_committee

    • persistent_committee => shard_committee

  • [x] 7. Misc shortenings in state (#358)

    • validator_registry_latest_change_slot => validator_registry_update_slot

    • fork_data => fork

    • latest_penalized_exit_balances => latest_penalized_balances (still an awkward name)

    • candidate_pow_receipt_roots => deposit_root_votes (#383)

  • [x] 8. Fields that will be removed from state

    • validator_registry_exit_count

    • validator_registry_delta_chain_tip (#476)

    • shard_committees_at_slots (done)

    • [x] 9. Normalise this_ and current_ (preference for "current")

    • current_validator_registry_delta_chain_tip, current_slot => keep as is

    • this_epoch_ => current_epoch_

  • [x] 10. Normalise "change" and "update" (preference for "update")

    • update_validator_status, update_validator_registry => keep as is

    • latest_status_change_slot => latest_status_update_slot, etc.

    • epochs_since_last_registry_change => epochs_since_last_registry_update

  • [x] 11. Normalise Eth1Deposit and Deposit
  • [x] 12. fork_slot => slot #358
  • [x] 13. value => amount
  • [x] 14. slashable_vote_data => vote_data
  • [x] 15. participation_bitfield => aggregation_bitfield (#358)

Wishlist

  • [ ] 1. Normalise time constants (we have _DURATION, _DELAY, _LENGTH, _PERIOD and _TTL)
  • [ ] 2. Normalise helper function names (it's unclear what the rule is for the get_ prefix)
  • [ ] 3. Simplify Deposit, DepositData, DepositInput => maybe collapse two together
  • [ ] 4. Find something less awkward than latest_penalized_balances
  • [x] 5. Find something less awkward than ZERO_BALANCE_VALIDATOR_TTL (also avoid TTL abbreviation)

Unsure

  • [ ] 1. validator_registry_ => registry_ (shorter, and allows for registry_balances for consistency)
  • [ ] 2. "collective penalty" => partial slashing?
  • [ ] 3. proposer_index => validator_index
  • [ ] 4. genesis_time => genesis
  • [x] 5. Remove "casper" (e.g. see here)
  • [x] 6. Normalise previous_justified_slot and second_last_poc_change_slot?
  • [x] 7. Shorten _reassignments?
  • [ ] 8. Shorten aggregate_signature?
  • [ ] 9. ValidatorIndex -> Index and only use "index" when for validator index
proofread

Most helpful comment

Wishlist (1) Normalise time constants (we have _DURATION, _DELAY, _LENGTH, _PERIOD and _TTL)

After #492, there will be:

| Name | Value | Unit | Duration |
| - | - | :-: | :-: |
| SLOT_DURATION | 6 | seconds | 6 seconds |
| MIN_ATTESTATION_INCLUSION_DELAY | 2**2 (= 4) | slots | 24 seconds |
| EPOCH_LENGTH | 2**6 (= 64) | slots | 6.4 minutes |
| SEED_LOOKAHEAD | 2**0 (= 1) | epochs | 6.4 minutes |
| ENTRY_EXIT_DELAY | 2**2 (= 4) | epochs | 25.6 minutes |
| ETH1_DATA_VOTING_PERIOD | 2**4 (= 16) | epochs | ~1.7 hours |
| MIN_VALIDATOR_WITHDRAWAL_EPOCHS | 2**8 (= 256) | epochs | ~27 hours |

Suggestion:

  1. For describing that an action happens at t1 + TIME, we use _DELAY.

    • MIN_VALIDATOR_WITHDRAWAL_EPOCHS -> MIN_VALIDATOR_WITHDRAWAL_DELAY

  2. For describing that an action happens at t1 - TIME, we use _LOOKAHEAD.
  3. For describing that action continues for TIME long, we use _PERIOD.
  4. For describing the time unit duration, explicitly:

    • SLOT_DURATION => SECOND_PER_SLOT

    • EPOCH_LENGTH => SLOT_PER_EPOCH

I'm not certain of (4) since I somehow get used to SLOT_DURATION and EPOCH_LENGTH.

All 12 comments

I'm working on 1. poc_ to custody_. 馃檵

will do (3) pow_receipt_ to deposit_

Should Eth1Data.block_hash be renamed to Eth1Data.block_root or Eth1Data.eth1_block_root?
Similar reason to why we have Crosslink.shard_block_root.

/cc @JustinDrake @djrtwo @vbuterin

I'm fine either way. :)

"block hash" is the common nomenclature in ethereum 1.0 and does not share the same tree hash structure so I think block_hash is correct here

@djrtwo got it. 馃憤

@JustinDrake Could you elaborate how/why to remove validator_registry_exit_count? It's now being used to sort eligible_indices order for applying prepare_validator_for_withdrawal.

  1. slashable_vote_data => vote_data

Since Eth1Data was introduced recently, if we apply this renaming, it might cause some confusion:
CasperSlashing <=> Eth1DataVote
SlashableVoteData => VoteData <=> Eth1Data

I suggest ProposalSignedData change to ProposalData.
thoughts?

I'm not a huge fan of ProposalSignedData and ProposerSlashing for several reasons:

  • It tries to accommodate for both the beacon chain and the shards, somewhat violating the clean design separation.
  • Having BEACON_CHAIN_SHARD_NUMBER feels like an unfortunate and avoidable constant in the spec.
  • We may want to prioritise punishing bad validator behaviour on the beacon chain over bad behaviour on shards, and hence have two separate slashing conditions.
  • Introducing the "Proposal" concept when we already have the equivalent concept of "Block" is not ideal. On that note, should we rename DOMAIN_PROPOSAL to DOMAIN_BLOCK?

Wishlist (1) Normalise time constants (we have _DURATION, _DELAY, _LENGTH, _PERIOD and _TTL)

After #492, there will be:

| Name | Value | Unit | Duration |
| - | - | :-: | :-: |
| SLOT_DURATION | 6 | seconds | 6 seconds |
| MIN_ATTESTATION_INCLUSION_DELAY | 2**2 (= 4) | slots | 24 seconds |
| EPOCH_LENGTH | 2**6 (= 64) | slots | 6.4 minutes |
| SEED_LOOKAHEAD | 2**0 (= 1) | epochs | 6.4 minutes |
| ENTRY_EXIT_DELAY | 2**2 (= 4) | epochs | 25.6 minutes |
| ETH1_DATA_VOTING_PERIOD | 2**4 (= 16) | epochs | ~1.7 hours |
| MIN_VALIDATOR_WITHDRAWAL_EPOCHS | 2**8 (= 256) | epochs | ~27 hours |

Suggestion:

  1. For describing that an action happens at t1 + TIME, we use _DELAY.

    • MIN_VALIDATOR_WITHDRAWAL_EPOCHS -> MIN_VALIDATOR_WITHDRAWAL_DELAY

  2. For describing that an action happens at t1 - TIME, we use _LOOKAHEAD.
  3. For describing that action continues for TIME long, we use _PERIOD.
  4. For describing the time unit duration, explicitly:

    • SLOT_DURATION => SECOND_PER_SLOT

    • EPOCH_LENGTH => SLOT_PER_EPOCH

I'm not certain of (4) since I somehow get used to SLOT_DURATION and EPOCH_LENGTH.

What about the following?

  • MIN_VALIDATOR_WITHDRAWAL_DELAY
  • MIN_ATTESTATION_INCLUSION_DELAY
  • MIN_SEED_LOOKAHEAD (the SEED_LOOKAHEAD is a min because the last revealer in an epoch could not produce a block)
  • MAX_SEED_LOOKAHEAD (ENTRY_EXIT_DELAY is not great because we use "activation"鈥攏ot "entry"鈥攁nd we use "exited"/"penalized"/"ejected" for different types of deactivations. It also explains why we have a delay in the first place.)
  • SECONDS_PER_SLOT
  • SLOTS_PER_EPOCH
  • EPOCHS_PER_ETH1_VOTING_PERIOD

Closing in favour of #534

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JustinDrake picture JustinDrake  路  12Comments

prestonvanloon picture prestonvanloon  路  17Comments

JustinDrake picture JustinDrake  路  12Comments

vbuterin picture vbuterin  路  13Comments

JustinDrake picture JustinDrake  路  33Comments