-
Notifications
You must be signed in to change notification settings - Fork 861
RBF is not disabled by default anymore #686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Wait I don't understand why there is both If |
Nicolas: Lucas didn't introduce two flags. After Lucas' PR, there was only |
Ah ok. |
I don't really like bothering users with a question they don't care or are unlikely to understand. (what the hell is RBF??) |
5e7b223
to
c22cfa5
Compare
Ok, fixed.
I can rename the parameter to |
No it should be named RBF, but most users don't care about it and asking them a question if they don't care about it is not a good solution I think. I am mixed... ping @lontivero what do you think? |
Well, I can use XML documentation for that API, where we recommend to enable it unless they need to care about backwards compatibility. |
That make sense. |
c22cfa5
to
acdde96
Compare
Done, and rebased (and fixed build). |
acdde96
to
6b8cab9
Compare
6b8cab9
to
ad44c79
Compare
ad44c79
to
f1438b5
Compare
Concept ACK.
Agree, renaming is fine, probably nobody using it yet. |
Then let's merge it asap and bump? |
It is okay for me but let me be honest here: the name RBF sucks bad because the semantic is unclear, for example: what does it means IsRBF? Does it means that the tx is replaceable? It is confusing. Bitcoin core calls it
So, in the library it is okay to call it |
@knocte have you fixed all the warnings? |
Oh well... I started doing this, and found out that Transaction.Sign() calls CreateTransactionBuilder()... Which means that we should add overloads on Sign() (or Transaction ctor) with RBF flag too. I went for the latter, and oh my, the rabbit hole is very deep. I need help. |
(I pushed my warnings-fixage WIP work as a 2nd commit) |
@knocte I think that you just have to call with |
Sorry for late reply, but I never understood the statement above. If I mark RBF=false on existing stuff, it would defeat the point of this PR. Anyway I've been thinking about this lately, and as you Nicolas seem to always recommend TransactionBuilder API over Transaction API, would you accept marking |
Old CreateTransactionBuilder() methods are now marked as Obsolete; the new ones, introduced in this commit, will force the NBitcoin consumer to make a decision about what kind of transactions will be created by her/his TransactionBuilder instance: * if using EnhanceOnChainPrivacy mode, RBF will be disabled and the inputs & outputs will be shuffled; * if using Lightning mode, RBF will be enabled (ReplaceByFee is very important in this environment because fee rates might change a lot since the moment when a channel was opened until when it needs to be closed), and shuffling inputs or outputs will be disabled. Why disabling shuffling for Lightning? Because according to the spec, they need to be ordered lexicographically (e.g. the previous defaults were causing a bug in DotNetLightning: [1]). [1] joemphilips/DotNetLightning#133
eb592e0
to
f8ed69b
Compare
878114e
to
24301c6
Compare
d114a5d
to
e4c0829
Compare
725a14b
to
bbcaf18
Compare
But it's not enabled by default either: the developer is forced to
make a decision if he wants to avoid the compile-time warnings.
This way we avoid the potential problems that could have been caused
by simply switching the default to be RFB-enabled, as discussed
originally here: #355