Skip to content

feat(chain): add live utxo lookup by output ref#723

Merged
AndrewWestberg merged 1 commit intomasterfrom
feat_live_utxos_by_output_ref
Feb 4, 2026
Merged

feat(chain): add live utxo lookup by output ref#723
AndrewWestberg merged 1 commit intomasterfrom
feat_live_utxos_by_output_ref

Conversation

@AndrewWestberg
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new gRPC endpoint QueryLiveUtxosByOutputRef that queries UTXOs by their output reference (transaction hash and index), checking an in-memory live state cache first before falling back to the database. This is analogous to the existing QueryLiveUtxos endpoint but operates on specific output references rather than addresses.

Changes:

  • Added QueryLiveUtxosByOutputRef RPC method to the protobuf service definition
  • Implemented the gRPC service handler with consistent error handling
  • Added repository layer method that checks live UTXO map before querying the database
  • Updated transaction builder to use the new live lookup method for reference scripts
  • Bumped version from 0.13.1-SNAPSHOT to 0.13.2-SNAPSHOT

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
newm-chain-grpc/src/main/proto/newm_chain.proto Added new RPC endpoint definition for querying live UTXOs by output reference
newm-chain/src/main/kotlin/io/newm/chain/grpc/NewmChainService.kt Implemented gRPC handler for the new endpoint and updated transaction builder to use live lookups
newm-chain-db/src/main/kotlin/io/newm/chain/database/repository/LedgerRepository.kt Added interface method for querying live UTXOs by output reference
newm-chain-db/src/main/kotlin/io/newm/chain/database/repository/LedgerRepositoryImpl.kt Implemented method with live cache check and database fallback, plus private helper method
build.gradle.kts Version bump to reflect new feature addition

@AndrewWestberg AndrewWestberg merged commit 749257a into master Feb 4, 2026
8 checks passed
@AndrewWestberg AndrewWestberg deleted the feat_live_utxos_by_output_ref branch February 4, 2026 15:42
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