Connect with us


“The Cardano [ADA] Wallet” has a semi-formal spec development from Haskell

Sthuthie Murthy



"The Cardano [ADA] Wallet" has a semi-formal spec development from Haskell
Source: Public Domain Pictures

Cardano [ADA] has been in the race for test net releases and wallets like many other coins in the market. They have now announced a Semi-Formal Development specification of the Cardano wallet through a blog post.

The Well-Typed, Haskell Consultant tweeted:

“New blog post on “Semi-Formal Development: The Cardano Wallet.”

As part of their consulting work for IOHK, they have been working on the design and implementation along with IOHK on the new version of the Cardano cryptocurrency wallet. The formal specification specifies and proves many wallet properties but not all which is why it is referred to as “semi-formal.”

A mathematical model of the wallet along with behavioral invariants and lemmas is what the semi-formal specification is about.

A piece of software that monitors the state of the blockchain and keeps a record of the user‘s funds while also allowing them to create new transactions to include in the blockchain is what a cryptocurrency wallet does. The wallet is basically the prime source for the users to interact with the blockchain.

They have stripped down the wallet state to just the wallet’s UTxO and its set of unattended or held-up transactions. These specifications can fit in a single page. The simplicity of the model is enough to be studied deeply and support the mathematical proofs of its properties, and at the same time is accurate enough.

Object-Oriented Programming in Haskell is used to translate the different wallet models from the specifications. Throwing light on the wallet implementation, the Haskell translation of the invariants deal beyond the specifications. This scenario involves detailed error reports when the invariants do not hold.

QuickCheck is the tool that is used for various testing purposes and properties checking. Having the QuickCheck generators to check the real implementation is very valuable as they are used to generate wallet events with the use of a simplified type of models.

The testing can be done by specifying the properties and the model itself formally. The development of the new wallet from IOHK is open source and can be found on GitHub.

Follow us on Telegram | Twitter | Facebook

Sthuthie Murthy is a full-time reporter at AMBCrypto. She has been researching and writing about the Blockchain technology for a year now. Her passion for blockchain has led her to be a part of AMBCrypto's news reporting team. She does not hold value in any cryptocurrencies currently.