Skip to content

chore(ntx-builder): attach sponsorship notes error to feature notes - #2701

Open
SantiagoPittella wants to merge 2 commits into
nextfrom
santiagopittella-add-sponsorship-notes-error
Open

SantiagoPittella wants to merge 2 commits into
nextfrom
santiagopittella-add-sponsorship-notes-error

Conversation

@SantiagoPittella

Copy link
Copy Markdown
Collaborator

closes #2515

Summary

Attaches the sponsorship notes error to the feature note, to be returned when calling to GetNetworkNoteStatus. THe response is now structured as:

// Response containing the lifecycle status and latest execution error for a network note.
message GetNetworkNoteStatusResponse {
    // Current lifecycle status of the note.
    NetworkNoteStatus status = 1;
    // The latest error message from execution, if any.
    optional string last_error = 2;
    // Number of failed execution attempts.
    uint32 attempt_count = 3;
    // Block number of the last failed attempt, if any.
    optional fixed32 last_attempt_block_num = 4;
    // FEE_SPONSORSHIP notes bound to this note.
    repeated NetworkNoteSponsorship sponsorships = 5;
}

// A FEE_SPONSORSHIP note that pays the fee for a network note.
message NetworkNoteSponsorship {
    // ID of the sponsorship note.
    note.NoteId note_id = 1;
    // Fee asset that the sponsorship note carries.
    asset.Asset fee_asset = 2;
    // Block height at or after which the reclaimer can reclaim the note. Not set when reclaim is
    // disabled.
    optional fixed32 reclaim_height = 3;
    // Block number in which the sponsorship note was consumed. Not set while it is unconsumed.
    optional fixed32 committed_block_num = 4;
    // The latest execution error of the sponsorship note, if any.
    optional string last_error = 5;
    // Block number of the last failed attempt of the sponsorship note, if any.
    optional fixed32 last_attempt_block_num = 6;
}

Changelog

[[entry]]
scope       = "rpc"
impact      = "added"
description = "`GetNetworkNoteStatus` now lists the `FEE_SPONSORSHIP` notes bound to the note, with their fee asset, reclaim height, consuming block, and latest execution error."

[[entry]]
scope       = "ntx-builder"
impact      = "changed"
description = "When a `FEE_SPONSORSHIP` note fails, the feature note's `last_error` now names the failed sponsorship note."

This branch has not been deployed

No deployments
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.

Consider exposing fee sponsorship notes via the debug endpoint

1 participant