<oembed><type>rich</type><version>1.0</version><author_name>npub1m230cem2yh3mtdzkg32qhj73uytgkyg5ylxsu083n3tpjnajxx4qqa2np2</author_name><author_url>https://nostr.ae/npub1m230cem2yh3mtdzkg32qhj73uytgkyg5ylxsu083n3tpjnajxx4qqa2np2</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2016-06-20&#xA;📝 Original message:In light of Ethereum&#39;s recent problems with its imperative, account-based,&#xA;programming model, I thought I&#39;d do a quick writeup outlining the building&#xA;blocks of the state-machine approach to so-called &#34;smart contract&#34; systems, an&#xA;extension of Bitcoin&#39;s own design that I personally have been developing for a&#xA;number of years now as my Proofchains/Dex research work.&#xA;&#xA;&#xA;# Deterministic Code / Deterministic Expressions&#xA;&#xA;We need to be able to run code on different computers and get identical&#xA;results; without this consensus is impossible and we might as well just use a&#xA;central authoritative database. Traditional languages and surrounding&#xA;frameworks make determinism difficult to achieve, as they tend to be filled&#xA;with undefined and underspecified behavior, ranging from signed integer&#xA;overflow in C/C++ to non-deterministic behavior in databases. While some&#xA;successful systems like Bitcoin are based on such languages, their success is&#xA;attributable to heroic efforts by their developers.&#xA;&#xA;Deterministic expression systems such as Bitcoin&#39;s scripting system and the&#xA;author&#39;s Dex project improve on this by allowing expressions to be precisely&#xA;specified by hash digest, and executed against an environment with&#xA;deterministic results. In the case of Bitcoin&#39;s script, the expression is a&#xA;Forth-like stack-based program; in Dex the expression takes the form of a&#xA;lambda calculus expression.&#xA;&#xA;&#xA;## Proofs&#xA;&#xA;So far the most common use for deterministic expressions is to specify&#xA;conditions upon which funds can be spent, as seen in Bitcoin (particularly&#xA;P2SH, and the upcoming Segwit). But we can generalize their use to precisely&#xA;defining consensus protocols in terms of state machines, with each state&#xA;defined in terms of a deterministic expression that must return true for the&#xA;state to have been reached. The data that causes a given expression to return&#xA;true is then a &#34;proof&#34;, and that proof can be passed from one party to another&#xA;to prove desired states in the system have been reached.&#xA;&#xA;An important implication of this model is that we need deterministic, and&#xA;efficient, serialization of proof data.&#xA;&#xA;&#xA;## Pruning&#xA;&#xA;Often the evaluation of an expression against a proof doesn&#39;t require all all&#xA;data in the proof. For example, to prove to a lite client that a given block&#xA;contains a transaction, we only need the merkle path from the transaction to&#xA;the block header. Systems like Proofchains and Dex generalize this process -&#xA;called &#34;pruning&#34; - with built-in support to both keep track of what data is&#xA;accessed by what operations, as well as support in their underlying&#xA;serialization schemes for unneeded data to be elided and replaced by the hash&#xA;digest of the pruned data.&#xA;&#xA;&#xA;# Transactions&#xA;&#xA;A common type of state machine is the transaction. A transaction history is a&#xA;directed acyclic graph of transactions, with one or more genesis transactions&#xA;having no inputs (ancestors), and one or more outputs, and zero or more&#xA;non-genesis transactions with one or more inputs, and zero or more outputs. The&#xA;edges of the graph connect inputs to outputs, with every input connected to&#xA;exactly one output. Outputs with an associated input are known as spent&#xA;outputs; outputs with out an associated input are unspent.&#xA;&#xA;Outputs have conditions attached to them (e.g. a pubkey for which a valid&#xA;signature must be produced), and may also be associated with other values such&#xA;as &#34;# of coins&#34;. We consider a transaction valid if we have a set of proofs,&#xA;one per input, that satisfy the conditions associated with each output.&#xA;Secondly, validity may also require additional constraints to be true, such as&#xA;requiring the coins spent to be &gt;= the coins created on the outputs. Input&#xA;proofs also must uniquely commit to the transaction itself to be secure - if&#xA;they don&#39;t the proofs can be reused in a replay attack.&#xA;&#xA;A non-genesis transaction is valid if:&#xA;&#xA;1. Any protocol-specific rules such as coins spent &gt;= coins output are&#xA;   followed.&#xA;&#xA;2. For every input a valid proof exists.&#xA;&#xA;3. Every input transaction is itself valid.&#xA;&#xA;A practical implementation of the above for value-transfer systems like Bitcoin&#xA;could use two merkle-sum trees, one for the inputs, and one for the outputs,&#xA;with inputs simply committing to the previous transaction&#39;s txid and output #&#xA;(outpoint), and outputs committing to a scriptPubKey and output amount.&#xA;Witnesses can be provided separately, and would sign a signature committing to&#xA;the transaction or optionally, a subset of of inputs and/or outputs (with&#xA;merkle trees we can easily avoid the exponential signature validation problems&#xA;bitcoin currently has).&#xA;&#xA;As so long as all genesis transactions are unique, and our hash function is&#xA;secure, all transaction outputs can be uniquely identified (prior to BIP34 the&#xA;Bitcoin protocol actually failed at this!).&#xA;&#xA;&#xA;## Proof Distribution&#xA;&#xA;How does Alice convince Bob that she has done a transaction that puts the&#xA;system into the state that Bob wanted? The obvious answer is she gives Bob data&#xA;proving that the system is now in the desired state; in a transactional system&#xA;that proof is some or all of the transaction history. Systems like Bitcoin&#xA;provide a generic flood-fill messaging layer where all participants have the&#xA;opportunity to get a copy of all proofs in the system, however we can also&#xA;implement more fine grained solutions based on peer-to-peer message passing -&#xA;one could imagine Alice proving to Bob that she transferred title to her house&#xA;to him by giving him a series of proofs, not unlike the same way that property&#xA;title transfer can be demonstrated by providing the buyer with a series of deed&#xA;documents (though note the double-spend problem!).&#xA;&#xA;&#xA;# Uniqueness and Single-Use Seals&#xA;&#xA;In addition to knowing that a given transaction history is valid, we also want&#xA;to know if it&#39;s unique. By that we mean that every spent output in the&#xA;transaction history is associated with exactly one input, and no other valid&#xA;spends exist; we want to ensure no output has been double-spent.&#xA;&#xA;Bitcoin (and pretty much every other cryptocurrency like it) achieves this goal&#xA;by defining a method of achieving consensus over the set of all (valid)&#xA;transactions, and then defining that consensus as valid if and only if no&#xA;output is spent more than once.&#xA;&#xA;A more general approach is to introduce the idea of a cryptographic Single-Use&#xA;Seal, analogous to the tamper-evidence single-use seals commonly used for&#xA;protecting goods during shipment and storage. Each individual seals is&#xA;associated with a globally unique identifier, and has two states, open and&#xA;closed. A secure seal can be closed exactly once, producing a proof that the&#xA;seal was closed.&#xA;&#xA;All practical single-use seals will be associated with some kind of condition,&#xA;such as a pubkey, or deterministic expression, that needs to be satisfied for&#xA;the seal to be closed. Secondly, the contents of the proof will be able to&#xA;commit to new data, such as the transaction spending the output associated with&#xA;the seal.&#xA;&#xA;Additionally some implementations of single-use seals may be able to also&#xA;generate a proof that a seal was _not_ closed as of a certain&#xA;time/block-height/etc.&#xA;&#xA;&#xA;## Implementations&#xA;&#xA;### Transactional Blockchains&#xA;&#xA;A transaction output on a system like Bitcoin can be used as a single-use seal.&#xA;In this implementation, the outpoint (txid:vout #) is the seal&#39;s identifier,&#xA;the authorization mechanism is the scriptPubKey of the output, and the proof&#xA;is the transaction spending the output. The proof can commit to additional&#xA;data as needed in a variety of ways, such as an OP_RETURN output, or&#xA;unspendable output.&#xA;&#xA;This implementation approach is resistant to miner censorship if the seal&#39;s&#xA;identifier isn&#39;t made public, and the protocol (optionally) allows for the&#xA;proof transaction to commit to the sealed contents with unspendable outputs;&#xA;unspendable outputs can&#39;t be distinguished from transactions that move funds.&#xA;&#xA;&#xA;### Unbounded Oracles&#xA;&#xA;A trusted oracle P can maintain a set of closed seals, and produce signed&#xA;messages attesting to the fact that a seal was closed. Specifically, the seal&#xA;is identified by the tuple (P, q), with q being the per-seal authorization&#xA;expression that must be satisfied for the seal to be closed. The first time the&#xA;oracle is given a valid signature for the seal, it adds that signature and seal&#xA;ID to its closed seal set, and makes available a signed message attesting to&#xA;the fact that the seal has been closed. The proof is that message (and&#xA;possibly the signature, or a second message signed by it).&#xA;&#xA;The oracle can publish the set of all closed seals for transparency/auditing&#xA;purposes. A good way to do this is to make a merkelized key:value set, with the&#xA;seal identifiers as keys, and the value being the proofs, and in turn create a&#xA;signed certificate transparency log of that set over time. Merkle-paths from&#xA;this log can also serve as the closed seal proof, and for that matter, as&#xA;proof of the fact that a seal has not been closed.&#xA;&#xA;&#xA;### Bounded Oracles&#xA;&#xA;The above has the problem of unbounded storage requirements as the closed seal&#xA;set grows without bound. We can fix that problem by requiring users of the&#xA;oracle to allocate seals in advance, analogous to the UTXO set in Bitcoin.&#xA;&#xA;To allocate a seal the user provides the oracle P with the authorization&#xA;expression q. The oracle then generates a nonce n and adds (q,n) to the set of&#xA;unclosed seals, and tells the user that nonce. The seal is then uniquely&#xA;identified by (P, q, n)&#xA;&#xA;To close a seal, the user provides the oracle with a valid signature over (P,&#xA;q, n). If the open seal set contains that seal, the seal is removed from the&#xA;set and the oracle provides the user with a signed message attesting to the&#xA;valid close.&#xA;&#xA;A practical implementation would be to have the oracle publish a transparency&#xA;log, with each entry in the log committing to the set of all open seals with a&#xA;merkle set, as well as any seals closed during that entry. Again, merkle paths&#xA;for this log can serve as proofs to the open or closed state of a seal.&#xA;&#xA;Note how with (U)TXO commitments, Bitcoin itself is a bounded oracle&#xA;implementation that can produce compact proofs.&#xA;&#xA;&#xA;### Group Seals&#xA;&#xA;Multiple seals can be combined into one, by having the open seal commit to a&#xA;set of sub-seals, and then closing the seal over a second set of closed seal&#xA;proofs. Seals that didn&#39;t need to be closed can be closed over a special&#xA;re-delegation message, re-delegating the seal to a new open seal.&#xA;&#xA;Since the closed sub-seal proof can additionally include a proof of&#xA;authorization, we have a protcol where the entity with authorization to close&#xA;the master seal has the ability to DoS attack sub-seals owners, but not the&#xA;ability to fraudulently close the seals over contents of their choosing. This&#xA;may be useful in cases where actions on the master seal is expensive - such as&#xA;seals implemented on top of decentralized blockchains - by amortising the cost&#xA;over all sub-seals.&#xA;&#xA;&#xA;## Atomicity&#xA;&#xA;Often protocols will require multiple seals to be closed for a transaction to&#xA;be valid. If a single entity controls all seals, this is no problem: the&#xA;transaction simply isn&#39;t valid until the last seal is closed.&#xA;&#xA;However if multiple parties control the seals, a party could attack another&#xA;party by failing to go through with the transaction, after another party has&#xA;closed their seal, leaving the victim with an invalid transaction that they&#xA;can&#39;t reverse.&#xA;&#xA;We have a few options to resolve this problem:&#xA;&#xA;### Use a single oracle&#xA;&#xA;The oracle can additionally guarantee that a seal will be closed iff some other&#xA;set of seals are also closed; seals implemented with Bitcoin can provide this&#xA;guarantee. If the parties to a transaction aren&#39;t already all on the same&#xA;oracle, they can add an additional transaction reassigning their outputs to a&#xA;common oracle.&#xA;&#xA;Equally, a temporary consensus between multiple mutually trusting oracles can&#xA;be created with a consensus protocol they share; this option doesn&#39;t need to&#xA;change the proof verification implementation.&#xA;&#xA;&#xA;### Two-phase Timeouts&#xA;&#xA;If a proof to the fact that a seal is open can be generated, even under&#xA;adversarial conditions, we can make the seal protocol allow a close to be&#xA;undone after a timeout if evidence can be provided that the other seal(s) were&#xA;not also closed (in the specified way).&#xA;&#xA;Depending on the implementation - especially in decentralized systems - the&#xA;next time the seal is closed, the proof it has been closed may in turn provide&#xA;proof that a previous close was in fact invalid.&#xA;&#xA;&#xA;# Proof-of-Publication and Proof-of-Non-Publication&#xA;&#xA;Often we need to be able to prove that a specified audience was able to receive&#xA;a specific message. For example, the author&#39;s PayPub protocol[^paypub],&#xA;Todd/Taaki&#39;s timelock encryption protocol[^timelock], Zero-Knowledge Contingent&#xA;Payments[^zkcp], and Lightning, among others work by requiring a secret key to&#xA;be published publicly in the Bitcoin blockchain as a condition of collecting a&#xA;payment. At a much smaller scale - in terms of audience - in certain FinTech&#xA;applications for regulated environments a transaction may be considered invalid&#xA;unless it was provably published to a regulatory agency.  Another example is&#xA;Certificate Transparency, where we consider a SSL certificate to be invalid&#xA;unless it has been provably published to a transparency log maintained by a&#xA;third-party.&#xA;&#xA;Secondly, many proof-of-publication schemes also can prove that a message was&#xA;_not_ published to a specific audience. With this type of proof single-use&#xA;seals can be implemented, by having the proof consist of proof that a specified&#xA;message was not published between the time the seal was created, and the time&#xA;it was closed (a proof-of-publication of the message).&#xA;&#xA;## Implementations&#xA;&#xA;### Decentralized Blockchains&#xA;&#xA;Here the audience is all participants in the system. However miner censorship&#xA;can be a problem, and compact proofs of non-publication aren&#39;t yet available&#xA;(requires (U)TXO commitments).&#xA;&#xA;The authors treechains proposal is a particularly generic and scalable&#xA;implementation, with the ability to make trade offs between the size of&#xA;audience (security) and publication cost.&#xA;&#xA;### Centralized Public Logs&#xA;&#xA;Certificate Transparency works this way, with trusted (but auditable) logs run&#xA;by well known parties acting as the publication medium, who promise to allow&#xA;anyone to obtain copies of the logs.&#xA;&#xA;The logs themselves may be indexed in a variety of ways; CT simply indexes logs&#xA;by time, however more efficient schemes are possible by having the operator&#xA;commit to a key:value mapping of &#34;topics&#34;, to allow publication (and&#xA;non-publication) proofs to be created for specified topics or topic prefixes.&#xA;&#xA;Auditing the logs is done by verifying that queries to the state of the log&#xA;return the same state at the same time for different requesters.&#xA;&#xA;### Receipt Oracles&#xA;&#xA;Finally publication can be proven by a receipt proof by the oracle, attesting&#xA;to the fact that the oracle has successfully received the message. This is&#xA;particularly appropriate in cases where the required audience is the oracle&#xA;itself, as in the FinTech regulator case.&#xA;&#xA;&#xA;# Validity Oracles&#xA;&#xA;As transaction histories grow longer, they may become impractical to move from&#xA;one party to another. Validity oracles can solve this problem by attesting to&#xA;the validity of transactions, allowing history prior to the attested&#xA;transactions to be discarded.&#xA;&#xA;A particularly generic validity oracle can be created using deterministic&#xA;expressions systems. The user gives the oracle an expression, and the oracle&#xA;returns a signed message attesting to the validity of the expression.&#xA;Optionally, the expression may be incomplete, with parts of the expression&#xA;replaced by previously generated attestations. For example, an expression that&#xA;returns true if a transaction is valid could in turn depend on the previous&#xA;transaction also being valid - a recursive call of itself - and that recursive&#xA;call can be proven with a prior attestation.&#xA;&#xA;## Implementations&#xA;&#xA;### Proof-of-Work Decentralized Consensus&#xA;&#xA;Miners in decentralized consensus systems act as a type of validity oracle, in&#xA;that the economic incentives in the system are (supposed to be) designed to&#xA;encourage only the mining of valid blocks; a user who trusts the majority of&#xA;hashing power can trust that any transaction with a valid merkle path to a&#xA;block header in the most-work chain is valid. Existing decentralized consensus&#xA;systems like Bitcoin and Ethereum conflate the roles of validity oracle and&#xA;single-use seal/anti-replay oracle, however in principle that need not be true.&#xA;&#xA;&#xA;### Trusted Oracles&#xA;&#xA;As the name suggests. Remote-attestation-capable trusted hardware is a&#xA;particularly powerful implementation - a conspiracy theory is that the reason&#xA;why essentially zero secure true remote attestation implementations exist is&#xA;because they&#39;d immediately make untraceable digital currency systems easy to&#xA;implement (Finney&#39;s RPOW[^rpow] is a rare counter-example).&#xA;&#xA;Note how a single-use seal oracle that supports a generic deterministic&#xA;expressions scheme for seal authorization can be easily extended to provide a&#xA;validity oracle service as well. The auditing mechanisms for a single-use seal&#xA;oracle can also be applied to validity oracles.&#xA;&#xA;&#xA;# Fraud Proofs&#xA;&#xA;Protocols specified with deterministic expressions can easily generate &#34;fraud&#xA;proofs&#34;, showing that claimed states/proof in the system are actually invalid.&#xA;Additionally many protocols can be specified with expressions of k*log2(n)&#xA;depth, allowing these fraud proofs to be compact.&#xA;&#xA;A simple example is proving fraud in merkle-sum tree, where the validity&#xA;expression would be something like:&#xA;&#xA;    (defun valid? (node)&#xA;        (or (== node.type leaf)&#xA;            (and (== node.sum (+ node.left.sum node.right.sum))&#xA;                 (and (valid? node.left)&#xA;                      (valid? node.right)))))&#xA;&#xA;To prove the above expression evaluates to true, we&#39;ll need the entire contents&#xA;of the tree. However, to prove that it evaluates to false, we only need a&#xA;subset of the tree as proving an and expression evaluates to false only&#xA;requires one side, and requires log2(n) data. Secondly, with pruning, the&#xA;deterministic expressions evaluator can automatically keep track of exactly&#xA;what data was needed to prove that result, and prune all other data when&#xA;serializing the proof.&#xA;&#xA;&#xA;## Validity Challenges&#xA;&#xA;However how do you guarantee it will be possible to prove fraud in the first&#xA;place? If pruning is allowed, you may simply not have access to the data&#xA;proving fraud - an especially severe problem in transactional systems where a&#xA;single fraudulent transaction can counterfeit arbitrary amounts of value out of&#xA;thin air.&#xA;&#xA;A possible approach is the validity challenge: a subset of proof data, with&#xA;part of the data marked as &#34;potentially fraudulent&#34;. The challenge can be&#xA;satisfied by providing the marked data and showing that the proof in question&#xA;is in fact valid; if the challenge is unmet participants in the system can&#xA;choose to take action, such as refusing to accept additional transactions.&#xA;&#xA;Of course, this raises a whole host of so-far unsolved issues, such as DoS&#xA;attacks and lost data.&#xA;&#xA;&#xA;# Probabilistic Validation&#xA;&#xA;Protocols that can tolerate some fraud can make use of probabilistic&#xA;verification techniques to prove that the percentage of undetected fraud within&#xA;the system is less than a certain amount, with a specified probability.&#xA;&#xA;A common way to do this is the Fiat-Shamir transform, which repeatedly samples&#xA;a data structure deterministically, using the data&#39;s own hash digest as a seed&#xA;for a PRNG. Let&#39;s apply this technique to our merkle-sum tree example. We&#39;ll&#xA;first need a recursive function to check a sample, weighted by value:&#xA;&#xA;    (defun prefix-valid? (node nonce)&#xA;        (or (== node.type leaf)&#xA;            (and (and (== node.sum (+ node.left.sum node.right.sum))&#xA;                      (&gt; 0 node.sum)) ; mod by 0 is invalid, just like division by zero&#xA;                                      ; also could guarantee this with a type system&#xA;                 (and (if (&lt; node.left.sum (mod nonce node.sum))&#xA;                          (prefix-valid? node.right (hash nonce))&#xA;                          (prefix-valid? node.left (hash nonce)))))))&#xA;&#xA;Now we can combine multiple invocations of the above, in this case 256&#xA;invocations:&#xA;&#xA;    (defun prob-valid? (node)&#xA;        (and (and (and .... (prefix-valid? node (digest (cons (digest node) 0)))&#xA;             (and (and ....&#xA;                            (prefix-valid? node (digest (cons (digest node) 255)))&#xA;&#xA;As an exercise for a reader: generalize the above with a macro, or a suitable&#xA;types/generics system.&#xA;&#xA;If we assume our attacker can grind up to 128 bits, that leaves us with 128&#xA;random samples that they can&#39;t control. If the (value weighted) probability of&#xA;a given node is fraudulent q, then the chance of the attacker getting away with&#xA;fraud is (1-q)^128 - for q=5% that works out to 0.1%&#xA;&#xA;(Note that the above analysis isn&#39;t particularly well done - do a better&#xA;analysis before implementing this in production!)&#xA;&#xA;&#xA;## Random Beacons and Transaction History Linearization&#xA;&#xA;The Fiat-Shamir transform requires a significant number of samples to defeat&#xA;grinding attacks; if we have a random beacon available we can significantly&#xA;reduce the size of our probabilistic proofs. PoW blockchains can themselves act&#xA;as random beacons, as it is provably expensive for miners to manipulate the&#xA;hash digests of blocks they produce - to do so requires discarding otherwise&#xA;valid blocks.&#xA;&#xA;An example where this capability is essential is the author&#39;s transaction&#xA;history linearization technique. In value transfer systems such as Bitcoin, the&#xA;history of any given coin grows quasi-exponentially as coins are mixed across&#xA;the entire economy. We can linearize the growth of history proofs by redefining&#xA;coin validity to be probabilistic.&#xA;&#xA;Suppose we have a transaction with n inputs. Of those inputs, the total value&#xA;of real inputs is p, and the total claimed value of fake inputs is q. The&#xA;transaction commits to all inputs in a merkle sum tree, and we define the&#xA;transaction as valid if a randomly chosen input - weighted by value - can&#xA;itself be proven valid. Finally, we assume that creating a genuine input is a&#xA;irrevocable action which irrevocable commits to the set of all inputs, real and&#xA;fake.&#xA;&#xA;If all inputs are real, 100% of the time the transaction will be valid; if all&#xA;inputs are fake, 100% of the time the transaction will be invalid. In the case&#xA;where some inputs are real and some are fake the probability that the fraud&#xA;will be detected is:&#xA;&#xA;    q / (q + p)&#xA;&#xA;The expected value of the fake inputs is then the sum of the potential upside -&#xA;the fraud goes detected - and the potential downside - the fraud is detected&#xA;and the real inputs are destroyed:&#xA;&#xA;    E = q(1 - q/(q + p)) - p(q/(q + p)&#xA;      = q(p/(q + p)) - p(q/(q + p)&#xA;      = (q - q)(p/(q + p))&#xA;      = 0&#xA;&#xA;Thus so long as the random beacon is truly unpredictable, there&#39;s no economic&#xA;advantage to creating fake inputs, and it is sufficient for validity to only&#xA;require one input to be proven, giving us O(n) scaling for transaction history&#xA;proofs.&#xA;&#xA;&#xA;### Inflationary O(1) History Proofs&#xA;&#xA;We can further improve our transaction history proof scalability by taking&#xA;advantage of inflation. We do this by occasionally allowing a transaction proof&#xA;to be considered valid without validating _any_ of the inputs; every time a&#xA;transaction is allowed without proving any inputs the size of the transaction&#xA;history proof is reset. Of course, this can be a source of inflation, but&#xA;provided the probability of this happening can be limited we can limit the&#xA;maximum rate of inflation to the chosen value.&#xA;&#xA;For example, in Bitcoin as of writing every block inflates the currency supply&#xA;by 25BTC, and contains a maximum of 1MB of transaction data, 0.025BTC/KB. If we&#xA;check the prior input proof with probability p, then the expected value of a&#xA;transaction claiming to spend x BTC is:&#xA;&#xA;    E = x(1-p)&#xA;&#xA;We can rewrite that in terms of the block reward per-byte R, and the transaction size l:&#xA;&#xA;    lR = x(1-p)&#xA;&#xA;And solving for p:&#xA;&#xA;    p = 1 - lR/x&#xA;&#xA;For example, for a 1KB transaction proof claiming to spending 10BTC we can omit&#xA;checking the input 0.25% of the time without allowing more monetary inflation&#xA;than the block reward already does. Secondly, this means that after n&#xA;transactions, the probability that proof shortening will _not_ happen is p^n,&#xA;which reaches 1% after 1840 transactions.&#xA;&#xA;In a system like Bitcoin where miners are expected to validate, a transaction&#xA;proof could consist of just a single merkle path showing that a single-use seal&#xA;was closed in some kind of TXO commitment - probably under 10KB of data. That&#xA;gives us a history proof less than 18.4MB in size, 99% of the time, and less&#xA;than 9.2MB in size 90% of the time.&#xA;&#xA;An interesting outcome of thing kind of design is that we can institutionalize&#xA;inflation fraud: the entire block reward can be replaced by miners rolling the&#xA;dice, attempting to create valid &#34;fake&#34; transactions. However, such a pure&#xA;implementation would put a floor on the lowest transaction fee possible, so&#xA;better to allow both transaction fee and subsidy collection at the same time.&#xA;&#xA;&#xA;# References&#xA;&#xA;[^paypub] https://github.com/unsystem/paypub&#xA;[^timelock] https://github.com/petertodd/timelock&#xA;[^zkcp] https://bitcoincore.org/en/2016/02/26/zero-knowledge-contingent-payments-announcement/&#xA;[^rpow] https://cryptome.org/rpow.htm&#xA;&#xA;-- &#xA;https://petertodd.org &#39;peter&#39;[:-1]@petertodd.org&#xA;-------------- next part --------------&#xA;A non-text attachment was scrubbed...&#xA;Name: signature.asc&#xA;Type: application/pgp-signature&#xA;Size: 455 bytes&#xA;Desc: Digital signature&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20160620/73f11845/attachment.sig&gt;</html></oembed>