Bitcoin Forum
November 29, 2026, 06:25:56 PM *
News: Latest Bitcoin Core release: 32.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: spscand: a watch-only BIP352 silent payment scanner, with a web scanner  (Read 99 times)
NotATether (OP)
Legendary
*
Offline

Activity: 2534
Merit: 10777


┻┻ ︵㇏(°□°㇏)


View Profile WWW
November 14, 2026, 10:17:34 AM
Last edit: November 15, 2026, 09:01:39 PM by NotATether
Merited by nullius (10), ABCbits (8), Pmalek (5), nc50lc (1), DireWolfM14 (1)
 #1

I've released spscand 0.1.0, the standalone scanner for silent payments.



What it does

It finds payments to your sp1 address (BIP352 1.1.2), tracks their spends and reorgs, and reports them through a local JSON API and a webhook.

Where it gets blocks

It never asks a server about an address, output or transaction. You can get blocks from your own node, a blindbit server, or BIP352 filters. Tor works with proxy = "socks5h://127.0.0.1:9050" including onion connections and peers

Web scanner

If you don't want to install anything, spscan.bitmixlist.org scans a wallet from a browser. There is also a server mode for long histories, but it can see your scan key. Results are deleted within 24 hours.

libspscan

A small C library, libspscan, does the scanning, BIP352 matching and the BIP158 filter checks.

It doesn't read or write anything and never sees a spend key. This allows other wallets can use it.

spscand needs Python 3.11, libsecp256k1 and a C compiler for libspscan. Nothing from PyPI.

Limits

  • Only works with confirmed blocks, and mempool payments are not reported.
  • A malicious BlindBit server could hide a payment by serving incomplete data.
  • Filter mode P2P connections are unencrypted (no BIP324 yet). Onion peers are fine. Filter mode gains are marginal with hundreds of labels

That's enough yapping for me. Now let me enjoy my fish noodles  Smiley

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
█████▀██████████████▀█████
████████▄▄██████▄▄████▀███

██████████████████████████
██▄▄██████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
███▄████▀▀██████▀▀████████
█████▄██████████████▄█████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀
 
 DΞX.fo 
▄▄██████
█████████
██████████
██████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|
▄▄█
▄████▀
▄███▀█▄
▄██▀█▄██
█████▀▀█
████████
████████
▀██▄████
▄████▄▄█
▄█████▀███
▄█████▀████▀
█████▀███████
▀██▀█████████
|..BTC......XMR...
..USDT.....LTC...
....Fees  0.8%.....
nullius
Copper Member
Hero Member
*****
Offline

Activity: 686
Merit: 2957


Privacy is necessary & sufficient for fungibility.


View Profile WWW
November 15, 2026, 02:16:39 AM
 #2

I’ve just been browsing libspscan on and off between distractions.  I haven’t yet tried anything, and I cannot yet opine either way.  But I want to THANK YOU for working on this.  I’m not yet sure, but you may have accidentally either obsoleted or jumpstarted my planned project.  Wink

One remark thus far:  In libspscan, I respectfully suggest using git submodule for secp256k1.  Although I myself have some debate over the pros and cons of submodules, one of several major benefits is that they make auditing much easier:  The submodule code is guaranteed to be either Core’s secp256k1, or your branch/fork thereof which is easily diffable against upstream; thus, there is no need to compare files by the means you suggest in the README.  And when you bump the upstream version of a submodule, the git history is clean and simple—easy to read.

(What’s this, your very own gcs_decode() and friends?  Mmmm, I weep that you may be taking away my work.)

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
█████▀██████████████▀█████
████████▄▄██████▄▄████▀███
██████████████████████████
██▄▄██████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
███▄████▀▀██████▀▀████████
█████▄██████████████▄█████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀

 DΞX.fo 
▄▄██████
█████████
██████████
██████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|███████▄███▄███▄███▄██
█████████▄▀█████▀▄████
███▄████████▀█▀████████▄
█████████▀███████▀██████
████████████████████████
█▄██▄▀▀▀▀▀██▄▀▄██▀▀▀▀▀▄▀
▄████▄▀▀▀██▀███▀██▀▀▀▄
████████████████████
▀███████████████████▄
█▀████████████████████▄▄
████████████████████████
████████████████████████
███▀███████████████████▀
|
NotATether (OP)
Legendary
*
Offline

Activity: 2534
Merit: 10777


┻┻ ︵㇏(°□°㇏)


View Profile WWW
November 15, 2026, 03:54:33 PM
 #3

One remark thus far:  In libspscan, I respectfully suggest using git submodule for secp256k1.  Although I myself have some debate over the pros and cons of submodules, one of several major benefits is that they make auditing much easier:  The submodule code is guaranteed to be either Core’s secp256k1, or your branch/fork thereof which is easily diffable against upstream; thus, there is no need to compare files by the means you suggest in the README.  And when you bump the upstream version of a submodule, the git history is clean and simple—easy to read.

