546 Commits

Author SHA1 Message Date
Zahary Karadjov
c06c60dcaf
Merge branch 'devel' into cli-reforms 2020-07-10 16:23:27 +03:00
tersec
5d5957fd7e
fix attestation handling bottlenecks in slot processing and quadratic-time inclusion delay rewards/palties in epoch processing; create infrastructure for dynamically (un)subscribing to/from attestation topics (#1294) 2020-07-10 09:24:04 +00:00
Zahary Karadjov
3ec6a02b12
Merge devel and resolve conflicts 2020-07-10 02:02:40 +03:00
Zahary Karadjov
540b2828b2
Adapt the local sim scripts to use the new run-time presets 2020-07-10 01:08:54 +03:00
Mamy Ratsimbazafy
3cdae9f6be
Dual headed fork choice [Revolution] (#1238)
* Dual headed fork choice

* fix finalizedEpoch not moving

* reduce fork choice verbosity

* Add failing tests due to pruning

* Properly handle duplicate blocks in sync

* test_block_pool also add a test for duplicate blocks

* comments addressing review

* Fix fork choice v2, was missing integrating block proposed

* remove a spurious debug writeStackTrace

* update block_sim

* Use OrderedTable to ensure that we always load parents before children in fork choice

* Load the DAG data in fork choice at init if there is some (can sync witti)

* Cluster of quarantined blocks were not properly added to the fork choice

* Workaround async gcsafe warnings

* Update blockpoool tests

* Do the callback before clearing the quarantine

* Revert OrderedTable, implement topological sort of DAG, allow forkChoice to be initialized from arbitrary finalized heads

* Make it work with latest devel - Altona readyness

* Add a recovery mechanism when forkchoice desyncs with blockpool

* add the current problematic node to the stack

* Fix rebase indentation bug (but still producing invalid block)

* Fix cache at epoch boundaries and lateBlock addition
2020-07-09 11:29:32 +02:00
Zahary Karadjov
318b225ccd
Merge devel and resolve the conflicts 2020-07-08 15:36:03 +03:00
Viktor Kirilov
1482b0430d - work towards more REST API endpoints being implemented
- testnets can now be launched with a separate validator client - make altona SCRIPT_PARAMS="--separateVC"
- reverted the ctrl+C signal handler code reuse - not necessary for the VC anyway (default is good enough)
- added a bit more logging in the VC
- removed unnecessary code in the VC - connect() just parses the address & port...
- fixed a couple more VC issues - when fetching the duties for an epoch fails on the BN side ==> the VC shouldn't be left in a broken state
- documented the currently supported json-rpc endpoints
- added more checks on the BN side for the API - bounds-checking the requests & also checking if the BN itself is synced
- other cleanup

currently a local sim doesn't finalize, but participation in the altona network with a separate VC is painless and works just as well as with in-process validators in a BN
2020-07-08 13:29:03 +03:00
Zahary Karadjov
c4af4e2f35
Working test suite with run-time presets 2020-07-08 02:02:14 +03:00
Jacek Sieka
6fe0a623f5
Crypto rng (#1284)
* use bearssl rng throughout

* bump

* bump

* move keygen out of crypto
2020-07-07 17:51:02 +02:00
Zahary Karadjov
441ae9b58c
Introduce a RuntimePreset object for the overridable testnet preset values 2020-07-03 22:29:23 +03:00
tersec
c64737e7f2
implement aggregated attestation receiving/validating (#1272)
* implement aggregated attestation receiving/validating

* document the conditions without explicit implementations in isValidAggregatedAttestation()
2020-07-02 16:15:27 +00:00
Zahary Karadjov
98761afc64
Run beacon_node --network=altona without initial Eth1 syncing 2020-07-02 18:52:48 +03:00
Zahary Karadjov
e342b96d2e
Embed the Altona metadata in the NBC executable 2020-07-02 18:14:11 +03:00
Jacek Sieka
66c230ffd1
check that parent of added block is sufficiently recent (#1269)
Otherwise, we might introduce a fork into the DAG that is no longer
viable, creating trouble for both sync and fork choice
2020-07-01 17:21:21 +02:00
Zahary Karadjov
c19321e578
Fix the 'maxDelay' FieldError problem during the initial deposit making when joining a testnet 2020-07-01 12:13:56 +03:00
tersec
fe20c36ba5
switch several beacon_node procs to funcs (#1262)
* switch several beacon_node procs to funcs
2020-06-30 13:53:57 +00:00
Jacek Sieka
e898525b16
More version in --version and less version in --help (#1260)
Long version and copyright banners is probably not what the user is
after when typing `--help`
2020-06-30 14:23:52 +02:00
tersec
b4db2ad693
remove v0.11.3 support; add block_sim to CI (#1253)
* remove v0.11.3 support; add block_sim to CI

* rm stray PERSISTENT_COMMITTEE_PERIOD

* remove TopicFilter.InteropAttestations

* bump two comment-spec-refs to v0.12.1
2020-06-29 18:08:58 +00:00
Zahary Karadjov
302cef5e90 Attach all local validators before starting the networking 2020-06-29 18:07:41 +03:00
Jacek Sieka
61fc535f8c
print networking info on startup 2020-06-29 14:01:18 +02:00
Jacek Sieka
047f354e9b
Don't wait for genesis to start network (#1249) 2020-06-29 07:34:48 +02:00
Zahary Karadjov
8140b4458c Working local sim with WAIT_GENESIS=yes 2020-06-29 02:18:48 +03:00
Zahary Karadjov
b9e653f7fd Working genesis detection for Altona 2020-06-29 02:18:48 +03:00
Zahary Karadjov
31e31bb30c Switch to monitoring of Blocks; More accurate genesis detection and faster Eth1 syncing 2020-06-29 02:18:48 +03:00
Jacek Sieka
ea57852359
count attestations from blocks while syncing (#1244)
* count attestations from blocks while syncing

* check for resolved old attestations
2020-06-28 19:32:11 +02:00
Mamy Ratsimbazafy
fc3a18039d
typos 2020-06-26 15:51:20 +02:00
Zahary Karadjov
322a12fed7
Fix the Eth1 deposit contract monitoring on Witti 2020-06-26 02:33:39 +03:00
Mamy Ratsimbazafy
902093f57c
Revert "Dual headed fork choice [Reloaded] (#1223)" (#1234)
This reverts commit 6836d41ebda0ac2181adfd82489f67f968a44aa3.
2020-06-25 11:36:03 +02:00
Zahary Karadjov
62e4efe34b Re-wire the sending of deposits by the 'deposits create' command 2020-06-24 23:06:05 +03:00
Zahary Karadjov
384e512031 Implement EIP-2386 wallets; Progress towards a CLI for interactive wallet creation
For more information:
4494da0966/EIPS/eip-2386.md (specification)
2020-06-24 23:06:05 +03:00
Mamy Ratsimbazafy
6836d41ebd
Dual headed fork choice [Reloaded] (#1223)
* Dual headed fork choice

* fix finalizedEpoch not moving

* reduce fork choice verbosity

* Add failing tests due to pruning

* Properly handle duplicate blocks in sync

* test_block_pool also add a test for duplicate blocks

* comments addressing review
2020-06-24 20:24:36 +02:00
tersec
1b3c19dc21
default to v0.12.1 beacon chain spec, keeping witti working (#1222)
* default to v0.12.1 beacon chain spec, keeping witti working

* a couple of fixes that help for the Onyx testnet
2020-06-23 19:40:44 +00:00
tersec
807b920c19
state_transition implements the spec fairly directly (#1220) 2020-06-23 13:54:24 +00:00
Zahary Karadjov
7211a99086 Smooth out the differences between Ganache and Infura; Working local sim and Altona target 2020-06-22 17:30:04 +03:00
Zahary Karadjov
1def383ad1 Reword the Tmux setup to handle all simulation scenarios in more visible way 2020-06-22 17:30:04 +03:00
Zahary Karadjov
e9d68e2f7b Add simulation mode that bootstraps from an Eth1 ganache instance 2020-06-22 17:30:04 +03:00
tersec
dc1a565b3f
support v0.12.1 attestation topics in beacon node/inspector subscribing (#1187)
* support v0.12.1 attestation topics in beacon node and inspector subscribing

* bump is_valid_merkle_branch() spec ref
2020-06-18 15:10:25 +02:00
Eugene Kabanov
4436c85ff7
Forward sync refactoring. (#1191)
* Forward sync refactoring.
Rename Quarantine.pending to Quarantine.orphans.
Removing "old" fields.

* Fix test's FetchRecord.

* Fix `checkResponse` to not allow duplicates in response.
2020-06-18 12:03:36 +02:00
Jacek Sieka
e813111b3b peers rpc call
simple way to display nbc peer table
2020-06-18 07:29:20 +00:00
tersec
ee9f4a2e3f
remove skipMerkleValidation and skipBlockParentRootValidation (#1197) 2020-06-18 07:56:47 +02:00
Jacek Sieka
8fbbd59885
metric names (#1188)
* fix metric names to not clash with native libp2p metrics
* run testnet node with rpc enabled by default
2020-06-17 13:04:24 +02:00
Jacek Sieka
49e9167b28 clean up dump feature
* don't write blocks that get added to database
* don't write states
* write to folders
* add state dumping feature to `ncli_db` to get any known state from the
database
2020-06-16 13:44:37 +00:00
Jacek Sieka
60176b8cc1
Revert "Dual headed fork choice (#1163)" (#1181)
This reverts commit 090f06614a1688205690a8a749b156b5664874ae.
2020-06-16 09:46:00 +02:00
Mamy Ratsimbazafy
090f06614a
Dual headed fork choice (#1163)
* Dual headed fork choice

* fix finalizedEpoch not moving

* reduce fork choice verbosity
2020-06-16 00:40:16 +02:00
Jacek Sieka
42832cefa8
Small fixes (#1165)
* random fixes

* create dump dir on startup
* don't crash on failure to write dump
* fix a few `uint64` instances being used when indexing arrays - this
should be a compile error but isn't due to compiler bugs
* fix standalone test_block_pool compilation
* add signed block processing in ncli

* reuse cache entry instead of allocating a new one

* allow for small clock disparities when validating blocks
2020-06-12 18:43:20 +02:00
Zahary Karadjov
cf6a869e9e Address some TODO items; Handle start-up before genesis more properly 2020-06-11 17:40:08 +03:00
Zahary Karadjov
c773e10c1a Attempt to reduce the risk of dropped network connections during the loading of KeyStores 2020-06-11 17:40:08 +03:00
Zahary Karadjov
fdaf419e41 Address review comments 2020-06-11 17:40:08 +03:00
Zahary Karadjov
a75c632f7a Fixed launch_local_testnet; Renamed validator_keygen to keystore_directories 2020-06-11 17:40:08 +03:00
Zahary Karadjov
a8113cf2bc Restore the local sim to a working state 2020-06-11 17:40:08 +03:00