-
Notifications
You must be signed in to change notification settings - Fork 997
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
Phase 0 state transition checklist—take 5 #1054
Comments
What are the places where little endian is still used in the hash tree root? I have a strong preference toward not, for example, reversing the bytes of hashes the way bitcoin does. I had to deal with that as an implementer and it was painful. Endianness should be purely a convention about how we serialize things that are integers within the eth2 spec; we should be treating everything outside the eth2 spec proper (eg. hash algorithms, BLS signature and BLS pubkey serialization...) as black boxes that just give us |
To only place is It's confusing that "endianness" is used for both bits and bytes. What about using big/little "byteorder" and "bitorder" instead?
Agreed :) |
Ah sorry, meant to ask where big endian is used in tree hash root. To me it seems obvious that if SSZ serialization uses little endian then so should SSZ tree hashing, so I don't see the issue.... Bitorder is only relevant for bitfields, correct? |
This is arguably a bad idea, because the total payment that validators get would potentially be larger (!!!) if they skip crosslinks. That is:
|
Do we want an exit fee or a minimum time online? We already have this:
|
Possible replacement of `latest_active_index_roots` with `latest_active_registry_roots` to allow for significantly more efficient light clients (see item 17 in #1054). Key changes: * Validator information (including indices) is pre-shuffled and grouped by committee. * Validator information relevant to light clients (`validator.effective_balance` and `validator.slashed`) is kept "close" to the validator index to avoid accessing `validator_registry`. * Validator information (`index`, `effective_balance`, `slashed`) is compactified into a `uint64` which is friendly to SSZ packing. * Shuffled pubkeys are available but kept separate from compact validator information. Light clients with pubkeys cached do not need to re-download and re-authenticate them.
I'm not seeing much value here especially considering clients already have this functionality built and tested. If we sequester Transfer to another fork in between 0 and 1, we would have to define a whole state transition file for the in between fork. Coordinating a production fork around a constant change is significant enough IMO |
Down to get on a call to convince you that this is still not the proper path :) |
Address item 11 of #1054. This stores 8-month old historical start shards so that historical committees to be recomputed (e.g. for attester slashings).
See item 7 of #1054. We should consider increasing the slot duration as well.
Substantive changes: 1) Split the inclusion delay reward between attester and proposer to add up to at most one base reward. This is analogous to the reward logic in `slash_validator`, and makes the `BASE_REWARDS_PER_EPOCH` constant include proposer rewards. 2) Double `BASE_REWARD_FACTOR` to 2^6 (addressing item 4 in #1054). When the total effective balance is 2^17 ETH then maximum annual issuance is a bit below 2^21 ETH. Maximum annual issuance happens when a) all validators make perfect attestations (matching source, target, head, as well as consistent crosslink data), b) all attestations are included as fast as possible (in particular, no skip blocks), and c) there are no slashings. ```python BASE_REWARD_FACTOR = 2**6 SLOTS_PER_EPOCH = 2**6 SECONDS_PER_SLOT = 6 BASE_REWARDS_PER_EPOCH = 5 GWEI_PER_ETH = 10**9 MAX_TOTAL_EFFECTIVE_BALANCE = 2**27 * GWEI_PER_ETH TARGET_MAX_ISSUANCE = 2**21 * GWEI_PER_ETH def integer_squareroot(n: int) -> int: """ The largest integer ``x`` such that ``x**2`` is less than or equal to ``n``. """ assert n >= 0 x = n y = (x + 1) // 2 while y < x: x = y y = (x + n // x) // 2 return x MAX_REWARDS_PER_EPOCH = MAX_TOTAL_EFFECTIVE_BALANCE * BASE_REWARD_FACTOR // integer_squareroot(MAX_TOTAL_EFFECTIVE_BALANCE) // BASE_REWARDS_PER_EPOCH EPOCHS_PER_YEAR = 365.25*24*60*60 / (SECONDS_PER_SLOT * SLOTS_PER_EPOCH) MAX_REWARDS_PER_YEAR = EPOCHS_PER_YEAR * MAX_REWARDS_PER_EPOCH * BASE_REWARDS_PER_EPOCH print(MAX_REWARDS_PER_YEAR / TARGET_MAX_ISSUANCE) ```
All items except (16) have been addressed. Closing this in favor of specific issue on exit fee #1521 |
(See #128, #218, #322, #675 for takes 1, 2, 3, 4.)
This issue keeps track of possible phase 0 state transition function changes.
hash_tree_root
inputs: See also Little vs big endian #556.SLOTS_PER_EPOCH
andSHARD_COUNT
based on benchmarks.2**21
ETH is issued per year when2**27
ETH is at stake.Better aligned micro-incentives: Make crosslink incentives proportional to number of epochs in a crosslink. Make matching head incentives proportional to head slot vs target slot.Stateless withdrawal credentials: Consider not storing withdrawal credentials. See Do not store withdrawal_credentials #937.MIN_ATTESTATION_INCLUSION_DELAY
: SetMIN_ATTESTATION_INCLUSION_DELAY
to1
.Transfer
operation, going beyondMAX_TRANSFERS = 0
. We want to do a practice hard fork that add a field to an SSZ object (in this case, adding thetransfers
field toBeaconBlockBody
).Merged historical stats: Consider merginglatest_randao_mixes
,latest_active_index_roots
,latest_slashed_balances
into a single SSZ object.get_custody_chunk_count
is broken #1034.Crosslink
inAttestationData
: See Crosslink in AttestationData #1044.latest_active_index_roots
: For more efficient light clients. See Active registry roots #1104BeaconState
fixed size to be friendly to SSZ partials.BeaconState
to useCheckpoint
s.The text was updated successfully, but these errors were encountered: