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

Cake electrs fork updates #2

Open
wants to merge 3 commits into
base: cake-update-v1
Choose a base branch
from

Conversation

josibake
Copy link

@josibake josibake commented Aug 2, 2024

Been doing some testing and review, here are some bug fixes/improvements. Longterm, my goal is to get the electrs fork ready for a PR to the upstream electrs rep, but no reason not to update little things as I go along.

The main change here is now clients doing long rescans will download less data since a txid and tweak will only be included in the response if it has at least one unspent output.

Also let some thoughts in the comments (mostly for myself). cc @rafael-xmr

Only send a txid:tweak object if the output_pubkeys array has at least
one unspent output. Otherwise, we end up having the client download
a lot of data they will never use.
The smallest outpoint is chosen from all of the transaction inputs, not
just the silent payment eligible inputs (see BIP352). In practice, most
wallets will be spending the same input types together so its likely
that the set of silent payments eligible inputs will be the same as the
set of transaction inputs. Wallets can, however, add non-eligible
inputs, such as OP_CHECKMULTISIG inputs.

Fix by collecting all outpoints before filtering for the silent payments
eligible inputs.
70,000 is way too early, update to 800,000 which is after taproot
activation and a little before the first BIP352 transactions appear on
chain.

Ideally, this start height should be network specific considering
taproot has always been activated on signet.

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

Successfully merging this pull request may close these issues.

1 participant