Skip to content

Luganodes recovery on mainnet at electra1 fork#2822

Merged
calbera merged 14 commits intomainfrom
luganodes-recovery
Aug 14, 2025
Merged

Luganodes recovery on mainnet at electra1 fork#2822
calbera merged 14 commits intomainfrom
luganodes-recovery

Conversation

@fridrik01
Copy link
Copy Markdown
Contributor

@fridrik01 fridrik01 commented Jun 24, 2025

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 24, 2025

Codecov Report

❌ Patch coverage is 0% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.64%. Comparing base (e474a72) to head (0e959e7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
state-transition/core/state_processor_fixes.go 0.00% 22 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2822      +/-   ##
==========================================
- Coverage   60.75%   60.64%   -0.12%     
==========================================
  Files         354      354              
  Lines       16652    16673      +21     
==========================================
- Hits        10117    10111       -6     
- Misses       5747     5773      +26     
- Partials      788      789       +1     
Files with missing lines Coverage Δ
state-transition/core/state_processor_fixes.go 8.00% <0.00%> (-5.80%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fridrik01 fridrik01 marked this pull request as ready for review June 24, 2025 11:51
Copilot AI review requested due to automatic review settings June 24, 2025 11:51
@fridrik01 fridrik01 requested a review from a team as a code owner June 24, 2025 11:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces automated recovery for Luganode validators by injecting a hardcoded deposit during the Electra1 fork on mainnet.

  • Inserted a new processElectra1Fixes hook into the fork processing flow
  • Added processLuganodesRecovery to create a one-time BLS deposit for Luganode validators
  • Defined constants and credentials for the hardcoded deposit in a new file

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
state-transition/core/state_processor_forks.go Calls processElectra1Fixes before logging the Electra1 fork
state-transition/core/state_processor_fixes.go Implements fork fixes including Luganode deposit recovery
Comments suppressed due to low confidence (2)

state-transition/core/state_processor_fixes.go:55

  • This new recovery logic should be covered by unit tests to ensure the deposit is only added once and errors are handled correctly.
func (sp *StateProcessor) processLuganodesRecovery(st *state.StateDB) error {

state-transition/core/state_processor_fixes.go:41

  • There's a TODO placeholder for withdrawal credentials. Ensure this is updated to the correct value before release to avoid injecting invalid credentials.
var fixCredentials = ctypes.WithdrawalCredentials{0x00} // TODO: update this to a correct value

Comment thread state-transition/core/state_processor_fixes.go Outdated
Comment thread state-transition/core/state_processor_fixes.go Outdated
Comment thread state-transition/core/state_processor_fixes.go
forkChainID = uint64(80094) // avoid import cycle
luganodesPubKey = "0xafd0ad061f698eae0d483098948e26e254f4b7089244bda897895257c668196ffd5e2ddf458fdf8bcea295b7d47a5b37"
luganodesCreds = "0x010000000000000000000000b0c615224a053236ac7d1c239f6c1b5fbf8f0617"
luganodesAmount = 901_393_690_000_000 * params.Wei // 901_393.69 Gwei
Copy link
Copy Markdown
Contributor

@rezzmah rezzmah Jun 25, 2025

Choose a reason for hiding this comment

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

Did the math on my side and this value looks correct

const (
forkChainID = uint64(80094) // avoid import cycle
luganodesPubKey = "0xafd0ad061f698eae0d483098948e26e254f4b7089244bda897895257c668196ffd5e2ddf458fdf8bcea295b7d47a5b37"
luganodesCreds = "0x010000000000000000000000b0c615224a053236ac7d1c239f6c1b5fbf8f0617"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How can we validate the credentials?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rezbera we could ask them to verify their comet credentials.

Copy link
Copy Markdown
Contributor

@rezzmah rezzmah left a comment

Choose a reason for hiding this comment

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

lgtm pending someone tripple checking the credentials

Co-authored-by: abear <abear@berachain.com>
@abi87 abi87 changed the title Implement luganodes recovery on mainnet at electra1 fork Luganodes recovery on mainnet at electra1 fork Jun 27, 2025
Copy link
Copy Markdown
Contributor

@calbera calbera left a comment

Choose a reason for hiding this comment

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

utACK

@calbera calbera merged commit 3772798 into main Aug 14, 2025
21 checks passed
@calbera calbera deleted the luganodes-recovery branch August 14, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants