You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: node earnings labels a period from the earliest row, not from when the ledger started covering #2624
decdn node earnings labels a period "(ledger from )" when the period starts before ledger_since_unix. That value is the landed_at_unix of the earliest row the response counts (build_earnings_response), not the time the data source started covering. The figures are right; the label can disagree with them.
Daemon mode. A node runs with the ledger for 30 days and lands its first settlement on day 30. ledger_since reads day 30, so last 7d gets "(ledger from day 30)", which says the figure is truncated when the ledger covered all seven days and the answer is complete. The suffix means "no data before X" and the truth is "no settlement before X".
Chain mode (--address).ledger_since_unix is the block time of the first Settled found from from_block. A --since earlier than from_block's time is clamped by block_at_or_after(.., lo = from, ..) and then labelled "(ledger from )"; the real coverage boundary, from_block's timestamp, never appears in the response.
Proposed shape
Carry what the producer knows: a coverage_from_unix on EarningsResponse (or a covered_from_unix per EarningsPeriod, so each row is self-describing and the CLI needs no cross-field reasoning).
Daemon: a ledger-start stamp written to settle.redb when settlement_ledger_v1 is first created (one small row), dropped with the table on a PaymentPool repoint.
Chain mode: the timestamp of from_block, one header read block_at_or_after already pays for.
period_label compares against that instead of the earliest row. Keep ledger_since_unix as "earliest settlement" if the header line still wants it.
Activity