[feature] add bridge utxo indexing and grpc endpoint#785
Open
[feature] add bridge utxo indexing and grpc endpoint#785
Conversation
# Conflicts: # modules/midnight_state/src/grpc/service.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds partner-chain bridge observability data to
midnight-statein Acropolis for the preview network. It indexes UTXOs created at the Illiquid Circulation Supply (ICS) validator address for the configured bridge asset, computestokens_outandtokens_inwith the same checkpoint semantics used by the partner-chains db-sync bridge reader, and exposes that data through a newGetBridgeUtxosgRPC 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 fmtcargo test -p acropolis_module_midnight_statecargo clippy -p acropolis_module_midnight_state --all-targets -- -D warningscargo check -p acropolis_process_midnight_indexerChecklist
Impact / Side effects
This PR changes the
midnight-stateprotobuf 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_inis 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