Workers Auto Approve
Block and Attestation Validation
This issue is an extension of #524.
Blocks and attestations need to be validated before being propagated over the gossipsub network. The [networking specification](https://github.com/ethereum/eth2.0-specs/blob/dev/specs/networking/p2p-interface.md#global-topics) provides details on the validation of blocks and attestations.
This issue deals with the naive interop case for attestations, where we can ignore the `beacon_aggregate_and_proof` topic along with its validation. This is left for #580.
Specifically we need to add functionality that correctly validates blocks and attestations before propagation.
For block propagation, this issue ignores the case when a block's parent is unknown. For this case, the block is sent to the `sync_manager` which will handle searching for the blocks parents and propagation.
In the case that a parent is known, one can use the `CommitteeCaches` attached to the `BeaconState` to lookup block proposer and shard attester shufflings in order to validate the signature of the block. Note: The entire block must be deserialized in order to obtain the `hash_tree_root` that the signature is taken over.
Each `BeaconState` only has committee caches for the `Previous`, `Current` and `Next` epochs (3 epochs worth of shuffling, in total). If you need to advance a `BeaconState` to a future slot to obtain some future `CommitteeCache`, use `state_processing::per_slot_processing` (see `BeaconChain::process_block_internal` for an example). This may occur if a block is obtained whose slot is >3 epochs from it's parent (skipped a number of slots) and a new shuffling is required to validate the signature.
This is an expensive task and we would like to apply some heuristics to prevent DOS attacks. In this event, leave a TODO stub such that we can decrease the reputation of the peer that sent this block and also decide whether we propagate these blocks or not.
Setup your profile
Tell us a little about you:
No results found for
Type to search skills..
Required [[totalcharacter]] / 240
Are you currently looking for work?
[[ option.string ]]
Setup your profile
Our tools are based on the principles of earn (💰), learn (📖), and meet (💬).
Select the ones you are interested in. You can change it later in your settings.
I'm also an organization manager looking for a great community.
Enable your organization profile
Gitcoin products can help grow community around your brand. Create your tribe, events, and incentivize your community with bounties. Announce new and upcoming events using townsquare. Find top-quality hackers and fund them to work with you on a grant.
These are the organizations you own. If you don't see your organization here please be sure that information is public on your GitHub profile. Gitcoin will sync this information for you.
Select the products you are interested in:
Out of the box you will receive Tribes Lite for your organization. Please provide us with a contact email: