Skip to content

[Bug] Node Collector aborts metric collection on negative megapool reward value (abi: negatively-signed value cannot be packed into uint parameter) #1107

@McCloudS

Description

@McCloudS

Bug report

Smartnode version: v1.20.3
OS: Linux (Debian)
Execution client: Reth v2.2.0
Consensus client: Nimbus v26.5.0

Description

The Node Collector is repeatedly logging the following error, causing all rocketpool_node_* metrics to be absent from the Prometheus metrics endpoint at :9103/metrics:

[Node Collector] Error calculating megapool rewards: error calculating the rewards for amount -1046000000000000000000: abi: negatively-signed value cannot be packed into uint parameter

All node-specific metrics (bond amounts, RPL stake, minipool/megapool status, etc.) are absent.

Expected behavior

The Node Collector should either handle negative intermediate reward values gracefully (clamping to zero or skipping the metric) rather than aborting the entire node metrics collection cycle.

Actual behavior

An ABI encoding error is thrown when a negative value (-1046000000000000000000) is passed to a function expecting a uint parameter. This causes the full node metrics collection to fail silently, resulting in blank Grafana dashboard panels for all node-specific statistics.

Steps to reproduce

  1. Run smartnode v1.20.3 with an active megapool node
  2. Observe Node Collector logs: docker logs rocketpool_node 2>&1 | grep "Error calculating megapool rewards"
  3. Inside Prometheus, all rocketpool_node_* return "empty query"

Additional context

The negative value -1046000000000000000000 (~-1046 ETH in wei) suggests a potential underflow or signed/unsigned mismatch in the megapool reward calculation logic. Network-wide metrics (rocketpool_supply_*, rocketpool_performance_*, etc.) are unaffected and return normally.

Please excuse Claude's wordiness, it consolidated some of my troubleshooting data. All containers healthy, wallet initialized, node fully synced. I'm unsure when it started occurring, I only noticed after updating to v1.20.3. Is this bad data from eth1?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions