Skip to content

Commit

Permalink
Fix update process voluntary exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpaulucci committed Mar 12, 2024
1 parent 8b38e92 commit 79f98a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion lib/lambda_ethereum_consensus/state_transition/operations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,15 @@ defmodule LambdaEthereumConsensus.StateTransition.Operations do
current_epoch < validator.activation_epoch + ChainSpec.get("SHARD_COMMITTEE_PERIOD") ->
{:error, "validator cannot exit yet"}

not (Accessors.get_domain(state, Constants.domain_voluntary_exit(), voluntary_exit.epoch)
not ((if HardForkAliasInjection.deneb?() do
Misc.compute_domain(
Constants.domain_voluntary_exit(),
fork_version: ChainSpec.get("CAPELLA_FORK_VERSION"),
genesis_validators_root: state.genesis_validators_root
)
else
Accessors.get_domain(state, Constants.domain_voluntary_exit(), voluntary_exit.epoch)
end)
|> then(&Misc.compute_signing_root(voluntary_exit, &1))
|> then(&Bls.valid?(validator.pubkey, &1, signed_voluntary_exit.signature))) ->
{:error, "invalid signature"}
Expand Down
2 changes: 1 addition & 1 deletion test/spec/runners/operations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ defmodule OperationsTestRunner do
# "block_header",
# "deposit",
# "proposer_slashing",
"voluntary_exit"
# "voluntary_exit"
# "sync_aggregate",
# "execution_payload",
# "withdrawals",
Expand Down

0 comments on commit 79f98a7

Please sign in to comment.