lighthouse/consensus/types/src
Michael Sproul 2dc6163043 Add API version headers and map_fork_name! (#2745)
## Proposed Changes

* Add the `Eth-Consensus-Version` header to the HTTP API for the block and state endpoints. This is part of the v2.1.0 API that was recently released: https://github.com/ethereum/beacon-APIs/pull/170
* Add tests for the above. I refactored the `eth2` crate's helper functions to make this more straight-forward, and introduced some new mixin traits that I think greatly improve readability and flexibility.
* Add a new `map_with_fork!` macro which is useful for decoding a superstruct type without naming all its variants. It is now used for SSZ-decoding `BeaconBlock` and `BeaconState`, and for JSON-decoding `SignedBeaconBlock` in the API.

## Additional Info

The `map_with_fork!` changes will conflict with the Merge changes, but when resolving the conflict the changes from this branch should be preferred (it is no longer necessary to enumerate every fork). The merge fork _will_  need to be added to `map_fork_name_with`.
2021-10-28 01:18:04 +00:00
..
beacon_state Get arbitrary check passing (2.0) (#2710) 2021-10-14 02:58:11 +00:00
test_utils [Altair] Sync committee pools (#2321) 2021-07-15 00:52:02 +00:00
aggregate_and_proof.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
attestation_data.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
attestation_duty.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
attestation.rs Web3Signer support for VC (#2522) 2021-09-16 03:26:33 +00:00
attester_slashing.rs Update for clippy 1.50 (#2193) 2021-02-15 00:09:12 +00:00
beacon_block_body.rs Metrics for sync aggregate fullness (#2439) 2021-07-13 02:22:55 +00:00
beacon_block_header.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
beacon_block.rs Add API version headers and map_fork_name! (#2745) 2021-10-28 01:18:04 +00:00
beacon_committee.rs Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
beacon_state.rs Add API version headers and map_fork_name! (#2745) 2021-10-28 01:18:04 +00:00
chain_spec.rs Activate Altair on mainnet at epoch 74240 (#2632) 2021-09-27 04:22:06 +00:00
checkpoint.rs Bump all spec tags to v0.12.1 (#1275) 2020-06-19 11:18:27 +10:00
config_and_preset.rs Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
consts.rs Update to spec v1.1.0-beta.1 (#2460) 2021-07-27 05:43:35 +00:00
contribution_and_proof.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
deposit_data.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
deposit_message.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
deposit.rs Bump all spec tags to v0.12.1 (#1275) 2020-06-19 11:18:27 +10:00
enr_fork_id.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
eth1_data.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
eth_spec.rs Altair networking (#2300) 2021-08-04 01:44:57 +00:00
fork_context.rs Subscribe to altair gossip topics 2 slots before fork (#2532) 2021-09-17 01:11:16 +00:00
fork_data.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
fork_name.rs Add API version headers and map_fork_name! (#2745) 2021-10-28 01:18:04 +00:00
fork.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
free_attestation.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
graffiti.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
historical_batch.rs Bump all spec tags to v0.12.1 (#1275) 2020-06-19 11:18:27 +10:00
indexed_attestation.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
lib.rs Altair validator client and HTTP API (#2404) 2021-08-06 00:47:31 +00:00
participation_flags.rs Quoted altair fields (2.0) (#2712) 2021-10-14 02:58:12 +00:00
participation_list.rs Rust 1.54.0 lints (#2483) 2021-07-30 01:11:47 +00:00
pending_attestation.rs Get arbitrary check passing (2.0) (#2710) 2021-10-14 02:58:11 +00:00
preset.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
proposer_slashing.rs Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
relative_epoch.rs Remove saturating arith from state_processing (#1644) 2020-09-25 05:18:21 +00:00
selection_proof.rs Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
shuffling_id.rs Optimize validator duties (#2243) 2021-03-17 05:09:57 +00:00
signed_aggregate_and_proof.rs [Altair] Sync committee pools (#2321) 2021-07-15 00:52:02 +00:00
signed_beacon_block_header.rs Update for clippy 1.50 (#2193) 2021-02-15 00:09:12 +00:00
signed_beacon_block.rs Implement SSZ union type (#2579) 2021-09-25 05:58:36 +00:00
signed_contribution_and_proof.rs [Altair] Sync committee pools (#2321) 2021-07-15 00:52:02 +00:00
signed_voluntary_exit.rs Bump all spec tags to v0.12.1 (#1275) 2020-06-19 11:18:27 +10:00
signing_data.rs Consensus updates for v0.12 (#1228) 2020-06-03 14:56:54 +10:00
slot_data.rs [Altair] Sync committee pools (#2321) 2021-07-15 00:52:02 +00:00
slot_epoch_macros.rs Updated to comply with new clippy formatting rules (#2336) 2021-05-10 00:53:09 +00:00
slot_epoch.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
sqlite.rs Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
subnet_id.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
sync_aggregate.rs [Altair] Sync committee pools (#2321) 2021-07-15 00:52:02 +00:00
sync_aggregator_selection_data.rs Web3Signer support for VC (#2522) 2021-09-16 03:26:33 +00:00
sync_committee_contribution.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
sync_committee_message.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
sync_committee_subscription.rs Add quoted u64/u64_vec to SyncCommitteeSubscription (#2589) 2021-09-11 23:56:16 +00:00
sync_committee.rs Validator monitor support for sync committees (#2476) 2021-08-31 23:31:36 +00:00
sync_duty.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
sync_selection_proof.rs [Altair] Sync committee pools (#2321) 2021-07-15 00:52:02 +00:00
sync_subnet_id.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
tree_hash_impls.rs Rust 1.54.0 lints (#2483) 2021-07-30 01:11:47 +00:00
validator_subscription.rs Implement standard eth2.0 API (#1569) 2020-10-01 11:12:36 +10:00
validator.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00
voluntary_exit.rs Updates to make crates publishable (#2472) 2021-09-03 01:10:25 +00:00