Building EOSIO dapps independent from history solutions

It’s a common struggle for every dapp builder that transactions may disappear from the blockchain while their blocks are not final. A microfork, resulting in a few blocks reevaluated and newly signed, might not include the transaction you’ve already seen. It might be dropped due to congestion, or because its timeout period is too short.

So if your service is receiving or sending payments, you always need to make sure that the transaction has survived and made it into an irreversible block. There’s a number of other transactions where it’s important to track the finality.

Most services are relying on history solutions to track the finality: they check if a transaction ID exists in the history and if the block number is below the last irreversible block. This makes them dependent on third party history services. Any failure or outage at such services may cause a financial loss.

In this design document I propose a method to track the transaction finality without the need for a history API. The smart contract is recording its important events and their timestamps, and an oracle reports the irreversible timestamp to the contract.

The model is implemented in my POS contract, and a few other projects are adopting the method. It makes the dapps more resilient and independent from public infratructure.

Telegram: cc32d9, EOS account: "cc32dninexxx"

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store