Skip to content

[feature] add bridge utxo indexing and grpc endpoint#785

Open
lowhung wants to merge 4 commits intomainfrom
lowhung/bridge-ics-utxos
Open

[feature] add bridge utxo indexing and grpc endpoint#785
lowhung wants to merge 4 commits intomainfrom
lowhung/bridge-ics-utxos

Conversation

@lowhung
Copy link
Collaborator

@lowhung lowhung commented Mar 11, 2026

Description

This PR adds partner-chain bridge observability data to midnight-state in Acropolis for the preview network. It indexes UTXOs created at the Illiquid Circulation Supply (ICS) validator address for the configured bridge asset, computes tokens_out and tokens_in with the same checkpoint semantics used by the partner-chains db-sync bridge reader, and exposes that data through a new GetBridgeUtxos gRPC endpoint.

The user-visible effect is that Acropolis can now serve raw bridge ICS UTXOs directly over gRPC without relying on db-sync for this data path. The endpoint is intentionally UTXO-granular rather than transaction-granular so downstream consumers can resume from either a block checkpoint or a specific UTXO checkpoint without duplicates.

Related Issue(s)

None.

How was this tested?

  • cargo fmt
  • cargo test -p acropolis_module_midnight_state
  • cargo clippy -p acropolis_module_midnight_state --all-targets -- -D warnings
  • cargo check -p acropolis_process_midnight_indexer

Checklist

  • My code builds and passes local tests
  • I added/updated tests for my changes, where applicable
  • I updated documentation (if applicable)
  • branch has ≤ 5 commits (honor system)
  • commit messages tell a coherent story
  • branch is up to date with main (rebased on main; fast-forward possible)
  • CI/CD passes on the merged-with-main result

Impact / Side effects

This PR changes the midnight-state protobuf contract by adding a new bridge RPC and related messages, so downstream gRPC consumers will need to vendor the updated proto before they can call the new endpoint. The indexing change is additive: existing cNIGHT, candidate, governance, and parameter endpoints remain intact, and the branch includes the latest upstream stable-block gRPC additions.

On the indexing side, bridge tokens_in is resolved from previously indexed ICS UTXOs plus same-block temporary bridge outputs so same-block ICS spends can be represented correctly before the block is committed. Missing or non-inline datums are treated as absent rather than failing indexing.

Reviewer notes / Areas to focus

@lowhung lowhung marked this pull request as ready for review March 12, 2026 21:30
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.

1 participant