Discussion:
Few questions regarding ListTransaction
(too old to reply)
Maksim Solovjov via bitcoin-dev
2018-04-10 20:29:23 UTC
Permalink
Hi,

I have few questions regarding ListTransaction RPC call and I hope you can
help me.
Documentation for the RPC call is here:
https://bitcoin.org/en/developer-reference#listtransactions

1. What does it mean for a transaction ( with 0 confirmations ) to be
*trusted* or not?
There is such field in the response of ListTransaction
As far as I know bitcoin - nothing is trusted unless there are some numbers
of confirmations.
How does this value is set to true or false?

2. When does *confirmations* can be -1 ( conflicted )?
What does it mean to have conflicted transaction?
Is it about Transaction Malleability? Double Spend? or both?

3. *walletconflicts*. What if I add watch-only address to my bitcoind
process.
This address will not be a part of my wallet.
Now, someone will pay me to this address and someone else will make
Transaction Malleability ( for the sake of example, lets assume this second
one will be confirmed, not the original one ).
Will I get a first transaction in *walletconflicts* array when
ListTransaction will return me second transaction in the response?

Thank you in advance!
Joseph Gleason ⑈ via bitcoin-dev
2018-04-10 20:41:07 UTC
Permalink
2) -1 doesn't mean conflicted, it means the transaction is not only
unconfirmed buy depends on another unconfirmed transaction.

1) Depends on what you mean by trusted. If you are giving the user online
access to something that costs you next to nothing to revoke if there is a
problem later, no problem. 0-conf is great. If you are pre-pairing
shipments and will be able to pull the box from the ship stream if there is
a problem, also no problem. If you are sending some other non-reversible
thing like crypto, then you might want to be careful. It really depends on
the value of your things and your tolerance of risk.

In my opinion, an zero-conf transaction is way way better than a credit
card preauth or a check in hand.



