-
Notifications
You must be signed in to change notification settings - Fork 725
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
State transition helpers #104
Comments
i'll likely be tackling most of this as I handle #31 . feel free to reach out for status as we can likely parallelize :) |
Great stuff! Let me know as you progress through them and I'll keep this updated. |
Nice touch! |
Description has been updated to match the current spec. |
btw -- we just had a call where ppl are looking for good first issue -- i can take a pass by end of today at splitting this up into multiple functions |
also for the i started on a generic fn using the |
i would suggest we divide this issue into multiple issues to implement helpers so that it isn't all blocked on one or a few people; i'll put each chunk of related functions imo into a separate
|
Good call @ralexstokes. I'll split this up :) |
For
Would this be correct? |
@johnsBeharry you would just need to translate this code into Rust for inclusion in our repo: https://github.com/ethereum/eth2.0-specs/blob/master/specs/core/0_beacon-chain.md#merkle_root it isn't typed but seems like it would be a great way to get acquainted with Rust, Lighthouse and even the spec if you wanna go look at how it is used! |
looks like @drozdziak1 is gonna tackle this one: |
Yup, @paulhauner please assign me when you find the time to make the split |
The only function left in here is |
@paulhauner refer this comment for i looked at implementing it ourselves and all things considered i now prefer to just use that crate as needed |
Description
This is a "mega issue" which contains multiple discreet tasks. Mega issues exist to avoid cluttering the issues page a multitude of small tasks.
If you wish to work on one of these tasks, comment below and a maintainer will break the task out into a separate issue.
Mega Issue Tasks
The beacon chain state transition function Helper functions section defines a series of small functions that assist in state transitions.
Where exactly each function should be implemented (e.g., a new crate, existing crate, etc) varies and should be addressed on a case-by-case basis.
Tasks are split into difficulties for your convenience.
Very Easy
integer_squareroot
: a common function that does a deterministic square root on integers.Completed/split-off
The following helpers have already been implemented or split out into another issue:
hash
: digest some bytes.hash_tree_rootAddressed in [WIP] Tree hash #88.Split into Add active validator helpers #139is_active_validator
: returns a true if a validator should be considered "active".Split into Add active validator helpers #139get_active_validator_indices
: filters the set of validators down to only those which are "active".Split into Alex's transition helper bouquet #147get_shard_committees_at_slot
: given a slot, returns theShardAndCommittees
for each shard.Split into Alex's transition helper bouquet #147get_block_root
: returns a hash from the state.Split into Alex's transition helper bouquet #147get_beacon_proposer_index
: returns the index of the beacon block proposer for a given slot.-Split into #146merkle_root
: merkleize a list of values.Split into Alex's transition helper bouquet #147get_effective_balance
: returns the validators "effective balance". This balance can never be higher thatMAX_DEPOSIT
(32 ETH presently).Split into Alex's transition helper bouquet #147get_fork_version
: gets the version from some ForkData.Split into Alex's transition helper bouquet #147get_domain
: returns a "domain" used for replay protection across forks/chains.Split into #149verify_slashable_vote_data
: verify the signatures on someSlashableVoteData
.Split into #150is_double_vote
: determines if two attestations are a slashable "double vote".Split into #150is_surround_vote
: determines if two attestations are a slashable "surround vote".bls_verify
bls_verify_multiple
bls_aggregate_pubkeys
-Split into Implementget_attestation_participants
: returns the indices of the validators thatare indicated as participating in attestation bitfields. Flagged as difficult as it will have many error conditions and will require lots of testing.
get_attestation_participants
#145Implemented.shuffle
: a primitive function that pseudo-randomly shuffles a list.split
: splits a list inton
smaller lists in a deterministic and fail-safe manner.Implemented.
Split out into Implement/updateget_shuffling
: allocates a list of validators to committees that will attest to a shard.get_shuffling
#151The text was updated successfully, but these errors were encountered: