Skip to content

chore(ntx-builder): add note cycles check#2322

Open
SantiagoPittella wants to merge 1 commit into
nextfrom
santiagopittella-add-note-cycle-count
Open

chore(ntx-builder): add note cycles check#2322
SantiagoPittella wants to merge 1 commit into
nextfrom
santiagopittella-add-note-cycle-count

Conversation

@SantiagoPittella

Copy link
Copy Markdown
Collaborator

Closes #1962.

Summary

The ntx-builder was permanently dropping network notes that are individually consumable but that don't fit within a single transaction's cycle budget. Because of how we were checking consumability, the checker sorts standard notes first, a large non-standard note (like an AggLayer note) is consistently the one evicted. The builder then treats every failed note identically, bumping its attempt_count, so after max_note_attempts the evicted note is dropped from available_notes entirely, even though it would execute fine on its own.

How:

In execute_transactions' success branch, failed notes are partitioned (partition_failed_notes) on num_cycles().is_some():

  • Some: are individually consumable, evicted only for space. These are logged but not penalized.
  • None: real consumability failures, penalized as before.

Changelog

[[entry]]
scope = "ntx-builder"
impact = "fixed"
description = "Notes that are individually consumable but evicted from a transaction only for exceeding its cycle budget are no longer penalized and dropped; they are retried in a later round, letting a large note land in its own transaction."

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.

Use Cycle Counts from NoteConsumptionInfo

1 participant