Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Aggregation

Instead of verifying each transaction individually, transaction proofs may be recursively merged into a single proof that covers many transactions. This is how Tachyon seeks to reduce chain costs.

The act of merging proofs is aggregation, and aggregators are nodes enganged in this activity creating aggregate transactions.

Miners are likely to vertically integrate aggregation.

Bundle States

Transactions with no Tachyon bundle1 are not covered here.

Aggregation creation of a new transaction with a proof that can replace the proof in a selection of other transactions. To create a valid block with a given aggregate, a miner must include all of those other transactions, sans their now-redundant proofs.

So Tachyon bundles have two main states: stamped or stripped.

These two states do not correspond perfectly with 'aggregate' and 'not aggregate', so we establish some nomenclature:

TermStateProvenanceValidation
autonomestampedwalletComplete proof with all inputs
aggregatestampedaggregatorMerged proof needs input from other transactions
adjunctstrippedminerInput to merged proof from another transaction

Aggregates may be further named:

  • innocent aggregate containing no Tachyon actions.
    For example, an aggregate transaction might only contain activity in other pools, or no activity at all.
  • based aggregate proving its own Tachyon actions.
    For example, a miner's coinbase transaction might be an aggregate, and also output miner rewards via Tachyon action.

When stripped, an innocent contributes no actions but still names a covering transaction: its tachyonAggregateId is a nonzero reference to the aggregate that absorbed its stamp, never the all-zero wtxid.

Aggregation Process

Merge to produce Aggregate

A proof's wire format is compressed for bandwidth efficiency. Aggregators must decompress proofs to a mutable format in order to merge proofs, and then re-compress to broadcast.

Aggregators collect autonomes or existing aggregates and merge their stamps:

  1. Select transactions
  2. Deserialize and validate stamps
  3. Match/update anchors
  4. Merge stamps
    • Merge tachygrams (exclusive sets)
    • Merge proofs
  5. Serialize and compress the merged stamp
  6. Publish aggregate transaction

Strip to produce Adjuncts

Miners obtain the broadcast aggregates, or by vertically integrating as aggregators.

When authoring a block, miners remove stamps from transactions covered by an aggregate, to produce appropriate adjuncts, and assign the adjunct a reference to the wtxid of the aggregate.

---
title: Aggregation and Stripping
---
flowchart LR
    classDef tstamp fill:#7fff0040
    classDef ta_vec fill:#7fffd440
    classDef proof fill:#da70d640
    classDef txanchor fill:f0fff040

    style agg fill:black,stroke:white
    style invisible fill:none,stroke:none
    style pool fill:#f0e68c40
    style block fill:#bdb76b40


    subgraph pool["Mempool"]
        subgraph mp1["Autonome 1"]
            mp1_ta:::ta_vec@{ shape: procs, label: "tachyaction" }
            mp1_ts:::tstamp@{ shape: trap-t, label: "tachystamp" }
        end
        subgraph mp2["Autonome 2"]
            mp2_ta:::ta_vec@{ shape: procs, label: "tachyaction" }
            mp2_ts:::tstamp@{ shape: trap-t, label: "tachystamp" }
        end
        subgraph mp3["Autonome 3"]
            mp3_ta:::ta_vec@{ shape: procs, label: "tachyaction" }
            mp3_ts:::tstamp@{ shape: trap-t, label: "tachystamp" }
        end
        subgraph mp4["Autonome 4"]
            mp4_ta:::ta_vec@{ shape: procs, label: "tachyaction" }
            mp4_ts:::tstamp@{ shape: trap-t, label: "tachystamp" }
        end
    end

    mp1_ts ---o agg
    mp1_ta ==> bk1_ta
    mp2_ta ==> bk2_ta
    mp2_ts ---o agg
    agg(("merge")) ==> bk0_ts
    mp3_ta ==> bk3_ta
    mp3_ts ---o agg
    mp4_ta ==> bk4_ta
    mp4_ts ---o agg

    subgraph block["Block"]
        direction LR

        subgraph bk0["Aggregate"]
            bk0_ts:::tstamp@{ shape: trap-t, label: "tachystamp" }
        end

        bk0 ~~~ invisible

        subgraph invisible[" "]
            subgraph bk1["Adjunct 1"]
                bk1_ta:::ta_vec@{ shape: procs, label: "tachyaction" }
            end
            subgraph bk2["Adjunct 2"]
                bk2_ta:::ta_vec@{ shape: procs, label: "tachyaction" }
            end
            subgraph bk3["Adjunct 3"]
                bk3_ta:::ta_vec@{ shape: procs, label: "tachyaction" }
            end
            subgraph bk4["Adjunct 4"]
                bk4_ta:::ta_vec@{ shape: procs, label: "tachyaction" }
            end
        end
    end

Action set indicator

An aggregate's stamp proves its own actions together with every covered adjunct's actions, but carries no proof header: a verifier reconstructs the header from the covered actions. Within a block that material is all at hand, since each adjunct points to its aggregate by wtxid. Before block inclusion it is not: aggregators publish only their merged transactions, and the ambiguity between actions and tachygrams makes a nearly-complete collection of adjuncts hard to recognize without falling back on full proof verification.

To make that recognition cheap, the stamp trailer carries hStampActionsTachyon, an assistive indicator the transaction author provides (see Bundles → Wire Format). It is a BLAKE2b-256 digest over the sorted cv || rk descriptors of every action the stamp covers, so an observer can cheaply tell an autonome from an aggregate and judge whether a collection of adjuncts is complete, without verifying the proof. The proof binds the same actions as a Pedersen commitment to their Poseidon digests; recomputing the trailer digest is the cheap check, and it is a separate construction over the same set rather than a copy of the one the proof carries.

The indicator is authorization data, not effecting data: it rides on the strippable stamp trailer, contributes to auth_digest, and is absent from adjuncts. It is not a soundness mechanism. The proof binds the action set regardless; a wrong indicator only harms its author, since mempool actors decline to handle a transaction whose indicator they cannot satisfy, and a subset, superset, or partial overlap simply fails to validate.

Coverage verification uses it as the first of two fast-fail gates. It recomputes the digest over the candidate collection's actions and, on disagreement with the carried hStampActionsTachyon, fails before attempting the expensive proof verification. It then checks the tachygram arity, nTachygrams == 2 * covered actions, which the fixed per-action ratio makes an exact test: a stamp short of the arity has reused a tachygram across actions, since the published tachygrams are a set.


  1. See Bundles to understand bundle format. ↩