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

Make prev_tx optional during contract negotiation #98

Open
nkohen opened this issue Sep 24, 2020 · 1 comment
Open

Make prev_tx optional during contract negotiation #98

nkohen opened this issue Sep 24, 2020 · 1 comment

Comments

@nkohen
Copy link
Contributor

nkohen commented Sep 24, 2020

Full nodes and other clients with access to a full utxo set do not need to receive prev_tx when they are learning their counter-party's funding inputs because a txid and vout will suffice for them to query for this prev_tx (and txid + vout totals 36 bytes whereas a full transaction can be much much larger). Light clients which do not have access to the utxo set should still receive prev_tx.

We need to add an option during contract negotiation for parties to specify which kind of client they are so that clients with access to the full utxo set can save significant space when receiving an offer/accept message. Additionally a new funding input TLV type will be needed for non-prev_tx communication.

@NicolasDorier
Copy link

So basically, to explain my goal with this:

  1. When taproot comes, the prev_tx is useless in any case,
  2. A client with full utxo set access don't need it,
  3. In BTCPay Server, while we will try to include it if we can, our wallet don't have the previous tx if it has been restored (as it relies on pruned node and scantxoutset). So our goal is to make the best that we can: If we have, include previous tx, if not, then not including it. If we don't have the tx, this still might be fine for 1 or 2 clients.

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

No branches or pull requests

2 participants