fix(oracle): resolve top-up credentials through pod-or-node + regression test [re-review finding 1] - #491
Merged
0xpanicError merged 2 commits intoAug 13, 2026
Conversation
EtherFiAdmin._approveValidators (the production 31 ETH top-up builder, reached via executeValidatorApprovalTask) hardcoded getEigenPod(). For a pod-less node that is address(0), so it baked 0x02+address(0) credentials whose deposit root never matches the node credentials fixed at creation -> confirmAndFundBeacon- Validators reverts IncorrectBeaconRoot and the validator is stranded at 1 ETH. Resolve the target as pod-or-node (raw, no PodRetired gate) so the oracle-built deposit data matches what StakingManager.confirmAndFundBeaconValidators re- derives, for both pod-backed and pod-less nodes. Finding 1 of the independent re-review at head 0101757. The production builder was outside the original 15-file diff, so the existing suite (which hand-builds DepositData and pranks the admin) never exercised it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…valTask Regression for the oracle top-up blocker: drives the REAL production path (EtherFiAdmin.executeValidatorApprovalTask -> _approveValidators -> LiquidityPool.confirmAndFundBeaconValidators) for a pod-less validator, instead of hand-building the top-up DepositData and pranking the admin as the existing pod-less tests do. That fixture skipped _approveValidators, which is why the blocker survived 133 green tests. Creates a pod-less validator (phase 1, 1 ETH), lets _approveValidators build the top-up data, and asserts it funds to full validator size. Fails IncorrectBeaconRoot against the pre-fix builder; passes after it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
0xpanicError
merged commit Aug 13, 2026
d7a7e23
into
pankaj/feat/non-eigenpod-withdrawal-credentials
2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finding 1 (BLOCKER) — the production top-up builder stranded pod-less validators
The independent re-review at head
0101757found thatEtherFiAdmin._approveValidators— the production builder of the 31 ETH top-up deposit data, reached viaexecuteValidatorApprovalTask— hardcodedgetEigenPod(). For a pod-less node that isaddress(0), so it baked0x02 + address(0)credentials whose deposit root can never match the node credentials fixed at creation.confirmAndFundBeaconValidatorsthen revertsIncorrectBeaconRoot, and the validator is stranded at 1 ETH forever.This is the only production path that funds a validator past 1 ETH, so the pod-less feature could not work as merged.
EtherFiAdmin.solwas outside the original 15-file diff, which is why it was missed.Fix (
src/oracle/EtherFiAdmin.sol)Resolve the credential target as pod-or-node —
IEtherFiNode(node).getEigenPod(), else the node — mirroringStakingManager.confirmAndFundBeaconValidators. Resolved raw (not viawithdrawalCredentialTarget) so a top-up is not blocked if the pod was retired between creation and approval (consistent with the earlier finding-4 scoping). Pod-backed nodes are unaffected:getEigenPod()returns the pod, theelsebranch is never taken, and the built root is byte-identical to before.Test (
test/behaviour-tests/oracle-podless-funding.t.sol)Drives the real path —
executeValidatorApprovalTask → _approveValidators → confirmAndFundBeaconValidators— for a pod-less validator and asserts it funds to full validator size, stays linked, and stays pod-less. The existing pod-less tests hand-build the top-upDepositDataand prank the admin, skipping_approveValidators; this one lets the builder build it.Non-vacuous, verified both directions:
IncorrectBeaconRoot()when the fix is reverted (confirmed withforge build --forceto defeat the incremental-build cache).Notes
validator_scanner.pycomputes expected credentials throughgetEigenPodand rejects pod-less validators with "Withdrawal credentials mismatch." That must be fixed in the oracle repo before pod-less validators can be approved in production. This PR only fixes the on-chain builder.EtherFiAdminmust land before/with the contract upgrade, never after.Base:
pankaj/feat/non-eigenpod-withdrawal-credentials(the #485 branch).🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Touches the only on-chain path that builds validator top-up deposit data after oracle approval; incorrect credential logic would strand funds, but the change mirrors existing StakingManager behavior and is covered by a targeted regression test.
Overview
Fixes a blocker where pod-less validators could never complete oracle-driven funding past the initial 1 ETH deposit.
EtherFiAdmin._approveValidatorsno longer builds top-up deposit roots usinggetEigenPod()alone. It now uses the same pod-or-node rule asStakingManager.confirmAndFundBeaconValidators: EigenPod when present, otherwise the EtherFi node address. That keeps compounding withdrawal credentials aligned with what was fixed at validator creation, soconfirmAndFundBeaconValidatorsno longer revertsIncorrectBeaconRoot. Pod-backed validators behave as before; the fallback only applies when the pod isaddress(0).Adds
oracle-podless-funding.t.sol, which runs the production pathexecuteValidatorApprovalTask→_approveValidators→confirmAndFundBeaconValidatorsfor a pod-less validator (including an in-placeEtherFiAdminimpl swap on the fork) and asserts full-size funding without requiring hand-built deposit data.Reviewed by Cursor Bugbot for commit c355f43. Bugbot is set up for automated code reviews on this repo. Configure here.