Skip to content

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

Open
@Roasbeef

Description

@Roasbeef

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.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

🏗 In progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions