The daemon's wallet scan hashed every watched script against every block
filter with a BigInt SipHash: ~3 filters/s on the VPS once the gap limits
went to 200/100 (~3,300 scripts), i.e. days for a one-year window. The
matcher now lives in dgbpow.wasm next to the PoW hashes — scripts are
uploaded once per scan, each filter is one call, the set is decoded once
and each target binary-searched — ~5,500 filters/s locally, ~2,000/s on
the VPS with block fetches. The JS path was rewritten with uint32 lanes
and exact 32×32 partial products as a fallback (module missing or filter
beyond its buffers). scripts/gcs-check.ts cross-checks both against a
BigInt reference on random filters; `npm run gcs:test -w @dgb-wallet/p2p`.
NOWNodes stopped accepting the proxy's API key ("Unknown API_key" on every
endpoint), which is why the wallet showed "Blockbook HTTP 401" for every
path. The vhost mirror now proxies /blockbook/ to Atomic Wallet's public
Blockbook; ops/blockbook-upstream.sh switches the live vhost either way.
|
||
|---|---|---|
| .. | ||
| bin | ||
| native | ||
| scripts | ||
| src | ||
| test | ||
| .gitignore | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
@dgb-wallet/p2p
DigiByte P2P client for the Maximum Privacy backend. Client-side chain data via BIP157/158 compact block filters — the wallet does its own address matching locally, so peers never learn which addresses it cares about.
Current status: Milestone 1 (peer connect + version handshake).
Planned milestones:
- ✅ Peer connect + version handshake
- Peer discovery via DNS seeds +
getaddr - Header sync (
getheaders/headers) - BIP157 filter negotiation + BIP158 filter download
- Filter probing (address → scripthash → filter match)
- Block fetching for filter hits
- Transaction broadcast (
inv/tx) - Dandelion++ integration
- Persistent cache
Milestone 1 demo
cd "D:\Dev\SilentCode\Digibyte"
npm install # first time only
npm run build -w @dgb-wallet/core
npm run handshake -w @dgb-wallet/p2p
Resolves DGB DNS seeds → connects to real live peers on port 12024 → performs the version/verack handshake → reports each peer's protocol version, user agent, service flags, and chain tip height.
To target a specific peer IP:
npm run handshake -w @dgb-wallet/p2p -- 1.2.3.4
Layout
src/
hash.ts — double-SHA256 for message checksums
varint.ts — Bitcoin/DGB compact-size int encoding
framing.ts — 24-byte header + payload + checksum, multi-frame parsing
version.ts — version/verack message encode/decode, service flag bits
peer.ts — per-peer TCP + handshake state machine
index.ts — re-exports
scripts/
handshake-demo.ts — Milestone 1 end-to-end demo
Depends on @dgb-wallet/core for network parameters (DGB_P2P.magic, defaultPort, dnsSeeds).