bitauth / libauth

An ultra-lightweight, zero-dependency TypeScript library for Bitcoin Cash, Bitcoin, and Bitauth applications.

Home Page:https://libauth.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[2023.05 protocol upgrade]. Reject future transaction versions

tomFlowee opened this issue · comments

The 2023 protocol upgrade had a transaction-version rule that was added to consensus. (CHIP).

The unrealized side-effect is that there is a good chance that in the future we might see a new, incompatible transaction format. The point is, a future transaction version may work fine with todays codebase, it may not. There is no way to know.

So, if someone runs todays version of libauth (or any application that incorporates it) unexpected things may happen.

This issue is to suggest that libauth's raw transaction processing code will refuse to process transactions that have a too-high version number. Forcing people that get those transactions to upgrade to a newer version of libauth that presumably has added support. And to avoid them getting bad results that may happen due to parsing unknown transaction type.

The transactions-in-mainchain research showed that there are no transactions with versions higher than 9 in testnet4 and mainchain (all bets are off for testnet3). Therefor I suggest rejecting all transactions greater-equal 10.