Bitcoin Forum
April 25, 2024, 02:20:51 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Transaction v3 (BIP 62)  (Read 899 times)
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 619


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
1714011651
Hero Member
*
Offline Offline

Posts: 1714011651

View Profile Personal Message (Offline)

Ignore
1714011651
Reply with quote  #2

1714011651
Report to moderator
1714011651
Hero Member
*
Offline Offline

Posts: 1714011651

View Profile Personal Message (Offline)

Ignore
1714011651
Reply with quote  #2

1714011651
Report to moderator
Make sure you back up your wallet regularly! Unlike a bank account, nobody can help you if you lose access to your BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714011651
Hero Member
*
Offline Offline

Posts: 1714011651

View Profile Personal Message (Offline)

Ignore
1714011651
Reply with quote  #2

1714011651
Report to moderator
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1083


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: 1024



View Profile WWW
July 05, 2015, 07:19:05 PM
Last edit: July 05, 2015, 07:34:22 PM by dexX7
 #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: 1083


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: 4158
Merit: 8382



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: 619


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!