On Tue, Apr 10, 2018 at 1:34 PM Maksim Solovjov via bitcoin-dev <
Post by Maksim Solovjov via bitcoin-dev
Hi,
I have few questions regarding ListTransaction RPC call and I hope you can
help me.
https://bitcoin.org/en/developer-reference#listtransactions
1. What does it mean for a transaction ( with 0 confirmations ) to be
*trusted* or not?
There is such field in the response of ListTransaction
As far as I know bitcoin - nothing is trusted unless there are some
numbers of confirmations.
How does this value is set to true or false?
2. When does *confirmations* can be -1 ( conflicted )?
What does it mean to have conflicted transaction?
Is it about Transaction Malleability? Double Spend? or both?
3. *walletconflicts*. What if I add watch-only address to my bitcoind
process.
This address will not be a part of my wallet.
Now, someone will pay me to this address and someone else will make
Transaction Malleability ( for the sake of example, lets assume this second
one will be confirmed, not the original one ).
Will I get a first transaction in *walletconflicts* array when
ListTransaction will return me second transaction in the response?
Thank you in advance!
_______________________________________________
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
Karl-Johan Alm via bitcoin-dev
2018-04-11 05:21:10 UTC
Permalink
On Wed, Apr 11, 2018 at 5:29 AM, Maksim Solovjov via bitcoin-dev
Post by Maksim Solovjov via bitcoin-dev
1. What does it mean for a transaction ( with 0 confirmations ) to be
trusted or not?
It is trusted if (1) it is final (i.e. it can't be replaced), (2) it
is not in a block that was reorged out (negative confirmation count),
(3) the 'spend zero conf change' option is set, (4) it is in the
mempool, and (5) all inputs are from us.
Post by Maksim Solovjov via bitcoin-dev
2. When does confirmations can be -1 ( conflicted )?
What does it mean to have conflicted transaction?
Is it about Transaction Malleability? Double Spend? or both?
A transaction is conflicted if a different transaction exists that
spends the same inputs. A transaction gets -N confirmations if it is
mined in a block, and that block is orphaned away, and a different
transaction is mined in the new block so that the transaction becomes
a double spend.
Karl-Johan Alm via bitcoin-dev
2018-04-11 05:22:42 UTC
Permalink
Clarification on one part below:

On Wed, Apr 11, 2018 at 2:21 PM, Karl-Johan Alm
Post by Karl-Johan Alm via bitcoin-dev
On Wed, Apr 11, 2018 at 5:29 AM, Maksim Solovjov via bitcoin-dev
Post by Maksim Solovjov via bitcoin-dev
1. What does it mean for a transaction ( with 0 confirmations ) to be
trusted or not?
It is trusted if (1) it is final (i.e. it can't be replaced), (2) it
is not in a block that was reorged out (negative confirmation count),
(3) the 'spend zero conf change' option is set, (4) it is in the
mempool, and (5) all inputs are from us.
"can't be replaced" here means it cannot be replaced through
conventional means. It is always possible to replace a transaction
that has not yet been confirmed, e.g. by asking a miner to mine a
conflicting transaction directly.
Peter Todd via bitcoin-dev
2018-04-11 07:52:25 UTC
Permalink
Post by Karl-Johan Alm via bitcoin-dev
On Wed, Apr 11, 2018 at 2:21 PM, Karl-Johan Alm
Post by Karl-Johan Alm via bitcoin-dev
On Wed, Apr 11, 2018 at 5:29 AM, Maksim Solovjov via bitcoin-dev
Post by Maksim Solovjov via bitcoin-dev
1. What does it mean for a transaction ( with 0 confirmations ) to be
trusted or not?
It is trusted if (1) it is final (i.e. it can't be replaced), (2) it
is not in a block that was reorged out (negative confirmation count),
(3) the 'spend zero conf change' option is set, (4) it is in the
mempool, and (5) all inputs are from us.
"can't be replaced" here means it cannot be replaced through
conventional means. It is always possible to replace a transaction
that has not yet been confirmed, e.g. by asking a miner to mine a
conflicting transaction directly.
Or via full replace-by-fee, which appears to be used by a significant minority
of miners:

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

In practice transaction replacement by the sender for any transaction is very
easy.
--
https://petertodd.org 'peter'[:-1]@petertodd.org
Karl-Johan Alm via bitcoin-dev
2018-04-11 08:10:43 UTC
Permalink
Post by Peter Todd via bitcoin-dev
Or via full replace-by-fee, which appears to be used by a significant minority
I was of the impression that final transactions (sequence=0xffffffff)
cannot be RBF'd.
Peter Todd via bitcoin-dev
2018-04-11 09:37:24 UTC
Permalink
Post by Karl-Johan Alm via bitcoin-dev
Post by Peter Todd via bitcoin-dev
Or via full replace-by-fee, which appears to be used by a significant minority
I was of the impression that final transactions (sequence=0xffffffff)
cannot be RBF'd.
My full-replace-by-fee tree ignores that. It also does preferential peering to
ensure it's well connected with likewise peers, and thus the whole network.
--
https://petertodd.org 'peter'[:-1]@petertodd.org
Karl-Johan Alm via bitcoin-dev
2018-04-11 10:00:45 UTC
Permalink
Thanks for clarifying!
Good morning Karl-Johan Alm,
Nothing prevents a miner from completely ignoring nSequence when putting transactions in blocks.
Unconfirmed transactions are, by definition, not recorded in blocks. So if there is a transaction 0xFFFFFFF nSequence and fee 1000 satoshi, and another conflicting transaction 0xFFFFFFF nSequence and fee 100000000 satoshi, miners can include the latter one even if the first one came to their knowledge first, regardless nSequence.
Thus, in the end "full replace-by-fee", where nSequence is IGNORED for purposes of replace-by-fee, is expected to become the norm, and we should really be designing our wallets and so on so that we only trust transactions that have confirmations.
The "nSequence=0xFFFFFFFF means opt-OUT of RBF" convention is only followed by fullnodes running standard bitcoind. Nothing prevents miners from running patched bitcoind that ignores this rule, and connecting with similar peers who also ignore this rule.
Regards,
ZmnSCPxj
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Post by Peter Todd via bitcoin-dev
Post by Karl-Johan Alm via bitcoin-dev
Post by Peter Todd via bitcoin-dev
Or via full replace-by-fee, which appears to be used by a significant minority
I was of the impression that final transactions (sequence=0xffffffff)
cannot be RBF'd.
My full-replace-by-fee tree ignores that. It also does preferential peering to
ensure it's well connected with likewise peers, and thus the whole network.
---------------------------------------------------------------------------------------------------------------------------------------------------------------
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
Maksim Solovjov via bitcoin-dev
2018-04-11 19:58:45 UTC
Permalink
OK.

Thank you guys for clarification.

On Wed, Apr 11, 2018 at 1:00 PM, Karl-Johan Alm via bitcoin-dev <
Post by Karl-Johan Alm via bitcoin-dev
Thanks for clarifying!
Good morning Karl-Johan Alm,
Nothing prevents a miner from completely ignoring nSequence when putting
transactions in blocks.
Unconfirmed transactions are, by definition, not recorded in blocks. So
if there is a transaction 0xFFFFFFF nSequence and fee 1000 satoshi, and
another conflicting transaction 0xFFFFFFF nSequence and fee 100000000
satoshi, miners can include the latter one even if the first one came to
their knowledge first, regardless nSequence.
Thus, in the end "full replace-by-fee", where nSequence is IGNORED for
purposes of replace-by-fee, is expected to become the norm, and we should
really be designing our wallets and so on so that we only trust
transactions that have confirmations.
The "nSequence=0xFFFFFFFF means opt-OUT of RBF" convention is only
followed by fullnodes running standard bitcoind. Nothing prevents miners
from running patched bitcoind that ignores this rule, and connecting with
similar peers who also ignore this rule.
Regards,
ZmnSCPxj
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On April 11, 2018 5:37 PM, Peter Todd via bitcoin-dev <
Post by Peter Todd via bitcoin-dev
Post by Karl-Johan Alm via bitcoin-dev
Post by Peter Todd via bitcoin-dev
Or via full replace-by-fee, which appears to be used by a
significant minority
Post by Peter Todd via bitcoin-dev
Post by Karl-Johan Alm via bitcoin-dev
I was of the impression that final transactions (sequence=0xffffffff)
cannot be RBF'd.
My full-replace-by-fee tree ignores that. It also does preferential
peering to
Post by Peter Todd via bitcoin-dev
ensure it's well connected with likewise peers, and thus the whole
network.
Post by Peter Todd via bitcoin-dev
------------------------------------------------------------
------------------------------------------------------------
---------------------------------------
Post by Peter Todd via bitcoin-dev
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
_______________________________________________
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
Loading...