c5c7476518
[EIP-3030]: https://eips.ethereum.org/EIPS/eip-3030 [Web3Signer]: https://consensys.github.io/web3signer/web3signer-eth2.html ## Issue Addressed Resolves #2498 ## Proposed Changes Allows the VC to call out to a [Web3Signer] remote signer to obtain signatures. ## Additional Info ### Making Signing Functions `async` To allow remote signing, I needed to make all the signing functions `async`. This caused a bit of noise where I had to convert iterators into `for` loops. In `duties_service.rs` there was a particularly tricky case where we couldn't hold a write-lock across an `await`, so I had to first take a read-lock, then grab a write-lock. ### Move Signing from Core Executor Whilst implementing this feature, I noticed that we signing was happening on the core tokio executor. I suspect this was causing the executor to temporarily lock and occasionally trigger some HTTP timeouts (and potentially SQL pool timeouts, but I can't verify this). Since moving all signing into blocking tokio tasks, I noticed a distinct drop in the "atttestations_http_get" metric on a Prater node: ![http_get_times](https://user-images.githubusercontent.com/6660660/132143737-82fd3836-2e7e-445b-a143-cb347783baad.png) I think this graph indicates that freeing the core executor allows the VC to operate more smoothly. ### Refactor TaskExecutor I noticed that the `TaskExecutor::spawn_blocking_handle` function would fail to spawn tasks if it were unable to obtain handles to some metrics (this can happen if the same metric is defined twice). It seemed that a more sensible approach would be to keep spawning tasks, but without metrics. To that end, I refactored the function so that it would still function without metrics. There are no other changes made. ## TODO - [x] Restructure to support multiple signing methods. - [x] Add calls to remote signer from VC. - [x] Documentation - [x] Test all endpoints - [x] Test HTTPS certificate - [x] Allow adding remote signer validators via the API - [x] Add Altair support via [21.8.1-rc1](https://github.com/ConsenSys/web3signer/releases/tag/21.8.1-rc1) - [x] Create issue to start using latest version of web3signer. (See #2570) ## Notes - ~~Web3Signer doesn't yet support the Altair fork for Prater. See https://github.com/ConsenSys/web3signer/issues/423.~~ - ~~There is not yet a release of Web3Signer which supports Altair blocks. See https://github.com/ConsenSys/web3signer/issues/391.~~
84 lines
1.9 KiB
TOML
84 lines
1.9 KiB
TOML
[workspace]
|
|
members = [
|
|
"account_manager",
|
|
|
|
"beacon_node",
|
|
"beacon_node/beacon_chain",
|
|
"beacon_node/client",
|
|
"beacon_node/eth1",
|
|
"beacon_node/eth2_libp2p",
|
|
"beacon_node/http_api",
|
|
"beacon_node/http_metrics",
|
|
"beacon_node/network",
|
|
"beacon_node/store",
|
|
"beacon_node/timer",
|
|
|
|
"boot_node",
|
|
|
|
"common/account_utils",
|
|
"common/clap_utils",
|
|
"common/compare_fields",
|
|
"common/compare_fields_derive",
|
|
"common/deposit_contract",
|
|
"common/directory",
|
|
"common/eth2",
|
|
"common/eth2_config",
|
|
"common/eth2_interop_keypairs",
|
|
"common/eth2_network_config",
|
|
"common/eth2_wallet_manager",
|
|
"common/hashset_delay",
|
|
"common/lighthouse_metrics",
|
|
"common/lighthouse_version",
|
|
"common/lockfile",
|
|
"common/logging",
|
|
"common/lru_cache",
|
|
"common/malloc_utils",
|
|
"common/sensitive_url",
|
|
"common/slot_clock",
|
|
"common/task_executor",
|
|
"common/target_check",
|
|
"common/test_random_derive",
|
|
"common/validator_dir",
|
|
"common/warp_utils",
|
|
"common/fallback",
|
|
"common/monitoring_api",
|
|
|
|
"consensus/cached_tree_hash",
|
|
"consensus/int_to_bytes",
|
|
"consensus/fork_choice",
|
|
"consensus/proto_array",
|
|
"consensus/safe_arith",
|
|
"consensus/ssz",
|
|
"consensus/ssz_derive",
|
|
"consensus/ssz_types",
|
|
"consensus/serde_utils",
|
|
"consensus/state_processing",
|
|
"consensus/swap_or_not_shuffle",
|
|
"consensus/tree_hash",
|
|
"consensus/tree_hash_derive",
|
|
|
|
"crypto/bls",
|
|
"crypto/eth2_hashing",
|
|
"crypto/eth2_key_derivation",
|
|
"crypto/eth2_keystore",
|
|
"crypto/eth2_wallet",
|
|
|
|
"lcli",
|
|
|
|
"lighthouse",
|
|
"lighthouse/environment",
|
|
|
|
"slasher",
|
|
"slasher/service",
|
|
|
|
"testing/ef_tests",
|
|
"testing/eth1_test_rig",
|
|
"testing/node_test_rig",
|
|
"testing/simulator",
|
|
"testing/state_transition_vectors",
|
|
"testing/web3signer_tests",
|
|
|
|
"validator_client",
|
|
"validator_client/slashing_protection",
|
|
]
|