tersec
fe15d473c9
effectively revert withEpochState ( #1235 )
2020-06-25 14:14:41 +02:00
Jacek Sieka
1301600341
Trusted blocks ( #1227 )
...
* cleanups
* fix ncli state root check flag
* add block dump to ncli_db
* limit ncli_db benchmark length
* tone down finalization logs
* introduce trusted blocks
We only store blocks whose signature we've verified in the database - as
such, there's no need to check it again, and most importantly, no need
to deserialize the signature when loading from database.
50x startup time improvement, 200x block load time improvement.
* fix rewinding when deposits have invalid signature
* speed up ancestor iteration by avoiding copy
* avoid deserializing signatures for trusted data
* load blocks lazily when rewinding (less memory used)
* chronicles workarounds
* document trustedbeaconblock
2020-06-25 12:23:10 +02:00
Mamy Ratsimbazafy
902093f57c
Revert "Dual headed fork choice [Reloaded] ( #1223 )" ( #1234 )
...
This reverts commit 6836d41ebd
.
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
Zahary Karadjov
f20f077827
Introduce some short-cuts in the Eth1 monitoring for faster syncing
2020-06-24 19:22:52 +03:00
Ștefan Talpalaru
bdd56b626f
Merge pull request #1206 from status-im/readme
...
Update readme and manual
2020-06-24 01:04:25 +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
tersec
a683656238
send and validate with v0.12.1 attestations ( #1213 )
...
* send and validate with v0.12.1 attestations
* use EpochRef instead of empty cache in attestation validation
2020-06-23 10:38:59 +00:00
Eugene Kabanov
f60235b3e9
Attestation validator now populates list of missing blocks. ( #1211 )
2020-06-23 11:29:08 +02:00
Jacek Sieka
1d709c09f4
secp: requiresInit ( #1210 )
...
* secp: requiresInit
* bump
2020-06-22 21:40:19 +02:00
Zahary Karadjov
a2e28bef27
Further removal of enum support; Bump modules
2020-06-22 20:14:14 +03: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
14274587cf
More user-friendly logging during mainchain monitoring
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
Dustin Brody
62a7e7fede
fix is_valid_indexed_attestation() to check for too-high attestation indices
2020-06-22 14:15:51 +00:00
Eugene Kabanov
47eaaa7696
Fix connection workers race. ( #1204 )
2020-06-21 18:49:48 +02:00
Jacek Sieka
a661ecbae1
bump libp2p ( #1209 )
2020-06-21 18:45:28 +02:00
Jacek Sieka
7e0e4dc327
don't crash on unknown disconnection reason, fix disconnection reason enum ( #1208 )
2020-06-20 09:24:33 +02:00
tersec
7b4e129316
re-add minimal constant checking; organize presets by spec version ( #1203 )
...
* re-add minimal preset constant checking; organize presets to better support multiple spec versions
* bump spec ref
* increase Azure timeout to 90 minutes to accomodate Nim compiler building
2020-06-20 09:12:45 +02:00
李婷婷
fd35b61ecb
fix typo
2020-06-19 23:00:18 +08:00
Dustin Brody
4ecbc655ea
switch 11 beaconstate.nim spec refs from v0.11.x to v0.12.1
2020-06-19 11:54:37 +00:00
Viktor Kirilov
72dfe7f578
- updated the validator shell script after the keystore changes
...
- better logging & retrying requests on the VC side if the BN fails for some reason
- VC now fetches the attestation duties 1 epoch in advance - in the future it will tell the BN to subscribe to the appropriate attestation topics in advance based on that info
- a bunch of other code cleanup & fixes such as better naming for consoles when using multitail, etc.
reviewed in PR #1184 - proper review of the API & VC are pending
2020-06-19 12:21:22 +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
Dustin Brody
db870fead4
update 20 beacon chain protocol spec refs
2020-06-18 08:39:28 +00: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
Dustin Brody
ffca27b45f
update 24 v0.11.x spec refs to v0.12.1
2020-06-17 12:11:03 +00: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
Dustin Brody
5b6ade043c
remove unused import
2020-06-17 09:25:54 +00:00
Dustin Brody
ec85a8bdbf
update a dozen unchanged spec refs to v0.12.1
2020-06-17 09:25:54 +00: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
kdeme
a25bc025d1
Start discovery after starting libp2p switch
2020-06-16 13:33:46 +00:00
Jacek Sieka
5c25d23ef1
eth2hash -> eth2digest
...
hash in nim is the insecure hash-map helper - might as well use `digest`
consistently to mark the difference
2020-06-16 13:30:21 +00:00
Jacek Sieka
60176b8cc1
Revert "Dual headed fork choice ( #1163 )" ( #1181 )
...
This reverts commit 090f06614a
.
2020-06-16 09:46:00 +02:00
Jacek Sieka
89e4819ce9
collect signature production and verificaiton in one place ( #1179 )
...
* collect signature production and verificaiton in one place
Signatures are made over data and domain - here we collect all such
activities in one place.
Also:
* security: fix cast-before-range-check
* log block/attestation verification consistently
* run block verification based on `getProposer` in its own history
* clean up some unused stuff
* import
* missing raises
2020-06-16 07:45:04 +02:00
Ștefan Talpalaru
9335533503
bump submodules
2020-06-16 04:27:20 +00: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
Eugene Kabanov
96f26c447c
Replace zero-point rewind with rewind to latest finalized epoch's first slot. ( #1176 )
...
* Replace zero-point rewind with rewind to latest finalized epoch's first slot.
* Fix tests.
* Add missing penalty for MissingParent
Fix comments.
2020-06-15 21:41:26 +02:00
Dustin Brody
8a2c796e83
switch 12 unchanged spec references from 0.11.x to 0.12.1; line-wrap and remove pointless-to-counterproductive "return"
2020-06-15 10:10:31 +00:00
Eugene Kabanov
50c5d47250
Add maximum number of workers (peers used) by SyncManager (default: 10) ( #1172 )
...
Refactor and simplification of `sync` procedure.
Fix aggressive looping on excessive recurring failures.
2020-06-14 11:45:53 +02:00
Jacek Sieka
360ebd705f
db: compress with snappy
...
* 3gb vs 12gb for 4000 epochs of witti
* 3-4x sync blocks/sec performance improvement on my FDE SSD drive
* generate less quirky code for primitive types
2020-06-14 11:33:00 +03:00
Dustin Brody
1d1e90adf4
Update 36 spec refs from 0.11.x to 0.12.1
2020-06-12 19:41:03 +00:00
Jacek Sieka
78b767f645
avoid genericAssign for beacon node types ( #1166 )
...
* avoid genericAssign for beacon node types
ok, I got fed up of this function messing up cpu measurements - it's so
ridiculously slow, it's sad.
before, while syncing:
```
40,65% beacon_node_shared_witti_0 [.]
genericAssignAux__U5DxFPRpHCCZDKWQzM9adaw
9,02% libc-2.31.so [.] __memmove_avx_unaligned_erms
7,07% beacon_node_shared_witti_0 [.] BIG_384_58_monty
5,19% beacon_node_shared_witti_0 [.] BIG_384_58_mul
2,72% beacon_node_shared_witti_0 [.] memcpy@plt
1,18% [kernel] [k] rb_next
1,17% beacon_node_shared_witti_0 [.] genericReset
1,06% [kernel] [k] map_private_extent_buffer
```
after:
```
24,88% beacon_node_shared_witti_0 [.] BIG_384_58_monty
20,29% beacon_node_shared_witti_0 [.] BIG_384_58_mul
3,15% beacon_node_shared_witti_0 [.] BIG_384_58_norm
2,93% beacon_node_shared_witti_0 [.] BIG_384_58_add
2,55% beacon_node_shared_witti_0 [.] BIG_384_58_sqr
1,64% beacon_node_shared_witti_0 [.] BIG_384_58_mod
1,63% beacon_node_shared_witti_0 [.]
sha256Transform__BJNBQtWr9bJwzqbyfKXd38Q
1,48% beacon_node_shared_witti_0 [.] FP_BLS381_add
1,39% beacon_node_shared_witti_0 [.] BIG_384_58_sub
1,33% beacon_node_shared_witti_0 [.] BIG_384_58_dnorm
1,14% beacon_node_shared_witti_0 [.] FP2_BLS381_mul
1,05% beacon_node_shared_witti_0 [.] BIG_384_58_cmove
1,05% beacon_node_shared_witti_0 [.]
get_shuffled_seq__4uncAHNsSG3Pndo5H11U9aQ
```
* better field iteration
2020-06-12 21:10:22 +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
tersec
c8f24ae3b8
Remove three skipMerkleValidation usages ( #1164 )
...
* remove three skipMerkleValidation usages
* remove a couple obsolete comments/TODOs
2020-06-12 18:03:46 +02:00