From 14f5e6f4142a679419679cf2c0f1ff5afc1c1e58 Mon Sep 17 00:00:00 2001 From: terence Date: Mon, 6 Apr 2026 16:51:24 +0200 Subject: [PATCH] Downgrade genesis forkchoice balance underflow warning to debug (#16633) - Demotes the "node with invalid balance, setting it to zero" warning to DEBUG level for genesis nodes in forkchoice - Non-genesis block retain the WARN level since underflow there indicates a real bug - This is required for gloas e2e test because it plans to fail on any warning and error --- .../doubly-linked-tree/forkchoice.go | 23 +++++++++++-------- ..._fix-genesis-forkchoice-balance-warning.md | 3 +++ 2 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 changelog/terence_fix-genesis-forkchoice-balance-warning.md diff --git a/beacon-chain/forkchoice/doubly-linked-tree/forkchoice.go b/beacon-chain/forkchoice/doubly-linked-tree/forkchoice.go index 5dc34575aba5..4cfcc288f562 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/forkchoice.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/forkchoice.go @@ -325,15 +325,20 @@ func (f *ForkChoice) updateBalances() error { if pn != nil && vote.currentRoot != zHash { if pending { if pn.node.balance < oldBalance { - log.WithFields(logrus.Fields{ - "nodeRoot": fmt.Sprintf("%#x", bytesutil.Trunc(vote.currentRoot[:])), - "oldBalance": oldBalance, - "nodeBalance": pn.node.balance, - "nodeWeight": pn.node.weight, - "proposerBoostRoot": fmt.Sprintf("%#x", bytesutil.Trunc(f.store.proposerBoostRoot[:])), - "previousProposerBoostRoot": fmt.Sprintf("%#x", bytesutil.Trunc(f.store.previousProposerBoostRoot[:])), - "previousProposerBoostScore": f.store.previousProposerBoostScore, - }).Warning("node with invalid balance, setting it to zero") + if pn.node.slot == 0 { + log.WithField("nodeRoot", fmt.Sprintf("%#x", bytesutil.Trunc(vote.currentRoot[:]))). + Debug("Genesis node pending balance underflow, clamping to zero") + } else { + log.WithFields(logrus.Fields{ + "nodeRoot": fmt.Sprintf("%#x", bytesutil.Trunc(vote.currentRoot[:])), + "oldBalance": oldBalance, + "nodeBalance": pn.node.balance, + "nodeWeight": pn.node.weight, + "proposerBoostRoot": fmt.Sprintf("%#x", bytesutil.Trunc(f.store.proposerBoostRoot[:])), + "previousProposerBoostRoot": fmt.Sprintf("%#x", bytesutil.Trunc(f.store.previousProposerBoostRoot[:])), + "previousProposerBoostScore": f.store.previousProposerBoostScore, + }).Warning("node with invalid balance, setting it to zero") + } pn.node.balance = 0 } else { pn.node.balance -= oldBalance diff --git a/changelog/terence_fix-genesis-forkchoice-balance-warning.md b/changelog/terence_fix-genesis-forkchoice-balance-warning.md new file mode 100644 index 000000000000..8248fb38dd60 --- /dev/null +++ b/changelog/terence_fix-genesis-forkchoice-balance-warning.md @@ -0,0 +1,3 @@ +### Fixed + +- Demoted genesis node pending balance underflow warning to debug in forkchoice. The ePBS pending/full balance split causes a harmless accounting mismatch at genesis where there is no separate payload delivery.