210 Commits

Author SHA1 Message Date
Zahary Karadjov
57811dce89 Don't log unwanted lines in beacon_node --help 2020-02-18 12:53:49 +02:00
Zahary Karadjov
b2d5aba749 Advertise the TCP port of the bootstrap node properly 2020-02-18 12:53:49 +02:00
Zahary Karadjov
2c814db750 Temporary switch to supporting only ENR bootstrap addresses
Turns out the DiscV5 code relies heavily on the presence of ENR
records at the moment, so we cannot drive it with ENodes. @kdeme
is working on refactoring that will relax these requirements.
2020-02-18 12:53:49 +02:00
Zahary Karadjov
7f395e554a WIP Working local network sim with discovery
* The bootstrap_nodes.txt file in the node's data dir is now optional
* Log more data on start-up
* Use the latest ENR APIs
* Fix simulation build errors
2020-02-18 12:53:49 +02:00
Zahary Karadjov
ee7c2c9dff Unify the bootstrap nodes handling code
We no longer discriminate between ENR, MultiAddress or ENode
bootstrap records (all of them are remapped to ENodes).

The discovery loop will stochastically try to reconnect to
accidentally disconnected nodes.
2020-02-18 12:53:49 +02:00
Dmitriy Ryajov
b39f36b49b use floodsub instead of gossipsub 2020-02-05 17:20:04 +01:00
Jacek Sieka
270c25c8b8
drop rlpx support (#679) 2020-01-24 09:32:52 +01:00
Zahary Karadjov
52878405b7 Integrate Discovery V5 and support ENR bootstrap records 2020-01-21 01:26:57 +02:00
Zahary Karadjov
7e356b3fa6 Restore compilation with trace-level logging; Fixes #642 2020-01-21 01:26:57 +02:00
Zahary Karadjov
10e6d4842f Local sim finalizes with native LibP2P 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
Zahary Karadjov
1d8bfd8c0d Allow overriding the bootstrap node in run_node.sh 2019-11-26 02:45:25 +02:00
Dustin Brody
6f87c8fd89 verify that state_sim is justifying and finalizing; fix 3 more warnings; rename crosslink_committee_cache to beacon_committee_cache; fix O(n^2) usage of get_base_reward(...) 2019-11-18 17:35:58 +00:00
cheatfate
6e8a518077 Fix getPersistentNetIdentity() do not use daemon anymore.
Fix change PeerInfo to MultiAddress.
2019-11-12 23:43:38 +00:00
Zahary Karadjov
07f0bd9378
Log the executable version at start-up [skip ci] 2019-11-12 00:05:59 +00:00
Ștefan Talpalaru
6a1d287652 beacon_node: print name, version and Git revision [skip ci] (#527) 2019-11-08 10:33:16 +00:00
Yuriy Glukhov
9b39c792d0 Revert f79f9deeb370af4d35d59969cec087f994cc8756 a0fbf5464a50430f99d8868c9696ea3f91781f19 94a9c51d8ad646e76bfab74d7fc1da5a29d10db7 (#523) 2019-11-06 16:56:54 +02:00
cheatfate
94a9c51d8a
Initial commit. 2019-11-06 16:41:23 +02:00
Ștefan Talpalaru
e2b3f0dadb
announcedAddresses: fix logic error 2019-11-05 23:56:10 +01:00
Ștefan Talpalaru
03f57aab43
bump vendor/nim-libp2p 2019-11-05 23:31:01 +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
Dustin Brody
63e621c27d
initial 0.9.0 spec sync (#509)
* rename compute_epoch_of_slot(...) to compute_epoch_at_slot(...)

* remove some unnecessary imports; remove some crosslink-related code and tests; complete renaming of compute_epoch_of_slot(...) to compute_epoch_at_slot(...)

* rm more transfer-related code and tests; rm more unnecessary strutils imports

* rm remaining unused imports

* remove useless get_empty_per_epoch_cache(...)/compute_start_slot_of_epoch(...) calls

* rename compute_start_slot_of_epoch(...) to compute_start_slot_at_epoch(...)

* rename ACTIVATION_EXIT_DELAY to MAX_SEED_LOOKAHEAD

* update domain types to 0.9.0

* mark AttesterSlashing, IndexedAttestation, AttestationDataAndCustodyBit, DepositData, BeaconBlockHeader, Fork, integer_squareroot(...), and process_voluntary_exit(...) as 0.9.0

* mark increase_balance(...), decrease_balance(...), get_block_root(...), CheckPoint, Deposit, PendingAttestation, HistoricalBatch, is_active_validator(...), and is_slashable_attestation_data(...) as 0.9.0

* mark compute_activation_exit_epoch(...), bls_verify(...), Validator, get_active_validator_indices(...), get_current_epoch(...), get_total_active_balance(...), and get_previous_epoch(...) as 0.9.0

* mark get_block_root_at_slot(...), ProposerSlashing, get_domain(...), VoluntaryExit, mainnet preset Gwei values, minimal preset max operations, process_block_header(...), and is_slashable_validator(...) as 0.9.0

* mark makeWithdrawalCredentials(...), get_validator_churn_limit(...), get_total_balance(...), is_valid_indexed_attestation(...), bls_aggregate_pubkeys(...), initial genesis value/constants, Attestation, get_randao_mix(...), mainnet preset max operations per block constants, minimal preset Gwei values and time parameters, process_eth1_data(...), get_shuffled_seq(...), compute_committee(...), and process_slots(...) as 0.9.0; partially update get_indexed_attestation(...) to 0.9.0 by removing crosslink refs and associated tests

* mark initiate_validator_exit(...), process_registry_updates(...), BeaconBlock, Eth1Data, compute_domain(...), process_randao(...), process_attester_slashing(...), get_base_reward(...), and process_slot(...) as 0.9.0
2019-10-30 19:41:19 +00: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
Zahary Karadjov
fb220ee600
Preparations for introducing the native libp2p back-end 2019-10-28 15:00:25 +02:00
Zahary Karadjov
dfe3a6f0fb
Switch to Nim v1.0.2 2019-10-28 15:00:25 +02:00
Zahary Karadjov
a6f65cd37e Add lower-level metrics for the number of gossipsub messages sent/received 2019-10-26 16:37:36 +03:00
Jacek Sieka
66f03f491f
log raw incoming gossip data 2019-09-28 21:20:09 +02:00
Zahary Karadjov
5152c42c8e
Don't crash hard on P2P daemon errors during the initial connection 2019-09-27 18:58:51 +03:00
Jacek Sieka
e470bbb52e
don't sign libp2p messages 2019-09-10 10:13:02 -04:00
Zahary Karadjov
c3adac44f2
Use Secp256k1 keys in accordance to the interop spec 2019-09-10 10:11:56 -04:00
Zahary Karadjov
2bbfa8c877 Changes related to the new ETH interop spec
* Hello is no longer a handshake message
  (all handshakes related code was deleted for clarity)

* Deal with the single-parameter inlining defined in the new spec
2019-09-10 09:49:54 -04:00
Jacek Sieka
9cfbdb5e16 more interop fixes
* fix eth1 interop block hash
* update initialize_beacon_state_from_eth1 to 0.8.3
2019-09-02 22:14:18 +03:00
Zahary Karadjov
5ce50b3aca
Implement the latest networking spec
https://github.com/ethereum/eth2.0-specs/pull/1328
2019-08-07 05:22:28 +03:00
Ștefan Talpalaru
2768a3e89e
Ctrl+C handling and:
- added a "quitProc" for shutting down the p2pd process, after seeing it
  survive an unhandled exception (this required a global var for the
  DaemonApi instance)
- Makefile testnet0/1 targets now depend on the "p2pd" binary
- prefixed the testnet command line in the build script message with
  "../../env.sh" so it can find the superproject's "p2pd"
2019-07-11 04:36:07 +02:00
Jacek Sieka
b9e62a1f6c
std_shims -> stew 2019-07-07 11:53:58 +02:00
Zahary Karadjov
0d37ed7a2a
Fix a problem for the bootstrap nodes
connectToNetwork is executed for the bootstrap node as well, but
it should not quit when peers are not yet present.
2019-06-28 14:55:21 +03:00
Jacek Sieka
b0d27b9acc
disambiguate IPPROTO_TCP 2019-06-27 14:52:32 +02:00
Zahary Karadjov
69f3095fac Remove temp debugging code; Quit if you fail to connect to the network 2019-06-24 19:38:19 +03:00
Zahary Karadjov
31baa77742 Restore building with chronicles_sinks=json 2019-06-24 19:38:19 +03:00
Zahary Karadjov
e228c2dbcb
Implement the even/odd request ID scheme; Handle more edge cases; Break the cyclic imports 2019-06-24 05:34:22 +03:00
Zahary Karadjov
96e2a02faf
Respect the port configuration and NAT setup when using LibP2P 2019-06-24 05:34:22 +03:00
Zahary Karadjov
15fdf78d6a
[LibP2P] Persistent network key for the bootstrap node 2019-06-24 05:34:22 +03:00
Zahary Karadjov
12e9367f78
Improved error handling; Simple test case for connecting 2 peers 2019-06-24 05:34:22 +03:00
Zahary Karadjov
877b22cfb8
Share more code between the libp2p backends 2019-06-24 05:34:21 +03:00
Zahary Karadjov
87601a5eae
Share more code between the libp2p backends 2019-06-24 05:34:21 +03:00
Zahary Karadjov
3b166be166
Restore compilation in RLPx mode; More libp2p progress 2019-06-24 05:34:21 +03:00
Zahary Karadjov
f4a96bc3f3
[WIP] Restore the Lib2P2 builds and implement the latest wire spec
Depends on https://github.com/status-im/nim-eth/pull/54
2019-06-24 05:34:21 +03:00
Ștefan Talpalaru
53012b9a25
NAT traversal 2019-04-18 15:48:17 +02:00
Zahary Karadjov
6d4470a8c8 Simplified gossipsub.broadcast further 2019-03-28 16:54:50 +02:00
Zahary Karadjov
dd72218f48 Integrate traceAsyncErrors
You'll need the latest version of nim-eth
2019-03-28 16:54:50 +02:00