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
Dustin Brody
41fa377638
mark all non-changed 0.9.1 items as 0.9.2 ( #576 )
2019-11-22 09:29:04 +01:00
Mamy Ratsimbazafy
69e15a48a4
bump v0.9.2 test vectors ( #575 )
2019-11-22 00:23:41 +01:00
Dustin Brody
85f2596604
re-enable all_tests.nim mainnet tests
2019-11-21 19:40:35 +02:00
Jacek Sieka
7c6d87051a
simplify validator api ( #573 )
...
* avoid passing whole state to validator api (easier when it goes
out-of-process)
* clean up some cruft
2019-11-21 10:57:59 +01:00
Dustin Brody
c0f009908c
re-enable test_interop based on zcli with 0.9.1 specs and update initialize_beacon_state_from_eth1(...) to 0.9.1 ( #569 )
...
* re-enable test_interop based on zcli with 0.9.1 specs and update initialize_beacon_state_from_eth1(...) to 0.9.1
* switch many procs to funcs
* fix import os.nim instead; ospaths is deprecated [Deprecated] warnings
2019-11-21 09:15:10 +00: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
2749cb14a6
convert mostly-uncompiled verify_merkle_branch(...) calls to newer is_valid_merkle_branch(...) name; re-enable several lines of deposit testing code and outline roadmap for completion
2019-11-18 17:35:58 +00:00
Dustin Brody
d8590bbffc
fix several warnings and hints
2019-11-18 17:35:58 +00:00
Dustin Brody
6f87c8fd89
verify that state_sim is justifying and finalizing; fix 3 more warnings; rename crosslink_committee_cache to beacon_committee_cache; fix O(n^2) usage of get_base_reward(...)
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
96dcb1cf95
Remove shard-relating code
2019-11-14 19:48:12 +01:00
Dustin Brody
cd45b8b43f
mockAttestationData(...)/mockAttestationImpl(...) changes also match exactly
2019-11-14 19:09:18 +01:00
Dustin Brody
c08698bffe
scaffolding to remove last vestiges of get_committee_count(...), SHARD_COUNT, and rest of that 0.8.x infrastructure; this demonstrates equivalence between two, before discarding old code
2019-11-14 18:37:51 +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
Zahary Karadjov
f40675509a
Make all testnet env file values optional [skip CI]
...
Also removes some usages of SHARD_COUNT
2019-11-12 23:43:38 +00:00
Zahary Karadjov
048a786d7c
Fix the local simulation on Linux [skip ci]
2019-11-12 19:24:43 +00:00
Zahary Karadjov
92fb3d8233
Fix the local network sim when multitail is used
2019-11-12 19:08:12 +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
d5ce142511
fix network sim finalization; remove get_attestation_data_slot(...); remove 2 more get_crosslink_committee(...) calls
2019-11-12 14:49:26 +00:00
Zahary Karadjov
7df6c241a7
Fix a strange build failure in the tests
2019-11-11 23:29:36 +00:00
Zahary Karadjov
f5e9b9a922
Allow running local nodes without attached validators
...
The number of user nodes is now specified with `USER_NODES`.
To make the instructions more stable, the "numeric id" of the user
nodes will be starting from 0 (so you can always use `run_node.sh 0`
to start a user node).
If you specify a node index above the total number of nodes, you'll
launch a node without any validators attached (this is useful for
testing the sync for example).
2019-11-11 23:29:36 +00:00
Zahary Karadjov
22591deced
Safer testnet restarts; Working CLI queries for inspecting the genesis states
...
When the connect_to_testnet script is invoked it will first verify that
the genesis file of the testnet hasn't changed. If it has changed, any
previously created database associated with the testnet will be erased.
To facilitate this, the genesis file of each network is written to the
data folder of the beacon node. The beacon node will refuse to start if
it detects a discrepancy between the data folder and any state snapshot
specified on the command-line.
Since the testnet sharing spec requires us to use SSZ snapshots, the Json
support is now phased out. To help with the transition and to preserve the
functionality of the multinet scripts, the beacon node now supports a CLI
query command that can extract any data from the genesis state. This is
based on new developments in the SSZ navigators.
2019-11-11 23:29:36 +00:00
Zahary Karadjov
a644839b79
Dynamic SSZ navigator
2019-11-11 23:29:36 +00:00
Dustin Brody
d457dfee81
switch all but 4 remaining callers to get_crosslink_committee(...) to get_beacon_committee(...)
2019-11-11 11:46:03 +00:00
Dustin Brody
949d735155
fix remaining test 0.9.0 test fixtures and switch back to non-transitiontest setup; remove get_committee_count(...); keep SHARD_COUNT consistent with MAX_COMMITTEES_PER_SLOT
2019-11-11 10:25:57 +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
7e3fbbebd0
rename working_tests to more descriptive transition_0_9_0 tests
2019-11-08 13:23:08 +00:00
Dustin Brody
e1cdbb5516
fix typo
2019-11-08 13:23:08 +00:00
Dustin Brody
e984b2c932
mark is_valid_merkle_branch(...), process_justification_and_finalization(...), and process_rewards_and_penalties(...) as 0.9.0; update check_attestation(...) to 0.9.0; add 11 working test fixtures, having updated SSZ fixture directory to 0.9.0
2019-11-08 13:23:08 +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
Dustin Brody
3bb95f571f
remove remaining Crosslink and CompactCommittee vestiges
2019-11-08 13:23:08 +00:00
Dustin Brody
61c2cf9415
rm get_compact_committees_root(...), Transfer, and references to 0.9-removed BeaconState.{active_index_roots,compact_committees_roots; temporarily disable genesis interop test pending 0.9 BeaconState
2019-11-08 13:23:08 +00:00
Dustin Brody
68654848cb
update get_attesting_indices(...) to 0.9.0; remove Crosslink from AttestationData to update AttestationData to 0.9.0; rm get_winning_crosslink_and_attesting_indices(...) and get_crosslink_deltas(...)
2019-11-08 13:23:08 +00:00
Dustin Brody
c2ebe482a5
temporarily disable SSZ tests, which fail when trying to read AttestationData or structures which embed it; implemenet get_committee_count_at_slot(...) and get_beacon_committee(...); express get_crosslink_committee(...) in terms of get_beacon_committee(...) and ensure that results are identical
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