Commit Graph

609 Commits

Author SHA1 Message Date
tersec 820a6f65d5
use v1.1.0-alpha.6 test vectors (#2618)
* bump nim-eth2-vendors and use v1.1.0-alpha6 test vectors

* continue to download alpha 5 test vectors for const sanity checks
2021-05-30 09:51:01 +00:00
Jacek Sieka d16da06c92 ncli_db: validator performance database tool
Record attestation performance per epoch in sqlite database
2021-05-27 19:14:26 +03:00
Ștefan Talpalaru 9ddf7fea23 dist: use Ubuntu-18.04 to build ARM64 binaries 2021-05-26 16:51:06 +03:00
Jacek Sieka 80ed54378c
nim-eth: fix commit 2021-05-26 09:40:08 +02:00
Jacek Sieka eebc828778
create new database in separate file (#2596)
The V1 table structure shows great improvements in performance, but if
there's an old `kvstore` without rowid:s, these benefits are nullified:
reorgs during writes and deletes remain expensive (even if the
degradation is reduced somewhat).

This PR creates the tables in a new file instead, and uses the old file
as a read-only store - this has several interesting properties:

* the old database is left completely untouched - this guarantees that
downgrades work smooth (they'll only need to resync their missing
portions)
* starting sync after this PR means only a v1 database is created
* v0 databases stick around - no migration is performed (for now)

Future PR:s can introduce migration of the data from one database to
another - a simply copy will take hours which is downtime we want to
avoid - at that point, it might make sense to migrate straight to era
files instead.
2021-05-26 09:07:18 +02:00
tersec d69e06e519
bump nim-eth2-scenarios to stop downloading v1.0.1 test vectors (#2598) 2021-05-24 19:31:48 +00:00
tersec 056ff59595
bump eth2-testnets (#2589) 2021-05-21 13:09:35 +00:00
tersec 1c05865656
bump nim-eth2-scenarios to download v1.1.0-alpha.5 test vectors (#2588) 2021-05-21 10:54:59 +00:00
Zahary Karadjov dc49a51654
Merge stable into unstable (take 2) 2021-05-20 13:52:09 +03:00
Zahary Karadjov b7aa30adfd
Merge stable into unstable 2021-05-20 13:50:40 +03: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
Ș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 6057c2ffb4.

* 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 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 22ddf74752.
2021-05-17 06:34:44 +00: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 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
tersec f9b964ca5d
bump nim-eth2-scenarios for merge test vectors (#2553) 2021-05-10 13:56:31 +00: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 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 ce49da6c0a
Introduce unittest2 and junit reports (#2522)
* Introduce unittest2 and junit reports

* fix XML path

* don't combine multiple CI runs

* fixup

* public combined report also

Co-authored-by: Ștefan Talpalaru <stefantalpalaru@yahoo.com>
2021-04-28 18:41:02 +02:00
nbc-bump-bot[bot] d4cda02c97
auto-bump nim-libp2p (#2523)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2021-04-28 09:57:25 +02:00
cheatfate 18da0f8928 Bump nim-chronos to fix issues in httpserver.
Bump nim-http-utils to fix issues in httpserver.
2021-04-28 00:00:00 +03:00
nbc-bump-bot[bot] 8a3c070337
auto-bump nim-libp2p (#2517)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2021-04-23 12:54:06 +02:00
Ștefan Talpalaru 5b32f7ca17 Nim-1.2.12 2021-04-19 10:53:58 +03:00
Jacek Sieka 4959da78a8
mem fixes / libp2p (#2510)
* mem fixes / libp2p

* bump
2021-04-18 12:30:25 +02:00
Ștefan Talpalaru 9e439f19c8
bump nim-metrics (#2511) 2021-04-18 10:22:59 +02:00
cheatfate 14742890d6 Fix browsers unable to access HTTP endpoints (HTTP 400 error). 2021-04-14 22:05:00 +03:00
Jacek Sieka 4ed2e34a9e Revamp attestation pool
This is a revamp of the attestation pool that cleans up several aspects
of attestation processing as the network grows larger and block space
becomes more precious.

The aim is to better exploit the divide between attestation subnets and
aggregations by keeping the two kinds separate until it's time to either
produce a block or aggregate. This means we're no longer eagerly
combining single-vote attestations, but rather wait until the last
moment, and then try to add singles to all aggregates, including those
coming from the network.

Importantly, the branch improves on poor aggregate quality and poor
attestation packing in cases where block space is running out.

A basic greed scoring mechanism is used to select attestations for
blocks - attestations are added based on how much many new votes they
bring to the table.

* Collect single-vote attestations separately and store these until it's
time to make aggregates
* Create aggregates based on single-vote attestations
* Select _best_ aggregate rather than _first_ aggregate when on
aggregation duty
* Top up all aggregates with singles when it's time make the attestation
cut, thus improving the chances of grabbing the best aggregates out
there
* Improve aggregation test coverage
* Improve bitseq operations
* Simplify aggregate signature creation
* Make attestation cache temporary instead of storing it in attestation
pool - most of the time, blocks are not being produced, no need to keep
the data around
* Remove redundant aggregate storage that was used only for RPC
* Use tables to avoid some linear seeks when looking up attestation data
* Fix long cleanup on large slot jumps
* Avoid some pointers
* Speed up iterating all attestations for a slot (fixes #2490)
2021-04-13 20:24:02 +03:00
cheatfate 79d4735355 Address #2491. 2021-04-13 17:07:41 +03:00
Dmitriy Ryajov 03f478748f bump libp2p to lastest master 2021-04-12 20:28:39 +03:00
Dmitriy Ryajov 5eebf4b5f5 bump libp2p 2021-04-12 20:28:39 +03:00
Dmitriy Ryajov 4f4901b10a use master builders 2021-04-12 20:28:39 +03:00
Dmitriy Ryajov 920de91c37 use libp2p builder 2021-04-12 20:28:39 +03:00
cheatfate cc3851ec02 Bump nim-presto. 2021-04-09 21:42:13 +03:00
cheatfate 72695dd62a Rest API initial implementation. 2021-04-09 21:42:13 +03:00
cheatfate 3d701d8973 Add nim-presto submodule. 2021-04-09 21:42:13 +03:00
cheatfate c4d891f583 Fix sync_manager.nim to return proper status.
Bump REST API dependencies.
2021-04-09 21:42:13 +03:00
Zahary Karadjov 9776fbfe17
Merge branch 'version-1.1.0' into unstable 2021-04-08 20:50:06 +03:00
Zahary Karadjov ba59dd85cd Support for fallback web3 providers; Fix resource leaks on Eth1 monitor restarts 2021-04-08 12:46:42 +03:00
tersec 5f5e3e43c3
bump num-eth2-scenarios from v1.1.0-alpha.2 to v1.1.0-alpha3 (#2481) 2021-04-07 13:52:17 +00:00
Jacek Sieka adec9d878e
bump chronos (#2476) 2021-04-06 13:58:36 +02:00
tersec 49a5667288
update some v1.1.0 alpha1 to alpha2 (#2457)
* update some v1.1.0 alpha1 to alpha2

* remove unused getDepositMessage overload and move other out of datatypes/base

* bump nim-eth2-scenarios to download v1.1.0-alpha.2 test vectors

* construct object rather than result
2021-03-29 19:17:48 +00:00
Jacek Sieka 74732a23fe
json cleanups (#2456)
* move json-rpc specific marshalling to rpc
* serialize Epoch/Slot with cast to avoid Defect
* avoid a few eth1 deps
* simplify imports
2021-03-26 15:11:06 +01:00
Jacek Sieka 2695cfa864
EH cleanup (#2455)
almost 100% raises in nimbus-eth2 now!

* fix some rare exception-related crashes in json-rpc
2021-03-26 07:52:01 +01:00
Zahary Karadjov 2eacfc4685 Bump modules to take advantage of the new Json format flavors support
Since quite a lot of additional procs were now compiled as generics, this lead to compiler bugs that had
to be worked-around:

* The `Domain` type was renamed to `Eth2Domain` to avoid compilation errors
  due to conflicts with `nativesockets.Domain`.
  Similarly, `eth2_network.KeyPair` was renamed to `NetKeyPair`.

* A new more robust version of `hexToByteArray` was added to stew
2021-03-25 09:37:35 +02:00
Jacek Sieka 8b76ceed52
Fix minor exception effect issues (#2448)
Makes code compatible with
https://github.com/status-im/nim-chronos/pull/166 without requiring it.
2021-03-24 17:20:55 +01:00
Zahary Karadjov a727fc8e52
Merge stable into unstable 2021-03-24 03:24:20 +02:00
Zahary Karadjov 8391d3f83e
v1.0.12 2021-03-24 03:23:14 +02:00
Zahary Karadjov 5fd82ddaf5
Merge stable into unstable 2021-03-22 23:13:05 +02:00
Jacek Sieka d1357801e7
bumps 2021-03-22 20:53:27 +01:00
Zahary Karadjov af0d302398
Use the latest bootstrap nodes for Prater 2021-03-22 18:37:32 +02:00
Jacek Sieka 3743df6434
introduce unittest2 (#2437)
This commit introduces `unittest2`, driven by the need to fix several
long-standing issues with `unittest`, in particular exception handling,
test isolation, timing and others.

Upgrading to `unittest2` generally requires updating the unittest import
and potentially fixing the code to support the new `one-proc-per-test`
setup.

* nim-unittest2 has been moved from Stefans repository to status-im -
https://github.com/status-im/nim-unittest2/pull/2 fixes some exception
handling issues and brings it in line with latest nim devel - a notable
difference to unittest is that each test is run inside a proc which
gives it a fresh stack and removes a lot of globals, meaning tests
should run under conditions more similar to "normal" code and interfere
with each other less - this is a crucial first step to improving the
testing experience in general, that stefan implemented for the
multithreading support
* the multithreading in unittest2 is optional, and disabled by default
* nim-testutils contains utilities for fuzzing, as well as other
"large:ish" features that have dependencies -
https://github.com/status-im/nim-testutils/pull/27 pulls in unittest2 so
unittest2 can be kept "low-dependency"
* nim-chronos needs the above unittest changes to test its own new,
stricter exception handling -
https://github.com/status-im/nim-chronos/pull/166 - the strictess
introduced is expected to increase with time
2021-03-22 08:21:22 +01:00
Jacek Sieka 01fe564e46
chronos-based metrics (#2432)
This opens up the road for removing `-d:insecure` for metrics.
2021-03-19 10:36:38 +01:00
Zahary Karadjov c519c6012e
Merge branch 'stable' into unstable 2021-03-15 21:52:12 +02:00
Zahary Karadjov f3fc551ea7
Support for the prater testnet 2021-03-15 21:51:24 +02:00
nbc-bump-bot[bot] 2201480bd9
auto-bump nim-libp2p (#2409)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2021-03-15 17:39:10 +00:00
Jacek Sieka eb830c7968
Merge remote-tracking branch 'origin/stable' into unstable 2021-03-15 17:29:43 +01:00
Jacek Sieka f5180e0840
Revert "Nim-1.2.10" (#2411)
This reverts commit 12e15a0b8d.
2021-03-15 16:26:41 +01:00
Ștefan Talpalaru c5035c6eca dist: enable libbacktrace on ARM and ARM64
(and make sure it will work on Windows, when enabled)
2021-03-15 14:38:39 +02:00
Ștefan Talpalaru 12e15a0b8d Nim-1.2.10 2021-03-15 14:29:48 +02:00
nbc-bump-bot[bot] 4fcff4cd27
auto-bump nim-libp2p (#2406)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2021-03-15 07:36:36 +00:00
Zahary Karadjov 77ee210762
v1.0.10 2021-03-10 23:33:37 +02:00
zah 33c7f264bc
Bump news to fix resource leaks (#2388) 2021-03-10 12:22:41 +00:00
nbc-bump-bot[bot] a88d17dc04
auto-bump nim-libp2p (#2389)
Co-authored-by: = <arnetheduck@users.noreply.github.com>
2021-03-09 14:28:28 +01:00
Mamy André-Ratsimbazafy d425aabce2 BLST v0.3.3 2021-03-08 14:43:48 +02:00
kdeme 5f750f84b4 Use setupAddress for better IP and ports configuration 2021-03-06 00:09:09 +02:00
kdeme 769225b591 Bump nimbus-build-system to use nim-1-2-6-RC1-hotfixed
This should practically solve the segfaults we have been seeing in
issue #2134
2021-03-04 23:00:44 +02:00
nbc-bump-bot[bot] 9408a9af1c
auto-bump nim-libp2p (#2373)
Co-authored-by: = <arnetheduck@users.noreply.github.com>
2021-03-04 10:14:00 +01:00
nbc-bump-bot[bot] 965972dd0b
auto-bump nim-libp2p (#2360)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2021-03-01 10:26:16 +00:00
nbc-bump-bot[bot] 037a3e8946
auto-bump nim-libp2p (#2359)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2021-02-26 09:43:35 +00:00
Dustin Brody f14e7babb6 update eth2 specs to version v1.0.1 2021-02-25 14:21:59 +02:00
Ștefan Talpalaru 16abf2989b bump NimYAML 2021-02-25 14:20:26 +02:00
Ștefan Talpalaru 22620afa8f bump NimYAML for Nim-1.4 compatibility 2021-02-25 14:20:26 +02:00
nbc-bump-bot[bot] 45087f36bd
auto-bump nim-libp2p (#2350)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2021-02-25 11:25:00 +00:00
Eugene Kabanov 8478345619
Bump nim-bearssl to include latest fixes in submodule repository and cacert.pem. (#2354) 2021-02-24 19:22:40 +01:00
Zahary Karadjov 3f6834cce7
Fix a crash occurring with --slashing-db-kind=both 2021-02-22 21:05:08 +02:00
Zahary Karadjov 7e9648e52c
Use the latest Teku bootstrap nodes 2021-02-22 17:16:53 +02:00
Zahary Karadjov 5f924c0038 Bump modules; Compile with DEBUG logs by default 2021-02-19 08:44:13 +02:00
Kim De Mey aa29be288e
Bump eth2-testnets for updated LH bootstrap nodes (#2322) 2021-02-15 17:56:34 +01:00
Jacek Sieka 946608b572
bump json-rpc (#2321) 2021-02-15 13:47:57 +01:00
nbc-bump-bot[bot] ad66ba507e
auto-bump nim-libp2p (#2317)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2021-02-13 06:16:39 +00:00
nbc-bump-bot[bot] 8192015b86
auto-bump nim-libp2p (#2315)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2021-02-12 05:53:38 +00:00
nbc-bump-bot[bot] 0419a4122e
auto-bump nim-libp2p (#2309)
Co-authored-by: = <dryajov@users.noreply.github.com>
2021-02-11 02:20:39 +00:00
Jacek Sieka f012d7060b
better error message on disk / database issues (#2307)
bumps stew for better result defects as well
2021-02-10 13:21:06 +01:00
nbc-bump-bot[bot] c13205035e
auto-bump nim-libp2p (#2305)
Co-authored-by: = <dryajov@users.noreply.github.com>
2021-02-10 05:32:19 +00:00
Mamy Ratsimbazafy 03f47c8f2f
Slashing protection refactor - EIP 3076 (#2094)
* Create CLI tool for slashing export

* Use SQLite as a DB instead of a KV-store

* Keeps v1 and v2 DBs around

* Uses the same schema as Lighthouse v1.1.0

* Passes all interchange tests + skeleton of finalization pruning

* Removes tests that would violate v5 / minimal slashing DB and MinSlot rules

* Migration tool added using low-watermark scheme for faster migration of large number of validators
2021-02-09 17:23:06 +02:00
nbc-bump-bot[bot] 93cfc2d446
auto-bump nim-libp2p (#2300)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2021-02-08 08:32:47 +01:00
Jacek Sieka ece50c4706
bump nim-json-rpc (fixes https://github.com/status-im/nim-json-rpc/issues/93) (#2299) 2021-02-07 22:30:45 +01:00
nbc-bump-bot[bot] 0b560cc6fb
auto-bump nim-libp2p (#2296)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2021-02-06 09:50:08 +01:00
Zahary Karadjov 1394ef37fb
Tentative fix for the freezing Eth1 monitor activity 2021-02-04 17:01:47 +02:00
Ștefan Talpalaru 80c11546ff Windows binary release
CI: use both cores on GitHub Actions and set timeouts for the local testnet tests
2021-02-04 10:25:44 +02:00
Eugene Kabanov c4c04197c5
Bump nim-http-utils. (#2290) 2021-02-03 19:05:30 +01:00
Ștefan Talpalaru cadb1aae15
bump submodules (#2279)
* bump submodules

* undo a couple of bumps (32-bit failure)

* launch_local_testnet.sh: timeout and various fixes

* undo nim-http-utils bump (breaks RPC for VC)
2021-02-02 19:02:52 +01:00