<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Eternity Wall Blog</title>
    <description>Eternity Wall, messages lasting forever. Posts a little less...</description>
    <link>https://blog.eternitywall.com/</link>
    <atom:link href="https://blog.eternitywall.comfeed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Fri, 05 Aug 2022 11:22:08 +0200</pubDate>
    <lastBuildDate>Fri, 05 Aug 2022 11:22:08 +0200</lastBuildDate>
    <generator>Jekyll v3.9.0</generator>
    
      <item>
        <title>sign-to-contract</title>
        <description>&lt;p&gt;Creating a timestamp involves writing some data on the blockchain, by including those data in a valid bitcoin transaction (e.g. with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OP_RETURN&lt;/code&gt;).
The timestamp then is the cryptographic path that goes from the timestamped object to a block header, passing through the created transaction.
However, including those extra data causes your transaction size to increase, making the overall cost of the transaction higher.&lt;/p&gt;

&lt;p&gt;Thanks to OpenTimestamps aggregators and calendars, 
this issue is almost completely solved by collecting several timestamp requests and 
fitting those inside a single transaction, funded by the calendar. 
Consequently, if you pass through a calendar, you can timestamp completely for free.
Yet, if you want to timestamp by yourself, you have to pay some more fees.&lt;/p&gt;

&lt;p&gt;Actually there is a way to avoid to pay those extra satoshis: a &lt;em&gt;math trick&lt;/em&gt; that makes possible to &lt;em&gt;include a cryptographic commitment inside an elliptic curve point&lt;/em&gt;. 
Thanks to this gimmick every purely financial transaction can be turned into a timestamping transaction, while still serving for its original purpose and without adding a single additional byte.
This allows users not only to timestamp their data with no marginal cost, 
but, with no expense, they can also help the calendar timestamping its Merkle tip, leading to more frequent timestamps for calendar clients.&lt;/p&gt;

&lt;p&gt;The post is structured as follows:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;history of the name&lt;/li&gt;
  &lt;li&gt;the math trick: elliptic curve commitments
    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;pay-to-contract&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;sign-to-contract&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;some remarks&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;an actual implementation w/ Electrum
    &lt;ul&gt;
      &lt;li&gt;how to run&lt;/li&gt;
      &lt;li&gt;how to timestamp&lt;/li&gt;
      &lt;li&gt;how to verify&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;conclusions&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;a-bit-of-history&quot;&gt;A bit of history&lt;/h1&gt;
&lt;p&gt;When hearing the name &lt;em&gt;sign-to-contract&lt;/em&gt;, 
you may wonder from where the contract comes out.
To find an answer we have to go back (in 2012) to one of the &lt;a href=&quot;https://arxiv.org/pdf/1212.3257.pdf&quot;&gt;first applications&lt;/a&gt; that was developed: &lt;em&gt;pay-to-contract&lt;/em&gt; (&lt;em&gt;sign-to-contract&lt;/em&gt; elder brother) which basically allows to commit a contract to a receiver public key.
When a customers performs a payment to a merchant, with &lt;em&gt;pay-to-contract&lt;/em&gt;, 
he can commit the bill containing the details of the purchase to the receiving address.&lt;/p&gt;

&lt;p&gt;Both &lt;em&gt;pay-to-contract&lt;/em&gt; and &lt;em&gt;sign-to-contract&lt;/em&gt; are based on the same operation that allows to commit a value to a public key (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;secp256k1&lt;/code&gt; point) used in a bitcoin transaction.
Such operation is called &lt;em&gt;secp256k1 commitment&lt;/em&gt; and its functioning is detailed in the following section.&lt;/p&gt;

&lt;p&gt;Although secp256k1 commitments could serve different scopes, 
we focus on timestamping purposes 
and we take as a reference the &lt;a href=&quot;https://github.com/opentimestamps/python-opentimestamps/pull/14&quot;&gt;PR&lt;/a&gt; to OpenTimestamps 
(and the preceding &lt;a href=&quot;https://github.com/opentimestamps/python-opentimestamps/issues/12&quot;&gt;issue&lt;/a&gt;) by Andrew Poelstra.&lt;/p&gt;

&lt;h1 id=&quot;a-bit-of-math-elliptic-curve-commitments&quot;&gt;A bit of math: elliptic curve commitments&lt;/h1&gt;
&lt;p&gt;Now we need to get our hands into cryptography to unveil how this math trick works under the hood
(don’t get scared, we provide a quick recap of the results at the end of the section).&lt;/p&gt;

&lt;p&gt;Given an elliptic curve with generator &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;G&lt;/code&gt; and a random oracle hash function &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;h&lt;/code&gt;.
The map &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;m,P -&amp;gt; h(P||m)G + P&lt;/code&gt;, where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;||&lt;/code&gt; stands for concatenation, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;m&lt;/code&gt; is the value to commit and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;P&lt;/code&gt; is an elliptic curve point, is a valid commitment operation.
The output of the map is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C(m,P)&lt;/code&gt;, which is an elliptic curve point.&lt;/p&gt;

&lt;p&gt;The value &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;m&lt;/code&gt; is arbitrary, in particular it can be a commitment to something else (e.g. the hash of a document), 
and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;P&lt;/code&gt; is a public key used for a certain (and possibly independent) purpose.
The public key &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C(m,P)&lt;/code&gt; is a commitment to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;m&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;P&lt;/code&gt; 
in the sense that if the input is changed, so &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(m,P)!=(m&apos;,P&apos;)&lt;/code&gt;, 
then the output changes, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C(m,P)!=C(m&apos;,P&apos;)&lt;/code&gt;.
Thus we can use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C&lt;/code&gt; as a commitment operation (like a hash function) inside a timestamp proof.&lt;/p&gt;

&lt;p&gt;Now, to curb the abstraction, choose &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;secp256k1&lt;/code&gt; as elliptic curve and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sha256&lt;/code&gt; as hash function. 
The motivation is that we want to use Bitcoin as a notary, 
and Bitcoin itself grounds its working on the integrity of these two ingredients.
We won’t use directly the corresponding &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C&lt;/code&gt;, but instead a slightly modified version: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpSecp256k1Commitment&lt;/code&gt;.
It takes one input, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;P||m&lt;/code&gt;, and outputs the x-coord of the elliptic curve point &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C(m,P)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recap:&lt;/strong&gt; 
pick a value to commit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;m&lt;/code&gt; and a public key &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;P&lt;/code&gt; (on the curve &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;secp256k1&lt;/code&gt;), concatenate them (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;P||m&lt;/code&gt;), then compute:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;C(m,P) = SHA256(P||m)G + P 
OpSecp256k1Commitment(P||m) = C(m,P).x
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The value obtained is an elliptic curve point that serves two (independent) purposes: 
is a public key &lt;strong&gt;and&lt;/strong&gt; is a commitment to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(m,P)&lt;/code&gt; 
(or only to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;m&lt;/code&gt;, if &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;P&lt;/code&gt; is given before).&lt;/p&gt;

&lt;p&gt;To timestamp we need to write the x-coord of the elliptic curve point &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C(m,P)&lt;/code&gt; on the blockchain, 
there are two places where such points can be found, leading to two techniques:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Address/Public key: &lt;em&gt;pay-to-contract&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;Signature: &lt;em&gt;sign-to-contract&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;pay-to-contract&quot;&gt;&lt;em&gt;pay-to-contract&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;Alice has to receive some bitcoins from Bob.
Alice has public key &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;A&lt;/code&gt; but she also wants to timestamp a document with hash value &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;d&lt;/code&gt;.
Thus she tells Bob to send his bitcoins to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Q = A + h(A||d)G&lt;/code&gt;.
Bob, who eventually is not aware that he is timestamping Alice’s document, 
broadcasts the transaction, 
which after a while becomes part of the blockchain forever.
Alice composes her OpenTimestamps proof for her document, by finding &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Q.x&lt;/code&gt; on the chain and conveniently arranging the proof.&lt;/p&gt;

&lt;p&gt;However, by implementing this scheme Alice is exposing herself to a new risk.
Her new key &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Q&lt;/code&gt; is a deterministic function of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; (private key of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;A&lt;/code&gt;) and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;d&lt;/code&gt;, 
but, while &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; is derived from the seed (carefully stored),
instead the value &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;d&lt;/code&gt; is probably something new and unrelated to her wallet.
If her computer catches fire, 
the seed alone won’t be enough to find the private key to redeem the coin locked by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Q&lt;/code&gt;,
since it is required also &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;d&lt;/code&gt;, 
which needs an ad hoc backup that possibly has not taken place.&lt;/p&gt;

&lt;p&gt;This technique may lead to a loss of funds, hence using &lt;em&gt;pay-to-contract&lt;/em&gt; for timestamping purposes is not advisable.&lt;/p&gt;

&lt;h2 id=&quot;sign-to-contract&quot;&gt;&lt;em&gt;sign-to-contract&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;Now Carl has to pay Diana. 
Carl wants also to timestamp a value &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;c&lt;/code&gt;.
With &lt;em&gt;sign-to-contract&lt;/em&gt; he can fit a commitment to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;c&lt;/code&gt; inside the signature.
To understand how, we need to recall how signatures work.&lt;/p&gt;

&lt;p&gt;Signatures in Bitcoin are made with ECDSA which involves elliptic curve points, 
namely a signature is a couple of integers &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(r,s)&lt;/code&gt; in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Z/nZ&lt;/code&gt; where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n&lt;/code&gt; is the order of the curve.
In a simplified way, a signature for a message &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;m&lt;/code&gt; and from a user with private key &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt; is done as follows:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;def ECDSAsign(x,m):
    k = deterministic_nonce(x,m)
    R = k*G
    r = R.x mod n
    s = k^(-1) * (m + r*x) mod n
    return (r,s)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Carl wants to spend the coins locked in a given address whose private key is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt;.
He composes an unsigned transaction &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uTX&lt;/code&gt; sending from that address to Diana’s.
To sign the transaction he applies &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ECDSAsign(x,m)&lt;/code&gt; where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;m&lt;/code&gt; is the hash value of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uTX&lt;/code&gt; conveniently serialized.
Once produced the signature &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(r,s)&lt;/code&gt; Carl fill &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uTX&lt;/code&gt; with an encoded version of the signature &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SIG(r,s)&lt;/code&gt;, 
obtaining the signed (and broadcastable) transaction &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TX&lt;/code&gt;.
Then sends &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TX&lt;/code&gt; to the network and, later on, when confirmed, it becomes part of the blockchain forever.&lt;/p&gt;

&lt;p&gt;We can see that inside &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ECDSAsig&lt;/code&gt; an elliptic curve point (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;R&lt;/code&gt;) is used.
The idea of &lt;em&gt;sign-to-contract&lt;/em&gt; is simply to tweak it with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;h(R||c)&lt;/code&gt;, 
making it &lt;strong&gt;also&lt;/strong&gt; a commitment to another value &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;c&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;def ECDSAsign2contract(x,m,c):
    k = deterministic_nonce(x,m)
    R = k*G
    e = k + h(R||c)
    Q = R + h(R||c)*G  # which is Q = e*G = C(c,R)
    q = Q.x mod n
    z = e^(-1) * (m + q*x) mod n
    return (q,z), R
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Carl applies &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ECDSAsign2contract&lt;/code&gt;, which produces &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(q,z)&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;R&lt;/code&gt;. 
The former is the signature corresponding to the pubkey &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x*G&lt;/code&gt; for the message &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;m&lt;/code&gt;,
while the latter and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;c&lt;/code&gt; are the ingredients to prove the commitment to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Q.x&lt;/code&gt;. 
Now &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uTX&lt;/code&gt; is filled with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SIG(q,z)&lt;/code&gt; which contains &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;q&lt;/code&gt;, which in turn is (almost always) &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Q.x&lt;/code&gt;.
As before, the resulting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TX&lt;/code&gt; then is committed to the blockchain.&lt;/p&gt;

&lt;p&gt;Carl then looks at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TX&lt;/code&gt;, in which he spots &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Q.x&lt;/code&gt;, with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TX = TXp||Q.x||TXa&lt;/code&gt;. 
By retrieving the info to link &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TX&lt;/code&gt; to a block header we can complete the timestamp for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;c&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;File sha256: c
Timestamp:
prepend R == R||c
secp256k1commitment == Q.x
prepend TXp == TXp||Q.x
append TXa == TXp||Q.x||TXa
# transaction id ...
sha256
...
sha256
verify BitcoinBlockHeaderAttestation(...)
# Bitcoin merkle root ...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Resuming&lt;/strong&gt;, while doing a purely financial transaction to Diana, &lt;strong&gt;Carl timestamped&lt;/strong&gt; a value, 
without adding any bytes, so &lt;strong&gt;with zero marginal cost&lt;/strong&gt;.
Diana could be unaware that Carl timestamped, 
from her perspective the coins she just received are indistinguishable from coins signed in the standard way. 
Such coins are locked in the pubkey (or address) that Diana told Carl, 
hence Diana’s new coins are as secured as normal coins.&lt;/p&gt;

&lt;p&gt;Carl chose a particular nonce that allowed him to commit to a value.
The resulting singature is indistinguishable from a standard one and has the same security.
Moreover, if he loses the committed value &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;c&lt;/code&gt;, 
then he loses the ability of proving the timestamp,
but he does not compromise any coin: 
his coins have been already spent and Diana has hers in the desired destination, 
which is independent from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;c&lt;/code&gt;.
For this reason &lt;em&gt;sign-to-contract&lt;/em&gt; should be preferred when timestamping.&lt;/p&gt;

&lt;h2 id=&quot;remarks&quot;&gt;Remarks&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;The name is merely due to historical reasons and it came out of the desire to commit to contracts when paying someone.
The value committed could be any arbitrary data: 
for practical timestamping purposes it will be a Merkle tip aggregating several single timestamps.&lt;/li&gt;
  &lt;li&gt;Each elliptic curve point can include a commitment,
thus each pubkey, as well as each signature, could be used as anchoring point.
Multiple commitments can be included in a single transaction,
however, for timestamping, this is not essential: as pointed out above, 
a contract can be a commitment to an arbitrary high number of single timestamps.&lt;/li&gt;
  &lt;li&gt;These techniques (as everything in OTS) does not apply only to Bitcoin, 
with convenient adjustments, they can be extended to other similar systems,
for instance Litecoin or MimbleWimble.&lt;/li&gt;
  &lt;li&gt;With &lt;em&gt;segwit&lt;/em&gt; some issues arise. 
The signature is committed in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wtxid&lt;/code&gt;,
but not in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;txid&lt;/code&gt;: 
the latter is committed in the transaction Merkle tree, 
while the former is committed in another Merkle tree, 
whose tip is inserted in the coinbase transaction. 
As a result, the signature is committed in the block header, 
but the path has to traverse both trees and the coinbase.
Thus proofs at least double in size, 
the miner has some control on what is inside the coinbase, 
so he may decide to include malicious data or 
make the coinbase so large (multiple KB) 
that it won’t be possible to create an OTS proof passing through that.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;an-actual-implementation-w-electrum&quot;&gt;An actual implementation w/ Electrum&lt;/h1&gt;
&lt;p&gt;Implementing this stuff may seem simple,
but in practice it involves many steps very unrelated between each other:
extract private keys, 
perform elliptic curve math, 
fill the custom signature in the tx,
correctly serialize in the tx,
retrieve the link from tx to the block header 
and finally
compose the OTS proof.&lt;/p&gt;

&lt;p&gt;Anyhow we made it simple with an extension to the &lt;a href=&quot;https://github.com/LeoComandini/electrum-timestamp-plugin&quot;&gt;Electrum plugin&lt;/a&gt; 
we presented &lt;a href=&quot;https://blog.eternitywall.com/2018/03/14/electrum-timestamp-plugin-launch&quot;&gt;few weeks ago&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We now outline how to run this custom version and 
then how to create your first &lt;em&gt;sign-to-contract&lt;/em&gt; OTS proof.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remark:&lt;/strong&gt; 
at this stage the code is not intended for a general public
thus the procedure to make it works may be not super easy to put in place.&lt;/p&gt;

&lt;h2 id=&quot;getting-started&quot;&gt;Getting started&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Beware:&lt;/strong&gt; 
what follows is experimental,
make sure it is not messing up your Electrum or OpenTimestamps working libraries.&lt;/p&gt;

&lt;p&gt;Assuming running on Linux.&lt;/p&gt;

&lt;p&gt;You need to use the custom library by &lt;a href=&quot;https://github.com/apoelstra&quot;&gt;apoelstra&lt;/a&gt; that integrates &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpSecp256k1Commitment&lt;/code&gt; in OpenTimestamps.
You need to download Electrum from source and integrate it with the timestamp plugin.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/apoelstra/python-opentimestamps.git
git clone https://github.com/LeoComandini/electrum-timestamp-plugin.git
git clone git://github.com/spesmilo/electrum.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now go to the sign-to-contract (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;s2c&lt;/code&gt;) branch, 
copy the plugin file in the local Electrum directory, 
then copy a temporary version of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setup.py&lt;/code&gt; in the custom version of python-opentimestamps just downloaded.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cd electrum-timestamp-plugin
git checkout s2c
cd ..
cp -r electrum-timestamp-plugin/timestamp electrum/plugins
cp electrum-timestamp-plugin/setup.py python-opentimestamps
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Install the custom library.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;pip3 install python-opentimestamps/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Follow an adapted version of &lt;a href=&quot;https://github.com/spesmilo/electrum#development-version&quot;&gt;Electrum README&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Electrum is a pure python application. 
If you want to use the Qt interface, install the Qt dependencies:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo apt-get install python3-pyqt5
sudo apt-get install python3-setuptools
cd electrum
python3 setup.py install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Compile the icons file for Qt:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo apt-get install pyqt5-dev-tools
pyrcc5 icons.qrc -o gui/qt/icons_rc.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you tried the version of the plugin without s2c remove the db storing the info for generating the proof.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rm db_file.json
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Run on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;testnet&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;./electrum --testnet
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Run on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mainnet&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;./electrum
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;create-timestamps-with-your-transactions&quot;&gt;Create timestamps with your transactions&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;Enable the plugin:
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tools -&amp;gt; Plugins -&amp;gt; Timestamp&lt;/code&gt;, tick the checkbox&lt;/li&gt;
      &lt;li&gt;clicking on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Settings&lt;/code&gt; you can switch from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;op_return&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sign-to-contract&lt;/code&gt;, stay on the latter&lt;/li&gt;
      &lt;li&gt;close and restart Electrum to activate the plugin&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Visualize your timestamp history list:
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tools -&amp;gt; Timestamps&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Start tracking the file(s) to timestamp:
    &lt;ul&gt;
      &lt;li&gt;click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Add New File&lt;/code&gt; and select the file&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Create and broadcast a bitcoin transaction including the timestamp:
    &lt;ul&gt;
      &lt;li&gt;on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Send Tab&lt;/code&gt; select outputs, amount, fee&lt;/li&gt;
      &lt;li&gt;click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Preview&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;S2C&lt;/code&gt;, insert the password, 
 this will insert a commitment to the file you selected in the signature using &lt;em&gt;sign-to-contract&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Broadcast&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Check the timestamp history:
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tools -&amp;gt; Timestamps&lt;/code&gt;, the file now is an pending state&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Wait until the transaction is confirmed, you can now create the timestamp proof (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;file_name.ots&lt;/code&gt;):
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tools -&amp;gt; Timestamps&lt;/code&gt;, 
 click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Upgrade&lt;/code&gt;,
 the timestamp now is complete&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can find the timestamp proof next to the file(s):&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/path/file_name.txt
/path/file_name.txt.ots
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;try-the-proof&quot;&gt;Try the proof&lt;/h2&gt;
&lt;p&gt;Note that the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ots&lt;/code&gt; contains a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpSecp256k1Commitment&lt;/code&gt; so the standard OTS library won’t recognize it.
Print it using the python library just installed,
for instance with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python3 ots-info.py &quot;/path/file_name.txt.ots&quot;&lt;/code&gt;.
Then manually verify the correspondence with the hash of the file and the block header merkle root.&lt;/p&gt;

&lt;h1 id=&quot;conclusions&quot;&gt;Conclusions&lt;/h1&gt;
&lt;p&gt;Elliptic curve commitments commit values in elliptic curve points.
They can be used with public keys (&lt;em&gt;pay-to-contract&lt;/em&gt;) or in signatures (&lt;em&gt;sign-to-contract&lt;/em&gt;).
Although they have several uses, we confined ourselves to timestamping.
&lt;em&gt;pay-to-contract&lt;/em&gt; drives you out of a BIP32 logic and may lead you to a loss of funds;
&lt;em&gt;sign-to-contract&lt;/em&gt; does not, thus is better for timestamping purposes.&lt;/p&gt;

&lt;p&gt;Nevertheless, &lt;em&gt;sign-to-contract&lt;/em&gt; has some issues that should be addressed. 
If using segwit, remind that the proof is longer, 
contains arbitrary data by the miner and could be too large to create the OTS proof.&lt;/p&gt;

&lt;p&gt;As of writing, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpSecp256k1Commitment&lt;/code&gt; is not yet part of 
the standard library python-opentimestamps,
thus proofs including it won’t be retained valid by the standard clients.
If and when the PR will be merged, 
this new commitment operation can become part of valid timestamps.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;sign-to-contract&lt;/em&gt; can be integrated in every Bitcoin signing software 
and can produce OTS proofs with zero marginal cost. 
We integrated it with Electrum as a plugin: 
your purely financial transaction can also timestamp stuff with no extra charge.&lt;/p&gt;

&lt;p&gt;Since the cost reduction, users may start to consistently help the calendar timestamping its Merkle tip, 
leading to more frequent timestamps for calendar clients.
However, even though this seems promising, it may expose clients to new risks, 
hence it requires some work to be implemented properly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;P.S.&lt;/strong&gt; I would like to thank Riccardo Casatta, Peter Todd and Andrew Poelstra for reviewing this post.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;P.P.S.&lt;/strong&gt; This blog post sums up the the content of my master’s degree thesis. 
The work was done during an internship at Eternity Wall, 
which put me in the condition to properly understand the subject 
and deserves most credit. 
The complete research can be found &lt;a href=&quot;https://github.com/LeoComandini/Thesis&quot;&gt;here&lt;/a&gt;,
contributions of any kind are more than welcome.&lt;/p&gt;

</description>
        <pubDate>Fri, 13 Apr 2018 00:00:00 +0200</pubDate>
        <link>https://blog.eternitywall.com/2018/04/13/sign-to-contract/</link>
        <guid isPermaLink="true">https://blog.eternitywall.com/2018/04/13/sign-to-contract/</guid>
        
        
      </item>
    
      <item>
        <title>JS OpenTimestamps by example</title>
        <description>&lt;p&gt;OpenTimestamps is a standard format for blockchain timestamping.&lt;/p&gt;

&lt;p&gt;The reference implementation is written in &lt;a href=&quot;https://github.com/opentimestamps/python-opentimestamps&quot;&gt;Python by Peter Todd&lt;/a&gt;, and there are libraries in different languages: &lt;a href=&quot;https://github.com/opentimestamps/javascript-opentimestamps&quot;&gt;javascript&lt;/a&gt;, &lt;a href=&quot;https://github.com/opentimestamps/java-opentimestamps&quot;&gt;java&lt;/a&gt;, &lt;a href=&quot;https://github.com/opentimestamps/rust-opentimestamps&quot;&gt;rust&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Opentimestamps javascript library is written for nodejs and &lt;a href=&quot;https://www.npmjs.com/package/javascript-opentimestamps&quot;&gt;npm package&lt;/a&gt; is publicly available. OpenTimestamps library could be used also on the client side, for more details check &lt;a href=&quot;https://github.com/opentimestamps/javascript-opentimestamps#compatibility&quot;&gt;browser compatibility&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now let’s begin!&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Get started with opentimestamps.js&lt;/li&gt;
  &lt;li&gt;Get the hash of a file&lt;/li&gt;
  &lt;li&gt;Timestamp hash and retrieve the proof&lt;/li&gt;
  &lt;li&gt;Get information about the proof&lt;/li&gt;
  &lt;li&gt;Upgrade a pending proof&lt;/li&gt;
  &lt;li&gt;Verify the ots proof on the blockchain&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
  &lt;p&gt;JS OpenTimestamps web-interface and web-tools are available at &lt;a href=&quot;https://opentimestamps.org/tools/&quot;&gt;opentimestamps.org/tools&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;get-started-with-opentimestampsjs&quot;&gt;Get started with opentimestamps.js&lt;/h2&gt;
&lt;p&gt;In order to get the opentimestamps.js you can proceed in the following manner:&lt;/p&gt;

&lt;p&gt;Download a ready file from the website &lt;a href=&quot;https://opentimestamps.org&quot;&gt;opentimestamps.org&lt;/a&gt; (or directly include in your page)&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;script &lt;/span&gt;&lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://opentimestamps.org/assets/javascripts/vendor/opentimestamps.js&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or build sources from &lt;a href=&quot;https://github.com/opentimestamps/javascript-opentimestamps&quot;&gt;javascript-opentimestamps&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/opentimestamps/javascript-opentimestamps.git
npm &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--dev&lt;/span&gt;
npm run dist
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and add to html page:&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;script &lt;/span&gt;&lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;./dist/opentimestamps.js&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;get-the-hash-of-a-file&quot;&gt;Get the hash of a file&lt;/h2&gt;
&lt;p&gt;The first step in order to create a timestamp of a file calculates the hash of the file, you can calculate this hash directly from the webpage using Javascript in the following manners:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;using the library &lt;a href=&quot;https://github.com/brix/crypto-js&quot;&gt;crypto-js&lt;/a&gt; from string object&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;script &lt;/span&gt;&lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/crypto-js.js&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;script &lt;/span&gt;&lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;encrypted&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;CryptoJS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;SHA256&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;using hash function available in &lt;a href=&quot;https://github.com/opentimestamps/javascript-opentimestamps&quot;&gt;javascript-opentimestamps&lt;/a&gt; from byte array&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;script &lt;/span&gt;&lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/opentimestamps.js&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;script &lt;/span&gt;&lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;op&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;OpenTimestamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Ops&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;OpSHA256&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;hashByteArray&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;op&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;call&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([...])&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;blockquote&gt;
  &lt;p&gt;OpenTimestamps supports only sha1, sha256 and ripemd160 hash functions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;timestamp-hash-and-retrieve-the-proof&quot;&gt;Timestamp hash and retrieve the proof&lt;/h2&gt;
&lt;p&gt;After the calculation of the hash (in hexadecimal format) you can call the methods to generate the timestamps like show in the following code :&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;hashData&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;16193782f1d839a08f9fc9a94cec1675f1729db1abc15cf9b57f31aa1724a0ae&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;op&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;OpenTimestamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Ops&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;OpSHA256&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;detached&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;OpenTimestamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DetachedTimestampFile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fromHash&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;op&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;hashData&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;OpenTimestamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;stamp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;detached&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ots&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;detached&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;serializeToBytes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;hex&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;bytesToHex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ots&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The first step is to create an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpenTimestamps.DetachedTimestampFile&lt;/code&gt; object which is the virtual representation of a proof in OpenTimestamps protocol. The proof is a merkle tree of data where the original hash is the head and attestations are the tips.&lt;/p&gt;

&lt;p&gt;To create a new detached object use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fromHash()&lt;/code&gt; constructor and pass as input parameters:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;hash type instance of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpenTimestamps.Ops&lt;/code&gt; (supported: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpSha1&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpSha256&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpRimepd160&lt;/code&gt;)&lt;/li&gt;
  &lt;li&gt;hash data in hex format&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fromBytes()&lt;/code&gt; constructor to create a new detached file from an array of bytes, instead &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fromHash()&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then call &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpenTimestamps.stamp()&lt;/code&gt; to timestamp the hash inside &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;detached&lt;/code&gt; object.&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;In &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;stamp()&lt;/code&gt; function, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;detached&lt;/code&gt; is an input / output parameters, since &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpenTimestamps.DetachedTimestampFile&lt;/code&gt; is the proof.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;detached&lt;/code&gt; proof could be serialized to bytes with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;serializeToBytes()&lt;/code&gt; and download as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ots&lt;/code&gt; file; vice-versa, deserialize an byte array to an object with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpenTimestamps.DetachedTimestampFile.deserialize(ots)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/opentimestamps-org-tools.png&quot; alt=&quot;Timestamp data interface on opentimestamp.org/tools&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;get-information-about-the-proof&quot;&gt;Get information about the proof&lt;/h2&gt;

&lt;p&gt;The stamp command instantly provides an OpenTimestamps proof which contains the promised attestation of the stamped hash.
You can use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;info&lt;/code&gt; command in order to visualize the binary ots in a human-readable format.&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;detached&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;OpenTimestamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DetachedTimestampFile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;deserialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ots&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;output&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;OpenTimestamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;detached&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;output&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;info&lt;/code&gt; output is a chain of crypto-operation that describe a path from the originally stamped hash to one or more attestations. The info of the previous example shows:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;File sha256 hash: 16193782f1d839a08f9fc9a94cec1675f1729db1abc15cf9b57f31aa1724a0ae
Timestamp:
append c04158b183a378f3d051d55979a918d8
sha256
 -&amp;gt; append 89c144ad44156173d93cd470569c3087
    sha256
    prepend d37278872acc324f499d54dd488fbe29f76d892204793701e38129e0a2f224b0
    sha256
    prepend 333ea54d67017894b5e581b2bd4e197d3990c031bc78331b7e5c9ee89162c8fd
    sha256
    append bdef644af9388e148d198dec47e62fdaf9e264baf28f9e8115f0468354b2cc44
    sha256
    prepend 5ab7a0c9
    append 05765ac5abc32c3b
    verify PendingAttestation(&apos;https://alice.btc.calendar.opentimestamps.org&apos;)
 -&amp;gt; append 26ef6425656e1095c5a88badcdea280c
    sha256
    prepend 4e3e4ca04a74381180c6b4a648560e679b321b3e12d1932781b6398267151d70
    sha256
    prepend 61febb5707e8c9ae78c1248ca389d0dba9c00c156c2282020e27fcbae04d1810
    sha256
    prepend 5ab7a0c9
    append 6481affe61f15ea9
    verify PendingAttestation(&apos;https://bob.btc.calendar.opentimestamps.org&apos;)
 -&amp;gt; append 3dd70ea7ab4c979a7747ab0570d2ea27
    sha256
    prepend b47ab96db80690d1c436022e2869404d7423f7225eb47c81436e342062c70eba
    sha256
    append 7c8025312aa0b452457a1a33d1e12cf0237bc34cb359140dee74f45e6ef8ead7
    sha256
    prepend 5ab7a0c9
    append c302502f95a0f008
    verify PendingAttestation(&apos;https://finney.calendar.eternitywall.com&apos;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The OpenTimestamps proof is a chain of unary (hashing function) and binary (append, prepend) operations from the original stamped hash to the attestation. A &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PendingAttestation&lt;/code&gt; is a promise, given from the ots calendar, to put this data in future transaction.&lt;/p&gt;

&lt;p&gt;The OpenTimestamps library timestamp can use multiple calendars in order to allow to be more reliable and a robust from side attacks.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Uploading file uploading the proof-file at &lt;a href=&quot;https://opentimestamps.org&quot;&gt;opentimestamps.org&lt;/a&gt; and press INFO button in order to show a web visualizer of the ots proofs&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;upgrade-a-pending-proof&quot;&gt;Upgrade a pending proof&lt;/h2&gt;

&lt;p&gt;The ots proof can be upgraded to resolve pending attestations and in order to obtain a complete timestamp. A &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PendingAttestation&lt;/code&gt; is a promise provided by an ots calendar that only this specific calendar can resolve.
 A resolved attestation is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BitcoinBlockHeaderAttestation&lt;/code&gt; and it is verificable by block explorer.
 A timestamp is completed when there are at least one bitcoin attestation. The following code allows to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;upgrade&lt;/code&gt; a timestamp:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;detachedOts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;OpenTimestamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DetachedTimestampFile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;deserialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ots&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;OpenTimestamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;upgrade&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;detachedOts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;changed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;changed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Timestamp upgraded&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;upgradedOts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;detachedOts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;serializeToBytes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;upgradedHex&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;bytesToHex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;upgradedOts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;upgradedHex&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Timestamp not changed&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;upgrade&lt;/code&gt; command, the example shows the output of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;info&lt;/code&gt; command:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;File sha256 hash: 16193782f1d839a08f9fc9a94cec1675f1729db1abc15cf9b57f31aa1724a0ae
Timestamp:
append c04158b183a378f3d051d55979a918d8
sha256
 -&amp;gt; append 89c144ad44156173d93cd470569c3087
    sha256
    prepend d37278872acc324f499d54dd488fbe29f76d892204793701e38129e0a2f224b0
    sha256
    prepend 333ea54d67017894b5e581b2bd4e197d3990c031bc78331b7e5c9ee89162c8fd
    sha256
    append bdef644af9388e148d198dec47e62fdaf9e264baf28f9e8115f0468354b2cc44
    sha256
    prepend 5ab7a0c9
    append 05765ac5abc32c3b
    verify PendingAttestation(&apos;https://alice.btc.calendar.opentimestamps.org&apos;)
    sha256
    append 9392bf72d9060a7b50972524836e578e7e63dcdf14c3f5d4c1dca9d86756cb9b
    sha256
    append ce3d685da3581a2bb94b71cfaea03474ebe5fe40e4dca672afe7e1da742db297
    sha256
    prepend fce1e10cc3091a3846c93bf4aa84413fb250e5ee34b53dcad606573e3d78c4ac
    sha256
    append cce5fea18e0db1f32045a3eb9dfdcd4aa705fe3b180fcebf444d67c94c294c04
    sha256
    prepend eb3be78a0442c27bdd502552a256be442e85c47db7bf4e311cc831002b3f9b38
    sha256
    append 4b60e02f7497b5803e08daba5b71d48da32a173301915690e481b67f51970751
    sha256
    prepend b9b9f9fa9bdeb8a595bfa4eca6369506d2f1546e6b21b9c7bbd7fb2548a26ffe
    sha256
    append bef44e97f18402c26657532a8f73a7789105cd59f12f8d71515912470ff1fd6d
    sha256
    prepend 1bc0e9e84a56d090d0b3c3eb4f82e2d540f0ed7a814c3c8c408d2f578dfea53d
    sha256
    append 4e315507d6bfd306166e1020bd051d71e783ea1082d22013304626f7c5a279e6
    sha256
    append e5e9e4a6fe92bb4477cea41e2c15c2c16510bef0b45b269a9f0baba752ea2c8b
    sha256
    prepend 76242fc7615358d5cf2faa3ce7c0fea8eda591c128a7ab7f881bfc9da5dd96e2
    sha256
    append 59942d9922a624ddd4b4ce58de992436565db8cf682dbe98cfb1e71bd6a6a049
    sha256
    prepend 01000000012eac8b315182773e76d57edd23b0297f60c2b5cce26e8b1958609bf53f17c998000000001716001405b45b2e5fb44a6f875d69cb4df5d414f7ba1c34fdffffff02588665000000000017a9146f626afde13c6395faad1615fe281d5c0be123c0870000000000000000226a20
    append 22dc0700
    # transaction id fd02844474819a15ae726e2f7e75d0eeb7e5de497c918ee69758130e41e30cbc
    ...
    verify BitcoinBlockHeaderAttestation(515107)
    # Bitcoin block merkle root 7d7cd153b837a18ba32b21af103af1691b1ba3d4248e7fc9c290211e15de37d5
 -&amp;gt; append 26ef6425656e1095c5a88badcdea280c
    sha256
    prepend 4e3e4ca04a74381180c6b4a648560e679b321b3e12d1932781b6398267151d70
    sha256
    prepend 61febb5707e8c9ae78c1248ca389d0dba9c00c156c2282020e27fcbae04d1810
    sha256
    prepend 5ab7a0c9
    append 6481affe61f15ea9
    verify PendingAttestation(&apos;https://bob.btc.calendar.opentimestamps.org&apos;)
    ...
    # transaction id df7b8ba0739571e6508f812c82de25259059bd5129a4f96816567480d3718692
    ...
    verify BitcoinBlockHeaderAttestation(515104)
    # Bitcoin block merkle root 8331bed61eb2858361b16ac337da5fdacf9b3ee41f6c8f1e204a983b9fccdb36
 -&amp;gt; append 3dd70ea7ab4c979a7747ab0570d2ea27
    sha256
    prepend b47ab96db80690d1c436022e2869404d7423f7225eb47c81436e342062c70eba
    sha256
    append 7c8025312aa0b452457a1a33d1e12cf0237bc34cb359140dee74f45e6ef8ead7
    sha256
    prepend 5ab7a0c9
    append c302502f95a0f008
    verify PendingAttestation(&apos;https://finney.calendar.eternitywall.com&apos;)
    ...
    # transaction id 355d3a6da112e10a589b84eb3d45682c79b1a85dbd1a3720ccf7c7bf40b02969
    ...
    verify BitcoinBlockHeaderAttestation(515107)
    # Bitcoin block merkle root 7d7cd153b837a18ba32b21af103af1691b1ba3d4248e7fc9c290211e15de37d5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Now the timestamp is completed and each incomplete &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PendingAttestation&lt;/code&gt; has become a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BitcoinBlockHeaderAttestation&lt;/code&gt; with the corresponding block height. The bitcoin block contains the timestamp, so the date, of the stamped operation.
Follow the crypto-operations path from hash to attestation, to get the merkle root of the bitcoin block.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;To verify manually the ots proof: open a block-explorer and check if the block height and merkle root inside the attestation match.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;verify-the-ots-proof-on-the-blockchain&quot;&gt;Verify the ots proof on the blockchain&lt;/h2&gt;
&lt;p&gt;OpenTimestamps library provides the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;verify&lt;/code&gt; command to check the integrity of a proof and verify all the completed attestations in order to get the date of the proof.&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;hashData&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;16193782f1d839a08f9fc9a94cec1675f1729db1abc15cf9b57f31aa1724a0ae&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;op&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;OpenTimestamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Ops&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;OpSHA256&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;detached&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;OpenTime&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;stamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DetachedTimestampFile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fromHash&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;op&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;hashData&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;detachedOts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;OpenTimestamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DetachedTimestampFile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;deserialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ots&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;OpenTimestamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;verify&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;detachedOts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;detached&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;results&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;keys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;results&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Pending attestation&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;keys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;results&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; attests data existed as of &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;results&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}).&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;catch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Bad attestation&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The result is the unix timestamp of the first completed attestation, with lower block-height, in the example is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{bitcoin: 1521990170}&lt;/code&gt;. The previous code formats the unix timestamp and show the following message: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bitcoin attests data existed as of Sun Mar 25 2018 17:02:50 GMT+0200&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;OpenTimestamps proof supports multiple chains, a multi-chain proof is verified in both the chains and providing different timestamps.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
        <pubDate>Mon, 26 Mar 2018 00:00:00 +0200</pubDate>
        <link>https://blog.eternitywall.com/2018/03/26/js-opentimestamps-by-example/</link>
        <guid isPermaLink="true">https://blog.eternitywall.com/2018/03/26/js-opentimestamps-by-example/</guid>
        
        
      </item>
    
      <item>
        <title>OpenTimestamps meets Electrum</title>
        <description>&lt;p&gt;&lt;em&gt;Have you ever timestamped?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Being more precise, did you ever create an OpenTimestamps proof all by yourself?
To do so you need to send a bitcoin transaction incluing some extra data which are a commitment to, let’s say, your files &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;my_first_timestamp.txt&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;my_second_timestamp.txt&lt;/code&gt;.
Then for each file you should create a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ots&lt;/code&gt; receipt containing the proof linking the file to the merkle root in the block header, using the OpenTimestamps standard.&lt;/p&gt;

&lt;p&gt;This is not extremely easy to do, you should be familiar with the OpenTimestamps libraries and a software to create custom bitcoin transactions. 
While trying you may fail, wasting some bytes in your transaction or even worse some of your bitcoins.
But now there is an easy way: you can timestamp your files with your transactions using this Electrum plugin.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/electrum-meets-opentimestamps.png&quot; alt=&quot;electrum-meets-opentimestamps&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; except for educational purposes or particular cases, creating a timestamp in this way is the &lt;strong&gt;dumb&lt;/strong&gt; way to do a timestamp. 
The smart way is using a public &lt;em&gt;calendar&lt;/em&gt; service: it’s cheaper, requires less efforts and burdens less on the network.&lt;/p&gt;

&lt;h1 id=&quot;getting-started&quot;&gt;Getting started&lt;/h1&gt;

&lt;p&gt;In this launch phase the plugin is not super easy to install or download, 
we plan to make this easier after more reviews and tests.
In addition we tried to make it the less invasive possible, 
we used the existing hooks and we even haven’t (yet) added any fancy OpenTimestamps picture.
In the next phases we will make some steps to provide a nicer user experience.&lt;/p&gt;

&lt;p&gt;To use the plugin you need to install a custom version of Electrum including the plugin.&lt;/p&gt;

&lt;p&gt;The instructions are adapted from &lt;a href=&quot;https://github.com/spesmilo/electrum#development-version&quot;&gt;Electrum README&lt;/a&gt;
and it is assumed to run on Linux.&lt;/p&gt;

&lt;p&gt;(For Mac OS X use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew install&lt;/code&gt; instead of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get install&lt;/code&gt;, instead of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python-pyqt5&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pyqt5-dev-tools&lt;/code&gt; install &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pyqt5&lt;/code&gt; and check that it is using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python3&lt;/code&gt;. This should do the job.)&lt;/p&gt;

&lt;p&gt;Electrum is a pure python application. 
If you want to use the Qt interface, install the Qt dependencies:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo apt-get install python3-pyqt5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Install plugin requirements:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ pip3 install opentimestamps
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Clone the Electrum source code, then include the plugin files:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ git clone https://github.com/spesmilo/electrum.git
$ git clone https://github.com/LeoComandini/electrum-timestamp-plugin.git
$ cp -r electrum-timestamp-plugin/timestamp electrum/plugins
$ cd electrum
$ python3 setup.py install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Compile the icons file for Qt:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo apt-get install pyqt5-dev-tools
pyrcc5 icons.qrc -o gui/qt/icons_rc.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To run on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mainnet&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ ./electrum
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To run on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;testnet&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ ./electrum --testnet
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h1 id=&quot;timestamp-your-files-with-your-transaction&quot;&gt;Timestamp your files with your transaction&lt;/h1&gt;

&lt;h2 id=&quot;enable-the-plugin&quot;&gt;Enable the plugin&lt;/h2&gt;

&lt;p&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tools&lt;/code&gt; -&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Plugins&lt;/code&gt; and tick the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Timestamp&lt;/code&gt; checkbox&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/activate-timestamp-plugin.png&quot; alt=&quot;Activate-plugin&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Close and restart to Electrum to abilitate the plugin.&lt;/p&gt;

&lt;h2 id=&quot;visualize-the-timestamps-history&quot;&gt;Visualize the timestamps history&lt;/h2&gt;

&lt;p&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tools&lt;/code&gt; -&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Timestamps…&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/tools-timestamps.png&quot; alt=&quot;tools-timestamps&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;add-new-files&quot;&gt;Add new files&lt;/h2&gt;

&lt;p&gt;Click on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Add New File&lt;/code&gt; button and select the file yo want to timestamp.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/add-new-file.png&quot; alt=&quot;add-new-file&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;create-and-broadcast-a-bitcoin-transaction-including-the-timestamp&quot;&gt;Create and broadcast a bitcoin transaction including the timestamp:&lt;/h2&gt;
&lt;p&gt;On the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Send Tab&lt;/code&gt; select outputs, amount, fee
(select a fee &amp;gt; 1 sat/byte)&lt;/p&gt;

&lt;p&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Preview&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/preview.png&quot; alt=&quot;preview&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Timestamp&lt;/code&gt;, this write a commitment to your file(s) in the transaction&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/pre-timestamp.png&quot; alt=&quot;pre-timestamp&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Confirm the changes in the transaction 
(if fee is too low the transaction won’t be relayed or mined)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/post-timestamp.png&quot; alt=&quot;post-timestamp&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Sign and broadcast the transaction (click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Sign&lt;/code&gt;, then &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Broadcast&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; the hash value in the red box is the Merkle root resulting from the hashes of the files along with nonces to guarantee extra privacy.&lt;/p&gt;

&lt;h2 id=&quot;check-the-timestamps-history&quot;&gt;Check the timestamps history&lt;/h2&gt;

&lt;p&gt;Click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tools -&amp;gt; Timestamps…&lt;/code&gt;, the file now is an pending state.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/pending-commitment.png&quot; alt=&quot;pending-commitment&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you try to click on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;upgrade&lt;/code&gt; nothing will happen,
to create your timestamps you need to wait to have the transaction is confirmed (6 blocks) so reorgs won’t be an issue.&lt;/p&gt;

&lt;h2 id=&quot;upgrade&quot;&gt;Upgrade&lt;/h2&gt;

&lt;p&gt;After 6 blocks clicking on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;upgrade&lt;/code&gt; will do something, your timestamps are now completed.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/post-upgrade.png&quot; alt=&quot;post-upgrade&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Your timestamp proofs are next to the file you timestamped.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/files-and-proofs.png&quot; alt=&quot;files-and-proofs&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;verify-your-proofs&quot;&gt;Verify your proofs&lt;/h2&gt;

&lt;p&gt;Use the OpenTimestamps client (better) or go on &lt;a href=&quot;https://opentimestamps.org&quot;&gt;opentimestamps.org&lt;/a&gt; (suboptimal, you are trusting the website) to verify your proofs.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/pre-verify.png&quot; alt=&quot;pre-verify&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/electrum-timestamp-plugin/post-verify.png&quot; alt=&quot;post-verify&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;conclusions&quot;&gt;Conclusions&lt;/h1&gt;

&lt;p&gt;With this plugin you can easily timestamp your files while doing bitcoin transactions with Electrum.&lt;/p&gt;

&lt;p&gt;While it may be sometimes useful, it is better to use a &lt;em&gt;calendar&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;However this could become relevant if &lt;em&gt;sign-to-contract&lt;/em&gt; or external timestamping becomes a thing. 
Stay tuned.&lt;/p&gt;
</description>
        <pubDate>Wed, 14 Mar 2018 00:00:00 +0100</pubDate>
        <link>https://blog.eternitywall.com/2018/03/14/electrum-timestamp-plugin-launch/</link>
        <guid isPermaLink="true">https://blog.eternitywall.com/2018/03/14/electrum-timestamp-plugin-launch/</guid>
        
        
      </item>
    
      <item>
        <title>Integrate OpenTimestamps on S3 cloud storage</title>
        <description>&lt;p&gt;OpenTimestamps is a scalable, trustless, distributed protocol to timestamp files, documents and media on Bitcoin.&lt;/p&gt;

&lt;p&gt;There are available clients, documentations, tools and libraries in different languages, for more info look at &lt;a href=&quot;https://github.com/opentimestamps&quot;&gt;GitHub page&lt;/a&gt;.
Moreover, &lt;a href=&quot;https://opentimestamps.org&quot;&gt;OpenTimestamps website&lt;/a&gt; provides free and easy methods to stamp and verify documents.&lt;/p&gt;

&lt;p&gt;In this tutorial, I want to allow lazy people, as me, to automatically stamp documents in the cloud without any human interaction, by using Amazon Lambda functions:
when I transfer a file in my Amazon S3 cloud storage, the Lambda function stamps the document and stores the proof-file on the S3 itself.&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Note: Run your own Amazon Lambda function, because you should not trust to any third-party service.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/services.png&quot; alt=&quot;Services&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;why-awslambda&quot;&gt;Why AWS Lambda?&lt;/h3&gt;

&lt;p&gt;With Amazon AWS Lambda, you pay only for the compute time you consume, there is no charge when your code is not running. With Lambda, you can run code for virtually any type of application or backend service, all with zero administration. &lt;/p&gt;

&lt;p&gt;A full guide of AWS Lambda is available at &lt;a href=&quot;https://docs.aws.amazon.com/lambda/latest/dg/lambda-dg.pdf&quot;&gt;https://docs.aws.amazon.com/lambda/latest/dg/lambda-dg.pdf&lt;/a&gt; .&lt;/p&gt;

&lt;h3 id=&quot;get-started&quot;&gt;Get started&lt;/h3&gt;
&lt;p&gt;To create an AWS Lambda Function go to the list of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Services&lt;/code&gt; and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Lambda&lt;/code&gt;: Run Code without Thinking about Server.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_MWuRFTLiYqfgVK7AOqVDtA.png&quot; alt=&quot;Lambda functions list&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Create function from scratch: select name, node.js as runtime, select the existing role &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lambda_basic_execution&lt;/code&gt; and press &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Create function&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_dDybh77W8zkMAHW1XtVd0g.png&quot; alt=&quot;Build new Lambda function from Scratch&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;connect-to-s3bucket&quot;&gt;Connect to S3 bucket&lt;/h3&gt;
&lt;p&gt;I build and configure my S3 bucket previously with 2 main folders:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uploads&lt;/code&gt;: store files&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;proof&lt;/code&gt;: store OTS proof-files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the Designer, select S3 voice to import your S3 bucket&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_7ImATslGO810XJOl2IXHzw.png&quot; alt=&quot;Designer interface&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Configure S3 bucket to enable Triggers&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_6ZfbizTSoDEuMxCzQp54_Q.png&quot; alt=&quot;Add Trigger&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Press the orange button &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Save&lt;/code&gt; in the top-right of the page to save your current setting.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_5gqJaKVrKf4LnC5_uelfaQ.png&quot; alt=&quot;Designer with S3 component&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;write-lambdafunction&quot;&gt;Write lambda function&lt;/h3&gt;
&lt;p&gt;In Designer, select OpenTimestamps lambda function to view &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Function code&lt;/code&gt; panel.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_CQzNxfAN1wshJcAuDgBWkQ.png&quot; alt=&quot;Function code panel&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can write your own script to call OpenTimestamps calendar servers or use OpenTimestamps nodejs library available on npm.
Otherwise, you can find my own script at &lt;a href=&quot;https://github.com/lvaccaro/javascript-opentimestamp-awslambda&quot;&gt;https://github.com/lvaccaro/javascript-opentimestamp-awslambda&lt;/a&gt;.
Download and build a .zip package to upload on your AWS lambda platform. Select Upload a .ZIP file` on function code panel.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_DjPSQdx--DgRUzNaG8nGdA.png&quot; alt=&quot;Function code panel to upload package&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Check the execution role and select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lambda_basic_execution&lt;/code&gt; and increase the Timeout. Keep the other values as default.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_CDULGlkxhgzD3sLOyDTUjg.png&quot; alt=&quot;Execution role and Basic settings&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;set-access-androles&quot;&gt;Set access and roles&lt;/h3&gt;

&lt;p&gt;Go to Services IAM: Manage User Access and Encryption Keys.
In Roles menu, click on role &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lambda_basic_execution&lt;/code&gt; and attach the following policies: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AmazonS3FullAccess&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AWSLambdaRole&lt;/code&gt;.
Press &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Save&lt;/code&gt; to upload and save your current settings.&lt;/p&gt;

&lt;h3 id=&quot;publish&quot;&gt;Publish&lt;/h3&gt;

&lt;p&gt;Click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Actions&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Publish&lt;/code&gt;: set a version name before publish a new version.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_DStT_iub955Ghz02ha9kbA.png&quot; alt=&quot;Top menu&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;run&quot;&gt;Run&lt;/h3&gt;

&lt;p&gt;Go in your S3 bucket. Upload your files on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uploads&lt;/code&gt; folder and automatically our AWS lambda function build the OTS receipt on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;proof&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_Hnzbgo43tBqkcUO4u5tcYA.png&quot; alt=&quot;S3 bucket&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Go to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;upload&lt;/code&gt; folder to upload a file&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_OPCzOBHnCY0LJe7emO6lPg.png&quot; alt=&quot;Upload file&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;proof&lt;/code&gt; folder, it is automatically generated and stored the OTS file.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/aws-lambda-functions/1_HBEhSn8seRGX1aUisT_JDA.png&quot; alt=&quot;Proof file&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Wed, 28 Feb 2018 00:00:00 +0100</pubDate>
        <link>https://blog.eternitywall.com/2018/02/28/aws-lambda-function/</link>
        <guid isPermaLink="true">https://blog.eternitywall.com/2018/02/28/aws-lambda-function/</guid>
        
        
      </item>
    
      <item>
        <title>Create the shortest transaction</title>
        <description>&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; &lt;em&gt;what follows is a mere exercise in style.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Along with higher fees and block size debate a natural question arise: which is the shortest transaction?&lt;/p&gt;

&lt;p&gt;There are some extremely short transactions (like &lt;a href=&quot;http://yogh.io/#tx:id:f21b099d67070a7639d384f30e9b139bab58c27e47368a2d8152f05c14e187b7&quot;&gt;this&lt;/a&gt;), but we are looking for something that could be sent by everyone and relayed by the network, so &lt;del&gt;nonstandard&lt;/del&gt;, &lt;del&gt;coinbase&lt;/del&gt;.&lt;/p&gt;

&lt;h2 id=&quot;a-sent-short-transaction&quot;&gt;A sent short transaction&lt;/h2&gt;

&lt;p&gt;Extract the transaction with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;txid = 3419cbc51cec42d4f55d4147d0c1cef54fbdabddf4384270e6e93970b2496f74&lt;/code&gt; from the blockchain and decode the raw transaction:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ bitcoin-cli decoderawtransaction 0200000001017a28f3d62d98803174bd1ba3827c62e4ccb28b4aa23aa5c7bec74301005f1b0000000044433040022002aedaad7897022be857509bbf753d5c05d6c20092cf5088413f31d6ff661f0b021c57e00a637102d8223360b6797d0bb33c2dfc4504c30d0c4ced29ddb301ffffffff010000000000000000016a00000000
{
  &quot;txid&quot;: &quot;3419cbc51cec42d4f55d4147d0c1cef54fbdabddf4384270e6e93970b2496f74&quot;,
  &quot;hash&quot;: &quot;3419cbc51cec42d4f55d4147d0c1cef54fbdabddf4384270e6e93970b2496f74&quot;,
  &quot;version&quot;: 2,
  &quot;size&quot;: 129,
  &quot;vsize&quot;: 129,
  &quot;locktime&quot;: 0,
  &quot;vin&quot;: [
    {
      &quot;txid&quot;: &quot;1b5f000143c7bec7a53aa24a8bb2cce4627c82a31bbd743180982dd6f3287a01&quot;,
      &quot;vout&quot;: 0,
      &quot;scriptSig&quot;: {
        &quot;asm&quot;: &quot;3040022002aedaad7897022be857509bbf753d5c05d6c20092cf5088413f31d6ff661f0b021c57e00a637102d8223360b6797d0bb33c2dfc4504c30d0c4ced29ddb3[ALL]&quot;,
        &quot;hex&quot;: &quot;433040022002aedaad7897022be857509bbf753d5c05d6c20092cf5088413f31d6ff661f0b021c57e00a637102d8223360b6797d0bb33c2dfc4504c30d0c4ced29ddb301&quot;
      },
      &quot;sequence&quot;: 4294967295
    }
  ],
  &quot;vout&quot;: [
    {
      &quot;value&quot;: 0.00000000,
      &quot;n&quot;: 0,
      &quot;scriptPubKey&quot;: {
        &quot;asm&quot;: &quot;OP_RETURN&quot;,
        &quot;hex&quot;: &quot;6a&quot;,
        &quot;type&quot;: &quot;nulldata&quot;
      }
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It is &lt;strong&gt;only&lt;/strong&gt; 129 bytes long:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;4 bytes for version&lt;/li&gt;
  &lt;li&gt;1 byte for number of inputs&lt;/li&gt;
  &lt;li&gt;32 bytes for txid&lt;/li&gt;
  &lt;li&gt;4 bytes for vout&lt;/li&gt;
  &lt;li&gt;1 byte for length of unlocking script&lt;/li&gt;
  &lt;li&gt;1 byte for length of signature&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;67&lt;/strong&gt; bytes for DER encoded signature (including sighash)&lt;/li&gt;
  &lt;li&gt;4 bytes for sequence number&lt;/li&gt;
  &lt;li&gt;1 byte for number of outputs&lt;/li&gt;
  &lt;li&gt;8 bytes for amount&lt;/li&gt;
  &lt;li&gt;1 byte for length of locking script&lt;/li&gt;
  &lt;li&gt;1 bytes for locking script&lt;/li&gt;
  &lt;li&gt;4 bytes for nlocktime&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;how-to-create-such-a-short-transaction&quot;&gt;How to create such a short transaction?&lt;/h2&gt;

&lt;p&gt;Work on its body minimizing inputs and outputs.&lt;/p&gt;

&lt;p&gt;Squeeze the signature taking advantage of DER encoding.&lt;/p&gt;

&lt;h3 id=&quot;minimize-inputs-and-outputs&quot;&gt;Minimize inputs and outputs&lt;/h3&gt;

&lt;p&gt;A standard transaction must have at least one input and one output, so one input and one output.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;input&lt;/strong&gt; is created ad hoc for this transaction. It must be spendable (&lt;del&gt;nulldata&lt;/del&gt; has no bitcoin locked in). It must have the least possible redundant data in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ScriptSig&lt;/code&gt; (&lt;del&gt;P2PKH&lt;/del&gt; has to specify the public key, &lt;del&gt;multisig&lt;/del&gt; has to specify n-of-m). It must be signed (&lt;del&gt;P2SH&lt;/del&gt; without a signature can be stolen, with a signature has redundant data). Thus the input used is a &lt;em&gt;P2PK&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The shortest possible standard &lt;strong&gt;output&lt;/strong&gt; is a &lt;em&gt;nulldata&lt;/em&gt; with nothing following the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OP_RETURN&lt;/code&gt;.&lt;/p&gt;

&lt;h3 id=&quot;squeeze-the-signature&quot;&gt;Squeeze the signature&lt;/h3&gt;

&lt;p&gt;DER encoded signatures haven’t fixed length. Usually they are 73, 72 or 71 bytes long, however sometimes they could be shorter.&lt;/p&gt;

&lt;p&gt;Reminding how a signature is encoded:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;a ECDSA signature is a couple of integer in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[1..order-1]&lt;/code&gt;: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(r, s)&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;as specified in BIP66, a DER encoded signature is composed by:
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0x30&lt;/code&gt; DER encoded signature follows&lt;/li&gt;
      &lt;li&gt;1 byte for length of signature&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0x02&lt;/code&gt; int follows&lt;/li&gt;
      &lt;li&gt;1 byte for length of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;r&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;r&lt;/code&gt; in bytes (33 or less bytes)&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0x02&lt;/code&gt; int follows&lt;/li&gt;
      &lt;li&gt;1 byte for length of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;s&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;s&lt;/code&gt; in bytes (33 or less bytes)&lt;/li&gt;
      &lt;li&gt;1 byte for sighash&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;when encoding &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;r&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;s&lt;/code&gt; in bytes if the most signficant byte is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0x80&lt;/code&gt; or more then prepend &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0x00&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The idea is to try different nonces in order to find a shorter DER encoded signature.
Generating multiple nonces doesn’t have to be expensive, one can generate the first in the a standard way and then derive the next ones deterministically. You can see the code &lt;a href=&quot;https://github.com/RCasatta/small-signatures&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much is likely to get a short signature?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the following we will use an &lt;strong&gt;approximation&lt;/strong&gt;: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;order = 2**256&lt;/code&gt;. It will make computations easier: with this apporximation &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;P(r &amp;lt; 2**255) = 1/2&lt;/code&gt; while the true value is slightly above (since &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;r&lt;/code&gt; cannot assume values in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[order..2**256-1]&lt;/code&gt;).
However this values are &lt;em&gt;extremely&lt;/em&gt; close to the true results (computed &lt;a href=&quot;/content/20171212_Exact_Probabilities&quot;&gt;here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Compute the cumulative distribution:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;P(len(encoded int) &amp;lt;= 33 bytes) = 1
P(len(encoded int) &amp;lt;= 32 bytes) = 1/2
P(len(encoded int) &amp;lt;= 31 bytes) = 1/256 * 1/2
P(len(encoded int) &amp;lt;= 30 bytes) = 1/256**2 * 1/2
...
P(len(encoded int) &amp;lt;= (33-n) bytes) = | 1                    if n = 0
                                      | 1/2 * 1/256**(n-1)   if n = 1, 2, ..., 32
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Compute the discrete distribution per difference:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;P(len(encoded int) = 33 bytes) = P(33) = 1 - 1/2 = 1/2
P(len(encoded int) = 32 bytes) = P(32) = 1/2 - 1/256 * 1/2 = 1/2 * 255/256
P(len(encoded int) = 31 bytes) = P(31) = 1/256 * 1/2 - 1/256**2 * 1/2 = 1/2 * 1/256 * 255/256
P(len(encoded int) = 30 bytes) = P(30) = 1/256**2 * 1/2 - 1/256**3 * 1/2 = 1/2 * 1/256**2 * 255/256
...
P(33-n) = | 1/2                if n = 0
          | 255/2 * 1/256**n   if n = 1, 2, ..., 32
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Remembering that a DER signature is composed by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;r&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;s&lt;/code&gt; plus 7 bytes (sighash is included), compute the probability of obtaining a DER signature with a certain length:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;let a = 255/2, b = 1/256, recall P(33) = 1/2

P(len(encoded sig) = 73 bytes) = P(33) * P(33) = 1/4
P(len(encoded sig) = 72 bytes) = 2 * P(33) * P(32) = ab
P(len(encoded sig) = 71 bytes) = 2 * P(33) * P(31) + P(32) * P(32) = ab**2 + a**2*b**2 = b**2*(a + a**2)
P(len(encoded sig) = 70 bytes) = 2 * P(33) * P(30) + 2 * P(32) * P(31) =  ab**3 + 2*a**2*b**3 = b**3*(a + 2*a**2)
P(len(encoded sig) = 69 bytes) = 2 * P(33) * P(29) + 2 * P(32) * P(30) + P(31) * P(31) = ab**4 + 2*a**2*b**4 + a**2*b**4 = b**4*(a + 3*a**2)
P(len(encoded sig) = 68 bytes) = 2 * P(33) * P(28) + 2 * P(32) * P(29) + 2 * P(31) * P(30) = ab**5 + 2*a**2*b**5 + 2*a**2*b**5 = b**5*(a + 4*a**2)
...
P(len(encoded sig) = 73-n bytes) = | 1/4                   if n = 0
                                   | b**n*(a+(n-1)*a**2)   if n = 1,  ..., 32
                                   | b**n*(65-n)*a**2      if n = 33, ..., 65
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Resuming:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Length of DER encoded signature&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Probability&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Avg number of tries to generate such length&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;73 bytes&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;0.25&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;4&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;72 bytes&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;0.498046875&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;2&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;71 bytes&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;0.24999618530273438&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;4&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;70 bytes&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;0.00194549560546875&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;514&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;69 bytes&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;0.00001138454535976&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;87838&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;68 bytes&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;0.00000005925585355&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;16875969&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;67 bytes&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;0.00000000028922197&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;3457551881&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;…&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;…&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;…&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;So if you have exceeding computational power you can sign several times, get a shorter signature and save some bytes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is this worthy?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Not really.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There are some issues:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Privacy&lt;/strong&gt;: if few people squeeze their signatures then the squeezed ones become easily recognizable.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Security&lt;/strong&gt;: reducing the first part of the signature (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;r&lt;/code&gt;) of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n&lt;/code&gt; bytes is equivalent to choose the nonce from a set (approximately) &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1/256**n&lt;/code&gt; times smaller than the stardard one.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;SegWit&lt;/strong&gt;: the signature is in the witness which is discounted.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Still the transaction is smaller and weights less on the network.&lt;/p&gt;

&lt;h2 id=&quot;conclusions&quot;&gt;Conclusions&lt;/h2&gt;

&lt;p&gt;A very small UTXO could be insert in a transaction with 1 input and 1 &lt;em&gt;nulldata&lt;/em&gt; minimal output. This could be used to timestamp using a &lt;em&gt;sign-to-contract&lt;/em&gt; scheme.&lt;/p&gt;

&lt;p&gt;For every signature one may sign several times to save some bytes. This will make the transaction smaller and hence cheaper, but in the end it is not worth the effort.&lt;/p&gt;

&lt;p&gt;We haven’t found any signature smaller than 67 bytes, if you find one please comment down here!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remark:&lt;/strong&gt; &lt;em&gt;Most signature algorithms use a deterministic nonce (with RFC6979) hence to generate new signatures you should modify how the signature is made. But this is very delicate and could lead to loss of funds, don’t expose others to this risk&lt;/em&gt;.&lt;/p&gt;
</description>
        <pubDate>Tue, 12 Dec 2017 00:00:00 +0100</pubDate>
        <link>https://blog.eternitywall.com/2017/12/12/shortest-transaction/</link>
        <guid isPermaLink="true">https://blog.eternitywall.com/2017/12/12/shortest-transaction/</guid>
        
        
      </item>
    
      <item>
        <title>OpenTimestamps performances</title>
        <description>&lt;h1 id=&quot;executive-summary&quot;&gt;Executive Summary&lt;/h1&gt;

&lt;p&gt;Is the Bitcoin Blockchain a good choiche for timestamping purposes? Some articles conclude that bitcoin can not be used for such applications due to the writing time needed for include a transaction in a valid block.&lt;/p&gt;

&lt;p&gt;In this article I will analize the OpenTimestamps protocol perfomances (using public available servers) and I will show how timestamping can work in a efficient and cheap way on the Bitcoin Blockchain.&lt;/p&gt;

&lt;h1 id=&quot;introduction&quot;&gt;Introduction&lt;/h1&gt;

&lt;p&gt;Checking some articles online related with Bitcoin blockchain I found the &lt;em&gt;Blockchain Inefficiency in the Bitcoin Peers Network&lt;/em&gt; from &lt;em&gt;Giuseppe Pappalardo, T. Di Matteo, Guido Caldarelli, Tomaso Aste&lt;/em&gt; (you can find it on &lt;a href=&quot;https://arxiv.org/abs/1704.01414&quot;&gt;arxiv&lt;/a&gt;) that sound very pessimistic about the ability of the blockchain to support timestamping solutions.&lt;/p&gt;

&lt;p&gt;The article start with the following abstract&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;We investigate Bitcoin network monitoring the dynamics of blocks and transactions. We unveil that 43% of the transactions are still not included in the Blockchain after 1h from the first time they were seen in the network and 20% of the transactions are still not included in the Blockchain after 30 days, revealing therefore great inefficiency in the Bitcoin system. However, we observe that most of these “forgotten” transactions have low values and in terms of transferred value the system is less inefficient with 93% of the transactions value being included into the Blockchain within 3h.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And continue with some conclusion about the use of the Blockchain for timestamping purposes&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The fact that a sizeable fraction of transactions is not processed timely casts serious doubts on the usability of the Bitcoin Blockchain for reliable time-stamping purposes and calls for a debate about the right systems of incentives which a peer-to-peer unintermediated system should introduce to promote efficient transaction recording.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In my opinion this pessimistic conclusion on what you can do and what you can not do are totally wrong and the article miss an in-depth analysis of what cause that kind of delay.&lt;/p&gt;

&lt;p&gt;Then I tried to recreate the same results by contacting the author to obtain the script used or the complete dataset, unfortunately sources and dataset are not available for any elaboration.&lt;/p&gt;

&lt;p&gt;In the article the approach was bottom-up, from the raw data of the blockchain authors try to elaborate high level messages, in this post I will use a top-down analysis, I will analyze directly the data of some OpenTimestamps servers in order to check real performances of the system.&lt;/p&gt;

&lt;p&gt;OpenTimestamps calendar is designed to spend approximately a certain amount of money per day; this amount can be chosen adjusting the  granularity required from the calendar server and it’s unrelated to the amount of file timestamped in the interval.&lt;/p&gt;

&lt;p&gt;For this analysis I will use the data available from public calendars server.&lt;/p&gt;

&lt;h1 id=&quot;get-the-data&quot;&gt;Get the data&lt;/h1&gt;

&lt;p&gt;First step was to generate system’s performance data, the idea is the following:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;every 6 hours a new timestamp is generated using a script, informations about the digest and the creation date (timeCreated) is saved on a database,&lt;/li&gt;
  &lt;li&gt;every 5 minutes for each digest not confirmed with a proof on blockchain the script request an upgrade to the relative caledar server, if the digest appear in a confirmed transaction the actual time is recorded in the relative field (timeCompleted)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All this informations are exported in a csv file weekly. I decide to elaborate this data using the R language, the following code download the data from the website and convert in the internal data frame rappresentation.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;readr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggplot2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rvest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plyr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dplyr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;knitr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kableExtra&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setwd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;~/r-studio-workspace/MinMon&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;today&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Sys.Date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read_csv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;http://wpc.uk.to/miner_img/OTS/2017-06-22-dataset.csv&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCompleted&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;as.POSIXct&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCompleted&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;as.POSIXct&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;as.factor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;as.factor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;We can print the first rows of the dataset with the following code.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;knitr.table.format&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;html&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;caption&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Raw dataset&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&amp;gt;%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kable_styling&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bootstrap_options&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;striped&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;font_size&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;table class=&quot;table table-striped&quot; style=&quot;font-size: 7px; margin-left: auto; margin-right: auto;&quot;&gt;
&lt;caption style=&quot;font-size: initial !important;&quot;&gt;
Raw dataset
&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align:right;&quot;&gt;
X1
&lt;/th&gt;
&lt;th style=&quot;text-align:left;&quot;&gt;
digest
&lt;/th&gt;
&lt;th style=&quot;text-align:right;&quot;&gt;
datastoreId
&lt;/th&gt;
&lt;th style=&quot;text-align:right;&quot;&gt;
callNumber
&lt;/th&gt;
&lt;th style=&quot;text-align:left;&quot;&gt;
timeCompleted
&lt;/th&gt;
&lt;th style=&quot;text-align:left;&quot;&gt;
timeCreated
&lt;/th&gt;
&lt;th style=&quot;text-align:left;&quot;&gt;
siteUrl
&lt;/th&gt;
&lt;th style=&quot;text-align:right;&quot;&gt;
delta
&lt;/th&gt;
&lt;th style=&quot;text-align:left;&quot;&gt;
blockchain
&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
1
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
94802b7f99680476e82915cb93336290b8652a5213b06b47168a6622d05be6e262c93f59576137f8e94757dbd9a987e4
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
5.668601e+15
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
6
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-03-30 09:35:33
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-03-29 17:25:34
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
&lt;a href=&quot;https://alice.btc.calendar.opentimestamps.org&quot; class=&quot;uri&quot;&gt;https://alice.btc.calendar.opentimestamps.org&lt;/a&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
969.9709
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
BTC
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
2
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
94802b7f99680476e82915cb93336290b8652a5213b06b47168a6622d05be6e262c93f59576137f8e94757dbd9a987e4
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
5.707702e+15
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
6
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-03-30 09:35:33
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-03-29 17:25:34
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
&lt;a href=&quot;https://finney.calendar.eternitywall.com&quot; class=&quot;uri&quot;&gt;https://finney.calendar.eternitywall.com&lt;/a&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
969.9815
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
BTC
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
3
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
4666d7a59b1791130cbd53b3e64bfe7e07e7d2c9aecfa117868fa24e1d3c8f00
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
5.629500e+15
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
57
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-03-31 20:55:00
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-03-31 16:15:36
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
&lt;a href=&quot;https://finney.calendar.eternitywall.com&quot; class=&quot;uri&quot;&gt;https://finney.calendar.eternitywall.com&lt;/a&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
279.3964
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
BTC
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
4
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
70f9ff70692148b0bcb103510a4793cbb41ac8a7b71496a7087974d3704979c6
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
5.629500e+15
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
68
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-03-31 20:55:01
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-03-31 15:07:21
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
&lt;a href=&quot;https://finney.calendar.eternitywall.com&quot; class=&quot;uri&quot;&gt;https://finney.calendar.eternitywall.com&lt;/a&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
347.6549
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
BTC
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
5
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
c8f90141c605bfa7ab5ac7da2195320c6b98c1ea8a4595d048c3dedf510ce4bf
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
5.707702e+15
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
68
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-03-31 20:55:01
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-03-31 15:07:17
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
&lt;a href=&quot;https://finney.calendar.eternitywall.com&quot; class=&quot;uri&quot;&gt;https://finney.calendar.eternitywall.com&lt;/a&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
347.7321
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
BTC
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
6
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
480aaf138ff25cea952f24265899abf635bdded3429f986a09c41743c5c9abd1
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
5.629500e+15
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
53
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-04-01 02:25:01
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
2017-03-31 22:01:01
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
&lt;a href=&quot;https://alice.btc.calendar.opentimestamps.org&quot; class=&quot;uri&quot;&gt;https://alice.btc.calendar.opentimestamps.org&lt;/a&gt;
&lt;/td&gt;
&lt;td style=&quot;text-align:right;&quot;&gt;
264.0046
&lt;/td&gt;
&lt;td style=&quot;text-align:left;&quot;&gt;
BTC
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The dataset contain the following columns:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;X1&lt;/code&gt; a progressive row identificator,&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;digest&lt;/code&gt; the value which is going to be timestamped, normally the hash of a document, in this monitoring case 32 random byte,&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;datastoreId&lt;/code&gt; the row id in the datastore,&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;callNumber&lt;/code&gt; number of times the monitoring process asked the calendar if the timestamp is upgraded, approximately (timeCreated - timeCompleted) ~= callNumber * 5 minutes,&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timeCompleted&lt;/code&gt; time when the process monitor found a complete timestamp at the calendar server,&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timeCreated&lt;/code&gt; timestamp of the creation,&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;siteUrl&lt;/code&gt; url of the public calendar server,&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;delta&lt;/code&gt; difference between timeCreated and timeCompleted in minutes,&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;blockchain&lt;/code&gt; kind of blockchain used.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also download the raw data from each server calling a special page, for example for the finney public server you can call  &lt;a href=&quot;https://finney.calendar.eternitywall.com/calendar/&quot;&gt;https://finney.calendar.eternitywall.com/calendar/&lt;/a&gt; and access to all the content of the local database.&lt;/p&gt;

&lt;p&gt;Each commitment in the journal file has a seconds granularity UTC unix timestamp attached which records exactly when the commitment was generated, this timestamp is added only for debugging and monitoring purposes and it’s not part of OpenTimestamps protocol.&lt;/p&gt;

&lt;p&gt;Using this datasets a reader can autonomously check the performances of the service for a specific server.&lt;/p&gt;

&lt;p&gt;Note that even we can fake the time when a timestamp is requested, the time when a timestamp is completed is proved by a transaction written in the blockchain which cannot be tampered.&lt;/p&gt;

&lt;h1 id=&quot;analyzing-the-data&quot;&gt;Analyzing the data&lt;/h1&gt;

&lt;p&gt;The first idea is to plot the delta (difference between timeCreated and timeCompleted in minutes) for each transaction.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;ggplot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;alpha&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_point&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_hline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yintercept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;720&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dashed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;720&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;12h&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vjust&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_hline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yintercept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1440&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dashed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1440&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;24h&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vjust&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_hline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yintercept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://alice.btc.calendar.opentimestamps.org&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;red&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dashed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;as.numeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://alice.btc.calendar.opentimestamps.org&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;paste&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;as.numeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://alice.btc.calendar.opentimestamps.org&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;digits&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;h&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vjust&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://alice.btc.calendar.opentimestamps.org&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_hline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yintercept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://bob.btc.calendar.opentimestamps.org&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;green&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dashed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;as.numeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://bob.btc.calendar.opentimestamps.org&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;paste&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;as.numeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://bob.btc.calendar.opentimestamps.org&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;digits&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;h&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vjust&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://bob.btc.calendar.opentimestamps.org&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_hline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yintercept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://finney.calendar.eternitywall.com&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;blue&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dashed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;as.numeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://finney.calendar.eternitywall.com&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;paste&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;as.numeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://finney.calendar.eternitywall.com&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;digits&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;h&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vjust&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://finney.calendar.eternitywall.com&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggtitle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Delay in the OTS servers&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xlab&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Date&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ylab&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Delay in minutes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;guides&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;guide_legend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;OpenTimestamps server&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;/img/graphs_opentimestamps_performance/1_delay_in_the_ots_servers.png&quot; alt=&quot;delay_in_the_ots_servers&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In this chart unfortunately we can see how some public server went down for maintenance/debugging activities generating long delays. Thanks to the architecture of OpenTimestamps this is not a big deal!
Every timestamp request from the reference client is made to the 3 servers, what you really care of is the reply of the fastest one to write in the blockchain&lt;/p&gt;

&lt;p&gt;For this reason we can plot just the minimum time for each timestamp, this is a good approximation of the time needed to publish a message. This is how OpenTimestamps protocol work, imagine to ask two servers (Alice and Bot) the same timestamp, the protocol return the timestamp of the minimal height block so, if Alice publish transaction before Bob, the protocol will return the timestamp on the block containing Alice’s transaction.&lt;/p&gt;

&lt;p&gt;We can plot it using a dataset summarized by digest like in the following chunk.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataLog_plot&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&amp;gt;%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;group_by&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;digest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&amp;gt;%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;summarize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;na.rm&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;TRUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;which.min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;which.min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggplot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;alpha&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_point&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_hline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yintercept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;720&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dashed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;720&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;12h&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vjust&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_hline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yintercept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1440&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dashed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1440&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;24h&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vjust&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggtitle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Minimum delay in the OTS servers&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xlab&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Date&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ylab&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Delay in minutes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;guides&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;guide_legend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;OpenTimestamps server&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;/img/graphs_opentimestamps_performance/2_minimum_delay_in_the_ots_servers.png&quot; alt=&quot;minimum_delay_in_the_ots_servers&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Remember that every server can decide:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;how many transaction do in a day,&lt;/li&gt;
  &lt;li&gt;the amount of the fee for publish a message (adjustable using Replace By Fee approach better explained later).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this chart we can also add the average confirmation time that represent the load of the blockchain.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read.csv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://api.blockchain.info/charts/avg-confirmation-time?daysAverageString=1&amp;amp;format=csv&amp;amp;scale=0&amp;amp;timespan=30days&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;header&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;FALSE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggplot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;as.POSIXct&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;V1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;as.numeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;V2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;alpha&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dotted&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;alpha&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_point&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_hline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yintercept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;720&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dashed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;720&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;12h&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vjust&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_hline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yintercept&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1440&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linetype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dashed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeCreated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1440&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;24h&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vjust&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggtitle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Minimum delay in the OTS servers&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xlab&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Date&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ylab&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Delay in minutes&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;guides&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;guide_legend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;OpenTimestamps server&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;/img/graphs_opentimestamps_performance/3_minimum_delay_in_the_ots_servers.png&quot; alt=&quot;minimum_delay_in_the_ots_servers&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As we can see the average load has some effects on service speed but a good choice of fees can reduce the probability of an high delay.&lt;/p&gt;

&lt;h1 id=&quot;conclusions&quot;&gt;Conclusions&lt;/h1&gt;

&lt;p&gt;We show how 3 OpenTimestamps free public servers perform in the real life and allow the publish of the transaction in less than 24 hours. With higher budget you can obviously obtain better performance, but even with infinite budget the maximum precision with bitcoin is +/- 2 hours.&lt;/p&gt;

&lt;p&gt;If we represent the performance of the system using an histogram we can see how a large amount of timestamps are written in the chain in less than 12 hours and almost all timestamps are written and confirmed in the chain in less than 24 hours.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bar&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%/%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggplot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_histogram&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bins&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;+1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggtitle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xlab&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Delay in hours&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ylab&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Transactions&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;guides&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;guide_legend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;OpenTimestamps server&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;/img/graphs_opentimestamps_performance/4_histogram.png&quot; alt=&quot;histogram&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Or if you prefer in band of 6 hours…&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bar_2&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bar&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%/%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bar_2&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;factor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bar_2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;levels&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bar_2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;6&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;6-12&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;12-18&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;gt;18&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;gt;18&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggplot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;blockchain&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BTC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bar_2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;siteUrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_histogram&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bins&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;as.numeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my_dataLog_plot&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bar_2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;+1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stat&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;count&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggtitle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xlab&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Delay in hours&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ylab&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Transactions&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;guides&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;guide_legend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;OpenTimestamps server&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;/img/graphs_opentimestamps_performance/5_histogram.png&quot; alt=&quot;histogram&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Not bad for public servers that work 24/365 with low fees, a lot of timestamp are processed in less than 12 hours and many in less than 6 (hey hey remember that a public server make a transaction every 6 hours …). Every transaction is processed in a day!&lt;/p&gt;

&lt;h2 id=&quot;what-makes-possible-this-performances&quot;&gt;What makes possible this performances?&lt;/h2&gt;

&lt;p&gt;OpenTimestamps calendar may take long to create proofs but they will certainly do with a predetermined budget.
The algorithm to create bitcoin transactions leverage the &lt;a href=&quot;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-May/008248.html&quot;&gt;Replace By Fee&lt;/a&gt; feature.&lt;/p&gt;

&lt;p&gt;By default, every node enforce the first seen rule on tx, but if RBF flag is set a transaction in mempool could be replaced by one spending the same input if it has higher fee.&lt;/p&gt;

&lt;p&gt;When a calendar server needs to create a timestamping tx &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;A&lt;/code&gt;, it starts with a minimum fee amount F. When the calendar receive a newly mined block, it checks if the tx &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;A&lt;/code&gt; it’s in the block, if not, it creates another tx &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;B&lt;/code&gt; using the same input as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;A&lt;/code&gt; but with a fee equal to  &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;transaction_fee_of_A + F&lt;/code&gt;. When another block is mined the algo repeats, until the transaction will be eventually confirmed.&lt;/p&gt;

&lt;p&gt;With this algorithm, independently from the network condition, the Calendar server running budget is the number of blocks in a day (144) multiplied by F. What change depending on network conditions is the frequency of timestamping.&lt;/p&gt;

&lt;p&gt;As we saw timestamping is &lt;strong&gt;possible&lt;/strong&gt; using transaction on blockchain using the OpenTimestamps protocol, but remember:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;delay depends on the writing policy chosen (e.g. if you decide to write 4 times per day accept 12 hours granularity with acceptable fees) and&lt;/li&gt;
  &lt;li&gt;delay depends on the fee chosen, if very low you accept to have a less precise timestamp.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A special thanks to Peter Todd and Riccardo Casatta for feedbacks and everyone who works on OpenTimestamps.&lt;/p&gt;
</description>
        <pubDate>Thu, 22 Jun 2017 00:00:00 +0200</pubDate>
        <link>https://blog.eternitywall.com/2017/06/22/opentimestamp-performances/</link>
        <guid isPermaLink="true">https://blog.eternitywall.com/2017/06/22/opentimestamp-performances/</guid>
        
        
      </item>
    
      <item>
        <title>EW position on the hard-fork</title>
        <description>&lt;p&gt;Eternity Wall works on the assumption of an immutable and decentralized blockchain.
It’s by leveraging this properties that we can build useful new products for our users.
Blockchains losing this kind of properties are no different from existing technologies and we are not interested in this field.&lt;/p&gt;

&lt;p&gt;We didn’t even think to need to write this kind of statement but recently it looks a part of the network think can decide for all the partecipants and this is not the idea we have of Bitcoin. Eternity Wall will not consider the current Bitcoin Unlimited proposal to be the original Bitcoin cryptocurrency and even if there will be a BTU chain, we are not interested in building on top of it.&lt;/p&gt;

&lt;p&gt;We consider hard-fork only remotely possible with super-majority of every actor of the network.&lt;/p&gt;

&lt;p&gt;We support &lt;a href=&quot;https://bitcoincore.org/en/2016/01/26/segwit-benefits/&quot;&gt;SegWit&lt;/a&gt; development and we encourage miners to signal adoption of this technology.&lt;/p&gt;

&lt;p&gt;We recommend interesting readings from other companies or individuals sharing similar views:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://medium.com/@BHBnetwork/bhb-statement-on-proposed-hard-fork-7b8f82da05e5&quot;&gt;BHB network&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://blog.greenaddress.it/&quot;&gt;GreenAddress&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://blog.bitgo.com/bitgos-approach-to-handling-a-hard-fork-71e572506d7d&quot;&gt;BitGo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://medium.com/@bitrated/bitrateds-position-on-network-splits-and-bitcoin-unlimited-4685c5c3f8e8&quot;&gt;Bitrated&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://hackernoon.com/canadian-bitcoin-economic-nodes-unite-against-bitcoin-unlimited-412786fb4bb6&quot;&gt;Canadian economic nodes&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.facebook.com/notes/inbitcoin/and-what-if-the-hard-fork-happened-hard-what-getting-informed-on-an-unlikely-eve/1642579522437038&quot;&gt;inbitcoin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Thu, 30 Mar 2017 00:00:00 +0200</pubDate>
        <link>https://blog.eternitywall.com/2017/03/30/ew-position-on-the-hard-fork/</link>
        <guid isPermaLink="true">https://blog.eternitywall.com/2017/03/30/ew-position-on-the-hard-fork/</guid>
        
        
      </item>
    
      <item>
        <title>Timestamping is the first non-monetary blockchain use case</title>
        <description>&lt;p&gt;ESMA (European Securities and Markets Authority) recently asked a &lt;a href=&quot;https://www.esma.europa.eu/press-news/consultations/consultation-distributed-ledger-technology-applied-securities-markets&quot;&gt;Consultation&lt;/a&gt; on the distributed ledger technology applied to securities markets.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/Ferdinando1970&quot;&gt;Ferdinando Ametrano&lt;/a&gt; &lt;sup id=&quot;fnref:1&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:1&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;,
&lt;a href=&quot;https://www.mate.polimi.it/qfinlab/index.php?pp=show_pagine&amp;amp;id_art=1&amp;amp;cate=1&quot;&gt;Emilio Barucci&lt;/a&gt;,
 &lt;a href=&quot;https://www.mate.polimi.it/qfinlab/index.php?pp=show_pagine&amp;amp;id_art=54&amp;amp;cate=1&quot;&gt;Daniele Marazzina&lt;/a&gt; and &lt;a href=&quot;http://home.deib.polimi.it/zanero/&quot;&gt;Stefano Zanero&lt;/a&gt; submitted an answer, suggesting that timestamping and notarization services might be the first non-monetary use case for blockchain technology.
The relevant section of their &lt;a href=&quot;/content/20160902_Response_to_ESMA_DLT.pdf&quot;&gt;response&lt;/a&gt; is the following:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Q2: Do you see any other potential benefits of the DLT for securities markets? If yes, please explain.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
Notarization services are a very promising blockchain application [11]: the bitcoin blockchain (the most secure one, since the effort/cost for its manipulation is prohibitive) can be used for the trustless time-stamping of documents and the anchoring of arbitrarily large data set. A generic data file can be hashed to producing a short unique identifier, equivalent to its digital fingerprint. Such a fingerprint can be associated to a bitcoin transaction, the bitcoin amount being irrelevant, and hence registered on the blockchain: the blockchain immutability then provides robust non-repudiable time-stamping that can always prove without doubt the existence of that data file in that specific status at that precise moment in time. This generic process is even undergoing some standardization to achieve third party auditable verification [12]. Broker-dealers could use it to satisfy the regulatory prescriptions [13] for storing required records exclusively in non-rewriteable and non-erasable electronic storage media. WORM (write once read many) optical media has been used so far, but it is quite impractical, especially for large data set; instead, compliance could be easily achieved anchoring rewritable data sources to the blockchain, providing accurate and secure time-stamping resilient to manipulation.
&lt;br /&gt;&lt;br /&gt;…&lt;br /&gt;
&lt;br /&gt;[11] &lt;a href=&quot;https://eternitywall.it/notarize/&quot;&gt;https://eternitywall.it/notarize/&lt;/a&gt;, &lt;a href=&quot;https://stampery.com/&quot;&gt;https://stampery.com/&lt;/a&gt;, &lt;a href=&quot;https://tierion.com/&quot;&gt;https://tierion.com/&lt;/a&gt;
&lt;br /&gt;[12] &lt;a href=&quot;http://blog.eternitywall.it/2016/06/24/announcing-opentimestamps-support/&quot;&gt;http://blog.eternitywall.it/2016/06/24/announcing-opentimestamps-support/&lt;/a&gt;, &lt;a href=&quot;https://github.com/opentimestamps/python-opentimestamps&quot;&gt;https://github.com/opentimestamps/python-opentimestamps&lt;/a&gt;
&lt;br /&gt;[13] Rule 17a-4 of the Securities Exchange Act (Broker Dealers). See also &lt;a href=&quot;http://www.17a-4.com/regulations-summary/&quot;&gt;http://www.17a-4.com/regulations-summary/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Eternity Wall strongly agree with the content of the answer.
We are happy to see our efforts to promote standardization has been noted, and acknowledged also with a direct reference to our &lt;a href=&quot;http://blog.eternitywall.it/2016/06/24/announcing-opentimestamps-support/&quot;&gt;article&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We also endorse this tweet by Ametrano.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;“What jewelry is for gold, timestamping could be for bitcoin: not essential, but effective at leveraging its beauty”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After the response, another &lt;a href=&quot;https://petertodd.org/2016/opentimestamps-announcement&quot;&gt;blog post&lt;/a&gt; about the new version of OpenTimestamps has been published by Peter Todd.&lt;/p&gt;

&lt;p&gt;We are already working to provide WORM solutions in response to regulatory prescriptions in the Dodd Frank normative using the blockchain. Updates will be soon on this blog.&lt;/p&gt;

&lt;p&gt;The ESMA response is a confirmation of our vision, and our commitment on the subject is stronger than ever.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:1&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;F. Ametrano will be teaching “Bitcoin and Blockchain Technology” this semester at Politecnico, and Politecnico will host Scaling Bitcoin Milan in October &lt;a href=&quot;#fnref:1&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
</description>
        <pubDate>Fri, 16 Sep 2016 00:00:00 +0200</pubDate>
        <link>https://blog.eternitywall.com/2016/09/16/timestamping-first-on-esma-report/</link>
        <guid isPermaLink="true">https://blog.eternitywall.com/2016/09/16/timestamping-first-on-esma-report/</guid>
        
        
      </item>
    
      <item>
        <title>Announcing OpenTimestamps support</title>
        <description>&lt;h1 id=&quot;opentimestamps&quot;&gt;OpenTimestamps&lt;/h1&gt;

&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
  &lt;strong&gt;16 February update&lt;/strong&gt;&lt;br /&gt; A new version of OpenTimestamps has been developed, this post could be outdated.
  &lt;br /&gt;
  Consider visiting the &lt;a href=&quot;https://opentimestamps.org&quot;&gt;OpenTimestamps web site&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;/img/mail-stamp-template.svg&quot;&gt;
&lt;img src=&quot;/img/mail-stamp-template.svg&quot; alt=&quot;OpenTimestamps&quot; /&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;the-path-towards-third-party-auditable-verification&quot;&gt;The path towards third party auditable verification&lt;/h2&gt;

&lt;p&gt;Eternity Wall is making efforts towards allowing a fully independent timestamps verification.&lt;/p&gt;

&lt;p&gt;We already provided our users &lt;a href=&quot;https://blog.eternitywall.it/2016/02/16/how-to-verify-notarization/&quot;&gt;instructions&lt;/a&gt; and open-source &lt;a href=&quot;/2016/05/16/how-to-independently-verify-notarization/&quot;&gt;tools&lt;/a&gt; to verify our notarizations.
We would like to improve the auditability of our service by having an externally developed independent stamp verifier.&lt;/p&gt;

&lt;h2 id=&quot;opentimestamps-discovery&quot;&gt;OpenTimestamps discovery&lt;/h2&gt;

&lt;p&gt;Peter Todd showed us his OpenTimestamps format during his recent &lt;a href=&quot;https://petertodd.org/2016/talks-dex-arnhem-dev-workshop&quot;&gt;visit&lt;/a&gt; in Milan.
We immediately realized this was what we needed to create a trustworthy timestamping ecosystem. One of the best part of the format is flexibility, without changing the way Eternity Wall is stamping documents we added in ours stamps the OpenTimestamps format, under the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ots1&lt;/code&gt; property as in this &lt;a href=&quot;https://eternitywall.it/v1/hash/20c7ba9c57f653b7c079df5171c196f494a5446d684c1b26a63bc5fc3fa2e25e&quot;&gt;example&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;basic-idea&quot;&gt;Basic Idea&lt;/h2&gt;

&lt;p&gt;The basic idea of the format is that if you can create a path of generic operations from the document to the hash of a block you are proving that the document is committing to that block.&lt;/p&gt;

&lt;p&gt;All the operations you need are hashing functions (like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sha256&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ripemd&lt;/code&gt;), generic functions (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;reverse&lt;/code&gt;) and concatenations of binary data as a prefix or a suffix.
We are using the bitcoin blockchain to prove the timestamping but the format is flexible enough to support also other blockchains.&lt;/p&gt;

&lt;h2 id=&quot;how-to-verify&quot;&gt;How to verify&lt;/h2&gt;

&lt;p&gt;The following are the steps you need to verify an Eternity Wall notarized document using &lt;a href=&quot;https://github.com/petertodd/python-opentimestamps&quot;&gt;Peter’s python tool&lt;/a&gt;. The tool needs a bitcoin node with a reachable RPC endpoint (basing on the settings in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bitcoin.conf&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;We are using the picture of this &lt;a href=&quot;https://blog.eternitywall.it/2016/02/16/how-to-verify-notarization/&quot;&gt;example&lt;/a&gt; as the document to prove. Get the &lt;a href=&quot;https://eternitywall.it/v1/hash/20c7ba9c57f653b7c079df5171c196f494a5446d684c1b26a63bc5fc3fa2e25e&quot;&gt;stamp&lt;/a&gt; data and copy in the clipboard the content of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ots1&lt;/code&gt; child in the json, you will need this data later.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;git clone https://github.com/petertodd/python-opentimestamps
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;python-opentimestamps
wget https://blog.eternitywall.it/img/riccardo-casatta-profilo.jpg
nano riccardo-casatta-profilo.jpg.ots &lt;span class=&quot;c&quot;&gt;# paste the clipboard content in this file&lt;/span&gt;
./ots verify riccardo-casatta-profilo.jpg.ots&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;INFO:root:Success! riccardo-casatta-profilo.jpg was created on or before 2016-01-31 09:46:31
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Getting this messages means the document has been timestamped in the bitcoin blockchain on or before 2016-01-31 09:46:31&lt;/p&gt;

&lt;h2 id=&quot;improvements&quot;&gt;Improvements&lt;/h2&gt;

&lt;p&gt;The actual verification is still cumbersome but we are hoping that a wider ecosystem support of the OpenTimestamps format will grant an easier verification process in the future.&lt;/p&gt;

&lt;p&gt;We are already working in this direction to promote broader adoption of the standard. Stay tuned!&lt;/p&gt;
</description>
        <pubDate>Fri, 24 Jun 2016 00:00:00 +0200</pubDate>
        <link>https://blog.eternitywall.com/2016/06/24/announcing-opentimestamps-support/</link>
        <guid isPermaLink="true">https://blog.eternitywall.com/2016/06/24/announcing-opentimestamps-support/</guid>
        
        
      </item>
    
      <item>
        <title>Happy first birthday Eternity Wall</title>
        <description>&lt;p&gt;&lt;a href=&quot;/img/1st-birthday.jpg&quot;&gt;
&lt;img src=&quot;/img/1st-birthday.jpg&quot; alt=&quot;1st Eternity Wall birthday&quot; width=&quot;1304&quot; height=&quot;676&quot; class=&quot;center-block&quot; style=&quot;cursor:pointer&quot; /&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We would like to eat the cake with everyone who posted on the wall and talked about it with friends!&lt;/p&gt;

&lt;p&gt;This birthday has a special proof of authenticity, you can see this proof from the very &lt;a href=&quot;http://eternitywall.it/m/0e20ae6e&quot;&gt;first message&lt;/a&gt; on the wall.&lt;/p&gt;

&lt;p&gt;Thanks everybody!&lt;/p&gt;
</description>
        <pubDate>Tue, 21 Jun 2016 00:00:00 +0200</pubDate>
        <link>https://blog.eternitywall.com/2016/06/21/happy-birthday/</link>
        <guid isPermaLink="true">https://blog.eternitywall.com/2016/06/21/happy-birthday/</guid>
        
        
      </item>
    
  </channel>
</rss>
