3520 Commits

Author SHA1 Message Date
tersec
d8bb91d9a9
partially integrate eth1 merge changes (#2548)
* partially integrate eth1 merge changes

* use hexToSeqByte() and validate execution engine opaque transaction length

* remove incorrect REST serialization code
2021-05-20 10:44:13 +00:00
Johann Bauer
14c258db8b
Fix typo in book (#2580) 2021-05-20 12:41:33 +02:00
yslcrypto
5bf5804bc1 update faq 2021-05-19 16:29:57 +02:00
yslcrypto
8ca2329a20 minor restructure 2021-05-19 16:26:39 +02:00
yslcrypto
62a98e9c6d minor restructure 2021-05-19 16:21:05 +02:00
TennisBowling
d27c7b1f53
Add clarity to docs surrounding command line arguments, suggest data-dir when syncing, and polishing up for mainnet (#2527)
* mainnet

* add clarity to command line rules

* add datadir suggestion when syncing

* remind to pass with all calls

* noCommand added into troubleshooting

* review

Co-authored-by: 0xmiel <sacha.saint-leger@ethereum.org>

* review

Co-authored-by: 0xmiel <sacha.saint-leger@ethereum.org>

* review

Co-authored-by: 0xmiel <sacha.saint-leger@ethereum.org>

* review

Co-authored-by: 0xmiel <sacha.saint-leger@ethereum.org>

* typo

* /lib/systemd/system/ lets you enable on startup

Co-authored-by: 0xmiel <sacha.saint-leger@ethereum.org>
Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
Co-authored-by: 0xmiel <sacha@status.im>
2021-05-19 16:17:07 +02:00
0xmiel
199ebc995b
restructure, merge, simplify (#2581) 2021-05-19 16:12:25 +02:00
yslcrypto
07533f41ba update binaries page 2021-05-19 12:04:10 +02:00
yslcrypto
ed2e1e1c6b update docker page 2021-05-19 11:58:48 +02:00
Zahary Karadjov
eb55fe2419
v1.3.0 v1.3.0 2021-05-19 09:25:22 +03:00
0xmiel
3fe589a511
Update migration-options.md 2021-05-18 20:18:17 +02:00
0xmiel
80e11ac002
Update migration-options.md 2021-05-18 20:17:41 +02:00
Ștefan Talpalaru
06dca32786
CI: daily cron job testing 3 Nim branches 2021-05-18 21:17:23 +03:00
0xmiel
5eba5b530d
Update migration-options.md 2021-05-18 20:15:39 +02:00
0xmiel
2d3b9e4c07
Update migration-options.md
Edits
2021-05-18 18:53:59 +02:00
0xmiel
faf07737de
Sacha book updates (ready for review) (#2552)
* add doppelganger detection explanation to FAQ and link to Joe's guide from our Pi guide

* Edit CLI options page

* cp

* merge with ith unstable

* prysm migration guide: add steps until import slashing db

* update systemd

* update troubleshooting

* update pi guide

* metrics: replace winners with community

* update migration guide

* cp

* progress with guides, various edits
2021-05-18 18:42:51 +02:00
Eugene Kabanov
5b5ea2e813
Fix integer overflow issue in sync_manager. (#2564)
* Make Refactor rewind point assignment more concrete.

* Fix overflow issue in getRewindPoint().
Add tests.
2021-05-18 12:25:14 +02:00
Eugene Kabanov
cf06c4e87e
Make REST server more compatible with Lighthouse and Teku validator clients. (#2575)
* Allow REST server to parse arrays with comma delimiter.

* Fix compilation issues because of new presto framework.
2021-05-18 12:24:57 +02:00
tersec
fb88309b34
bump nim-eth2-scenarios to download v1.1.0-alpha.4 test vectors (#2574) 2021-05-18 11:59:46 +02:00
Zahary Karadjov
6b14d33ad6
Bump Confutils
This fixes an issue with the --bootstrap-file parameter which was
accidentally considered mandatory due to an upstream issue.
2021-05-18 11:02:01 +03:00
Dustin Brody
e6f1f88d9f
sync AllTests-mainnet.md 2021-05-18 09:45:16 +02:00
Zahary Karadjov
2cb1396969
Log the slashing DB pruning time 2021-05-17 21:42:28 +03:00
Ștefan Talpalaru
1f1367d09a
macOS binary distribution (both AMD64 and ARM64) 2021-05-17 21:42:28 +03:00
Zahary Karadjov
f6a1f602b4
Handle changes in the latest version of Confutils 2021-05-17 21:42:28 +03:00
Zahary Karadjov
b9924214ab
Better error-handling for the slashingdb import/export feature
* Error when specifying an invalid --data-dir (or --validator-dir)
* Error when entering an invalid validator public key (e.g. invalid hex value)
* Warning when attempting to export a validator not present in the local database

Some unnecessary remains of the v1 mode has been removed as well
2021-05-17 21:42:23 +03:00
Jacek Sieka
97f4e1fffe
Db1 cont (#2573)
* Revert "Revert "Upgrade database schema" (#2570)"

This reverts commit 6057c2ffb4a481d3994c8fe5a46e7b754d12ae8f.

* ssz: fix loading empty lists into existing instances

Not a problem earlier because we didn't reuse instances

* bump nim-eth

* bump nim-web3
2021-05-17 18:37:26 +02:00
Zahary Karadjov
5fadaa247c
Remove ncli_slashing 2021-05-17 18:17:42 +03:00
Zahary Karadjov
5c313b958e
Simplify the slashing db import/export CLI 2021-05-17 17:12:03 +03:00
tersec
6057c2ffb4
Revert "Upgrade database schema" (#2570)
This reverts commit 22ddf747520dce279f8ff13b77589f2a9cfd05e9.
2021-05-17 06:34:44 +00:00
Mamy André-Ratsimbazafy
dacc508992
slashing import integrated in NBC 2021-05-16 21:48:38 +03:00
Mamy André-Ratsimbazafy
0574531c43
add restore from slashing DB 2021-05-16 21:45:24 +03:00
Jacek Sieka
2c257438a0 Upgrade database schema
This is a minimal performance hotfix for the kvstore table, such that
new databases get a kvstore table with rowid, fixing the most urgent
performance problem we have with pruning.
2021-05-14 20:08:07 +03:00
Jacek Sieka
895ccd1c95 clean up imports (#2557) 2021-05-14 20:08:07 +03:00
Jacek Sieka
22ddf74752 Upgrade database schema
The `kvstore` design we're using now turns out to not be the best way to
use `sqlite` - in particular, there are some significant benefits to
using rowid in certain situations and to keep data in separate tables.

With this branch, there are massive improvements in startup time
(seconds instead of minutes) and state/block storage and pruning times
(milliseconds instead of seconds) - these improvements can in particular
be seen on slow drives and translate directly into better attestation
performance.

* update kvstore to new keyspace design
* remove `DirStoreRef` and the hidden `--state-db-kind` option - this
was an experiment to store large blobs in files, but with the new
kvstore, there's no compelling reason to do so
* remove `DbMap` - unused and would need updating for new keyspace
design
* introduce separate tables for each data type (blocks, states etc)
* remove "WITHOUT ROWID" pessimization for tables with large blobs
* close DbSeq statements explicitly (and earlier)
* store beacon block summaries in separate table, without SSZ
compression and load them all with single query on startup
* stop storing backwards compat full states
* mark genesis beacon block as trusted
* avoid faststreams when loading SSZ data
* remove `DisagreementBehavior` (unused)
2021-05-14 20:05:23 +03:00
Jacek Sieka
313748a353
update comment mode to latest action script version (#2558) 2021-05-14 15:29:42 +02:00
Zahary Karadjov
0a91c3c592
Prepare for the v1.3.0 release (more to come) 2021-05-12 16:28:10 +03:00
Jacek Sieka
0022015a91
clean up imports (#2557) 2021-05-12 14:31:02 +02:00
Jacek Sieka
0a477eb2d3
fix subnet logic (#2555)
This PR decreases the lead subscription time which should help
decrease bandwidth usage and CPU making the subscription for future
aggregation happen a bit later. There's room for more tuning here,
probably.

* fix missing negation from in #2550
* fix silly bitarray issues
* decrease subnet lead subscription time
* log all subnet switching source data
* rename subnet trackers to refer to stability and aggregate subnets
* more tests
2021-05-11 22:03:40 +02:00
Mamy Ratsimbazafy
149ff49c8e
Remove correlated queries in finalization pruning, all use indexes (#2554) 2021-05-11 10:41:37 +02:00
Mamy Ratsimbazafy
e6b559a35a
Slashing db pruning [Merge only after v2 has been default for 1 noticeable release] (#2452)
* Enable slashing DB pruning

* integrate slashing DB pruning with onSlotEnd

* rebase tests
2021-05-10 16:32:28 +02:00
tersec
f9b964ca5d
bump nim-eth2-scenarios for merge test vectors (#2553) 2021-05-10 13:56:31 +00:00
Jacek Sieka
867d8f3223
Perform attestation check before broadcast (#2550)
Currently, we have a bit of a convoluted flow where when sending
attestations, we start broadcasting them over gossip then pass them to
the attestation validation to include them in the local attestation pool
- it should be the other way around: we should be checking attestations
_before_ gossipping them - this serves as an additional safety net to
ensure that we don't publish junk - this becomes more important when
publishing attestations from the API.

Also, the REST API was performing its own validation meaning
attestations coming from REST would be validated twice - finally, the
JSON RPC wasn't pre-validating and would happily broadcast invalid
attestations.

* Unified attestation production pipeline with the same flow for gossip,
locally and API-produced attestations: all are now validated and entered
into the pool, then broadcast/republished
* Refactor subnet handling with specific SubnetId alias, streamlining
where subnets are computed, avoiding the need to pass around the number
of active validators
* Move some of the subnet handling code to eth2_network
* Use BitArray throughout for subnet handling
2021-05-10 09:13:36 +02:00
tersec
39da640beb
use getStateField() in ncli_db (#2549) 2021-05-07 13:14:20 +00:00
Jacek Sieka
646923c3dd
add attestation stats tool to ncli_db (#2539)
This also makes future efforts to provide metrics and logs for
attestation efficiency easier

* Export rewards from epoch transition
* Use less memory for reward calculation (bool -> set[enum], field
alignment)
* Reuse reward memory when replaying, avoiding spike
* Allow replaying any range in ncli_db benchmark
2021-05-07 13:36:21 +02:00
Jacek Sieka
5cd5da74c4
Gossipsub unsubscribe fixes (fixes #2540) (#2545) 2021-05-07 06:31:28 +02:00
Jacek Sieka
01b404f43d
bump chronos (#2544) 2021-05-06 18:20:37 +02:00
tersec
1d6c8ee9ab
store full state 4x less often (#2542) 2021-05-06 07:36:18 +02:00
tersec
dd43a2c3b0
bump nim-eth2-scenarios to get merge SSZ test vectors (#2541) 2021-05-05 15:35:36 +00:00
Ștefan Talpalaru
2018a55c51
bump a few submodules (#2529) 2021-05-05 08:55:39 +02:00
Jacek Sieka
427c0f307c
avoid extraneous hash root calculation (#2537)
When applying a block, we'll currently compute a state root for the
state after slot processing but before block processing - this is
unnecessary when a block is being applied because the intermediate state
root is never observed.
2021-05-05 08:54:21 +02:00