Skip to content

Conversation

darioAnongba
Copy link
Contributor

@darioAnongba darioAnongba commented Sep 19, 2025

Enable burning of assets by specifying a group key.

  • Add AssetSpecifier to tapcommon.proto and use it in the BurnAssetRequest
  • Change tapcli to accept group_key param in tapd assets burn commands
  • Update tapfreighter to support passing a group key in the asset specifier
  • Update BurnAsset RPC request to accept an AssetSpecifier. Breaking change!
  • Update integration tests

Example:

  • Mint asset in group key X: 1000 units
  • Mint asset in group X: 100 units
  • Burn 1080 units
  • Creates 3 outputs:
    • change: 20 units
    • burn output: 1000 units
    • burn output: 80 units

@darioAnongba darioAnongba self-assigned this Sep 19, 2025
@darioAnongba darioAnongba requested review from GeorgeTsagk and ffranr and removed request for GeorgeTsagk September 19, 2025 12:00
@levmi levmi moved this from 🆕 New to 🏗 In progress in Taproot-Assets Project Board Sep 22, 2025
@darioAnongba darioAnongba marked this pull request as ready for review September 23, 2025 11:27
@darioAnongba darioAnongba moved this from 🏗 In progress to 👀 In review in Taproot-Assets Project Board Sep 23, 2025
Copy link
Member

@GeorgeTsagk GeorgeTsagk left a comment

Choose a reason for hiding this comment

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

Great work!

return nil, err
}

for _, vPkt := range pkt.VPackets {
Copy link
Member

Choose a reason for hiding this comment

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

why was this moved here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As you can see, the old way was to run PrepareOutputAssets inside createFundedPacketWithInputs. But with the logic I introduced, we perform some operations on the vPkt before calling PrepareOutputAssets so we need to extract it to have control of when PrepareOutputAssets is called (or call it twice, which is inefficient and could have side undesirable effects).

@levmi levmi added this to the v0.8 milestone Sep 25, 2025
@darioAnongba darioAnongba removed the request for review from ffranr September 25, 2025 15:59
@darioAnongba darioAnongba force-pushed the feat/burn-group-key branch 3 times, most recently from 13a399f to 9cd15a7 Compare September 29, 2025 10:57
@jtobin jtobin self-requested a review September 29, 2025 13:08
@coveralls
Copy link

coveralls commented Sep 30, 2025

Pull Request Test Coverage Report for Build 18141060997

Details

  • 106 of 299 (35.45%) changed or added relevant lines in 5 files are covered.
  • 65 unchanged lines in 16 files lost coverage.
  • Overall coverage decreased (-0.05%) to 56.466%

Changes Missing Coverage Covered Lines Changed/Added Lines %
taprpc/taprootassets.pb.go 0 5 0.0%
tapfreighter/wallet.go 24 35 68.57%
taprpc/tapcommon.pb.go 30 68 44.12%
rpcserver.go 52 96 54.17%
cmd/commands/assets.go 0 95 0.0%
Files with Coverage Reduction New Missed Lines %
fn/context_guard.go 1 91.94%
address/mock.go 2 96.2%
mssmt/compacted_tree.go 2 77.65%
tapdb/mssmt.go 2 90.45%
tapdb/multiverse.go 2 80.59%
tapdb/sqlc/transfers.sql.go 2 83.33%
tapgarden/custodian.go 2 76.83%
universe_rpc_diff.go 2 76.0%
universe/syncer.go 2 84.22%
itest/assertions.go 3 87.67%
Totals Coverage Status
Change from base Build 18140243029: -0.05%
Covered Lines: 63754
Relevant Lines: 112906

💛 - Coveralls

@darioAnongba darioAnongba force-pushed the feat/burn-group-key branch 2 times, most recently from a9fc25c to 544f5b4 Compare September 30, 2025 16:39
@darioAnongba darioAnongba requested review from ffranr and removed request for jtobin September 30, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

5 participants