Skip to content

Commit

Permalink
refactor: validator state management refactor (#1274)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-o authored Aug 23, 2024
1 parent eab7a05 commit 9835380
Show file tree
Hide file tree
Showing 10 changed files with 531 additions and 573 deletions.
Empty file added .iex.exs
Empty file.
2 changes: 1 addition & 1 deletion config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ if keystore_pass_dir != nil and not File.dir?(keystore_pass_dir) do
System.halt(2)
end

config :lambda_ethereum_consensus, LambdaEthereumConsensus.Validator.Setup,
config :lambda_ethereum_consensus, LambdaEthereumConsensus.ValidatorSet,
keystore_dir: keystore_dir,
keystore_pass_dir: keystore_pass_dir

Expand Down
6 changes: 3 additions & 3 deletions lib/lambda_ethereum_consensus/beacon/beacon_node.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do
alias LambdaEthereumConsensus.ForkChoice
alias LambdaEthereumConsensus.StateTransition.Cache
alias LambdaEthereumConsensus.Store.BlockStates
alias LambdaEthereumConsensus.Validator
alias LambdaEthereumConsensus.ValidatorSet
alias Types.BeaconState

def start_link(opts) do
Expand All @@ -27,13 +27,13 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do

store = ForkChoice.init_store(store, time)

validators = Validator.Setup.init(store.head_slot, store.head_root)
validator_set = ValidatorSet.init(store.head_slot, store.head_root)

StoreSetup.get_deposit_snapshot!()
|> init_execution_chain(store.head_root)

libp2p_args =
[genesis_time: store.genesis_time, validators: validators, store: store] ++
[genesis_time: store.genesis_time, validator_set: validator_set, store: store] ++
get_libp2p_args()

children =
Expand Down
Loading

0 comments on commit 9835380

Please sign in to comment.