Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc renamings #358

Closed
19 of 29 tasks
hwwhww opened this issue Dec 23, 2018 · 12 comments
Closed
19 of 29 tasks

Misc renamings #358

hwwhww opened this issue Dec 23, 2018 · 12 comments
Labels
general:proofread spelling, grammar, accuracy

Comments

@hwwhww
Copy link
Contributor

hwwhww commented Dec 23, 2018

(Work in progress!)

  • 1. poc_ to custody_ (Rename 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
  • 2. INITIAL_ to GENESIS_ (Status code / slot reorganization #374)
    • INITIAL_FORK_VERSION => GENESIS_FORK_VERSION
    • INITIAL_SLOT_NUMBER => GENESIS_SLOT
  • 3. pow_receipt_ to deposit_ (Rename 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
  • 4. Remove Record suffix
    • ValidatorRecord => Validator
    • CrosslinkRecord => Crosslink
    • ShardReassignmentRecord => ShardReassignment
    • PendingAttestationRecord => PendingAttestation
  • 5. min_empty_validator_index => get_min_empty_validator_index
  • 6. Committees (Replace shard_committee with crosslink_committee #443)
    • shard_committee => crosslink_committee
    • persistent_committee => shard_committee
  • 7. Misc shortenings in state (Misc renamings #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 (Rename pow_receipt_ to deposit_ #383)
  • 8. Fields that will be removed from state
  • 9. Normalise this_ and current_ (preference for "current")
    • current_validator_registry_delta_chain_tip, current_slot => keep as is
    • this_epoch_ => current_epoch_
  • 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
  • 11. Normalise Eth1Deposit and Deposit
  • 12. fork_slot => slot Misc renamings #358
  • 13. value => amount
  • 14. slashable_vote_data => vote_data
  • 15. participation_bitfield => aggregation_bitfield (Misc renamings #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
  • 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
  • 5. Remove "casper" (e.g. see here)
  • 6. Normalise previous_justified_slot and second_last_poc_change_slot?
  • 7. Shorten _reassignments?
  • 8. Shorten aggregate_signature?
  • 9. ValidatorIndex -> Index and only use "index" when for validator index
@hwwhww
Copy link
Contributor Author

hwwhww commented Jan 2, 2019

I'm working on 1. poc_ to custody_. 🙋

@hwwhww
Copy link
Contributor Author

hwwhww commented Jan 2, 2019

will do (3) pow_receipt_ to deposit_

@hwwhww
Copy link
Contributor Author

hwwhww commented Jan 17, 2019

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. :)

@djrtwo
Copy link
Contributor

djrtwo commented Jan 17, 2019

"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

@hwwhww
Copy link
Contributor Author

hwwhww commented Jan 17, 2019

@djrtwo got it. 👍

@hwwhww
Copy link
Contributor Author

hwwhww commented Jan 19, 2019

@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.

@hwwhww
Copy link
Contributor Author

hwwhww commented Jan 19, 2019

  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

@djrtwo
Copy link
Contributor

djrtwo commented Jan 23, 2019

I suggest ProposalSignedData change to ProposalData.
thoughts?

@JustinDrake
Copy link
Collaborator

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?

@hwwhww
Copy link
Contributor Author

hwwhww commented Jan 28, 2019

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.

@JustinDrake
Copy link
Collaborator

JustinDrake commented Jan 28, 2019

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"—not "entry"—and 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

@JustinDrake
Copy link
Collaborator

Closing in favour of #534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general:proofread spelling, grammar, accuracy
Projects
None yet
Development

No branches or pull requests

3 participants