Skip to content
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

Opt In Topologically Restricted Until Confirmation Transactions For More Robust Fee-bumping #1541

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

glozow
Copy link
Member

@glozow glozow commented Jan 18, 2024

This is a BIP for Topologically Restricted Until Confirmation (TRUC) Transactions. It's also called "v3 transaction policy" since the marker is nVersion=3.

A specification is useful for coordination between node impls that want to implement the same policy and applications that want to use it. For those that are not interested in the details of v3 policy, this also serves as a writeup of the specific pinning problems we aim to address. There has been discussion of using this in other protocol design and multiple requests for its documentation to exist in the BIPs repository, so I'm opening a PR here.

Implementation:

Example usage and things built on top:

Discussion and history:

@t-bast
Copy link
Contributor

t-bast commented Jan 18, 2024

FWIW, concept ACK :)

Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 4bd12d5

bip-v3.mediawiki Outdated Show resolved Hide resolved
bip-v3.mediawiki Outdated Show resolved Hide resolved
bip-v3.mediawiki Outdated Show resolved Hide resolved
bip-v3.mediawiki Outdated Show resolved Hide resolved
bip-v3.mediawiki Outdated Show resolved Hide resolved
bip-v3.mediawiki Outdated Show resolved Hide resolved
@glozow
Copy link
Member Author

glozow commented Jan 22, 2024

Thanks @murchandamus, took all your suggestions (4bd12d5...af8e903)

Copy link
Member

@ismaelsadeeq ismaelsadeeq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

bip-v3.mediawiki Outdated Show resolved Hide resolved
bip-v3.mediawiki Outdated Show resolved Hide resolved
bip-v3.mediawiki Outdated Show resolved Hide resolved
@glozow glozow force-pushed the 2024-01-v3-prio branch 3 times, most recently from 752a287 to 542f833 Compare January 22, 2024 12:35
@glozow
Copy link
Member Author

glozow commented Feb 19, 2024

@luke-jr this has been open for a month, would you mind taking a look?

@ariard
Copy link
Member

ariard commented Feb 19, 2024

I think this should document that 1000 vb child limit is experimental and it cannot be relied on by downstream projects.
This opt-in policy is not robust towards NTA pinning (cf. “The Good, The Bad, The Ugly” 2020 mail) and “loophole” pinning exposed in Core’s #28948. This can note that additional opt-in policy might be applied on top of nversion=3 see Core’s #29454.

@glozow glozow changed the title Opt-In Policy For More Robust Fee-bumping Opt In Topologically Restricted Until Confirmation Transactions For More Robust Fee-bumping Mar 22, 2024
Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 63e8a71

bip-truc.mediawiki Outdated Show resolved Hide resolved
bip-truc.mediawiki Outdated Show resolved Hide resolved
bip-truc.mediawiki Outdated Show resolved Hide resolved
bip-truc.mediawiki Outdated Show resolved Hide resolved
bip-truc.mediawiki Outdated Show resolved Hide resolved
Copy link
Member Author

@glozow glozow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @murchandamus! Accepted your suggestions.

bip-truc.mediawiki Outdated Show resolved Hide resolved
bip-truc.mediawiki Outdated Show resolved Hide resolved
bip-truc.mediawiki Outdated Show resolved Hide resolved
bip-truc.mediawiki Outdated Show resolved Hide resolved
bip-truc.mediawiki Outdated Show resolved Hide resolved
<pre>
BIP: ???
Layer: Applications
Title: Topologically Restricted Until Confirmation Transactions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The title is longer than 44 characters

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed. 44 is not a lot of characters!

bip-truc.mediawiki Show resolved Hide resolved
@luke-jr
Copy link
Member

luke-jr commented Apr 23, 2024

As with #1524, node policy is not a standardizable subject matter in itself - every node decides its own policy. BIP 125 already defined a way for wallets to indicate they prefer RBF-like treatment of their transactions, and I don't see why the same signal can't be used for this.

@vostrnad
Copy link
Contributor

Every node deciding its own policy is not mutually exclusive with it being standardizable – each node decides which (if any) standards to follow. Policy standards make just as much sense as e.g. wallet standards or P2P protocol standards.

@Roasbeef
Copy link
Contributor

BIP 125 already defined a way for wallets to indicate they prefer RBF-like treatment of their transactions, and I don't see why the same signal can't be used for this.

BIP 125 defines a set of rules w.r.t transaction replacement. Some of those rules have edge cases that can lead to defects where transactions that should otherwise be replaced, can't be replaced. This class of replacement defects loosely falls under the umbrella of "transaction pinning". The TRUC rules resolve those issues, creating a replacement semantics that better serve off-chain protocols, and address some known pinning vectors. For many off-chain protocols, TRUC will supersede base RBF. As the semantics are distinct, it cannot use the existing sequence fields carved out by BIP 125 (the rules are also incompatible). Instead, it uses transaction v3 (no longer non standard) as a way to signal replacement under a distinct set of rules.

@luke-jr
Copy link
Member

luke-jr commented Apr 23, 2024

BIP 125 defines a signalling mechanism, not policy (which is again outside the scope of BIPs) even if it describes a particular policy. The intent of the signal is clear, and it can be implemented in other ways such as the one that seems to be desired here.

@Roasbeef
Copy link
Contributor

BIP 125 defines a signalling mechanism, not policy

It clearly defines both:

The opt-in full Replace-by-Fee (opt-in full-RBF) signaling policy described here allows spenders to add a signal to a transaction indicating that they want to be able to replace that transaction in the future

This policy specifies two ways a transaction can signal that it is replaceable.

Inherited signaling: Transactions that don't explicitly signal replaceability are replaceable under this policy for as long as any one of their ancestors signals replaceability and remains unconfirmed.

Because descendant transactions may also be replaceable under this policy through inherited signaling, any method used to process opt-in full-RBF transactions should be inherited by any descendant transactions for as long as any ancestor opt-in full-RBF transactions remain unconfirmed.

It also defines a precise set of rules for the policy. If an implementation deviates from those rules, then it isn't BIP 125. From the OP, there's a clear need to define a new policy and signalling mechanism, which this document does.

@luke-jr
Copy link
Member

luke-jr commented Apr 23, 2024

It may be poorly worded, but that isn't the point.

@luke-jr
Copy link
Member

luke-jr commented Apr 23, 2024

(Note that BIP 125's relationship with policy was a matter of discussion back when it was submitted, and it was nearly rejected - the only reason it was accepted in the end, was as a signalling BIP. And even if you want to insist it defines policy, mistakes made in the past would not be a reason to repeat them in the future, and thus would actually work against accepting this proposal)

@glozow
Copy link
Member Author

glozow commented Apr 24, 2024

Addressed @murchandamus's comments and slightly restructured the text.

As with #1524, node policy is not a standardizable subject matter in itself - every node decides its own policy.

I really don't see how the text in this BIP can be interpreted to mean that nodes can't decide their own policy. But I've added some language to the text to make it more clear that it's optional, that there are other ways to do this, policy is not consensus, and the details can be different.

BIP 125 already defined a way for wallets to indicate they prefer RBF-like treatment of their transactions, and I don't see why the same signal can't be used for this.

This policy restriction should be opt in to avoid breaking existing use cases. Also I don't agree that the same signal should be used for 2 different things just because they have a few things in common.

@ariard
Copy link
Member

ariard commented Apr 25, 2024

(Note that BIP 125's relationship with policy was a matter of discussion back when it was submitted, and it was nearly
rejected - the only reason it was accepted in the end, was as a signalling BIP. And even if you want to insist it defines
policy, mistakes made in the past would not be a reason to repeat them in the future, and thus would actually work against > accepting this proposal)

If I can make one suggestion it would be to split this BIP in two new BIP components:

  • the signaling mechanism (nversion=3)
  • the set of policy rules (i.e the TRUC)

This would certainly help to navigate more efficiently this kind of situation in the future.

"Similarly, there are multiple approaches to creating a policy to minimize pinning, more may become available over time (see Related Work section), and the details of this approach can be tweaked if conditions change. For example, if loosening one of the topology restrictions enables a new use case while still providing acceptable pinning bounds, it can be changed.”

This gives flexibility to have many signaling mechanism (e.g nversion / nsequence) committing to one set of policy rules and vice-versa have one signaling mechanism committing to many policy rules (bip125, 1000 vb child limit truc, etc). This can only give us more flexibility w.r.t coordinated upgrades across bitcoin layers.

edited - to clarify the suggestion to split in 2 new BIP documents this current one.

Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My concerns have been addressed, I just noticed a typo you could fix in case you need to touch this again.

reACK f2d33b5


===Specification===

Senders can signal that they want a transaction to be Topologically Restricted Until Confirmation (TRUC). Sepcifically, set <code>nVersion=3</code>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Senders can signal that they want a transaction to be Topologically Restricted Until Confirmation (TRUC). Sepcifically, set <code>nVersion=3</code>.
Senders can signal that they want a transaction to be Topologically Restricted Until Confirmation (TRUC). Specifically, set <code>nVersion=3</code>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
9 participants