Bitcoin Forum
November 18, 2024, 06:43:31 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Transaction v3 (BIP 62)  (Read 914 times)
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 662


View Profile
July 05, 2015, 05:29:12 PM
 #1

BIP62 mentions that transactions that want to get malleability enforced in blocks should be in version 3.
I am puzzled, because I see nowhere in the bitcoin source code where the check against v3 is done.

Also

In transaction.h :
Quote
static const int32_t CURRENT_VERSION=1;

With
Quote
bool IsStandardTx(const CTransaction& tx, string& reason)
{
    if (tx.nVersion > CTransaction::CURRENT_VERSION || tx.nVersion < 1) {
        reason = "version";
        return false;
    }

Means that if the version of the tx is different from 1 then the transaction is not standard.
So, at the end of the day, contrary to what BIP62 announce, there is no tx version 3 right ?

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1104


View Profile
July 05, 2015, 06:31:43 PM
Last edit: July 05, 2015, 10:39:56 PM by TierNolan
 #2

That is interesting.

It means that legacy transactions with high locktimes cannot be spent (if they have non-DER signatures).  It would need a hard-fork to reverse.

This violates promises inherent in the system.  Soft forks are not supposed to prevent people accessing their bitcoins.

This is a good candidate for a "consensus" hard fork, since it is clearly required to maintain a critical promise.  It is a terrible precedent that a soft fork can be used to permanently lock people's money.


Never mind, see below and below

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
dexX7
Legendary
*
Offline Offline

Activity: 1106
Merit: 1026



View Profile WWW
July 05, 2015, 07:19:05 PM
Last edit: July 05, 2015, 07:34:22 PM by dexX7
Merited by ABCbits (1)
 #3

BIP62 mentions that transactions that want to get malleability enforced in blocks should be in version 3.
I am puzzled, because I see nowhere in the bitcoin source code where the check against v3 is done.

There are no v3 transactions currently, and this seems more like a feature for the future, as sort of stated at the bottom of BIP 62.

It means that legacy transactions with high locktimes cannot be spent (if they have non-DER signatures).  It would need a hard-fork to reverse.

v1 transactions remain valid, and the use of v3 appears to be optional, but all v3 transactions must follow the rules of BIP 62:

Quote
- All transactions in v3 blocks are required to follow rules #1-#2.
- v3 (and higher) transactions in v3 blocks are required to follow rules #3-#7 as well.

When 95% of the past 1000 blocks are v3 or higher, v2 blocks become invalid entirely. Note however that v1 (and v2) transactions remain valid forever.

And this seems to be the relevant part of BIP 66:

Quote
The requirement to have signatures that comply strictly with DER has been enforced as a relay policy by the reference client since v0.8.0, and very few transactions violating it are being added to the chain as of January 2015. In addition, every non-compliant signature can trivially be converted into a compliant one, so there is no loss of functionality by this requirement. This proposal has the added benefit of reducing transaction malleability (see BIP 62).

TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1104


View Profile
July 05, 2015, 07:25:21 PM
 #4

And this seems the relevant part of BIP 66:

Quote
The requirement to have signatures that comply strictly with DER has been enforced as a relay policy by the reference client since v0.8.0, and very few transactions violating it are being added to the chain as of January 2015. In addition, every non-compliant signature can trivially be converted into a compliant one, so there is no loss of functionality by this requirement. This proposal has the added benefit of reducing transaction malleability (see BIP 62).

Good point, never mind then Smiley.

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4284
Merit: 8808



View Profile WWW
July 05, 2015, 09:48:41 PM
 #5

Means that if the version of the tx is different from 1 then the transaction is not standard.
So, at the end of the day, contrary to what BIP62 announce, there is no tx version 3 right ?
There is no BIP62 in the Bitcoin system today. It's an incomplete proposal; so there is no support for BIP62 at all.
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 662


View Profile
July 06, 2015, 03:34:07 AM
 #6

Thanks, good news, at the end of the day I don't need to change my code to protect against malleability attack.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!