Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: validator state management refactor #1274

Merged
merged 52 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
b6c2bed
This are the minimum changes to reproduce the invalid signature error
rodrigo-o Jul 23, 2024
c85151e
Moved notify_tick to libp2p to be sure the issues is just with new bl…
rodrigo-o Jul 23, 2024
11c9b72
Just deactivated attestation publish to check the node running withou…
rodrigo-o Jul 23, 2024
3c5961f
Finally fixing the issue
rodrigo-o Jul 26, 2024
b8623ee
Make the clock a ticker
rodrigo-o Jul 29, 2024
9985081
Remove unneded diffs
rodrigo-o Jul 30, 2024
b5c75b4
Merge branch 'main' into validator-manager-genserver-removal
rodrigo-o Jul 30, 2024
cb99b04
Format and genesis_time addition to libp2p starts on tests
rodrigo-o Jul 30, 2024
e3d7327
ValidatorsManager Genserver removal
rodrigo-o Jul 30, 2024
3802005
renamed validator manager and clock to Validator.Setup and Ticker
rodrigo-o Jul 30, 2024
2de70bf
Small fixe after renaming the ticker
rodrigo-o Jul 30, 2024
ff42301
Simplified the Ticker and added dialyzer to the 'make lint' task
rodrigo-o Jul 31, 2024
46efa3a
Fixed some dialyzer issues removing unused functions
rodrigo-o Jul 31, 2024
55c5d90
Simplify a diff
rodrigo-o Jul 31, 2024
9eed365
Added an async subscribe to topic to avoid issues in test
rodrigo-o Jul 31, 2024
5721ccf
Remove unneded diffs
rodrigo-o Jul 31, 2024
170db89
Merge branch 'main' into validator-manager-genserver-removal
rodrigo-o Jul 31, 2024
b1e9a3e
Ticker removal
rodrigo-o Aug 1, 2024
b9423e1
Small fix regarding an info message that should be debug and a unused…
rodrigo-o Aug 1, 2024
2055e78
Small cleanup of the Validator.Setup
rodrigo-o Aug 2, 2024
e7faf69
Merge branch 'main' into validator-state-management-refactor
rodrigo-o Aug 5, 2024
9a3b4c3
Created the new ValidatorPool and moved everything to work with it in…
rodrigo-o Aug 7, 2024
6046c52
ValidatorSet rename + started moving duties to all validators
rodrigo-o Aug 7, 2024
cb0b580
Calculate proposers for the whole epoch
rodrigo-o Aug 8, 2024
69150f2
Initial attesters_for_epoch implementation working
rodrigo-o Aug 8, 2024
a604213
Notify Head now working from the ValidatorSet instead of Validators
rodrigo-o Aug 9, 2024
cfc5efe
Hybrid version working with new_head handled at the ValidatorSet
rodrigo-o Aug 13, 2024
616f892
Removed slot and root from Validator and started cleaning up the Vali…
rodrigo-o Aug 13, 2024
0c85ce1
Merge branch 'main' into validator-state-management-refactor
rodrigo-o Aug 13, 2024
cde101c
Fixed how keystore functions handle the validator set
rodrigo-o Aug 13, 2024
654b5ea
Formatted and fixed all lint and dialyzer issues
rodrigo-o Aug 13, 2024
37a593d
Fix some warnings from compile and credo
rodrigo-o Aug 13, 2024
3abb064
Merge branch 'main' into validator-state-management-refactor
rodrigo-o Aug 14, 2024
c99729f
handle_tick completely moved to ValidatorSet
rodrigo-o Aug 14, 2024
5331a63
Epoch 0 completely working from ValidatorSet
rodrigo-o Aug 14, 2024
c030f1b
ValidatorSet and Validator cleanup
rodrigo-o Aug 15, 2024
8c1d818
Initial Duties cleanup
rodrigo-o Aug 15, 2024
35d2c51
Merge branch 'main' into validator-state-management-refactor
rodrigo-o Aug 15, 2024
e17a224
Further clean duties
rodrigo-o Aug 15, 2024
0987fc2
Quick fix regarding attesters calculation
rodrigo-o Aug 15, 2024
18f0564
Simplified comute_attesters_for_epoch and removed slot from duties
rodrigo-o Aug 15, 2024
d9e8d21
Merge branch 'main' into validator-state-management-refactor
rodrigo-o Aug 15, 2024
14ce12f
Refactored Duties functions out of the ValidatorSet
rodrigo-o Aug 16, 2024
7675b4b
Calculate next epoch duties ahead of time
rodrigo-o Aug 16, 2024
2d4690d
Merge branch 'main' into validator-state-management-refactor
rodrigo-o Aug 16, 2024
3defc24
Cleaned up logging
rodrigo-o Aug 16, 2024
5ff062b
Merge branch 'main' into validator-state-management-refactor
rodrigo-o Aug 16, 2024
666ff39
Added a comment from the previous implementation
rodrigo-o Aug 16, 2024
9a2d190
Merge branch 'main' into validator-state-management-refactor
rodrigo-o Aug 22, 2024
803941a
Added comments about should_aggregate? and use the same beacon for Va…
rodrigo-o Aug 22, 2024
ec987de
renamed ValidatorSet functions to maybe_ indicating they depend on du…
rodrigo-o Aug 22, 2024
2e9595f
Add maybe_prefetch_committees and fix and issue when there were no va…
rodrigo-o Aug 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading