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

Single-use seal primitive over Bitcoin blockchain #2

Closed
dr-orlovsky opened this issue Oct 12, 2019 · 1 comment
Closed

Single-use seal primitive over Bitcoin blockchain #2

dr-orlovsky opened this issue Oct 12, 2019 · 1 comment
Assignees
Labels
[CSV] Client-side validation-related specs proposal New proposals WIP Work in progress
Projects
Milestone

Comments

@dr-orlovsky
Copy link
Member

dr-orlovsky commented Oct 12, 2019

Single-use seal primitive over Bitcoin blockchain

Motivation

Single-use seal is a generic concept preventing double-definition or double-action (like double-spend), originally proposed by Peter Todd [1]. This specification defines how single-use seals can be constructed on top of bitcoin blockchain.

Background

Single use seal is a non-mathematical commitment primitive that allows to pick the fact after the commitment.

Single use seal (or seal) is a replicative state (or consensus?) primitive that allows to define a option for a future commitment (lazy commitment) to some value (that even can be not known now), such as:

  • the actual commitment to a message can happen once and only once;
  • the event of the promise fulfillment (i.e. the actual commitment being made) can be proved to independent parties.

Single-use seal may be used to define some value (or, with usage of cryptographic digests, message) to be defined in the future only once, and prevents an inconsistent view on a historical state. A party which would like to prove the event of the commitment must present a witness of the seal being closed over the message.

[implementation-specific]
The parties sharing the same single-use seal before it's creation must agree on a set of the global parameters, namely:

  • deterministic single location of the seal in that medium
  • cryptographic commitment function
  • deterministic definition of the witness for the seal closing

Specification

Single-use seal is defined as a tuple of parameters S_opened=(txid, vout, commitment_scheme, deterministic_commitment_txout_locator). When the seal is closed, it is closed over a value V (which may be just an integer value or a value of cryptographic hash function), so `S_closed=(S_opened, V).

struct Seal {
    txid: Txid,
    vout: u16,
}

trait Sealer<V> {
    fn close(&self, value: V, witness: &mut Transaction);
    fn verify(&self, value: V, bitcoin_blockchain: BitcoinFullNodeAPI) -> Result<V, Error>;

    // Used by the close function internally:
    fn commitment_applicator(&self,  commiting_txout: &mut TxOut);
    fn commitment_locator(&self, witness: &Transaction) -> &TxOut;
}

Screenshot 2019-10-12 at 12 15 57

References

1: https://petertodd.org/2017/scalable-single-use-seal-asset-transfer

@dr-orlovsky dr-orlovsky added this to In progress in RGB Core Dec 26, 2019
@dr-orlovsky dr-orlovsky self-assigned this Jan 15, 2020
@dr-orlovsky dr-orlovsky added [CSV] Client-side validation-related specs proposal New proposals labels Jan 15, 2020
@dr-orlovsky dr-orlovsky added this to the CSV: drafts milestone Jan 15, 2020
@dr-orlovsky dr-orlovsky added the WIP Work in progress label Jan 15, 2020
@dr-orlovsky dr-orlovsky moved this from In progress to To do in RGB Core Jan 15, 2020
@dr-orlovsky dr-orlovsky moved this from To do to In progress in RGB Core May 8, 2020
@dr-orlovsky
Copy link
Member Author

RGB Core automation moved this from In progress to Done May 26, 2020
dr-orlovsky added a commit that referenced this issue Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[CSV] Client-side validation-related specs proposal New proposals WIP Work in progress
Projects
No open projects
RGB Core
  
Done
Development

No branches or pull requests

1 participant