`validator_duties`->`beacon_validators` (#5333)
This PR renames the existing `validator_duties` to `beacon_validators` and in doing so, names validators running inside the beacon node process "beacon validators" while those running the VC can be referred to as "client validators" to disambiguate the two. The existing `validator_duties` instead takes on a new responsibility: as a home for logic shared between beacon and client validators - ie code that provides consistency in implementation and behavior between the two modes of operation. Not only does this simplify reasoning about where to put code -it also reduces the number of dependencies the validator client has from ~5000 to ~3000 modules (!) according to `nim genDepend` significantly reducing compile times.
This commit is contained in:
parent
d0314f0942
commit
a5151bc546
|
@ -14,7 +14,7 @@ import
|
|||
|
||||
from times import Time, getTime, fromUnix, `<`, `-`, inNanoseconds
|
||||
|
||||
export timer.Duration, Moment, now
|
||||
export timer.Duration, Moment, now, beacon_time
|
||||
|
||||
type
|
||||
BeaconClock* = object
|
||||
|
|
|
@ -258,10 +258,10 @@ proc updateHead*(self: var ConsensusManager, wallSlot: Slot) =
|
|||
self.updateHead(newHead.blck)
|
||||
|
||||
func isSynced(dag: ChainDAGRef, wallSlot: Slot): bool =
|
||||
# This is a tweaked version of the validator_duties isSynced. TODO, refactor
|
||||
# This is a tweaked version of the beacon_validators isSynced. TODO, refactor
|
||||
# that one so this becomes the default version, with the same information to
|
||||
# work with. For the head slot, use the DAG head regardless of what head the
|
||||
# proposer forkchoiceUpdated is using, because by the validator_duties might
|
||||
# proposer forkchoiceUpdated is using, because by the beacon_validators might
|
||||
# be ready to actually propose, it's going to do so from the DAG head. Given
|
||||
# the defaultSyncHorizon, it will start triggering in time so that potential
|
||||
# discrepancies between the head here, and the head the DAG has (which might
|
||||
|
|
|
@ -19,7 +19,7 @@ import
|
|||
./rpc/[rest_api, state_ttl_cache],
|
||||
./spec/datatypes/[altair, bellatrix, phase0],
|
||||
./spec/[deposit_snapshots, engine_authentication, weak_subjectivity],
|
||||
./validators/[keystore_management, validator_duties],
|
||||
./validators/[keystore_management, beacon_validators],
|
||||
"."/[
|
||||
beacon_node, beacon_node_light_client, deposits,
|
||||
nimbus_binary_common, statusbar, trusted_node_sync, wallets]
|
||||
|
|
|
@ -14,7 +14,7 @@ import
|
|||
libp2p/protocols/pubsub/pubsubpeer,
|
||||
./rest_utils,
|
||||
../el/el_manager,
|
||||
../validators/validator_duties,
|
||||
../validators/beacon_validators,
|
||||
../spec/[forks, beacon_time],
|
||||
../beacon_node, ../nimbus_binary_common
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import std/[options, macros],
|
|||
stew/byteutils, presto,
|
||||
../spec/[forks],
|
||||
../spec/eth2_apis/[rest_types, eth2_rest_serialization, rest_common],
|
||||
../validators/validator_duties,
|
||||
../validators/beacon_validators,
|
||||
../consensus_object_pools/blockchain_dag,
|
||||
../beacon_node,
|
||||
"."/[rest_constants, state_ttl_cache]
|
||||
|
|
|
@ -10,7 +10,7 @@ import ".."/[beacon_chain_db, beacon_node],
|
|||
".."/networking/eth2_network,
|
||||
".."/consensus_object_pools/[blockchain_dag, spec_cache,
|
||||
attestation_pool, sync_committee_msg_pool],
|
||||
".."/validators/validator_duties,
|
||||
".."/validators/beacon_validators,
|
||||
".."/spec/[beaconstate, forks, network],
|
||||
".."/spec/datatypes/[phase0, altair],
|
||||
"."/[rest_utils, state_ttl_cache]
|
||||
|
|
|
@ -853,7 +853,7 @@ func init*(t: typedesc[Web3SignerRequest], genesisForkVersion: Version,
|
|||
signingRoot: signingRoot,
|
||||
deposit: Web3SignerDepositData(
|
||||
pubkey: data.pubkey,
|
||||
withdrawalCredentials: data.withdrawalCredentials,
|
||||
withdrawalCredentials: data.withdrawal_credentials,
|
||||
genesisForkVersion: genesisForkVersion,
|
||||
amount: data.amount
|
||||
)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue