Author

Topic: Sequence numbers created by Bitcoin Core (Read 104 times)

legendary
Activity: 2856
Merit: 7410
Crypto Swap Exchange
December 04, 2022, 07:47:02 AM
#5
I wonder, what is the reason behind that. Because for now it seems like another possibility to check if someone is using console or GUI, so it may be harmful for privacy.
Harmful for privacy in what way? Are you saying that the difference in the sequence number can help identify the user or can it help in identifying that the person creating the transaction is using a wallet that has a console? Knowing that the person is using a console, limits the scope of potential wallets being used.   

When it's combined with other unique value, it definitely could be used to deanonymize or track someone. For example, research by @madu about breaking mixing service[1] use sequence number 4294967294 as one of indicator to spot coinmixer's transaction[2].

[1] https://bitcointalksearch.org/topic/breaking-mixing-services-5117328
[2] https://www.dropbox.com/s/3yapwyfz72tvswh/BA_mixing_services.pdf?dl=0, page 34 table 4.4.
legendary
Activity: 2730
Merit: 7065
Farewell, Leo. You will be missed!
December 04, 2022, 04:59:38 AM
#4
I wonder, what is the reason behind that. Because for now it seems like another possibility to check if someone is using console or GUI, so it may be harmful for privacy.
Harmful for privacy in what way? Are you saying that the difference in the sequence number can help identify the user or can it help in identifying that the person creating the transaction is using a wallet that has a console? Knowing that the person is using a console, limits the scope of potential wallets being used.   
hero member
Activity: 789
Merit: 1909
December 04, 2022, 04:12:42 AM
#3
It seems that I messed up with locktime. Because if it is set to zero, the sequence number is 0xffffffff, so that the locktime is ignored entirely. But if it is set to any higher value, then the sequence number is changed into 0xfffffffe, simply to enforce that locktime.

So, by using console, the locktime is explicitly set by user, or set to zero by default. By using GUI, the locktime is different, based on the current block number. And that's the reason, why results from the console are different.

And about this non-final error: my locktime was simply too big for regtest, even if it was reached in other networks long time ago.
legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
December 04, 2022, 03:03:45 AM
#2
Edit: -snip- Also, I wonder why using sendrawtransaction with 0xfffffffe gives a "non-final" error. It is above RBF range, so it should be final, right?
I've tried it and it worked without an error at my end.

Command used (RegTest):
Code:
createrawtransaction "[{\"txid\":\"58a898970f0de331a61b4912d26c0721dcfe2f7825fad6f9788b739005a35673\",\"vout\":0,\"sequence\":4294967294}]" "[{\"bcrt1pv4xmga6fzuz9svh02sxg8rfqn9jsp39534qm5jpgdarg6zfetjws8hxy6j\":9.99875255},{\"bcrt1ppthegxrypyfq4xx8nvk79tdzc73e9cllnltu53sy6jqug6hjrveqew6xy9\":0.00123450}]"

The only way that error would show is if you set the "locktime" to 4294967294 (which is about 100 years in the future) instead of the sequence.
Compare your command with mine to see the possible issue.

I can't comment on the sequence's inconsistency in createrawtransaction command and GUI. (you may consider opening a new issue for that)
hero member
Activity: 789
Merit: 1909
December 03, 2022, 04:45:23 PM
#1
I tested two ways of creating transaction: one is by clicking that in GUI, and another one is by using createrawtransaction in the console. What surprised me, that if some transaction is marked as non-RBF in the console, it gets 0xffffffff sequence number. However, when the same thing is done in the GUI, it has 0xfffffffe sequence number!

I wonder, what is the reason behind that. Because for now it seems like another possibility to check if someone is using console or GUI, so it may be harmful for privacy. Of course, by using console, it is possible to assign any sequence number. What I described, is automatically selected value, when the whole transaction is marked as replaceable or not, and when sequence numbers are not selected manually by the user.

Edit: It is also surprising that PSBTs also use 0xfffffffe for non-RBF. So, why createrawtransaction use 0xffffffff? Also, I wonder why using sendrawtransaction with 0xfffffffe gives a "non-final" error. It is above RBF range, so it should be final, right?
Jump to: