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

feat: electra slashing, proposer_index & compute_sync_committees changes #1417

Merged
merged 5 commits into from
Apr 8, 2025

Conversation

LeanSerra
Copy link
Contributor

@LeanSerra LeanSerra commented Apr 3, 2025

Motivation

Fix spec tests related to slashings

Description

  • Implement the changes in slashing penalties made in EIP-7251
  • Some test from electra/random.exs were failing with "proposer index is incorrect", implemented the changes to compute_proposer_index from here. The tests from random are still failing with "expected withdrawals don't match the state withdrawals in length" but this fixed 19 other tests
  • The tests from sync were also failing because of changes to compute_sync_committees from here
  • Some tests were failing intermittently because of the cleanup of an environment variable that was not being done if the tests failed, there was a TODO that is now fixed

Fixed spec tests

test/generated/mainnet/electra/epoch_processing.exs:833
test/generated/mainnet/electra/epoch_processing.exs:835
test/generated/mainnet/electra/epoch_processing.exs:845
test/generated/mainnet/electra/epoch_processing.exs:847
test/generated/mainnet/electra/epoch_processing.exs:851
test/generated/mainnet/electra/epoch_processing.exs:853
test/generated/mainnet/electra/fork_choice.exs:101
test/generated/mainnet/electra/fork_choice.exs:143
test/generated/mainnet/electra/fork_choice.exs:149
test/generated/mainnet/electra/fork_choice.exs:155
test/generated/mainnet/electra/fork_choice.exs:157
test/generated/mainnet/electra/fork_choice.exs:161
test/generated/mainnet/electra/fork_choice.exs:167
test/generated/mainnet/electra/fork_choice.exs:23
test/generated/mainnet/electra/fork_choice.exs:25
test/generated/mainnet/electra/fork_choice.exs:29
test/generated/mainnet/electra/fork_choice.exs:35
test/generated/mainnet/electra/fork_choice.exs:41
test/generated/mainnet/electra/fork_choice.exs:47
test/generated/mainnet/electra/fork_choice.exs:53
test/generated/mainnet/electra/fork_choice.exs:59
test/generated/mainnet/electra/fork_choice.exs:71
test/generated/mainnet/electra/fork_choice.exs:77
test/generated/mainnet/electra/fork_choice.exs:83
test/generated/mainnet/electra/fork_choice.exs:89
test/generated/mainnet/electra/fork_choice.exs:91
test/generated/mainnet/electra/fork_choice.exs:95
test/generated/mainnet/electra/sync.exs:23
test/generated/mainnet/electra/sync.exs:25
test/generated/minimal/electra/epoch_processing.exs:893
test/generated/minimal/electra/epoch_processing.exs:895
test/generated/minimal/electra/epoch_processing.exs:905
test/generated/minimal/electra/epoch_processing.exs:907
test/generated/minimal/electra/epoch_processing.exs:911
test/generated/minimal/electra/epoch_processing.exs:913
test/generated/minimal/electra/epoch_processing.exs:935
test/generated/minimal/electra/epoch_processing.exs:937
test/generated/minimal/electra/epoch_processing.exs:941
test/generated/minimal/electra/epoch_processing.exs:943
test/generated/minimal/electra/epoch_processing.exs:947
test/generated/minimal/electra/epoch_processing.exs:949
test/generated/minimal/electra/epoch_processing.exs:953
test/generated/minimal/electra/epoch_processing.exs:955

@LeanSerra LeanSerra added elixir Pull requests that update Elixir code electra labels Apr 3, 2025
@LeanSerra LeanSerra self-assigned this Apr 3, 2025
@LeanSerra LeanSerra changed the title feat EpochProcessing.process_slashings electra changes feat: electra slashing changes Apr 3, 2025
Copy link
Collaborator

@rodrigo-o rodrigo-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Left some nits

Comment on lines +35 to +42
on_exit(fn ->
Application.put_env(
:lambda_ethereum_consensus,
EngineApi,
original_engine_api_config
)
end)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@LeanSerra LeanSerra changed the title feat: electra slashing changes feat: electra slashing, proposer_index & compute_sync_committees changes Apr 8, 2025
@LeanSerra LeanSerra merged commit e611684 into electra-support Apr 8, 2025
10 of 15 checks passed
@LeanSerra LeanSerra deleted the electra_slashing branch April 8, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electra elixir Pull requests that update Elixir code
Projects
Development

Successfully merging this pull request may close these issues.

2 participants