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!

@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
@darioAnongba darioAnongba force-pushed the feat/burn-group-key branch 2 times, most recently from c0a0cae to c3082d6 Compare September 30, 2025 19:21
@darioAnongba darioAnongba changed the base branch from main to 0-8-0-staging October 1, 2025 15:09
@darioAnongba darioAnongba changed the base branch from 0-8-0-staging to main October 1, 2025 15:17
@lightninglabs-deploy
Copy link

@GeorgeTsagk: review reminder
@ffranr: review reminder

@ffranr
Copy link
Contributor

ffranr commented Oct 9, 2025

I think this should have base branch 0-8-0-staging?

@darioAnongba darioAnongba changed the base branch from main to 0-8-0-staging October 10, 2025 13:30
@darioAnongba
Copy link
Contributor Author

comments applied (and answered) and pointed to 0-8-0-staging

@darioAnongba darioAnongba force-pushed the feat/burn-group-key branch 4 times, most recently from 86b225f to ca49ac9 Compare October 13, 2025 10:19
@darioAnongba darioAnongba requested a review from ffranr October 13, 2025 10:41
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.

getting there
some final Qs

rpcserver.go Outdated
in.AmountToBurn)
// If the asset ID is set but the group key is not, we need to query
// the asset group by the asset ID to get the group key.
if assetID != nil && groupKey == nil {
Copy link
Member

Choose a reason for hiding this comment

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

So we're also silently dropping support for burning a specific asset ID. With this line we're always trying to find the group and burn based on the group key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The previous behavior stays unchanged regarding asset ID. As you can see, this was also done before but I moved it outside of the switch to support both using the old Asset and the new AssetSpecifier.
If I somehow changed the logic, it isn't intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

6 participants