Skip to content

Privacy bundle interface #27

Open
arminsabouri wants to merge 9 commits intomasterfrom
bracketing
Open

Privacy bundle interface #27
arminsabouri wants to merge 9 commits intomasterfrom
bracketing

Conversation

@arminsabouri
Copy link
Copy Markdown
Collaborator

This is a large refactor. The major changes here are:

  • Collapse maker and taker roles into one multi party role
  • acceptance of a cospend proposal is now conditional on the wallet's own cost bracket, not unconditional
  • unilateral fallback planning considers all batching combinations, not just individual obligations
    • future work will also enumurate over chagne decomposition strategies
  • wallets won't enter a session unless they have enough viable unilateral exits
  • introduces PrivacyMetric/ErasedPrivacyMetric/PrivacyBundle traits, SubsetSumMetric, the input amount resolution on Plan, and wires it into CompositeScorer
  • cleans up the old flat privacy_weight: f64 field that the bundle replaces. And some other scoring weights that were never used in 0481ca8

Previously, MakerStrategy and TakerStrategy accepted cospend proposals
unconditionally: any invitation was accepted, any orderbook peer was
proposed to, regardless of whether joining the session was actually
cost-beneficial for the wallet.

Now the makers and takers only make commital actions (agg proposals) if 
they their best unilateral action is no worse than the agg proposal in terms of 
subjective cost.
Unilateral actions include all possible subsets of 
payment obligations as individual plans.
makers and takers should behave uniformally. This will make future work on the 
cost function easier to reason about and implement. This distinction was initially
created as part of a POC / testing scaffolding. Agenst will make co spends as long as there
are orderbook utxos and PO's in the queue
stub the privacy cost to differentiate unilateral from cospend:
unilateral transactions should cost more, but we have no privacy terms rn.

This stubs a privacy weight for unilateral txs making cospends more preferabably when
they are not under time pressure.

Lastly, `ContributeOutputsToSession` was comparing single-PO contribution cost
against the global best unilateral cost (which batches all POs), causing
wallets to never contribute once accepted. Remove the cost gate from
contribution
Bundles are collections of privacy metrics / measures that evaluate
over a plan. A measure can output a value specific to its domain. The 
individual metrics define how to convert that into a satoshi amount 
wrt a privacy budget.
Just removing clutter
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