PubRef - Script OP Code For Public Data References



Summary:

The proposal aims to reduce the cost of building a Merkle tree by utilizing a dictionary of repetitive strings. The dictionary is already built by the blockchain, and transactions can refer to it using a new opcode called PubRef. This BIP enables users to reuse previously confirmed transaction elements with smaller numeric offsets or pointers, reducing transaction sizes and allowing miners to fit more transactions into blocks. The new opcode is introduced with BIP-0141 (Segregated Witness), defining a uint4 input and data output. A newly created script can refer to a specific PUSHDATA used in any previously confirmed block, but the signature of the input must still be unique. If a user sends Bitcoin to a newly formed address, no PUBREF can be created, and a pushdata outputScript is necessary at least once. Once these transactions are confirmed, any future script can refer to these public-key values with a PUBREF operation. Access to a database that resolves PUBREF indices will be needed for clients to use PUBREF operations, but all full nodes already have the data needed to build and resolve public references. Additional computational effort is required to maintain these indices, but it provides smaller transaction sizes and relief from storing repetitive data on the blockchain.


Updated on: 2023-06-13T20:09:46.374159+00:00