Skip to content

Add honest overview - #11

Open
arminsabouri wants to merge 1 commit into
mainfrom
honest-overview
Open

Add honest overview#11
arminsabouri wants to merge 1 commit into
mainfrom
honest-overview

Conversation

@arminsabouri

Copy link
Copy Markdown
Collaborator

@yuval-block

Copy link
Copy Markdown
Collaborator

@arminsabouri seeking concept ACK to supersede this with a proper overview (see #17 which used to be the overview)

a lot of the foundational layers for honest, semi-honest and BFT are shared so i want to consolidate that into a single overview doc for all layers

@arminsabouri

Copy link
Copy Markdown
Collaborator Author

@arminsabouri seeking concept ACK to supersede this with a proper overview (see #17 which used to be the overview)

a lot of the foundational layers for honest, semi-honest and BFT are shared so i want to consolidate that into a single overview doc for all layers

Concept ACK foundational layers being consolidated to a single document. is #17 that document?

@nothingmuch

nothingmuch commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Concept ACK foundational layers being consolidated to a single document. is #17 that document?

no, that was initially conceived as an overview, but most of the content is strawmen... it's more a strawman ladder, similar to the "protocol design" doc of privacy pass, and is a supplementary aid to the spec, that justifies the various details

the overview needs to be narrower in scope, only focusing on the concrete, layered protocol suite

here is a proposed outline, each layer inherits most of the previous layer's functionality and adds additional restrictions:

  • sneakernet/implicit transport honest threat model
    • bip draft dependencies:
      • concurrent & extensions - basic data format
      • scrubbing - enforcing boundary between privacy domains e.g. own signing devices and collaborative txn construction
      • hpke - optional - for embedding of out-of-band messages into psbt files
    • define net settlement / payment confirmation
      • base definition assumes out-of-band
      • can be made in-band with hpke
    • all "messages" are just PSBTs with a partial order (can't guarantee a join semilattice in general)
    • should have discussion of privacy
  • interactive transaction construction w/ pluggable transports in honest threat model
    • use cases
      • multisig
      • internally segregated wallets (e.g. operational vs. customer funds)
      • collaborative batching
      • net-settlement
    • define message space to avoid in-band
    • framing format for duplex stream transports
    • broadcast
      • leader
      • clique
      • gossip
    • optional compatibility with lightning interactive-tx by bridging
  • semi-honest
    • considerations for on chain structure
    • restrictions on transport
    • anonymous broadcast by relay w/ anonymous p2p transport
    • implications for liveness
  • bft
    • threat model, incentives
    • coalition formation
      • ownership proofs & online key enrollment
      • listen advertisements
      • co-spend proposals
      • coalition formation proposal
      • role of aggregator in bootstrapping agreement
    • causal log structure, bft crdts = liveness in async/eventual consistency communication model (this may make sense to split, and move the non-bft component to interactive honest)
    • validity proofs
    • bft agreement
      • setchain/redebelly + weak coordinator (bootstrapped by aggregator)
      • TEE leader without redbelly? weak coordinator?
      • distributed (set union consensus)

it should only summarize these topics, not go into detail, referring to the relevant documentation for the details, which will be defined later, including but not limited to:

  • message types
  • framing
  • threat models
  • gossip
    • p2p topology, with and without use of OHTTP based service
    • p2p set reconcilation
  • OHTTP service
    • bridging
    • rate limiting
    • mailboxes
    • broadcast
    • multi server set reconcilation

i.e. a full accounting of the technical means for realizing the goals defined by the cost function

@bc1cindy bc1cindy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concept ACK, well scoped!

Comment thread honest.md
@@ -0,0 +1,178 @@
# Overview: Multiparty transaction construction in honest peer threat model

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rescope this as the detail doc for the interactive-honest layer?

Comment thread honest.md

### `Initiator` and `Responder`

The `Initiator` signals willingness to batch to their counterparty over an authenticated bidirectional channel that may have been established prior to initiation. This document treats signaling `mppj=1` via BIP21 as one practical bootstrap example, not a normative long-term mechanism. Either the receiver or sender of a payment may be the Initiator.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could stay signaling-agnostic, the same abstract/concrete pattern as the broadcast channel from the communication model, with the BIP21/BIP77 material as a non-normative compat section

if the flag stays, what about mp=1? i see no technical reason to inherit the pj name

Comment thread honest.md

Either an `Initiator` or a `Responder` may create the session. The party that does so is the `SessionCreator`.

In production, we rarely observe multiple concurrent `Initiator` and `Responder` pairings. After `T_intent`, most multiparty payjoin attempts therefore collapse to two-party payjoins. Clients should persist multiparty capability metadata for counterparties learned during interactive sends. Each `Initiator` fans out session requests to `Responder`s with prior payment history. `Responder`s in turn can fan out requests to their previous counterparties.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since "we" here no longer includes payjoin, I guess worth attributing this to two-party payjoin production data

Comment thread honest.md
Comment on lines +53 to +56
TODO: concurrent session creators ? How to prevent? What to do?

* Deterministic rule for picking?
* Participate in both sessions?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since fund safety doesn't depend on this, is prevention needed?

what if whoever discovers two overlapping sessions selects one based on the lower session ID?

same input in both just degrades to an accepted liveness failure?

Comment thread honest.md

For this document, `balance` means the running value equation over the accumulated transaction view:

`balance = sum(inputs) - sum(outputs) - sum(pseudo outputs)`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if everyone pays exactly the minimum fee, nobody posts a pseudo output, the balance stays stuck at the total fee, and signing never triggers

maybe pseudo outputs should just declare the full fee contribution, always

that's how #16 defines PSBT_GLOBAL_EXPLICIT_FEE_CONTRIBUTION

makes sense?

Comment thread honest.md

Before signing, each sender must receive explicit confirmation from all of its receivers of the PSBT’s unique ID (defined in the [draft BIP](https://github.com/payjoin/multiparty-protocol-docs/pull/6/)) which commits to the complete output set and verify that every confirmed ID matches the one computed locally.

In a cyclic payment graph, such as Alice pays Bob, Bob pays Carol, and Carol pays Alice, net-positive receivers can initiate safely and break the dependency cycle. Senders sign only after every receiver has confirmed the PSBT unique ID. Once all net-positive receivers confirm, the protocol can treat all funds as fully accounted for.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in a perfectly balanced cycle everyone is net-zero, so net-positive (read as > 0) selects nobody and this deadlocks

the intended meaning is >= 0 and #16 already says non-negative for who can confirm, so maybe just use that term here or be explicit

payjoin/multiparty-protocol-docs#4 (comment)

Comment thread honest.md

Each participant submits the transaction inputs they control and outputs they wish to create. Inputs and outputs must be posted as independent messages. Participants should send all their inputs before the outputs.

To signal their intent to back out of the session, a participant can deliberately post outputs that exceed their input contribution, causing the transaction balance to overflow. This action makes the balance equation unsatisfiable and prompts all other participants to refuse to sign.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the abort mechanism was a MAX_MONEY pseudo output (global field, not a txout), a modest overflow as written here is indistinguishable from an output still waiting for inputs

payjoin/multiparty-protocol-docs#4 (comment)

payjoin/multiparty-protocol-docs#4 (comment)

Comment thread honest.md

When the `balance` reaches zero and participants receive receiver confirmations, every participant can independently verify their outputs are present and proceed to witness provision.

This honest variant uses optimistic signing and does not require an explicit "Ready-to-Sign" (RTS) declaration on the success path. With pseudo-output accounting, readiness is implicit once participants converge on the same message set and each participant has contributed at least one input before final output/pseudo-output closure.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this diverges from past comments

"converge on the same message set" isn't observable and "closure" is undefined without RTS

payjoin/multiparty-protocol-docs#4 (comment)

payjoin/multiparty-protocol-docs#4 (comment)

Comment thread honest.md

Inputs and outputs may arrive in arbitrary order. Define ordering semantics a priori.

All messages are raw binary encoded PSBT fragments.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#16 defines fields for inputs/outputs, removal, sort keys and fee contributions, but the unique-ID confirmation is only described in prose (no field), and the SP scan key / tweak shares aren't specified anywhere

are these meant to follow the same grow-only-set field pattern?

Comment thread honest.md

## Silent Payments

To support Silent Payments, the recipient broadcasts its [BIP 352 scan public key](https://github.com/bitcoin/bips/blob/master/bip-0352.mediawiki) as an independent message instead of an output registration. Participants must share their ECDH tweak share once the silent payments output is known. Each participant derives the silent payment output from the shared transaction inputs and recipient scan public key. When the input set changes (new input and tweak), all participants recompute the Silent Payment output before signing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a late input already invalidates all sigs under SIGHASH_ALL, but with SP it additionally changes the output itself

everyone must re-derive before re-signing, and finalization now depends on every input's tweak share being present, so one missing share blocks the whole session

worth noting SP couples convergence to the input set?

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.

4 participants