1428 Commits

Author SHA1 Message Date
Viktor Kirilov
4767eba465 - properly distributing the keys between BNs & VCs - fixing finalization - will switch to ON by default as soon as finalization becomes overall stable
- added a new altona-vc Makefile target which uses a separate VC process
2020-07-15 16:18:21 +03:00
zah
8970a22fdd
Add a non-optional Json file log for the beacon node as stopgap measure (#1322)
* Add a non-optional Json file log for the beacon node as stopgap measure

* Fix the build with -d:testnet_servers_image
2020-07-15 15:15:55 +02:00
tersec
26e893ffc2
restore EpochRef and flush statecaches on epoch transitions (#1312)
* restore EpochRef and flush statecaches on epoch transitions

* more targeted cache invalidation

* remove get_empty_per_epoch_cache(); implement simpler but still faster get_beacon_proposer_index()/compute_proposer_index() approach; add some abstraction layer for accessing the shuffled validator indices cache

* reduce integer type conversions

* remove most of rest of integer type conversion in compute_proposer_index()
2020-07-15 12:44:18 +02:00
tersec
4aefd8b021
fix over/underflow in proposerslashing processing (#1325) 2020-07-15 10:38:45 +00:00
Giovanni Petrantoni
49cdd348d1
use splitLines to read bootstrap nodes list (#1321) 2020-07-15 10:13:34 +02:00
Ștefan Talpalaru
88a9629c2b
bump submodules 2020-07-14 03:01:23 +02:00
Jacek Sieka
300e0d57c1
avoid replaying long empty slots on old votes (#1304)
* avoid replaying long empty slots on old votes

* fixup!

* fixup!

* fixup!
2020-07-13 16:58:38 +02:00
zah
0be77f9cbc
Restore compilation with custom presets (#1309)
This also assigns precise types to the constants in the minimal
and mainnet presets in order to reduce the chance of compilation
errors when custom presets are used (previously, only the custom
presets have precisely assigned types for the constants).
2020-07-13 16:44:58 +02:00
Zahary Karadjov
49800b3360
Hotfix: fix Altona's GENESIS_FORK_VERSION value 2020-07-13 12:10:26 +03:00
Zahary Karadjov
74396747a3 Address review comments; Add a test 2020-07-12 21:01:31 +03:00
Zahary Karadjov
93b04bc214 Add an option for graffiti customization 2020-07-12 21:01:31 +03:00
tersec
853bd5b799
quick workaround for epochref cache issue (#1296)
* quick workaround for epochref cache issue

* disable assertion which doesn't work without epochref caches

* get local testnets and altona running again
2020-07-12 17:09:49 +02:00
Ștefan Talpalaru
86241d7303
Merge pull request #1300 from status-im/deactivate-dual-fork-choice
Deactivate dual fork choice
2020-07-11 00:07:53 +02:00
Jacek Sieka
d6f317950c
Compute state root instead of loading from database (#1297)
htr is fast now, so hitting the database to load the state root is no
longer motivated - the more simple code is less vulnerable to database
corruption.
2020-07-10 22:47:39 +02:00
Mamy André-Ratsimbazafy
344175d1a2
Deactivate dual fork choice 2020-07-10 18:47:48 +02:00
Zahary Karadjov
87928e0069
Documentation; 'deposits create' can now ask for a private key 2020-07-10 18:18:14 +03:00
Zahary Karadjov
d16676b294
Bake the metadata for testnet0 and testnet1 as well; Remove the old scripts 2020-07-10 17:39:54 +03:00
Zahary Karadjov
7280b0aa61
Remove unsused import 2020-07-10 16:30:45 +03:00
Zahary Karadjov
c06c60dcaf
Merge branch 'devel' into cli-reforms 2020-07-10 16:23:27 +03:00
Zahary Karadjov
c0241305c6
Fix a build issue manifesting in Jenkins 2020-07-10 16:21:36 +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
Kim De Mey
396825344c
Bump nim-eth and adjust code for it (#1293) 2020-07-10 11:17:15 +02:00
Eugene Kabanov
01c00c960c
Fix syncman topics log lines. (#1295)
* Fix syncman log topics is not applied properly.
2020-07-10 11:25:58 +03: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
tersec
61b0b5af17
update most remaining non-fork-choice spec refs, updating code where necessary (#1292)
* update most of the remaining non-fork-choice spec refs, updating code where necessary

* revert presumably harmless compute_signing_root() change, but this way, keep things really unchanged outside inspector
2020-07-09 11:43:27 +00: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
Dustin Brody
4140b3b9d9 update 29 spec refs to v0.12.1 2020-07-08 20:49:25 +00:00
Zahary Karadjov
318b225ccd
Merge devel and resolve the conflicts 2020-07-08 15:36:03 +03:00
Zahary Karadjov
5d056ba667
Switch to uint64 as the default type for preset values 2020-07-08 14:00:40 +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
Dustin Brody
fc8502c54e halve memory usage from state caches 2020-07-08 10:21:41 +00:00
Jacek Sieka
f53425873c Only use noise 2020-07-08 08:05:38 +00:00
Dustin Brody
8ac613421d only calculate total_balance once per attestation delta application 2020-07-08 07:45:21 +00:00
Dustin Brody
3c030d945d allow 50k validators on block_sim by avoiding repeated get_total_active_balance() in get_proposer_reward() 2020-07-08 07:45:21 +00: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
cheatfate
6ef2e71468 Fix names 2020-07-07 15:34:04 +03:00
cheatfate
322ec3d2f9 Forward sync should always start from finalized epoch's first slot. 2020-07-07 15:34:04 +03:00
Eugene Kabanov
293d990d43
Fix PeerPool issue with peers overflow maxPeers setting. (#1285) 2020-07-07 11:49:08 +02:00
Zahary Karadjov
441ae9b58c
Introduce a RuntimePreset object for the overridable testnet preset values 2020-07-03 22:29:23 +03:00
tersec
a92276d510
adopt Result[void, string] in place of some bool return signatures (#1275)
* adopt Result[void, string] in place of some bool return signatures

* string -> cstring to reduce memory allocations; ensure all err() strings are constants, with contextual information from higher-level callers

* logScope usage fixes

* homogenize err() reporting convention

* invalid signature in deposit isn't an error
2020-07-03 17:03:14 +00: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
cheatfate
76c12d493e Add check for late attestation sent messages in logtrace tool. 2020-07-02 10:36:04 +03:00
Zahary Karadjov
26b7202af3
Fix #1266 2020-07-01 22:01:50 +03:00
Jacek Sieka
f3e92762e3
add tests for unviable blocks (#1271)
* add tests for unviable blocks

also enable finalization tests in all test configs - they're plenty fast
now
also fix newClone for non-rvo cases. sigh.

* fixes
2020-07-01 19:00:14 +02: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
Jacek Sieka
ef2f037571
bump libp2p (#1267) 2020-07-01 13:41:40 +02:00