I'll consider this. The main thing I was worried about was exporting libsecp256k1 symbols from the library. As anyone who has worked with C knows, this can cause quite frustrating problems for programs using such libraries and the system's libsecp256k1. As I had painfully learned over the last couple of years.

But I don't think submodules will interfere with this.

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
█████▀██████████████▀█████
████████▄▄██████▄▄████▀███

██████████████████████████
██▄▄██████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
███▄████▀▀██████▀▀████████
█████▄██████████████▄█████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀
 
 DΞX.fo 
▄▄██████
█████████
██████████
██████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|
▄▄█
▄████▀
▄███▀█▄
▄██▀█▄██
█████▀▀█
████████
████████
▀██▄████
▄████▄▄█
▄█████▀███
▄█████▀████▀
█████▀███████
▀██▀█████████
|..BTC......XMR...
..USDT.....LTC...
....Fees  0.8%.....
nullius
Copper Member
Hero Member
*****
Offline

Activity: 686
Merit: 2957


Privacy is necessary & sufficient for fungibility.


View Profile WWW
November 15, 2026, 06:21:45 PM
 #4

One remark thus far:  In libspscan, I respectfully suggest using git submodule for secp256k1.

I'll consider this. The main thing I was worried about was exporting libsecp256k1 symbols from the library. As anyone who has worked with C knows
, this has nothing whatsoever to do with source code management.  Files are in the exact same place on the filesystem, only different to git.  Smiley

this can cause quite frustrating problems for programs using such libraries and the system's libsecp256k1. As I had painfully learned over the last couple of years.

But I don't think submodules will interfere with this.

Indeed.  Is that the cause of your -Wl,-Bsymbolic?

Is it still the situation that linking to a system libsecp256k1 yourself is a bad idea?  I know it was, something like nine years ago; I’d hoped then that that would change someday.

I figured out an ad hoc scheme for handling this myself (with in-tree copy, sorry!), before I discovered that libwally did it better than I did.  It’s been a long time since I looked at that code; I guess it could probably still be a handy guide.

To prevent export of secp256k1 symbols and thus, avoid clashes when your library is linked by something that links secp256k1 itself, linker version scripts (LDFLAGS+=-Wl,--version-script=spscan.map in Makefile) may be used to control symbol visibility—but then, if you’re linking secp256k1 statically into a shared library, other dark arts may be required.  I don’t know all the right knobs off the top of my head.  I also don’t know off the top of my head if it would also solve the problem that you stated.  To control symbol visibility and runtime binding is sometimes a major pain point, with platform-dependent pitfalls.

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
█████▀██████████████▀█████
████████▄▄██████▄▄████▀███
██████████████████████████
██▄▄██████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
███▄████▀▀██████▀▀████████
█████▄██████████████▄█████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀

 DΞX.fo 
▄▄██████
█████████
██████████
██████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|███████▄███▄███▄███▄██
█████████▄▀█████▀▄████
███▄████████▀█▀████████▄
█████████▀███████▀██████
████████████████████████
█▄██▄▀▀▀▀▀██▄▀▄██▀▀▀▀▀▄▀
▄████▄▀▀▀██▀███▀██▀▀▀▄
████████████████████
▀███████████████████▄
█▀████████████████████▄▄
████████████████████████
████████████████████████
███▀███████████████████▀
|
NotATether (OP)
Legendary
*
Offline

Activity: 2534
Merit: 10777


┻┻ ︵㇏(°□°㇏)


View Profile WWW
November 15, 2026, 08:00:35 PM
 #5

Indeed.  Is that the cause of your -Wl,-Bsymbolic?

Yeah, it particularly helps for the .so shared library.



spscand 0.1.1 has been released.

Release notes:

- Unconfirmed payments are now shown if connected to a Bitcoin Core node.
- An API has been implemented to enable users to watch arbitrary labels without restarting the daemon.
  See the README for more information about this.
- Fixed a bug in the filters backend where it could stall when asked for a block it hadn't indexed yet.

I'll try to write proper docs for all this, it will need to be hosted somewhere.

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
█████▀██████████████▀█████
████████▄▄██████▄▄████▀███

██████████████████████████
██▄▄██████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
███▄████▀▀██████▀▀████████
█████▄██████████████▄█████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀
 
 DΞX.fo 
▄▄██████
█████████
██████████
██████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|
▄▄█
▄████▀
▄███▀█▄
▄██▀█▄██
█████▀▀█
████████
████████
▀██▄████
▄████▄▄█
▄█████▀███
▄█████▀████▀
█████▀███████
▀██▀█████████
|..BTC......XMR...
..USDT.....LTC...
....Fees  0.8%.....
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!