Author: Robert Grosse 2016-01-16 18:20:13
Published on: 2016-01-16T18:20:13+00:00
The proposed new transaction format is designed to make transactions take up less space, enabling more transactions per block. A compressed transaction can only be used for non-coinbase transactions with 1-8 inputs and outputs that pay to pubkey hash only, whereas transactions using arbitrary scripts or a larger number of inputs/outputs can still use the existing transaction format. The header byte of a compressed transaction has a specific bit format to identify it as compressed and save space by omitting version numbers and input/output count fields. Additionally, most transactions will not require lock_time, saving another four bytes. Compressed inputs and outputs have differences from normal inputs and outputs, such as the index byte being only one byte, the scriptSig length being completely omitted, and signature and public key being included directly. Compressed values are encoded in a specific format, allowing for savings in space when encoding smaller values. The new changes would only take effect after a consensus is reached among miners who increment the version code. To implement the new format with only a softfork, compressed transactions are hidden as extra data inside the coinbase transaction rather than replacing ordinary transactions in a block, and uncompressed transactions can hide compressed inputs and outputs using an unused opcode called OP_SHADOW. The blockchain must remain valid when all hidden data is ignored, and sending money back from the shadow chain involves specially marked anyone-can-spend outputs. Uncompressed transactions can include multiple inputs and up to eight shadow inputs and outputs. Validation rules ensure that the total amount of marked anyone-can-spend outputs being spent and created matches up with the total balance leaving and entering the shadow chain. The proposed solution is a true softfork, unlike generalized softfork proposals, as the new blockchain remains valid under old rules but interpreted differently.
Updated on: 2023-06-11T03:06:54.945237+00:00