Commit Graph

39 Commits

Author SHA1 Message Date
Jacek Sieka 0dbc7162ac startup cleanup
* fix several memory leaks due to temporaries not being reset during
init
* avoid massive main() function with lots of stuff in it
* disable nim-prompt (unused)
* reuse validator pool instance in eth2_processor
* style cleanup
2021-02-22 23:32:54 +02:00
Zahary Karadjov e0df027c11
Avoid a possible nil dereference 2021-02-04 17:24:34 +02:00
Zahary Karadjov 1394ef37fb
Tentative fix for the freezing Eth1 monitor activity 2021-02-04 17:01:47 +02:00
Zahary Karadjov fa99c3b417 Fix #2261
Also bumps Confutils to allow setting the hidden --web3-mode param
(to allow testing the eth1 syncing without validators)
2021-01-30 01:32:20 +02:00
Kim De Mey b99a6f3dfd
Warn on Eth1 chain not synced (#2221) 2021-01-11 10:23:09 +01:00
Zahary Karadjov 338428cbd7 Add Eth1 deposits simulation to block_sim 2021-01-04 13:22:00 +02:00
Zahary Karadjov c56677867b
Remove some accidentally left debugging changes 2020-12-16 01:09:19 +02:00
Zahary Karadjov 8ebf9c30b0
More complete reset of the web3 provider on each failure; Fix #2184 2020-12-16 00:21:11 +02:00
Zahary Karadjov 57fdd87a24 Log Eth1 request failures more precisely 2020-12-10 02:54:58 +02:00
Zahary Karadjov 7979fb79d3 Add some useful Eth1 monitor metrics 2020-12-10 02:54:58 +02:00
Zahary Karadjov 983b3c9fbf Add a 'we3 test' command for verifying the compatibility of a web3 provider 2020-12-10 02:54:58 +02:00
Zahary Karadjov 027d2547cd Fix a block proposal issue caused by incorrect merkle proofs
The key change here is that `addChunksAndGenMerkleProofs` is called
with all pending deposits instead of just the deposits included in
the block. The later was effectively producing merkle proofs against
a different root.
2020-12-03 11:25:52 +02:00
Zahary Karadjov 92655f936a Add backoff for the deposit logs requests as well; More debug logs 2020-12-02 01:43:54 +02:00
Zahary Karadjov 7225a6d6ed Retry all web3 requests up to 3 times with exponential backoff 2020-12-02 01:43:54 +02:00
Zahary Karadjov 2fd71a9aac Reduce the rate of requesting deposits to lower the risk of triggering the Infura rate limits 2020-12-01 15:38:50 +02:00
Zahary Karadjov 4eaf29875a Less risk for Eth1-induced delays in block proposal 2020-12-01 15:38:50 +02:00
Zahary Karadjov 151d116f02
Fix off-by-one error in Eth1 pruning 2020-11-25 01:51:17 +02:00
Zahary Karadjov 594ef713a0
Increase the web3 timeouts 2020-11-24 23:28:20 +02:00
zah 372c9b798c
Fix the corrupted database state on Pyrmont nodes; Add mainnet genesis (#2056)
* Handle some web3 timeouts better

* Add support for developer .env files

* Eth1 improvements; Mainnet genesis state

Notable changes:

* The deposits table have been removed from the database. The client
  will no longer process all deposits on start-up.

* The network metadata now includes a "state snapshot" of the deposit
  contract. This allows the client to skip syncing deposits made prior
  to the snapshot (i.e. genesis). Suitable metadata added for Pyrmont
  and Mainnet.

* The Eth1 monitor won't be started unless there are validators attached
  to the node.

* The genesis detection code is now optional and disabled by default

* Bugfix: The client should not produce blocks that will fail validation
  when it hasn't downloaded the latest deposits yet

* Bugfix: Work around the database corruption affecting Pyrmont nodes

* Remove metadata for Toledo and Medalla
2020-11-24 22:21:47 +01:00
Zahary Karadjov 316a19af5f Address review comments 2020-11-20 17:13:51 +02:00
Zahary Karadjov d232f16b40 Add more eth1-related logging 2020-11-20 17:13:51 +02:00
Zahary Karadjov e22248bca1 Tentative fix for the Pyrmont Eth1 voting issue 2020-11-20 17:13:51 +02:00
tersec 1d7fb2ed0c
remove {.inline.} pragmas (#2033)
* remove {.inline.} pragmas

* re-add inline on bitseqs functions and tweak inlining threshold

* remove macOS/LLVM inlining setting; revert non-init/module-local/tests inline pragma removal
2020-11-20 11:00:22 +01:00
Zahary Karadjov 883e18da81
Hotfix: don't crash on web3 provider errors during initialization 2020-11-20 10:26:47 +02:00
Zahary Karadjov 11e1a9e8e8
A hacky work-around for a web3 issue that may cause the client to go into a loop of failing requests 2020-11-18 00:27:21 +02:00
Zahary Karadjov ebfacf597c
Review and fix some usages of Future.cancel; Bump Chronos 2020-11-18 00:27:21 +02:00
Zahary Karadjov b022dc4d1f Use O(n) algorithm in initialize_beacon_state_from_eth1; Avoid unnecessary merkle proofs generation 2020-11-15 21:40:40 +02:00
Zahary Karadjov 8012102704 Bugfix: the client can miss the genesis event in the absence of new deposits 2020-11-15 21:40:40 +02:00
Zahary Karadjov 80ca7a2d9f Implement #1768 2020-11-12 22:29:43 +02:00
Zahary Karadjov 17d35e1fd9 Allow the node to start when it fails to initialize the Eth1 monitor
* Avoid hangs when wss:// is specified for a non-secure HTTP server
* Produce an ERROR when the web3 provider is unsupported, but still launch the node
2020-11-12 22:29:43 +02:00
Zahary Karadjov 5e45e7429e Rewrite all HTTP(S) web3 URLs to WebSocket URls 2020-11-12 22:29:43 +02:00
Zahary Karadjov 389c11743a
Review TODO items and self-assign the most important ones 2020-11-10 20:41:04 +02:00
tersec 271df8b604
bump 1.0.0rc-0 spec refs to 1.0.0 (#1974) 2020-11-09 14:18:55 +00:00
Zahary Karadjov 4a710252d8 Check the web3 provider for network compatibility 2020-11-07 01:25:02 +02:00
Zahary Karadjov 24f8b7d483
[skip ci] Clean up some accidentally commited code 2020-11-06 11:53:44 +02:00
Zahary Karadjov a8a66fe3f6 Fix #1784; Handle Infura HTTPS URLs 2020-11-06 11:15:32 +02:00
Zahary Karadjov f596a24c4c Mainnet deposit contract monitoring 2020-11-06 11:15:32 +02:00
Zahary Karadjov 7823c25ba8
Hotfix for a failing assert during block production 2020-11-04 11:06:58 +02:00
Zahary Karadjov 6ee80651c7 Rename mainchain_monitor to eth1_monitor 2020-11-03 23:23:10 +02:00