Update on Contributions to Date

Posted on Wed 05 July 2017 in misc

When designing the contribution software, we made sure that all contributions to the Tezos fundraiser are recorded on the Bitcoin and Ethereum blockchains, so there is no risk of losing or forgetting any contributions, and so the fundraiser can be audited at a later time.

For convenience, we also created a counter that produces summaries of contributions on the https://check.tezos.com website and a global counter at https://tezos.com. In the first hour of the fundraiser, we experienced a corruption of a database we use to produce these summaries, but the outage only prevented less than 1% of the contributors to automatically confirm their transaction. We manually confirmed the contributions of these contributors.

We worked directly with these contributors to explain the situation and include their transaction confirmation in the database. Meanwhile, we carefully wrote and tested scripts for checking the consistency of the database, both its inner consistency and its consistency relative to the Bitcoin and Ethereum blockchains. Here is the result of a dry run on the production database, after 726 blocks (the 5th of July around 2PM UTC). These results are consistent with a complete replay on a test database.

  • Missed UTXOs (unspent transaction outputs): 199
  • Missed deposits: 45
  • Global data after fix:
    • Collected BTC: 48,768 (-4,565)
    • Collected ETH: 274,613 (+1,984)
    • Total allocated wallets: 21,755 (+348)
    • Changed wallets: 1,272
    • Added wallets: 200

In other words, once we run our cleanup scripts, the website counter will show 4,565 less BTC and 1,984 more ETH.

Note that all transactions have been processed correctly on the blockchains themselves, so the actual contributions are not affected. Only our separate, independent database that creates a summary of the results was temporarily affected during the first hour of the fundraiser and we’ve now produced a fix for the issue.

The number of wallets that had inaccurate summaries is 1,272. Of these, only 243 were missing UTXOs or ETH deposits. For the other affected wallets the listed contributions were valid but the total number of allocated tezzies was buggy.

All missed UTXOS (except 4) occurred in the 8 first blocks of the crowdsale. The 4 remaining missing UTXOs were randomly spread (level: 15, 331, 524, 575).

The errors that occurred during the 8 first blocks of the crowdsale resulted from two mistakes:

  • The 'offline' server was initially deployed with too little RAM, and the maintenance script crashed a couple of times. This explains the missing UTXOs.
  • While debugging these random crashes, we mistakenly (due to sleep deprivation at the time) deleted some global counters. This explains the disparities between the actual collected BTC/ETH and the amounts shown by the website counter.

We have no explanation yet for the four unregistered UTXOs that occurred later in the crowdsale. But we suspect a bug either in the Bitcoin parsing library we rely on, or the database library, or the way we use them. Anyway, we now have a robust consistency checker, and can promptly detect and correct any missing UTXOs.