bitcoin-dev
Purely off-chain coin colouring
Posted on: November 17, 2023 07:58 UTC
In the realm of blockchain technology, particularly concerning inscriptions, there's an interesting approach that involves minimal on-chain presence.
Instead of posting the actual data on the blockchain, one can hash the data and use a sign-to-contract commitment to this hash. This method significantly reduces the on-chain footprint as it only requires signing a transaction, which can be considerably less expensive. Moreover, since the inscription itself isn't on-chain, it avoids potential issues with mempool observers such as blocking or front-running.
A noteworthy advantage of this technique is the ability to maintain private inscriptions. These remain transferable through the standard ordinals protocol but are announced off-chain, which means they're not publicly visible unless specifically shared. However, this introduces some uncertainty because one cannot definitively identify the sequence or pattern of these private inscriptions due to the possibility of earlier undisclosed sign-to-contract commitments.
When the sign-to-contract method is extended to include a merkle root representing multiple inscriptions, it essentially becomes a form of timestamping. While outsourcing inscriptions to a timestamp server would conflict with the concept of owning an ordinal that signifies ownership, offering timestamping services could complement the creation of inscriptions.
The technical process of sign-to-contract involves generating a secret random nonce and its public version, calculating a derived nonce with the given data, and then creating a signature using the public nonce. To verify a sign-to-contract, one must reveal the initial public nonce and the data, and verification involves ensuring the final public nonce matches the expected value based on the provided components. This mechanism is compatible with both ecdsa and schnorr signatures without requiring any prior setup. The utility of sign-to-contract extends beyond inscriptions; for instance, it offers protection against exfiltration by malicious hardware wallets during transaction signing.
For those interested in deeper exploration of the sign-to-contract method and its applications, several resources offer valuable insights, including discussions on Reddit and various GitHub repositories detailing the implementation and usage of sign-to-contract in different contexts. These references provide a more technical understanding of this feature within the broader scope of cryptographic operations and blockchain interactions.