Skip to content

Thread zkcoins.account_commit_txid GUC through publisher / mint / send paths #159

Description

@TaprootFreak

Follow-up to #153 (round-2 review).

account_history.triggering_commit_txid is populated by the migration-0009 trigger when a Postgres caller sets the zkcoins.account_commit_txid GUC inside the same transaction as the account upsert. Today no Rust caller sets that GUC, so:

  • account_history.triggering_commit_txid is always NULL
  • the LEFT JOINs in list_account_history (db.rs) on observed_inscriptions / pending_inscriptions always miss
  • txid and block_height on the /api/history wire shape are always null
  • the wire status falls back to the default branch instead of reflecting the on-chain state machine

Scope:

  • mint path (router::mint_handler → publisher → account_node.receive_coin): set the GUC to the commit txid the publisher mined before upserting the recipient account
  • send path (router::send_coin_handler / commit_handlerruntime::broadcast_commit_and_deliver): same, for sender + recipient upserts
  • scanner path on receive_coin_into: already filtered out of /api/history so lower priority, but the GUC plumbing would let an operator-facing view light up too

TODO comments in node/src/db.rs::list_account_history and node/src/router.rs::history_row_to_item reference this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions