Skip to content

Scurbber crate - #1

Closed
arminsabouri wants to merge 3 commits into
cargo-docfrom
scurbber-crate
Closed

Scurbber crate#1
arminsabouri wants to merge 3 commits into
cargo-docfrom
scurbber-crate

Conversation

@arminsabouri

@arminsabouri arminsabouri commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Migrated from payjoin/concurrent-psbt#32
Implementation of payjoin/multiparty-protocol-docs#6.

Key type bytes overlap across PSBT map types. For example, 0x06 is TX_MODIFIABLE in
global but BIP32_DERIVATION in inputs. So filtering requires map context.

Buffers the global map to detect version and counts (INPUT_COUNT/
OUTPUT_COUNT for v2, UNSIGNED_TX parsed via Transaction::consensus_decode
for v0), then streams remaining maps with per-map allowlists for global,
input, and output.

Pair::decode is pub(crate) in psbt-v2 0.3.0; worked around with a
PairDecode extension trait replicating the upstream logic.

===

Follow up todo that I totally forgot about is to upstream visibility changes to decode upsteam to rust-psbt

Key type bytes overlap across PSBT map types. For example, 0x06 is TX_MODIFIABLE in
global but BIP32_DERIVATION in inputs. So filtering requires map context.

Buffers the global map to detect version and counts (INPUT_COUNT/
OUTPUT_COUNT for v2, UNSIGNED_TX parsed via Transaction::consensus_decode
for v0), then streams remaining maps with per-map allowlists for global,
input, and output.

Pair::decode is pub(crate) in psbt-v2 0.3.0; worked around with a
PairDecode extension trait replicating the upstream logic.
@yuval-block yuval-block closed this Jul 9, 2026
@yuval-block
yuval-block deleted the scurbber-crate branch July 9, 2026 00:40
@arminsabouri

Copy link
Copy Markdown
Collaborator Author

Why did this one end up getting closed?

@nothingmuch

Copy link
Copy Markdown
Contributor

i fucked up pushing branches, sorry about that

@arminsabouri
arminsabouri restored the scurbber-crate branch July 9, 2026 15:24
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.

3 participants