1699 Commits

Author SHA1 Message Date
Jacek Sieka
6cfa28e1f5 fix finalization cleanup
* add block pool finalization test
2020-01-21 15:53:53 +02:00
Zahary Karadjov
74fc34eef2 Restore some constants to pass the constants & presets test 2020-01-21 01:26:57 +02:00
Zahary Karadjov
095b271bd4 Implement a loader for custom const presets
The loader has been tested with the presets published by Lighthouse.
You can try connecting to one of their testnets by running:

cd nim-beacon-chain
./connect-to-testnet lighthouse/testnet0
2020-01-21 01:26:57 +02:00
Jacek Sieka
2a67ac3c05 trie -> kv store
* simplify data storage to key-value, tries are not relevant for NBC
* locked-down version of lmdb dependency
* easier to build / maintain on various platforms
2020-01-20 13:39:37 +00:00
Jacek Sieka
d853d7c024
remove SigKey.init (unused, fixes #664) 2020-01-18 10:22:17 +01:00
Dustin Brody
c301e5d42f mark 49 0.9.2/0.9.4 spec functions/data types as 0.10.0 2020-01-15 12:34:16 +00:00
Jacek Sieka
860be026e1 fix block pool init head selection
the head state is not necessarily saved in the database, so we need to
make sure we update things to the correct place
2020-01-15 12:17:49 +00:00
Mamy André-Ratsimbazafy
b49003988a Add Epoch Processing to nbench 2020-01-15 10:03:56 +00:00
Dustin Brody
8eaebf7163 update to spec version 0.10.0 2020-01-14 18:17:16 +00:00
Dustin Brody
46de726e3d mark all compatible 0.9.3 functions and data structures as 0.9.4 2019-12-20 17:24:42 +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
417f96213d fix genesis interop by fixing deposit signature handling; add TRACE-level compilation to CI 2019-12-20 15:26:48 +00:00
Jacek Sieka
746659bdc6
bump stew, fix warnings (#655) 2019-12-20 14:25:33 +01:00
Dustin Brody
ea4afd7454 mark 19 more 0.9.2-compatible entities as 0.9.3-compatible 2019-12-19 11:46:30 +00:00
Dustin Brody
350a6c071a mark a couple compatible dozen 0.9.2 functions/data structures as 0.9.3 2019-12-18 16:13:39 +00:00
Dustin Brody
0328cd49bf mark several more functions and data structures as 0.9.3 2019-12-18 10:00:17 +00:00
Dustin Brody
1610981be6 mark several more spec-referencing code/data parts as 0.9.3 2019-12-17 16:51:46 +00: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
Dustin Brody
c4daa726b5 fix AggregateAndProof definition 2019-12-13 09:04:30 +00:00
Dustin Brody
294db6aaca initially implement specified attestation aggregation functions and data structures 2019-12-13 09:04:30 +00:00
Jacek Sieka
a3145f0f5c cleanups
* move stuff out of beaconnode
* fix use-after-free in query
2019-12-10 14:47:52 +00:00
Zahary Karadjov
889031453f The beacon node can be compiled with the LibP2P native back-end
This hasn't been tested yet even in local sim.
2019-12-10 15:02:16 +02:00
Jacek Sieka
eea523a89e logging fixes
* don't log out-of-sync when there's no work to do
* small logging fixes
2019-12-10 10:18:30 +00:00
Zahary Karadjov
8ab0248209
Revert "tighten a few imports"
This reverts commit b24a9200d91b185bf44ec556f553e5cb8a856280.
2019-12-10 02:18:47 +02:00
Jacek Sieka
b24a9200d9 tighten a few imports 2019-12-09 12:58:28 +00:00
Dustin Brody
c762c0232d render get_beacon_proposer_index(...) return value an option and remove overly aggressive assertion formerly causing crashes when missing validators (#617)
* render get_beacon_proposer_index(...) return value an option and remove overly aggressive assertion formerly causing crashes when missing validators

* follow addBlock(...) after refactoring

* [skip ci] fix typo
2019-12-04 11:49:59 +01:00
kdeme
3b3a2b10f1 First attempt to have some fuzz tests exported for the fuzzing framework 2019-12-03 14:33:47 +02:00
Dustin Brody
e88e559caf render visible gradual validator emptying on catchup 2019-12-02 18:24:30 +02:00
Jacek Sieka
2a728d9468 fix stack overflow in isAncestor recursion 2019-11-28 17:36:07 +02:00
Dustin Brody
bde20436e8 ~50% speedup by fast-pathing Eth2Digest merkle hashing 2019-11-26 15:23:27 +00:00
Zahary Karadjov
8de4d38e4e More tracing 2019-11-26 02:45:25 +02:00
Zahary Karadjov
957645d752 Fix the bulds with json logging enabled 2019-11-26 02:45:25 +02:00
Yuriy Glukhov
777b3f4e29 State/block pruning 2019-11-26 02:45:25 +02: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
b82328b148 convert hash_tree_roots_prefix(...) to an iterator 2019-11-25 14:48:59 +00:00
Dustin Brody
f6de87b80e remove O(n^2) eth1 deposit processing and scaffolding comparing it with O(n) deposit processing; re-enable now-viable-to-run genesis state initialization tests with around 16,384 validators 2019-11-25 14:48:59 +00:00
Dustin Brody
fa2a703a17 switch more funcs and procs from global to module scope; create scaffolding for non-O(n^2) eth1 deposit processing with assertions for equivalent functionality; fix a few more shellcheck warnings 2019-11-25 14:48:59 +00:00
Dustin Brody
a8de94ad05 add validator_leaving logging at debug chronicles level for all call paths to initiate_validator_exit(...) 2019-11-25 09:08:15 +00: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
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
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
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
c7c439ac61
use bounded List[] SSZ type for more hashing consistency with spec 2019-11-18 09:35:17 +01:00