What is Nostr?
Tier Nolan [ARCHIVE] /
npub1g6vโ€ฆl5wd
2023-06-07 17:49:13

Tier Nolan [ARCHIVE] on Nostr: ๐Ÿ“… Original date posted:2016-02-18 ๐Ÿ“ Original message:I wrote a bip last year ...

๐Ÿ“… Original date posted:2016-02-18
๐Ÿ“ Original message:I wrote a bip last year about extended transaction information. The idea
was to include the scriptPubKey that was being spent along with
transactions.

https://github.com/TierNolan/bips/blob/extended_transactions/bip-etx.mediawiki

This makes it easier possible to verify the transactions locally. An
extended transaction would contain the current transaction and also the
CTxOuts that are being spent.

For each entry in the UTXO set, a node could store

UTXO_hash = hash(txid_parent | n | CTxOut)

Witness transactions will do something similar. I wonder if it would be
possible to include the CTxOut for each input that isn't a segregated
witness output, as part of the witness data. Even for witness data, it
would be good to commit to the value of the output as part of the witness.

There was a suggestion at one of the conferences to have the witness data
include info about the block height/index of the output that each input is
spending.

The effect of this change is that nodes would only have to store the
UTXO_hashes for each UTXO value in the database. This would make it much
more efficient.

It would also make it easier to create a simple consensus library. You
give the library the transaction and the witness and it returns the
UTXO_hashes that are spent, the UTXO_hashes that are created, the fee,
sigops and anything that needs to be summed.

Validating a block would mostly (famous last words) mean validating the
transactions in the block and then adding up the totals.

The advantage of including the info with the transactions is that it saves
each node having to include a lookup table to find the data.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20160218/231703a0/attachment.html>;
Author Public Key
npub1g6vxlp4e0nyhs2dqxxcryztyf5f5hyuaq93nw4r87zcnv0sdsa0qqsl5wd