Skip to content

Conversation

ffranr
Copy link
Contributor

@ffranr ffranr commented Sep 25, 2025

Adds a string-encoded supply commit outpoint to the SupplyCommitChainData proto message for easier client use. Updates itest to assert consistency of the new field with existing values.

@ffranr ffranr added this to the v0.7 milestone Sep 25, 2025
@ffranr ffranr self-assigned this Sep 25, 2025
@ffranr ffranr added gRPC supply commit Work on the supply commitment feature, enabling issuers to attest to total asset supply on-chain. labels Sep 25, 2025
Copy link

Summary of Changes

Hello @ffranr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant enhancement to the SupplyCommitChainData structure by adding a string representation of the commit outpoint. This change aims to improve the usability of the data for client applications by providing a more accessible format. The implementation includes updates across the protobuf definition, RPC marshalling logic, generated Go code, and API documentation, all while ensuring data consistency through new test assertions.

Highlights

  • New Field Addition: A new string-encoded field, CommitOutpoint, has been added to the SupplyCommitChainData protobuf message to provide an easier-to-use representation of the supply commit outpoint for clients.
  • Data Population: The CommitOutpoint field is now populated in the marshalSupplyCommitChainData function within supplysync_rpc.go, converting the rootCommitment.CommitPoint() to its string representation.
  • API and Schema Updates: The universe.proto definition, the generated universe.pb.go file (including a new getter method), and the universe.swagger.json schema have all been updated to reflect the addition of the CommitOutpoint field.
  • Integration Test Verification: An integration test in itest/assertions.go has been updated to assert the consistency of the newly added CommitOutpoint field with existing values, ensuring data integrity.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new commit_outpoint string field to the SupplyCommitChainData proto message for easier client use. The changes are well-implemented across the proto definition, RPC marshalling, and generated code. The integration test is also updated to verify the consistency of this new field.

My main feedback is to make the test assertion more robust by parsing the string outpoint back and comparing the struct, which ensures the string is not only correct but also parsable.

Overall, this is a good and clean change that improves the API's usability.

@levmi levmi moved this from 🆕 New to 👀 In review in Taproot-Assets Project Board Sep 25, 2025
@coveralls
Copy link

coveralls commented Sep 25, 2025

Pull Request Test Coverage Report for Build 18139048459

Details

  • 6 of 11 (54.55%) changed or added relevant lines in 3 files are covered.
  • 38 unchanged lines in 10 files lost coverage.
  • Overall coverage increased (+6.9%) to 56.538%

Changes Missing Coverage Covered Lines Changed/Added Lines %
taprpc/universerpc/universe.pb.go 0 5 0.0%
Files with Coverage Reduction New Missed Lines %
fn/iter.go 2 62.07%
universe_rpc_diff.go 2 76.0%
itest/assertions.go 3 87.67%
itest/multisig.go 3 97.94%
tapdb/assets_store.go 3 79.9%
tapdb/universe.go 4 79.63%
universe/syncer.go 4 84.22%
tapdb/assets_common.go 5 78.34%
universe/archive.go 5 81.24%
tapdb/multiverse.go 7 80.05%
Totals Coverage Status
Change from base Build 18137871327: 6.9%
Covered Lines: 63736
Relevant Lines: 112731

💛 - Coveralls

Copy link
Member

@jamaljsr jamaljsr left a comment

Choose a reason for hiding this comment

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

Functional tACK 👌

Confirmed the commit_outpoint field is displayed in the tapcli universe supplycommit fetch output.

Does this update make the tx_out_idx redundant? Should that be removed?

@ffranr ffranr requested review from Roasbeef and jtobin September 25, 2025 15:53
@ffranr
Copy link
Contributor Author

ffranr commented Sep 25, 2025

Functional tACK 👌

Confirmed the commit_outpoint field is displayed in the tapcli universe supplycommit fetch` output.

Does this update make the tx_out_idx redundant? Should that be removed?

I guess it is redundant, but it saves a user having to parse the outpoint for the index i suppose

Copy link
Member

@jtobin jtobin left a comment

Choose a reason for hiding this comment

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

Nice add, LGTM. 👍

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 🥇

Includes the supply commit outpoint as a string in the proto message
SupplyCommitChainData. Helps clients that cannot deserialize
transactions to compute the txid.
Modify itest helper to verify that the string-encoded outpoint in
SupplyCommitChainData matches the expected value based on existing
fields.
@ffranr ffranr force-pushed the wip/supplycommit/add-supply-outpoint-to-fetch-rpc branch from bb1ec2a to 1e033a0 Compare September 30, 2025 18:01
@ffranr ffranr enabled auto-merge September 30, 2025 18:01
@ffranr ffranr added this pull request to the merge queue Sep 30, 2025
Merged via the queue into main with commit 21f385d Sep 30, 2025
19 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Taproot-Assets Project Board Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gRPC supply commit Work on the supply commitment feature, enabling issuers to attest to total asset supply on-chain.
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants