Transaction Replacement by Fee

Transaction Replacement by Fee
2017-01-12 14:13 ` Greg Sanders
  
From: Police Terror @ 2017-01-12 14:02 UTC (permalink / raw)
  To: Adam Back via bitcoin-dev

Hello,

Where can I find the rules on transaction replacement?

For instance what are the valid ranges for the sequence values in
transaction inputs? Normally I set this value to MAX_UINT32, and the
locktime to 0.

Can I change the outputs? Can I add more inputs to pay a higher fee?

Just looking for clarity on this aspect of Bitcoin. Any resources would
be much appreciated.

Thanks.


 permalink raw reply	[|nested]
2017-01-12 14:02 [bitcoin-dev] Transaction Replacement by Fee Police Terror

  2017-01-12 19:58   ` Peter Todd
  
From: Greg Sanders @ 2017-01-12 14:13 UTC (permalink / raw)
  To: Police Terror, Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

BIP125 is the standard way to signal:
https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki

Should explain everything you need.

On Thu, Jan 12, 2017 at 9:02 AM, Police Terror via bitcoin-dev <
bitcoin-dev@lists•linuxfoundation.org> wrote:

> Hello,
>
> Where can I find the rules on transaction replacement?
>
> For instance what are the valid ranges for the sequence values in
> transaction inputs? Normally I set this value to MAX_UINT32, and the
> locktime to 0.
>
> Can I change the outputs? Can I add more inputs to pay a higher fee?
>
> Just looking for clarity on this aspect of Bitcoin. Any resources would
> be much appreciated.
>
> Thanks.
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists•linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

[-- Attachment #2: Type: text/html, Size: 1504 bytes --]

 permalink raw reply	[|nested]
2017-01-12 14:13 ` Greg Sanders

  2017-01-28 18:34     ` Andrew
  
From: Peter Todd @ 2017-01-12 19:58 UTC (permalink / raw)
  To: Greg Sanders, Bitcoin Protocol Discussion

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

On Thu, Jan 12, 2017 at 09:13:23AM -0500, Greg Sanders via bitcoin-dev wrote:
> BIP125 is the standard way to signal:
> https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki
> 
> Should explain everything you need.

Additionally some miners mine full replace-by-fee, which has no limitations on
nSequence. My implementation (for v0.13.2) is here:

    https://github.com/petertodd/bitcoin/tree/replace-by-fee-v0.13.2

and is identical to Bitcoin Core modulo the nSequence stuff being removed, and
a special service bit added to allow full-rbf nodes to preferentially peer with
each other to make sure replacement transactions get propagated.

In practice full-RBF works fairly well, so while it's even faster to use the
nSequence signalling specified in BIP-125, doing so is not mandatory so long as
you can et your replacement transaction to a full-RBF node.

-- 
https://petertodd.org 'peter'[:-1]@petertodd.org

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

 permalink raw reply	[|nested]
2017-01-12 19:58   ` Peter Todd

  
From: Andrew @ 2017-01-28 18:34 UTC ( / )
  To: Peter Todd, Bitcoin Protocol Discussion

Hi, recently been trying to get RBF working on a multisig input. I set
the nSequence to 0, but script didn't verify (used python-bitcoinlib).
Should it work for this type of transaction? I am using the
SignatureHash(...) method of signing, not rpc.signrawtransaction(...).

Thanks

On Thu, Jan 12, 2017 at 7:58 PM, Peter Todd via bitcoin-dev
<bitcoin-dev@lists•linuxfoundation.org> wrote:
> On Thu, Jan 12, 2017 at 09:13:23AM -0500, Greg Sanders via bitcoin-dev wrote:
>> BIP125 is the standard way to signal:
>> https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki
>>
>> Should explain everything you need.
>
> Additionally some miners mine full replace-by-fee, which has no limitations on
> nSequence. My implementation (for v0.13.2) is here:
>
>     https://github.com/petertodd/bitcoin/tree/replace-by-fee-v0.13.2
>
> and is identical to Bitcoin Core modulo the nSequence stuff being removed, and
> a special service bit added to allow full-rbf nodes to preferentially peer with
> each other to make sure replacement transactions get propagated.
>
> In practice full-RBF works fairly well, so while it's even faster to use the
> nSequence signalling specified in BIP-125, doing so is not mandatory so long as
> you can et your replacement transaction to a full-RBF node.
>
> --
> https://petertodd.org 'peter'[:-1]@petertodd.org
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists•linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>



-- 
PGP: B6AC 822C 451D 6304 6A28  49E9 7DB7 011C D53B 5647