Skip to content

feat(ntx-builder): materialize note eligibility in the database - #2582

Open
SantiagoPittella wants to merge 2 commits into
nextfrom
santiagopittella-ntx-eligibility-column
Open

SantiagoPittella wants to merge 2 commits into
nextfrom
santiagopittella-ntx-eligibility-column

Conversation

@SantiagoPittella

@SantiagoPittella SantiagoPittella commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds notes.next_eligible_block: the first block at which a note may be attempted, being the later of its execution-hint window and its post-failure backoff. Every write path maintains it, and the backoff and hint arithmetic moves into db::eligibility so the read and write paths share one definition.

Nothing reads the column yet.

A sponsorship arriving for a pending feature note now clears that note's backoff, since the note may have failed for an uncovered fee and the sponsorship is new information. Existing rows default to 0 (eligible now).

Changelog

[[entry]]
scope       = "ntx-builder"
impact      = "added"
description = "Added the `notes.next_eligible_block` column."

@SantiagoPittella
SantiagoPittella force-pushed the santiagopittella-ntx-eligibility-column branch 2 times, most recently from bc67b0c to 1c7df12 Compare September 8, 2026 13:33
Comment thread bin/ntx-builder/src/db/queries/insert_network_notes/mod.rs Outdated
Comment thread bin/ntx-builder/src/db/queries/notes_failed/mod.rs Outdated
Comment thread bin/ntx-builder/src/db/queries/notes_failed/select_note_backoff.sql Outdated
Comment thread bin/ntx-builder/src/db/queries/tests.rs
Comment thread bin/ntx-builder/src/db/eligibility.rs Outdated
@SantiagoPittella
SantiagoPittella force-pushed the santiagopittella-ntx-eligibility-column branch 4 times, most recently from d3981ab to 5cd0416 Compare September 16, 2026 18:44
@SantiagoPittella
SantiagoPittella force-pushed the santiagopittella-ntx-eligibility-column branch from 5cd0416 to c3bff1c Compare September 17, 2026 13:35
@SantiagoPittella
SantiagoPittella force-pushed the santiagopittella-ntx-eligibility-column branch from c3bff1c to 10a8e8e Compare September 18, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants