Repository navigation
[WIP] draft of complete docs - #80
yuval-block wants to merge 112 commits into
Conversation
range-diff for force push 1ee57d1562 → 8e41ba243d
|
oakagent
left a comment
There was a problem hiding this comment.
Typos in what this pull request adds:
docs/channels.md
- l.47 - "UTXOs that provides" → "UTXOs that provide"
- l.49 - "encoded of the cost function" → "encoded in the cost function"
- l.69 - "gossipped" → "gossiped"
- l.69 - "is just be a hash" → "is just a hash"
docs/coalition_formation.md
- l.76 - "the honest subset peers" → "the honest subset of peers"
oak · automated
|
|
||
| - each started successor costs the adversary at least one coin, apart from option A's counterparty exception; | ||
| - a late pass starts nothing, so it creates no new attempt; | ||
| - a participant accepts at most one successor per stalled phase; |
There was a problem hiding this comment.
Recovery accepts conflict with one-successor rule
The acceptance section says a participant may accept competing successors of the same stalled phase, but this privacy bullet says it accepts at most one. The two rules cannot both be implemented, and the privacy and boundary-split analysis depends on which one holds.
oak · automated · 8e41ba2
There was a problem hiding this comment.
the privacy bullet is wrong, although directionally correct - participants should not accept an unbounded number of proposals, but there is no requirement for recovery coalition formation proposals to be linearized or synchronized in any way
the problem with accepting all proposals is that this necessarily reveals some information:
- when a participant is active
- what their preferences may be (e.g. consider probing with co-spend proposals until a feerate threshold is discovered, and then knowing that feerate, differentiating with respect to the other elements of the co-spend proposals to ellicit information about preferences with respect to various UTXOs, constraints, etc)
a participant should add some noise to their preferences and limit how much they negotiate, which applies to recovery sessions especially since DoS amplifies privacy leaks, c.f. https://dl.acm.org/doi/10.1145/1315245.1315258 (loosely related)
There was a problem hiding this comment.
something i meant to add to the coalition formation chapter is a few worked examples. noting here since it's relevant to this point too:
a trivial co-spend proposal is one involving just a single UTXO and surplus, no fee adjustment. this does not benefit from any fee fuzzing, but minimally reveals preferences through the transaction constraints. this is also suitable for light clients who do not wish to interact with the order book directly, delegating order matching to the aggregator. notably, relaxing the requirement that the aggregator own an input makes possible aggregation by some generic service, cc @zealsham, but the cryptography would preclude earning any fees (essentially coordinator fees) without also contributing an input, so i'm leaning towards just requiring an input. other semi-centralized special cases of coordination responsibilities are discussed in the DAG sections.
then for demonstrating privacy optimization concretely, a few more co-spend proposals make sense:
- a sub-coalition of several "lucky" market makers collectively bargaining for a larger fee payoff, by posting a negative surplus
- a radix coinjoin equivalence class of UTXOs, and nominal input value constraints for radix coinjoin guarantees
- heterogenous / complementary values and sumset density certificates
- two mutually trusting parties who wish to make an interactive payment selecting some coins to their dissimilar inputs as cover, without revealing each others' specific inputs among the decoy set selected by each party, and without either party revealing to the world their identity or relationship within the union of their decoy sets
| - the Merkle set commitment of its parent blocks; | ||
| - the Merkle set commitment of the gossiped transaction construction messages it includes; | ||
| - its parent block by the same node; | ||
| - the nonce point R its successor will be signed with. |
There was a problem hiding this comment.
Block format drops recovery nonce commitment
This block format lists a single nonce point, while the block DAG requires separate optimistic and recovery nonce points and selects the point by track. A block built from this description cannot satisfy the track-specific signing rule, and the two descriptions disagree on the data needed to detect equivocation.
oak · automated · 8e41ba2
There was a problem hiding this comment.
the block DAG specification is correct, we need one R point per track
| additional-css = ["theme/diagrams.css"] | ||
| git-repository-url = "https://github.com/fungi-protocol/docs" | ||
| site-url = "/docs/" | ||
| site-url = "/docs-draft/" |
There was a problem hiding this comment.
Not-found page base points to a path the Pages workflow does not deploy
On merge, the Pages workflow publishes the site at /docs/ (as docs/README.md documents), but site-url makes mdbook write <base href="/docs-draft/"> into the 404 page, so its CSS and JS resolve under a path the workflow does not deploy.
oak · automated · 8e41ba2
There was a problem hiding this comment.
this is an artifact of me pushing that to the other repo, this modification shouldn't be merged in this repo but is correct over there
| | [Session initialization](#session-initialization) | Start a construction session | all | | ||
| | [Transaction construction](#transaction-construction) | Build the transaction | all | | ||
| | [Interactive payments](#interactive-payments) | Grant funds and confirm payments | honest, semi-honest | | ||
| | [Blocks](#blocks) | Synchronize state and signal phase changes | semi-honest, Byzantine | |
There was a problem hiding this comment.
Docs disagree on blocks in the honest setting
The blocks row restricts blocks to the semi-honest and Byzantine settings, but transaction-construction says both tracks use the block DAG and the optimistic track is sufficient in the honest setting. Implementers cannot tell whether the honest setting uses blocks.
oak · automated · 8e41ba2
There was a problem hiding this comment.
strictly speaking naive gossip with no consistency guarantees is still safe to use, and with deterministic ordering also ensure convergence on transcript with high probability the larger the transaction. there is no safety requirement for synchronization.
synchronization can, however, reduce the number of times the spending keys are accessed to the minimum, so this is desirable in both of these settings as a UX consideration, and to allow more efficient communications.
as a separate consideration, the honest and semi-honest threat model do not differ in this either, in both we assume liveness is not being attacked, and the question is about how non-byzantine fault tolerance, i.e. the communication model being assumed (timeout behavior, etc). this too is primarily a UX consideration.
for MVP the recovery track can be omitted and async communication model & optimistic track can be assumed, semi-honest & honest threat models only. this is arguably not the the most minimal minimally viable thing, but i see no benefit to not going directly to that for the coordination layer, choosing when to sign without a synchronization mechanism without one would be hacky and fragile (waiting for quiesence)
| """A notebook's frontmatter, as a markdown page would have it, if a | ||
| raw cell holding nothing else opens it, and the notebook without it.""" | ||
| nb = json.loads(text) | ||
| cells = nb.get("cells", []) |
There was a problem hiding this comment.
Non-object notebook JSON crashes check with AttributeError
A notebook file containing [] makes nb.get raise AttributeError, which check does not wrap, so the build fails with a traceback that omits the filename.
oak · automated · 8e41ba2
mdbook-graphviz re-serializes every chapter, escaping characters such as `[`, `_` and `\` along the way. It and mdbook-katex were both only ordered after `links`, and mdbook happened to run graphviz first, so katex saw the escaped source: a formula like `$t \in [a, b]$` reached it as `$t \\in \[a, b\]$`, failed to parse, and was left in the page as raw TeX. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An index entry indented two spaces more than the entry above it becomes a sub-chapter of that entry in SUMMARY.md, which mdbook numbers and shows as nested in the sidebar. The contents page copies the index, so it nests the same way. Note that this is idiosyncratic with respect to OKF v0.2, which specifies only flat index entries. The more OKF native way to nest is a sub-directory with its own index.md, such as docs/tactics/index.md, listed by the root index as one entry. Indented entries keep the files where they are; moving to sub-indexes is a possible follow-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the cost function framework stub to optimization_framework.md, and group the index into the parts proposed in #19. This adds stubs for all chapters in the draft so that there are valid targets for cross-reference links, allowing each chapter's PR to be independently opened and pass checks without needing to add links in a second PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
cc @xstoicunicornx this can be thought of as a sort of tracking issue for all of the spec chapters, as i slowly finalize things i plan to open PRs, happy to already open draft PRs for some of the less sloppy chapters if they seem like they could use more focused review currently finding oakagent's feedback useful here, and using it to save some notes for additional improvements, i think i will do a few more LLM passes before converting to meat slop, most of this is dry spec so not as important as README, overview, problem definition and abstract cost function chapters which are more conceptual so i was more ready to accept LLM output expanding my outlines etc, but i'm still a bit wary of opening PRs for most of this |
range-diff for force push 8e41ba243d → dbe0d25372
|
A 🤖 covers everything under it, so a mark inside a marked chapter, section or list item is redundant, and suggests that only the inner part is LLM output. contrib/robot_marks.py reads each page as a tree of sections, paragraphs and list items. check lists the redundant marks, and the chapters whose title and index entry disagree, and the robot-marks flake check runs it on docs/. fix removes the redundant marks. merge marks a chapter, section or list item in place of its children once they are all covered. relegate moves a mark onto the children, for when part of a marked scope is rewritten. The property tests generate pages from a tree of blocks, and check that the pages are read as that tree, that fix keeps what is covered, that fix and merge give the same marks in either order, and that merge undoes relegate. Hypothesis comes from nixpkgs. The stub titles of five chapters were marked where their index entries are not; their chapters are not marked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| target = posixpath.normpath(posixpath.join(here, m.group(2) + ".ipynb")) | ||
| return m.group(1) + m.group(2) + ".md" if target in notebooks else m.group(0) | ||
|
|
||
| chapter["content"] = NOTEBOOK_LINK.sub(fix, chapter.get("content", "")) |
There was a problem hiding this comment.
Link rewrite corrupts code blocks
link_notebooks applies the .ipynb regex to the whole chapter, so a notebook link shown in a fenced code block is rewritten from .ipynb to .md, changing verbatim code.
oak · automated · dbe0d25
|
|
||
| This can provides additional integrity to a collaborative transaction construction protocol, since [`SIGHASH_ALL`](#divergence-and-sighash-flags) signatures must agree on the ordering. | ||
|
|
||
| In applications where this is desirable, the *Creator* should only set `PSBT_GLOBAL_SORT_DETERMINISTIC` to `0x01`, and leave `PSBT_GLOBAL_SORT_SEED` unset. Each replica will locally provide a value for `PSBT_GLOBAL_SORT_SEED` just in time, as a commitment to protocol transcript (e.g. the root hash of a Merkle set of protocol messages). |
There was a problem hiding this comment.
Sort seed requirement contradicts flag
Line 153 tells the Creator to set PSBT_GLOBAL_SORT_DETERMINISTIC to 0x01 and leave PSBT_GLOBAL_SORT_SEED unset, but line 139 requires the seed whenever that flag is 0x01.
oak · automated · dbe0d25
Improve the introduction, define sub-transaction balance, clarify wallet fingerprint distributions, social graph partitioning and related payments in CoinJoins, and fix typos. Use "topological" rather than "structural" for features of the graph shape, to avoid confusion with features related to transaction structure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build broadcast to a group or to the world by gossip over peer to peer channels: broadcast domains, neighbor and submission channels, the announce, pull and push messages, anonymous submission, synchronization of the session's message set, dissemination methods and topology. Developed from the peer-messages notes (onwloqro, 1f68a962). Links to the optimistic track and set reconciliation chapters resolve once those follow in this series. It replaces the chapter's review stub. Links to other chapters resolve against their stubs until those land. Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It introduces the two chapters that evaluate a pure strategy: the structure of the cost function, and its privacy liability terms. It replaces the chapter's review stub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chapter replaces its stub in docs/, with frontmatter, and leaves In Review for the top level of the index, before its first part, like the introduction. The README links to it by its docs/ path, which book.py rewrites for the book. Co-authored-by: bc1cindy <bc1cindy@proton.me> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a table of candidate transports: the BIP 77 mailbox, a specialized OHTTP pubsub service, nostr with gift wrapping, Tor and Nym. It compares delivery, broadcast domain, sender anonymity and topology, and states that the specification relies only on the channel properties. Name the gossip topologies after the literature, as described in Weaver's dissertation: the random phone call model, one random neighbor per round, and the LOCAL model, all neighbors per round with bounded degree. Transports that are connectionless end to end match the former; connection oriented ones scale well only in the latter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Builds the decision tree from the leaves: partitions of the pending action queue, coin selection within each, change construction, order book coins, action sequences, and bracketing. It replaces the chapter's review stub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: bc1cindy <bc1cindy@proton.me> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Armin Sabouri <me@arminsabouri.com>
The sumsets draw k values from the denominations and 0, so they hold the sums of every combination of size at most k. Count those combinations the same way, (n+k choose k) less the empty combination, which makes the two curves agree at k=1. The counted combinations are not limited by their sum, so title the chart by the denominations they are drawn from and attach the range to the distinct sums and integers instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The quantile levels are i/20, so the median is i == 10. Skipping i == 5 dropped the first quartile and drew dots under the median markers. Name the number of quantile levels and derive the median's index and the legend's percentile step from it, so they cannot disagree again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Say which property permutations of equal values preserve and why permutations within a sub-transaction yield no new mappings, name the fee rates whose variance makes k:1 exchanges asymmetric, and use m for multiplicity so that k only ever means combination size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe why dense instances leave sub-transaction mappings underdetermined without suggesting a brute force enumeration: density survives setting any one sub-transaction aside, so it holds for the rest of the transaction too. Open the Radix CoinJoin section by drawing that conclusion explicitly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The book is assembled from docs/ by contrib/book.py, which only took markdown pages as chapters. Take Jupyter notebooks too. A notebook's frontmatter is a raw cell that opens it, holding what a markdown page's frontmatter would. It is checked, and dropped from the notebook the book is given, as a markdown page's is. Jupyter's autosaves under .ipynb_checkpoints/ are neither chapters nor copied. List the radix CoinJoin notebook in the index, under a new Drafts part, in place of the SUMMARY.md entry it had before the book was assembled from docs/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mdbook rewrites links to `.md` chapters into links to their `.html` pages, and into in-page anchors on the print page, but leaves links to `.ipynb` chapters as they are, so they lead to the raw notebook, which isn't part of the built site. After rendering the notebooks, the preprocessor points every relative link that resolves to a notebook chapter at the chapter's `.md` path, so mdbook rewrites it like any other chapter link. Links to other `.ipynb` files, and absolute ones, are left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mdbook lists separators as the bare string "Separator" and part titles
as {"PartTitle": ...}, and the jupyter preprocessor called .get on every
item, so a book with a separator stopped the build. It now only
descends into chapters.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mdbook loads additional-js on print.html as well, so the printed book kept only the first page of each table and showed dead page buttons. Showing every row widens the table past the page, because the later rows hold the longest values, so print also tightens font and padding.
The global text colour is a mid grey chosen to read on the page, but these labels sit on the bars, where grey has almost no contrast. They go back to black, as they were before the plot style was added.
With a transparent figure the darkest plasma fills sit directly on the page, and on the dark themes they nearly vanish into it. A grey outline per series keeps each silhouette visible on either theme.
The plot style turns legend frames off and makes their labels grey. Over the dust band of this plot that left the labels unreadable on dark pages, so this legend gets back its white frame and black labels.
With the notebook's own parameters the k=6 sumset still has gaps larger than the dust threshold, including below max_denom, so describe how coverage varies across the range instead. Suggested-by: bc1cindy <bc1cindy@proton.me> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
powers() dropped every power below min_denom before multiples() scaled them, so the multiples of those powers that do reach min_denom were missing: 2 × 3^5 = 486 and 5 × 10^2 = 500. multiples() already keeps only the values in the denomination range, so powers() now starts at the zeroth power. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The quantiles of the k=6 sumset start with several that are entirely gaps of size 1, but the plot omits gaps of size 1 (min_diff = 2), so its quantiles plateau at 2 and then at 3. The text described the sumset as if it were the plot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A sum above c times max_denom does not need c copies of the largest denomination: 100000000 + 86093442 + 20000000 exceeds the cutoff at c = 2 with one. Since no term exceeds max_denom, it needs more than c terms, which is what leaves it fewer free terms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The paragraph defines the implied fee rate as the nominal input sum minus the output sum, over the weight. A k:1 exchange keeps the nominal sums, so the difference it makes is to the weight, and therefore to the implied fee rate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A sub-transaction that uses every copy of a denomination leaves the remaining coins without it, and they may no longer be dense. The argument holds when the multiplicities are high enough that no single sub-transaction does that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tag the parameter cells and the cells that build the binary, ternary and decimal sets and their union with show-input, so the rendered chapter gives the code that generates the denominations. The plotting, sumset and gap cells stay hidden. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tag the cells that compute the sumsets, the gaps and the relative gaps with show-input. The plotting cells stay hidden. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gap code shown in the chapter filters by min_diff and min_diff_ratio, so tag the cell that sets them with show-input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The draft is published from its own repository, fungi-protocol/docs-draft, so that nothing has to be merged into main for it to go live. Its Pages site is served from /docs-draft/, not /docs/. Point the 404 page's base and the link check at that path. The Pages workflow is unchanged: it deploys on a push to that repository's main, which is this commit. This commit belongs on draft only. It never goes to main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
range-diff for force push dbe0d25372 → f2806d95f0
|
| before it left.""" | ||
| for op in ops: | ||
| page = parse(text, indexed) | ||
| op(page) |
| from hypothesis import given, settings | ||
| from hypothesis import strategies as st | ||
|
|
||
| import robot_marks |
| "\n", | ||
| "Although this preserves the nominal sum of the sub-transaction, its weight, and therefore its implied fee rate, will differ. A high variance in the implied fee rates of sub-transactions is less likely, so unlike 1:1 exchanges, k:1 exchanges are not perfectly symmetric. Here a sub-transaction's implied fee rate is the nominal sum of its inputs minus that of its outputs, divided by the weight of the sub-transaction. Users who attempt to recover every last sat are more susceptible to such analysis.\n", | ||
| "\n", | ||
| "A partition of the inputs and outputs is only a valid sub-transaction mapping if each part's outputs balance its inputs. When the coins form a dense subset sum instance, almost any group of inputs can be balanced by many groups of outputs, and vice versa. With multiplicities high enough that no single sub-transaction uses every copy of a denomination, the remaining coins stay dense after any one sub-transaction is set aside, so the same holds for the rest of the transaction. Every input and output therefore appears in many distinct sub-transactions across all non-derived mappings.\n", |
There was a problem hiding this comment.
Density claim fails after a sub-transaction consumes copies
The condition only ensures a sub-transaction leaves at least one copy of each denomination it uses, not that the remaining multiset stays dense. With six 1s, two 3s, and two 9s, a balanced sub-transaction can consume three 1s and one 3, satisfying the condition yet leaving 7 unrepresentable, so the 'many groups' claim does not follow.
oak · automated · f2806d9
There was a problem hiding this comment.
two strategies i have considered for this:
- when computing the sumsets, compute explicit combinations. similar machinery is needed for coin selection, etc. this ensures distinct combinations, not reusing the same values. the output value selection subset sum density cost function term specifies this behavior to a limited degree, because it provides strict lower bounds.
- and when that is intractable, shuffle the elements and construct a tree of sumsets with some fanout factor TBD, where each intermediate node in the tree is associated with the sumset generated by the values labeling the leaves of the tree. per Bringmann et al, stop when just before sumset by convolution transitions to the dense regime, and characterize the overall redundant density approximately the scale at which density emerges from disjoint subsets. i think Sasamoto et al has some theoretical insights into when the transition is normally expected.
this notebook is not trying to define cost function terms, those are done more carefully, this is more to give intuition about why the particular strategy of using these denominations has been proposed
| "outputs": [ | ||
| { | ||
| "data": { | ||
| "image/png": "iVBORw0KGgoAAAANSUhEUgAABAUAAAO6CAYAAADnwu5aAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjksIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvJkbTWQAAAAlwSFlzAAAPYQAAD2EBqD+naQAAoZtJREFUeJzs3Xu8XFV98P/P5JwTwgkhBlGItRAMaiVaEKyKpigqVbSP4K3SVlv91RvUtjxa+IbWaqVVsniKtT4KaRFr5alPq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/IRrAcSDbKabpSbL6yj0my3+/LIuLzXb4OSQViUkAqjl8jO9lbQXbF561kQ0VPrmyvri3wJ5V/jRzc5HnITp5eSHZV5AayuaRlspPNdsNGW/kYWaLhJODzZEOO9+ORJzeHkA2Hf6jJPlr1u3pF5e4G2+6mJimQsoWariEbHfBmsi/hD5ENhf599n2dP26wz+pzra72fjWldCrZ0OlPAPtVrjS+r4N50qSU3kU2NeA3IuJzNZu6+Yx/m+z1vZZsKsjulNLnyW5j1eo2ltX3oNnJb7v35E6yYc613gh8PKX0SrKTz0+Rnfj8mOxE+3SyVf |
There was a problem hiding this comment.
Density threshold does not bound every approximation gap
The plotted density is count / bin_width in sats, so a density at or above the dust inverse threshold only gives about one sum per dust-wide interval on average; it does not mean every value is approximable with error below dust. The notebook itself says some gaps still exceed the dust threshold even at the largest combination size shown.
oak · automated · f2806d9
There was a problem hiding this comment.
not sure which plot this is specifically but this is why absolute gaps are also plotted
There was a problem hiding this comment.
The comment is on the "Density of distinct sums" markdown at line 1387, above the density plot, not on the absolute gap histogram. It is about the sentence that density ≥ dust⁻¹ means every value can be approximated within dust; the notebook itself says some gaps still exceed the dust threshold even with six outputs (line 53).
oak · automated
| if not isinstance(cells, list) or not all(isinstance(c, dict) for c in cells): | ||
| raise ValueError("not a Jupyter notebook") | ||
| if cells and cells[0].get("cell_type") == "raw": | ||
| head = "".join(cells[0].get("source", [])) |
There was a problem hiding this comment.
Null raw-cell source crashes notebook check
A raw cell with source: null raises TypeError at book.py:55, which check does not catch, so the build aborts with a traceback instead of a ValueError.
oak · automated · f2806d9
| "\n", | ||
| "In base 2, a value with multiplicity 2 within a single sub-transaction is exchangeable with the next denomination up from some other sub-transaction. Base 3 and 10 have somewhat more complex arithmetic relationships which imply yet more permutations of subsets of coins.\n", | ||
| "\n", | ||
| "If an arbitrary output value (i.e. with large Hamming weight) can be constructed -- or more generally than in Maurer et al, approximated -- by summing together $k$ distinct denominations, and each of which has multiplicity $m$ in the outputs of the sub-transaction mapping as a whole, then the number of equivalent mappings is $k \\times m!$. This counts permutations over sets of subsets of outputs, specifically when a subset of size $k$ is exchanged with a subset of size $1$.\n", |
There was a problem hiding this comment.
Formula gives 6 where the case has 8 choices
For k=3 and m=2, choosing one copy of each denomination from two copies each gives 8 subsets, while k × m! gives 6, so the stated formula does not match this case.
oak · automated · f2806d9
There was a problem hiding this comment.
yes, this is supposed to be a (trivial) lower bound, it is a factor of the actual bound (because like instances of the symmetric group can be quotiented out of the sub-transaction model)
mainly for @oakagent to pick apart, individual PRs for the various pieces will come separately, but feedback welcome
this branch is also pushed to main on docs-draft repo and rendered here: https://fungi-protocol.github.io/docs-draft/