nimbus-eth2/tests
Jacek Sieka 20e700fae4
Harden CommitteeIndex, SubnetId, SyncSubcommitteeIndex (#3259)
* Harden CommitteeIndex, SubnetId, SyncSubcommitteeIndex

Harden the use of `CommitteeIndex` et al to prevent future issues by
using a distinct type, then validating before use in several cases -
datatypes in spec are kept simple though so that invalid data still can
be read.

* fix invalid epoch used in REST
`/eth/v1/beacon/states/{state_id}/committees` committee length (could
return invalid data)
* normalize some variable names
* normalize committee index loops
* fix `RestAttesterDuty` to use `uint64` for `validator_committee_index`
* validate `CommitteeIndex` on ingress in REST API
* update rest rules with stricter parsing
* better REST serializers
* save lots of memory by not using `zip` ...at least a few bytes!
2022-01-09 01:28:49 +02:00
..
consensus_spec Harden CommitteeIndex, SubnetId, SyncSubcommitteeIndex (#3259) 2022-01-09 01:28:49 +02:00
fork_choice Fork choice EF consensus tests (#3041) 2021-11-25 19:41:39 +01:00
fuzzing test fixture cleanups (#2976) 2021-10-12 13:36:52 +02:00
helpers Use nim-ssz-serialization module and rm local ssz code 2021-11-10 13:37:24 +02:00
mocking rm spec_block_processing/test_process_attestation (#3258) 2022-01-08 10:07:44 +01:00
simulation Implementation of the Keymanager API (BETA) 2022-01-04 18:51:45 +02:00
slashing_protection add Bellatrix fork and transition tests; "Ethereum Foundation" -> EF (#3242) 2022-01-05 09:42:56 +01:00
spec_block_processing rm spec_block_processing/test_process_attestation (#3258) 2022-01-08 10:07:44 +01:00
spec_epoch_processing Harden CommitteeIndex, SubnetId, SyncSubcommitteeIndex (#3259) 2022-01-09 01:28:49 +02:00
all_tests.nim rm spec_block_processing/test_process_attestation (#3258) 2022-01-08 10:07:44 +01:00
nim.cfg Revert writing backfill root to database (#3215) 2021-12-21 11:40:14 +01:00
test_action_tracker.nim Backfill support for ChainDAG (#3171) 2021-12-13 14:36:06 +01:00
test_attestation_pool.nim Harden CommitteeIndex, SubnetId, SyncSubcommitteeIndex (#3259) 2022-01-09 01:28:49 +02:00
test_beacon_chain_db.nim update era file documentation / impl (#3226) 2022-01-07 11:13:19 +01:00
test_block_dag.nim REST cleanups (#3255) 2022-01-08 22:06:34 +02:00
test_block_processor.nim Validator monitoring (#2925) 2021-12-20 20:20:31 +01:00
test_blockchain_dag.nim Handle access to historical data for which there is no state (#3217) 2022-01-05 19:38:04 +01:00
test_datatypes.nim remove false OnBlockAdded dependency on phase0 HashedBeaconState (#2661) 2021-06-21 08:35:24 +00:00
test_discovery.nim Implementation of the Keymanager API (BETA) 2022-01-04 18:51:45 +02:00
test_eth1_monitor.nim convert between engine and consensus ExecutionPayloads (#3228) 2022-01-03 13:22:56 +01:00
test_eth2_ssz_serialization.nim cleanups, partly from kintsugi branch (#3161) 2021-12-05 17:32:41 +00:00
test_exit_pool.nim Validator monitoring (#2925) 2021-12-20 20:20:31 +01:00
test_forks.nim REST JSON support improvements (#3232) 2022-01-06 08:38:40 +01:00
test_gossip_transition.nim rename Beacon{Block,State}Fork.Merge to Bellatrix; update copyright years (#3240) 2022-01-04 09:45:38 +00:00
test_gossip_validation.nim Harden CommitteeIndex, SubnetId, SyncSubcommitteeIndex (#3259) 2022-01-09 01:28:49 +02:00
test_helpers.nim import `is_valid_merkle_branch` test cases from `nim-eth` (#3182) 2021-12-10 16:56:26 +01:00
test_honest_validator.nim odds and ends (#3015) 2021-10-21 15:09:19 +02:00
test_interop.nim ncli_db: add putState, putBlock (#3096) 2021-11-18 13:02:43 +01:00
test_keymanager_api.nim Implementation of the Keymanager API (BETA) 2022-01-04 18:51:45 +02:00
test_keystore.nim unexport various parts of tests/ and remove unused code (#2794) 2021-08-18 13:58:43 +00:00
test_keystore_management.nim Implementation of the Keymanager API (BETA) 2022-01-04 18:51:45 +02:00
test_merge_vectors.nim Backfill support for ChainDAG (#3171) 2021-12-13 14:36:06 +01:00
test_message_signatures.nim batch-verify sync messages for a small perf boost (#3151) 2021-12-09 14:56:54 +02:00
test_peer_pool.nim proc -> func in ncli/, research/, and test/ (#2818) 2021-08-25 14:51:52 +00:00
test_spec.nim ncli_db: add putState, putBlock (#3096) 2021-11-18 13:02:43 +01:00
test_statediff.nim Validator monitoring (#2925) 2021-12-20 20:20:31 +01:00
test_sync_committee_pool.nim batch-verify sync messages for a small perf boost (#3151) 2021-12-09 14:56:54 +02:00
test_sync_manager.nim SyncManager cleanups for backfill support (#3189) 2021-12-16 15:57:16 +01:00
test_zero_signature.nim update spec references from eth2.0-specs to consensus-specs and to v1.1.0-beta.2 (#2822) 2021-08-26 10:21:52 +02:00
testblockutil.nim Harden CommitteeIndex, SubnetId, SyncSubcommitteeIndex (#3259) 2022-01-09 01:28:49 +02:00
testdbutil.nim Support starting from altair (#3054) 2021-11-10 13:39:08 +02:00
teststateutil.nim rename Beacon{Block,State}Fork.Merge to Bellatrix; update copyright years (#3240) 2022-01-04 09:45:38 +00:00
testutil.nim forkedbeaconstate_helpers -> forks (#2772) 2021-08-10 22:46:35 +02:00