98 Commits

Author SHA1 Message Date
Dustin Brody
2591be8796 re-organize/shuffle proposer_slashing operations test runner for easy consistency-with-alphabetical-GitHub checking 2020-01-30 12:42:21 +00:00
Dustin Brody
9748b2606e update attestations and voluntary exit operations test to 0.10.1 2020-01-30 11:19:48 +00:00
Zahary Karadjov
1f1a244f3f Implement more checks and wire up the invalid SSZ tests 2020-01-29 10:10:28 +02:00
Dustin Brody
dab107fa1e more 0.10.1 updates 2020-01-27 12:50:54 +00:00
Mamy Ratsimbazafy
1ba2cebd85 v0.10.1 (test vectors + unchanged parts) (#696)
* update to 0.10.1

* SSZ Generic and nbench uses the v0.10.1 fixtures

* Tests + spec links: v0.10.0 -> v0.10.1

* Add v0.10.1 TODO in get_latest_attesting_balance (forkchoice)

* SSZ Bytes are now ByteList

* Remove nim-result submodules that was leftover/added by mistake in the branch
2020-01-27 10:56:32 +00:00
Dustin Brody
8eaebf7163 update to spec version 0.10.0 2020-01-14 18:17:16 +00:00
Dustin Brody
8090a15cc2 fix UnusedImport warning 2020-01-07 18:06:20 +00:00
Dustin Brody
3e7d56a66f update test suite to 0.9.4 vectors 2019-12-20 16:37:36 +00:00
Mamy Ratsimbazafy
106352aff3
Nbench - Flexible benchmarking of Nimbus internals (#641)
* nbench PoC

* Remove the yaml files from the example scenarios

* update README with current status

* Add an alternative implementation that uses defer

* Forgot to add the old proc body

* slots-processing

* allow benching state_transition failures

* Add Attestations processing (workaround confutils bug:
- https://github.com/status-im/nim-confutils/issues/10
- https://github.com/status-im/nim-confutils/issues/11
- https://github.com/status-im/nim-confutils/issues/12

* Add CLI command in the readme

* Filter report and add notes about CPU cycles

* Report averages

* Add debugecho style time/cycle print

* Report when we skip BLS and state root verification

* Update to 0.9.3

* Generalize scenario parsing

* Support all block processing scenarios

* parallel bench runner PoC

* gitBetter load issues reporting (the load issues were invalid signature and expected to fail)
2019-12-20 17:14:43 +01:00
Dustin Brody
27bf8908a9 mark a couple dozen functions and data structures as 0.9.3; fix TRACE-level compiling; stop downloading 0.9.2 test vectors; update cosmetic/display spec versions in test suite 2019-12-17 16:51:46 +00:00
Dustin Brody
c824416f56 initial 0.9.3 spec update 2019-12-17 00:06:03 +02:00
Mamy André-Ratsimbazafy
eeadafa46b
Test vector 0.9.3 2019-12-13 09:45:12 +01:00
Dustin Brody
570de0839d measure/find slow tests (#624) 2019-12-05 11:27:00 +01:00
Dustin Brody
1494bcc262 replace links to Apache and MIT licenses with HTTPS versions (#592) 2019-11-25 16:30:02 +01:00
Dustin Brody
8d9fdb0afd miscellanous cleanups and removing a few funcs/procs from unnecessary global scopes 2019-11-25 09:08:15 +00:00
Mamy Ratsimbazafy
22adccc917
support List in reportDiff and comment out BLS and shuffling tests (#585)
* support List in report diff

* Json tests were removed but walkDirRec lull-ed us into thinking we were passing them :/
2019-11-24 11:46:45 +01:00
Mamy Ratsimbazafy
1938379bcd
Automated beacon constant checks (#583)
* Fix SSZ bitlist deserialization super silly bug

* Add an automated sanity checks of the beacon chain constants

* Remove SSZ consensus skipping procs [skip ci]

* Add phase 1 domains

* Fix mainnet constants

* Add missing phase 1 constants on minimal (they are not needed somehow on mainnet)

* Rebase artifact: constants were defined twice
2019-11-22 20:56:39 +01:00
Dustin Brody
edfd65fd5d stop download 0.9.1 test vectors; finish 0.9.2 update, primarily via fixing preset constants; remove a couple 0.19.6 shims 2019-11-22 16:41:43 +00:00
Dustin Brody
f5b8931fad switch assert(...) to doAssert(...) and minor cleanup 2019-11-22 16:39:05 +00:00
Mamy Ratsimbazafy
69e15a48a4
bump v0.9.2 test vectors (#575) 2019-11-22 00:23:41 +01:00
Mamy Ratsimbazafy
bb0979f232
Ssz fixes (#566)
* SSZ signature from EF are always opaque blobs (security issue - https://github.com/status-im/nim-beacon-chain/issues/555)
Enable
- Attestation
- Beaconstate (minimal only)
- Deposit
- DepositData
- ProposerSlashing

Updates #518

* mv debug_ssz to helpers

* Small reorg of the list types

* Fix IndexedAttestation, AttesterSlashing and BeaconBlock

* Deactivate on mainnet: AttesterSlashing, BeaconBlockBody, IndexedAttestation, Attestation, BeaconBlock

* Fix Validators on minimal and mainnet
2019-11-19 12:04:51 +01:00
Dustin Brody
d8590bbffc fix several warnings and hints 2019-11-18 17:35:58 +00:00
Dustin Brody
3f958d3529
Merge branch 'master' into bat 2019-11-14 19:37:47 +00:00
Dustin Brody
7e70d16da9
remove BeaconStateNew and associated testing scaffolding/infrastructure 2019-11-14 20:03:08 +01:00
Dustin Brody
b4850fbb06 remove XDeclaredButNotUsed spam 2019-11-14 15:58:31 +00:00
Mamy André-Ratsimbazafy
f98dd9b1bf Bump: only keep 0.9.1 tests, remove LFS 2019-11-14 12:48:34 +00:00
Dustin Brody
df1d00f13a remove UnusedImport spam (#549)
* remove UnusedImport spam

* re-add random import to beacon_node
2019-11-14 11:47:55 +01:00
Dustin Brody
24ade89e33 don't download 0.9.0 test vectors 2019-11-13 14:30:21 +00:00
Dustin Brody
5a54c823d8 update to 0.9.1: don't try to run removed tests; re-add 1.5 tests (one only in minimal); remove bls_verify_multiple(...) and AttestationDataAndCustodyBit; and update process_attester_slashing(...), get_indexed_attestation(...), and is_valid_indexed_attestation(...) 2019-11-13 13:49:38 +00:00
Mamy André-Ratsimbazafy
a44925cd24 Enable testing of a third of the SSZ consensus objects (minimal and mainnet) 2019-11-12 15:57:27 +00:00
Mamy André-Ratsimbazafy
f14d4c4796 Remove the old SSZ tests [skip ci] 2019-11-12 15:57:27 +00:00
Dustin Brody
8e259368a3 flip all but 3 test fixtures to 0.9.1 test vectors 2019-11-12 14:49:26 +00:00
Dustin Brody
637054e765 stop downloading 0.8.3 test vectors 2019-11-12 14:49:26 +00:00
Dustin Brody
cb4a86756b update get_seed(...) and get_beacon_proposer_index(...) to 0.9.0, implement compute_proposer_index(...), and render 3 more test fixtures working (#532)
* update get_seed(...) and get_beacon_proposer_index(...) to 0.9.0, implement compute_proposer_index(...), and render 3 more test fixtures working

* rm stray Crosslink reference which prevented static SSZ tests from building

* remove references to removed tests in attestations test fixture; add minimal-preset block sanity test, plus all but one of mainnet tests for block sanity to transition fixtures
2019-11-10 01:03:41 +01:00
Mamy André-Ratsimbazafy
d92d90eb0f add v0.9.1 fixtures 2019-11-09 10:03:11 +00:00
Dustin Brody
275fb22c00 flip targeted spec version and ssz test fixtures to 0.9.0; almost completely update BeaconState to 0.9.0; update minimal and mainnet preset constants to 0.9.0; update process_proposer_slashing(...), get_attestation_deltas(...), and get_matching_head_attestations(...) to 0.9.0; mark process_final_updates(...) as 0.9.0 2019-11-08 13:23:08 +00:00
Mamy André-Ratsimbazafy
88e6bb04d2 Integrate to the test suite 2019-11-07 17:22:15 +00:00
Mamy André-Ratsimbazafy
4e5137011b Fix some declared but not used 2019-11-07 17:22:15 +00:00
Mamy André-Ratsimbazafy
05362886a9 SSZ Heterogeneous container: deserialize SingleField/Small/Fixed, Skip Var/Complex/Bits 2019-11-07 17:22:15 +00:00
Mamy André-Ratsimbazafy
d17f15d020 stash support for Bitlist tests - serialization of distinct types not supported https://github.com/status-im/nim-beacon-chain/issues/518 2019-11-07 17:22:15 +00:00
Mamy André-Ratsimbazafy
1caea64ac9 add BitVector [skip ci] 2019-11-07 17:22:15 +00:00
Mamy André-Ratsimbazafy
3b8fc8fab8 Supports for parsing testing dynamically typed vectors [skip ci] 2019-11-07 17:22:15 +00:00
Mamy André-Ratsimbazafy
bfbcf2a34d Skeleton of SSZ 0.9.0 for generic SSZ type (not consensus related no minimal/mainnet difference) [skip ci] 2019-11-07 17:22:15 +00:00
Mamy André-Ratsimbazafy
5087b5af30 remove unneeded imports in SSZ fixtures 2019-11-07 17:22:15 +00:00
Dustin Brody
0073555752
transition deposit operation fixtures to 0.9.0 (#515)
* transition deposit operations fixture to 0.9.0

* mark slash_validator(...) as 0.9.0

* switch remaining non-ref objects to ref objects to maybe avoid crashes in CI

* remove unused helpers/debug_state imports
2019-11-06 15:02:06 +00:00
Dustin Brody
55dac3e36f re-enable some tests on Win64 since Nim 1.0.2 fixes https://github.com/nim-lang/Nim/issues/12186 (#513) 2019-11-01 09:46:50 +01:00
Mamy Ratsimbazafy
753d5af447
Test vectors: use tarballs, allow multiple spec versions for progressive spec updates (#514)
* update test submodule [skip ci]

* rename the process_lfs script to setup_official_tests [skip ci]

* clarify that the existing LFS is for json files [skip ci]

* Update again to use download/unpack function library

* update the test downloading script [skip ci]

* Update EF fixtures with new test path

* fix symlink order

* Fix relative:absolute symlink issue

* add symlink existence check

* setup_official_tests.sh: refactoring
2019-11-01 09:44:16 +01:00
Dustin Brody
63e621c27d
initial 0.9.0 spec sync (#509)
* rename compute_epoch_of_slot(...) to compute_epoch_at_slot(...)

* remove some unnecessary imports; remove some crosslink-related code and tests; complete renaming of compute_epoch_of_slot(...) to compute_epoch_at_slot(...)

* rm more transfer-related code and tests; rm more unnecessary strutils imports

* rm remaining unused imports

* remove useless get_empty_per_epoch_cache(...)/compute_start_slot_of_epoch(...) calls

* rename compute_start_slot_of_epoch(...) to compute_start_slot_at_epoch(...)

* rename ACTIVATION_EXIT_DELAY to MAX_SEED_LOOKAHEAD

* update domain types to 0.9.0

* mark AttesterSlashing, IndexedAttestation, AttestationDataAndCustodyBit, DepositData, BeaconBlockHeader, Fork, integer_squareroot(...), and process_voluntary_exit(...) as 0.9.0

* mark increase_balance(...), decrease_balance(...), get_block_root(...), CheckPoint, Deposit, PendingAttestation, HistoricalBatch, is_active_validator(...), and is_slashable_attestation_data(...) as 0.9.0

* mark compute_activation_exit_epoch(...), bls_verify(...), Validator, get_active_validator_indices(...), get_current_epoch(...), get_total_active_balance(...), and get_previous_epoch(...) as 0.9.0

* mark get_block_root_at_slot(...), ProposerSlashing, get_domain(...), VoluntaryExit, mainnet preset Gwei values, minimal preset max operations, process_block_header(...), and is_slashable_validator(...) as 0.9.0

* mark makeWithdrawalCredentials(...), get_validator_churn_limit(...), get_total_balance(...), is_valid_indexed_attestation(...), bls_aggregate_pubkeys(...), initial genesis value/constants, Attestation, get_randao_mix(...), mainnet preset max operations per block constants, minimal preset Gwei values and time parameters, process_eth1_data(...), get_shuffled_seq(...), compute_committee(...), and process_slots(...) as 0.9.0; partially update get_indexed_attestation(...) to 0.9.0 by removing crosslink refs and associated tests

* mark initiate_validator_exit(...), process_registry_updates(...), BeaconBlock, Eth1Data, compute_domain(...), process_randao(...), process_attester_slashing(...), get_base_reward(...), and process_slot(...) as 0.9.0
2019-10-30 19:41:19 +00:00
Dustin Brody
255980c9f6 fix issue #367 and remove too-small range type usage for ValidatorIndex 2019-10-03 16:41:25 +03:00
Mamy André-Ratsimbazafy
90b20fab52 Domain is now array[8, byte] instead of uint64 2019-09-26 17:53:59 +03:00