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

universe - [feature]: finish implementation of on chain universe commitments #1094

Open
Roasbeef opened this issue Aug 20, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@Roasbeef
Copy link
Member

Is your feature request related to a problem? Please describe.

Today we don't have a commitment maintained by an issuer on chain that can be used to authenticate new issuance, as outlined in the BIP.

Describe the solution you'd like

Revamp and review the section of the BIP listed above.

In addition, we want to expand the scope of the chain commitment to include 3 commitemtns:

  • issued
  • burned
  • ignore

Issued is the root of the normal issuance universe tree we maintain today.

Burned is a new root that stores any relevant burning transaction as state transition proofs.

Ignore is another new root for outputs that should be ignored, meaning if an asset being verified has the specified asset outpoint/scriptkey in it's history, then it should be ignored.

Some very early interface definitions and structs can be found here which should prove to be useful:

// Commitment is an on chain universe commitment. This includes the merkle
// proof for a transaction which anchors the target universe root.
type Commitment struct {
// BlockHeight is the height of the block that the commitment is
// contained within.
BlockHeight uint32
// BlockHeader is the block header that commits to the transaction.
BlockHeader wire.BlockHeader
// MerkleProof is a merkle proof for the above transaction that the
// anchor output was included.
MerkleProof *proof.TxMerkleProof
// UniverseRoot is the full Universe root for this commitment.
UniverseRoot mssmt.Node
}
// CommittedIssuanceProof couples together a Bitcoin level merkle proof
// commitment with an issuance proof. This allows remote callers to verify that
// their responses re actually committed to within the chain.
type CommittedIssuanceProof struct {
// ChainProof is the on chain proof that shows the Universe root has
// been stamped in the chain.
ChainProof *Commitment
// TaprootAssetProof is a proof of new asset issuance.
TaprootAssetProof *Proof
}
// ChainCommitter is used to commit a Universe backend in the chain.
type ChainCommitter interface {
// CommitUniverse takes a Universe and returns a new commitment to that
// Universe in the main chain.
CommitUniverse(universe BaseBackend) (*Commitment, error)
}
.

In particular, we'll need to decide on the finer details of the "canonical issuance" scheme, which as proposed, would reuse the asset_group_key as an on-chain taproot public key, in order to tie the off-chain asset group key to an on-chain UTXO.

With this, the total amount outstanding is: issued - burned - ignore.

Additional context

Such a feature can be used to authenticate any supply level information, useful for transparency pages involving bridges.

@dstadulis dstadulis added this to the v0.5 milestone Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants