lighthouse-pulse/beacon_node/store/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
..
impls Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
chunk_writer.rs Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
chunked_iter.rs Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
chunked_vector.rs Resolve Rust 1.56 lints and warnings (#2728) 2021-10-19 00:30:42 +00:00
config.rs Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
errors.rs Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
forwards_iter.rs Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
garbage_collection.rs Compact database on finalization (#1871) 2020-11-09 07:02:21 +00:00
hot_cold_store.rs Fix I/O atomicity issues with checkpoint sync (#2671) 2021-10-05 03:53:17 +00:00
impls.rs Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
iter.rs Add BeaconChainHarness::builder (#2707) 2021-10-14 02:58:10 +00:00
leveldb_store.rs update dependencies (#2032) 2020-12-07 08:20:33 +00:00
lib.rs Fix I/O atomicity issues with checkpoint sync (#2671) 2021-10-05 03:53:17 +00:00
memory_store.rs Compact database on finalization (#1871) 2020-11-09 07:02:21 +00:00
metadata.rs Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
metrics.rs Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
partial_beacon_state.rs Add API version headers and map_fork_name! (#2745) 2021-10-28 01:18:04 +00:00
reconstruct.rs Fix I/O atomicity issues with checkpoint sync (#2671) 2021-10-05 03:53:17 +00:00