Commit Graph

191 Commits

Author SHA1 Message Date
Ștefan Talpalaru 7c7b6fb361
Grafana: only show one node per page [skip ci]
by using Grafana variables to get dropdown menus
2020-06-07 01:42:54 +02:00
Zahary Karadjov 0c78fc39e7
Use the latest LibP2P 2020-06-05 19:34:12 +03:00
Ștefan Talpalaru 3a6a9f8135 generate Grafana dashboards for remote testnet nodes 2020-06-03 12:44:16 +03:00
Zahary Karadjov 0bcdabfcdf Detect another invalid SSZ input found through fuzzing
The first offset of an SSZ object should always have a fixed constant
value. Otherwise, some unused bytes may appear between the fixed portion
and the dynamic portion.

Please note that this fix shutds down the minimal forward compatibility
currently supported by the SSZ format (and thus, the expected behavior
must be clarified in the SSZ spec).
2020-05-30 14:47:35 +03:00
Ștefan Talpalaru b0a7cb17eb
connect_to_testnet.nims: enable metrics [skip ci]
you still need to pass NIMFLAGS="-d:insecure" to Make
2020-05-27 22:35:40 +02:00
Zahary Karadjov 52c3ebf631 Fuzzing tests for SSZ 2020-05-20 15:51:45 +03:00
Jacek Sieka 30f84224a4 create dumpdir in beaconnode binary 2020-05-20 11:03:24 +00:00
Ștefan Talpalaru 8b4065bc19
Jenkins: support running 2 parallel jobs on the same node (#1025)
* Jenkins: support running 2 parallel jobs on the same node

* try escaping $
2020-05-14 19:34:47 +02:00
Ștefan Talpalaru 2d78523423
fix Grafana dashboards (#1006)
* fix Grafana dashboards

and refactor a couple of scripts

* start.sh: allow running standalone script
2020-05-11 18:35:53 +00:00
Jacek Sieka fb2e0ddbec
sync fixes (#1005)
* sync fixes

* fix Status message finalized info
* work around sync starting before initial status exchange
* don't fail block on deposit signature check failure (fixes #989)
* print ForkDigest and Version nicely
* dump incoming blocks
* fix crash when libp2p peer connection is closed
* update chunk size to 16 to work around missing blocks when syncing

* bump libp2p

* bump libp2p

* better deposit skip message
2020-05-11 18:08:52 +00:00
Ștefan Talpalaru a7a50824a1
more metrics (#1004) 2020-05-11 06:25:49 +00:00
Ștefan Talpalaru fa663be029
launch_local_testnet.sh: get the metrics out with "--grafana" 2020-05-06 00:02:39 +02:00
Ștefan Talpalaru 1e7a4188d2
launch_local_testnet.sh: dump logs more often 2020-05-02 00:09:04 +02:00
Ștefan Talpalaru 11a36980a7
launch_local_testnet.sh: avoid infinite waits
and tail the logs on failure
2020-05-01 20:57:12 +02:00
Ștefan Talpalaru 784c5e3d73
Jenkins: add timeouts to testnet finalisation tests (#947)
* Jenkins: add timeouts to testnet finalisation tests

- add nicer child process management to "launch_local_testnet.sh"
- correct a comment in "start.sh"

* the Jenkins worker's version of "timeout" doesn't support "-v"
2020-04-30 13:59:57 +00:00
Zahary Karadjov fada11e1e9 Address review comments
* Create a json log named "nbc.log" only when the --dev-build option
  is specified to the connect_to_testnet script.

  This option is specified for the targets "testnet0", "testnet1"
  and "schlesi-dev"
2020-04-28 13:49:30 +03:00
Zahary Karadjov 7237a370ba Implement https://github.com/status-im/nim-beacon-chain/issues/872
Please see the newly added 'schlesi-dev' Makefile target.
It demonstrates how the log level can be specified for individual topics.

Additionally, when connecting to testnets like 'schlesi' there will be
two additional log files produced in the working directory:

* json-log.txt
* text-log.txt (in the textblocks format)
2020-04-28 13:49:30 +03:00
Zahary Karadjov 80b538452e Updated the custom preset loader to the latest spec; Working makefile target for connecting to the Schlesi testnet 2020-04-27 23:22:54 +03:00
Zahary Karadjov f0b1fffefc
Fix the connect_to_testnet script 2020-04-27 00:06:22 +03:00
Zahary Karadjov 740b76d152 Spec-compliant implementation of Eth1 monitoring; Eth1-enabled local sim
BEWARE! This commit will trigger a stack overflow during local sim
2020-04-26 13:04:53 +03:00
Ștefan Talpalaru 39a893ea90
use the right preset in "make testnet{0,1}" [skip ci] (#932)
...and stop pretending to handle the preset in "connect_to_testnet.nims".
2020-04-24 17:28:03 +02:00
tersec 8a72ae89b9
fix mainnet finalization (#906)
* fix mainnet finalization and swith eth2_network_simulation to a kind of small-mainnet profile

* Fix slot reference in trace logging

* bump a couple of spec refs from v0.11.0 to v0.11.1

* bump another spec ref to v0.11.1, one more try at Jenkins test vector download CI issue

* fix other slot reference in trace logging and skip past single-block/multi-slot gaps to re-approach from ancestry side by state_transitioning, by requiring exact match on both root hash and slot for fast path

* make more precise the fast path condition

* redo logic to make uniform with BeaconChainDB; fix chronos deprecation warning

* revert not-working replacement of deprecated chronos futures `or`

* switch testnet1 to mainnet
2020-04-20 19:27:52 +02:00
Ștefan Talpalaru 8af4ee9dbc connect_to_testnet.nims: don't hide makeDeposits failure [skip ci] 2020-04-18 16:17:18 +03:00
Zahary Karadjov d7c36a677e Remove p2pd from the build recipes 2020-03-23 14:59:33 +02:00
Zahary Karadjov 0c018cb68a Mechanically remove all mentions of the daemon from the code 2020-03-23 14:59:33 +02:00
Zahary Karadjov d2b7ee27de The RPC service listens on localhost by default 2020-03-22 19:00:09 +02:00
kdeme 10d9042893 Specifically set extip to loopback address for local testnet 2020-03-11 16:05:11 +00:00
Ștefan Talpalaru 929fcf0036
eth2_network_simulation: propagate LOG_LEVEL [skip ci]
also add a "--log-level" option to launch_local_testnet.sh
2020-03-09 01:37:57 +01:00
Ștefan Talpalaru c2c570fcb0
bump submodules
plus a few small modifications
2020-02-26 01:14:20 +01:00
Ștefan Talpalaru 0b05fecedc
make SCRIPT_PARAMS="--skipGoerliKey" testnet1 2020-02-25 02:49:47 +01:00
Ștefan Talpalaru 8b8a99135f
bump vendor/nim-eth
and improve htop processes in launch_local_testnet.sh
2020-02-23 01:56:29 +01:00
Ștefan Talpalaru bd194da3d1
launch_local_testnet.sh: copy validator keys to nodes 2020-02-21 14:19:34 +01:00
Ștefan Talpalaru f146b71197
testnet finalisation testing in CI (disabled) 2020-02-19 03:26:56 +01:00
Mamy André-Ratsimbazafy 37446302b2 Use the new nim-eth2-scenarios path for the test vectors 2020-02-17 15:26:11 +00:00
Ștefan Talpalaru 06322385d9
lightweight stack traces
- plus some light test runner refactoring and some Makefile cosmetic changes
- compile tools with LOG_LEVEL=TRACE in CI
- bump a couple of submodules
2020-02-13 17:54:53 +01:00
Ștefan Talpalaru 82447e22b2
cleanup [skip ci] 2020-02-11 18:43:57 +01:00
Ștefan Talpalaru 8df447d497
Docker: optimise container beacon_node for server CPU [skip ci]
This means that we can no longer do "docker run" locally, so we compile
a local beacon_node with the same flags as the container one.
2020-02-11 18:41:25 +01:00
Ștefan Talpalaru d78a7f4a6a
Merge branch 'runtimeloglevel' into devel 2020-02-09 03:38:14 +01:00
Ștefan Talpalaru 6007b01d47
testnet: don't use -march=native when building the Docker image [skip ci]
(because we run that Docker image both locally and remotely, we can't
use the server's "-march" either)
- reduce the genesis offset to 5 minutes
2020-02-09 03:22:42 +01:00
Stefan Talpalaru 7feaa11372
make testnetX: propagate LOG_LEVEL to beacon_node runtime [skip ci]
This allows running `make LOG_LEVEL=TRACE testnet1` and having that log
level also enabled at runtime, not just at compile time.
2020-02-08 00:57:48 +01:00
Jacek Sieka 521b0ed6ba
Clean 20200205 (#729)
* beacon node code cleanup
* rudimentary error checking on mainnet monitor
* start client even when sending deposit
* work around missing block number exception
* connect to testnet with web3 url
* pretty-print digests in json
2020-02-07 08:13:38 +01:00
Stefan Talpalaru a37aa3b86d `make testnet1`: switch the local node to the Nim libp2p
so we can debug it without having to also consider Go-Nim libp2p
interoperability issues
2020-02-06 13:36:28 +01:00
Zahary Karadjov 0d9503ee49
Allow run-time switching to the TRACE log level 2020-02-03 17:06:35 +01:00
Zahary Karadjov 2cb1cc69ba Fix shell script error triggered by braces in testnet names 2020-01-29 10:10:28 +02:00
Zahary Karadjov b1c247fa4a
Change the testnet servers domain names 2020-01-28 22:28:52 +02:00
Zahary Karadjov 7781536576
Handle the option of not resetting the network properly 2020-01-22 21:11:15 +02:00
Ștefan Talpalaru 7e36ba4f4e launch_local_testnet.sh 2020-01-22 13:44:58 +00:00
Zahary Karadjov c65575d105 Improved logging related to bootstrap nodes 2020-01-21 01:26:57 +02:00
Zahary Karadjov 4848b12050 Detect and use Lighthouse's boot_enr.yaml files 2020-01-21 01:26:57 +02:00
Zahary Karadjov 095b271bd4 Implement a loader for custom const presets
The loader has been tested with the presets published by Lighthouse.
You can try connecting to one of their testnets by running:

cd nim-beacon-chain
./connect-to-testnet lighthouse/testnet0
2020-01-21 01:26:57 +02:00
Ștefan Talpalaru 13b9f61f6f
reset_testnet.sh: `make build` moved earlier [skip ci] 2020-01-13 14:48:19 +01:00
Ștefan Talpalaru 05f0950f41
cosmetic change [skip ci] 2020-01-13 14:40:40 +01:00
Ștefan Talpalaru cc1c3f9181
reset_testnet.sh: restart the nodes [skip ci]
Watchtower seems broken, so we need to restart them explicitly.
2020-01-13 13:55:09 +01:00
Ștefan Talpalaru c6f8fdab13
reset_testnet.sh: add newline [skip ci] 2020-01-13 13:37:50 +01:00
Ștefan Talpalaru 6e1b60de36
reset_testnet.sh: avoid "unbound variable" error [skip ci] 2020-01-13 13:21:22 +01:00
Ștefan Talpalaru c39ca5b5c3
reset_testnet.sh: push the Docker image right after building it [skip ci]
and let Watchtower manage container restart
2020-01-13 12:58:16 +01:00
Zahary Karadjov 6ae4070d3f Slightly safer testnet reset detection 2019-12-10 15:02:16 +02:00
Zahary Karadjov 889031453f The beacon node can be compiled with the LibP2P native back-end
This hasn't been tested yet even in local sim.
2019-12-10 15:02:16 +02:00
Ștefan Talpalaru 3d2fde0cd4 alternative prompt solution and noise reduction 2019-12-05 10:43:41 +00:00
Ștefan Talpalaru 40648b463a connect_to_testnet.nims: default to "n" on the interactive prompt [skip ci] 2019-12-05 10:43:41 +00:00
Jacek Sieka afc0686b36 save ssz dummps during processing (#471) 2019-12-03 11:32:27 +00:00
Zahary Karadjov ee2448b221 Simple validator onboarding
On your very first connection to each testnet, you'll be asked to
become a validator. Please consult our private repo for a Goerli
Eth1 private key that you can use for deposits.

Other changes:

* Added a simple wrapper ./connect-to-testnet script calling the
  nims file in the correct environment. No extension was used to
  make the command the same on Unix and Windows.

* Bumped a number of modules with fixes from this week

* `make testnet0` and `make testnet1` will no longer delete your
  existing database. This is considered a more appropriate behavior
  for testing forward sync.
2019-12-03 02:23:17 +02:00
Zahary Karadjov 7617e293a9 Make testnet1 identical to testnet0 2019-11-26 02:45:25 +02:00
Jacek Sieka fd4de5de0f
start untangling beaconnode (#589)
* Move BeaconNode type to its own file (fewer imports)
* disentangle sync protocol/request manager
* fix some old nimisms
* de-fear some logs
* simplify eth1 data production
* add stack tracing to release builds
* drop release compile flag for testnet
2019-11-25 15:36:25 +01:00
Ștefan Talpalaru e46e9b12a2 remove last traces of git-lfs usage 2019-11-22 14:15:04 +00:00
Dustin Brody 2fdfba1f34 don't need git-lfs anymore, since test vector download moved to curl from github; remove some unused OS/xz detection code from test vector download script 2019-11-21 09:50:03 +00:00
Zahary Karadjov 67991065d6
Cache the Nim build in docker; Use unique keys for the testnet bootstrap nodes 2019-11-19 02:05:46 +02:00
Ștefan Talpalaru f4273f7b89 Docker changes [skip ci]
- use a Debian Bullseye image
- use the distro's packages whenever possible
- cache as much as possible of the Git repos and tool binaries locally
- restrict Docker image pushing to specific branches; no build
  restrictions, to allow for easy development
2019-11-18 18:09:23 +00:00
Mamy André-Ratsimbazafy f98dd9b1bf Bump: only keep 0.9.1 tests, remove LFS 2019-11-14 12:48:34 +00:00
Zahary Karadjov 9af418c30d
Bugfix: the testnet nim flags were not being passed to Docker properly [skip ci] 2019-11-13 01:28:00 +00:00
Zahary Karadjov f40675509a Make all testnet env file values optional [skip CI]
Also removes some usages of SHARD_COUNT
2019-11-12 23:43:38 +00:00
Zahary Karadjov 5a6a8e9520 Finalizing setup for testnet1; Auto-restart of the docker containers after testnet resets 2019-11-12 19:08:12 +00:00
Ștefan Talpalaru 6c021f8c12
connect_to_testnet.nims: fix warning and enforce verbosity [skip ci] 2019-11-12 15:57:33 +01:00
Zahary Karadjov 88010a1cd1 Allow running the reset_testnet script outside of the Nimbus env [skip ci] 2019-11-11 23:29:36 +00:00
Zahary Karadjov f5e9b9a922 Allow running local nodes without attached validators
The number of user nodes is now specified with `USER_NODES`.

To make the instructions more stable, the "numeric id" of the user
nodes will be starting from 0 (so you can always use `run_node.sh 0`
to start a user node).

If you specify a node index above the total number of nodes, you'll
launch a node without any validators attached (this is useful for
testing the sync for example).
2019-11-11 23:29:36 +00:00
Zahary Karadjov 22591deced Safer testnet restarts; Working CLI queries for inspecting the genesis states
When the connect_to_testnet script is invoked it will first verify that
the genesis file of the testnet hasn't changed. If it has changed, any
previously created database associated with the testnet will be erased.

To facilitate this, the genesis file of each network is written to the
data folder of the beacon node. The beacon node will refuse to start if
it detects a discrepancy between the data folder and any state snapshot
specified on the command-line.

Since the testnet sharing spec requires us to use SSZ snapshots, the Json
support is now phased out. To help with the transition and to preserve the
functionality of the multinet scripts, the beacon node now supports a CLI
query command that can extract any data from the genesis state. This is
based on new developments in the SSZ navigators.
2019-11-11 23:29:36 +00:00
Zahary Karadjov 9d858eef90 Switch testnet1 to a preset that is harder to finalize 2019-11-11 23:29:36 +00:00
Zahary Karadjov 13068c6b57 Safer testnet resets
* Delete the node database on all containers when resetting a testnet
* Add a simple mechanism for switching the URL of the eth2-testnets repo
* More flexible code for validator assignments
2019-11-11 23:29:36 +00:00
Ștefan Talpalaru 0794337ba6
simplify handling of eth2-clients/eth2-testnets repo [skip ci] 2019-11-07 21:10:59 +01:00
Yuriy Glukhov 568e669b1c Fixed deposit/contract 2019-11-07 17:23:06 +00:00
Ștefan Talpalaru e8a64e4206
Dockerfile: less verbosity, faster build [skip ci] 2019-11-07 02:32:59 +01:00
Ștefan Talpalaru 35da46cc3c
Makefile: "testnetX" targets verbosity level [skip ci] 2019-11-05 23:54:52 +01:00
Zahary Karadjov 14374504cf
Finalization experiements
* Switched to FloodSub
* Testnet0 switched to the minimal preset. All validators deployed on the master node.
2019-11-05 03:13:16 +02:00
Mamy Ratsimbazafy 753d5af447
Test vectors: use tarballs, allow multiple spec versions for progressive spec updates (#514)
* update test submodule [skip ci]

* rename the process_lfs script to setup_official_tests [skip ci]

* clarify that the existing LFS is for json files [skip ci]

* Update again to use download/unpack function library

* update the test downloading script [skip ci]

* Update EF fixtures with new test path

* fix symlink order

* Fix relative:absolute symlink issue

* add symlink existence check

* setup_official_tests.sh: refactoring
2019-11-01 09:44:16 +01:00
Zahary Karadjov efa063d4bc
Safer handling of the git operations in the eth2-testnets repo [skip ci] 2019-10-31 20:07:48 +02:00
Yuriy Glukhov abbe4075fa Fixed deposit contract deployment 2019-10-30 17:23:34 +02:00
Ștefan Talpalaru 7fa7c8ee53
Merge branch 'CI' 2019-10-29 21:28:14 +01:00
Zahary Karadjov 068cc8066e
Store the testnet metadata in the official eth2-clients repo [skip ci] 2019-10-29 20:22:25 +02:00
Zahary Karadjov 6664f1689f
Use SSZ genesis files
Multi-client testing requires more portable formats, and SSZ is
much better specified than our flavour of Json.

Tools like ncli and zcli can be now used to inspect the contents
of the SSZ files.
2019-10-29 19:16:32 +02:00
Zahary Karadjov efa6d2d08e
Fix some obsolete paths and delete obsolete scripts 2019-10-29 19:16:32 +02:00
Zahary Karadjov 1ef9f458ac
Remove hard-coded variables from the manage_testnet_hosts script 2019-10-29 19:16:32 +02:00
Zahary Karadjov 3da4d4f23a
Remove some obsolete code 2019-10-29 19:16:32 +02:00
Zahary Karadjov f5fb4277b4
Testnet reset script fixes 2019-10-29 19:16:32 +02:00
Zahary Karadjov f1ea0cec32
Add support for testnets with mixed quickstart/random deposits 2019-10-29 19:16:32 +02:00
Ștefan Talpalaru 49b67f58fc
Travis: ARM64 build
Azure changes:

- use newer caching task
- add the branch name to cache keys
- install the 64-bit MinGW-w64 ourselves

Homebrew fix
2019-10-29 16:10:43 +01:00
Zahary Karadjov b244f35731
Make the deposit contract metadata file optional 2019-10-29 02:27:13 +02:00
Zahary Karadjov 734ab64da8
Unix-style command-line params for the 'deposit_contract' binary 2019-10-29 02:20:47 +02:00
Zahary Karadjov f92db449e1
nims script for connecting to testnets published in the eth2-testnets repo
See https://github.com/ethereum/eth2.0-pm/pull/93 for more info
2019-10-29 01:07:31 +02:00
Zahary Karadjov ba0037738b
Removed all code related to the old network metadata files
Also switched to a more "standard" naming convention for the
command-line parameters.
2019-10-29 01:04:52 +02:00
Yuriy Glukhov 9d3889cbab
WIP Goerli testnet 2019-10-28 15:51:17 +02:00