Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock Minting Anchor TX Change Output for Future Universe Commitment Support #1325

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ffranr
Copy link
Contributor

@ffranr ffranr commented Jan 24, 2025

This is a work-in-progress draft that will eventually address Minimal Code Changes for Future Universe Commitment Transaction Support.

At a high level, this PR introduces the following functionality: if the "enable universe commitment" flag is set on a batch, the change output will be locked with a script that only tapd can spend. Additionally, the PR includes validations and restrictions to ensure that the "enable universe commitment" feature can only be applied to minting batches containing assets from the same asset group. For more details, refer to the linked issue.

@ffranr ffranr self-assigned this Jan 24, 2025
@ffranr ffranr changed the base branch from main to small-minting-cleanup January 24, 2025 20:54
@coveralls
Copy link

coveralls commented Jan 24, 2025

Pull Request Test Coverage Report for Build 12990933517

Details

  • 36 of 93 (38.71%) changed or added relevant lines in 3 files are covered.
  • 26 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.02%) to 40.714%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tapgarden/planter.go 15 21 71.43%
rpcserver.go 0 7 0.0%
tapgarden/batch.go 21 65 32.31%
Files with Coverage Reduction New Missed Lines %
tappsbt/create.go 2 53.22%
commitment/tap.go 3 84.32%
tapgarden/caretaker.go 4 68.11%
asset/mock.go 5 92.13%
tapdb/universe.go 12 79.56%
Totals Coverage Status
Change from base Build 12988582439: -0.02%
Covered Lines: 26771
Relevant Lines: 65753

💛 - Coveralls

Introduce MintingBatch.AddSeedling, a method for attempting
to add seedlings to a batch.

Future commits will extend this method with validation logic
to ensure compatibility of the seedling with others already
in the batch.
This commit adds a new flag to the `MintAsset` RPC request message. When
set to true, this flag enables the universe commitment feature for the
minting batch. To comply with this feature, the minting batch must be
restricted to assets that share the same group key.

Universe commitments are minter-controlled, on-chain anchored
attestations regarding the state of the universe.
Add the EnableUniCommitment field to the seedling structure. This
field is populated based on data from the corresponding RPC request.
Add the EnableUniCommitment field to the MintingBatch structure,
populating it when a seedling is added to the batch. Include
validation logic to ensure that for a batch with uni commitment
enabled, all seedlings share the same asset group key.
@ffranr ffranr force-pushed the unit-commitment-mint-output branch from 8c10bbc to a18c17e Compare January 27, 2025 14:14
@ffranr ffranr changed the base branch from small-minting-cleanup to main January 27, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

2 participants