IOHK sponsors new Haskell Foundation
Independent, open, non-profit body will support tools, libraries, education, and research
4 November 2020 2 mins read
Simon Peyton Jones has just announced the launch of the Haskell Foundation at the Haskell eXchange virtual conference. The foundation is an independent, open, non-profit organization dedicated to broadening the adoption of the Haskell language, by supporting its ecosystem of tools, libraries, education, and research.
IOHK is one of the first sponsors of the Haskell Foundation because we believe in the power of functional programming, open-source software, and open governance. So, we are delighted to be able to join other key companies in supporting the community through an open and transparent process in which everyone can participate.
IOHK and Haskell
All of IOHK’s core software is open-source, and where possible we do our work via standalone projects that will benefit the community too. We have contributed substantially to compilers like GHC, GHCJS and Asterius; created libraries for eliminating space leaks; and are even building the Plutus smart contract platform on Haskell.
For several years IOHK has been supporting the development of GHC itself and aims to continue doing so. Our engineers have contributed the ghc-bignum library, improved cross-compilation support, worked on support for ARM architectures, provided general code improvements, and fixed a number of bugs. We are keen to help other community efforts, for example by funding the work of others, and by helping to get the recently-merged Windows I/O manager across the finish line.
In addition to its direct technical involvement, IOHK has also invested in expanding the Haskell community, including developing online tutorials, education programmes, and delivering face-to-face training courses in places such as Athens, Barbados, Mongolia and Ethiopia. Through this and other programs, we are fully committed to the Haskell Foundation’s goals of enhancing diversity within the Haskell community.
We are excited to be working with the Haskell Foundation to help move Haskell forward. IOHK has contributed to the Foundation’s technical agenda, and will help directly with technical work. Stay tuned for more exciting announcements!
Getting to grips with metadata on Cardano
Adding information about transactions is a powerful tool for companies and developers
3 November 2020 5 mins read
In a previous post, Bringing new value and utility to the Cardano blockchain, I discussed the notion of transaction metadata. I also explained why this is crucial to Cardano’s Goguen evolution as a utility platform for decentralized finance (DeFi) operations.
There are many potential uses for metadata. With that in mind, IOHK has been working to ensure that both developers and enterprise-focused clients can easily build metadata into their applications. Furthermore, we want to make certain that ada users have a convenient way to see information about their transactions.
How does metadata work on Cardano?
Metadata tells the story of a transaction and there are many ways to interact with this story. Developers can take advantage of metadata by embedding details directly into a transaction, and ada users can search for specific information in the Cardano Explorer. The data can be added directly, or, for larger amounts, it is possible to create a Merkle tree of the data and put the root hash of the Merkle tree on the blockchain. Once this is done, it can be proved that the data existed at a specific point of time and that it remains permanently on the chain for future reference.
It is also important to note that transaction metadata is stored on the blockchain and is carried along with each transaction. The fact that it is stored on-chain, rather than being recorded in the ledger state, is beneficial because it does not influence transaction validation or compromise ledger performance.
Metadata service from IOHK
IOHK’s Professional Services Group (PSG) provides business consulting and technological services. In particular, our PSG is developing services to help companies build and implement blockchain solutions by integrating their systems in a seamless and convenient way with distributed ledger technology.
The metadata service has been developed with a variety of applications in mind, but for commercial applications in particular.
This interface handles the wallet interaction, provides users with low balance alarms, and rolls it all up into a Docker container. This eliminates the complexity associated with submitting metadata directly in the wallet’s backend API. Thus, the metadata service only requires the specified metadata and the number of blocks under which the transaction should be stored before it is considered as final.
In the metadata request, one can include:
- The actual metadata: sender and receiver identities, comments, tags.
- The depth: the number of blocks under which the transaction containing the metadata should be stored before it is considered as final.
- The client identity: indicates the wallet to be used.
- Transaction identity: this feature is useful in case of failures and restarts. It allows clients to re-examine previously submitted metadata.
After including all the details, the metadata service records a transaction on the blockchain, which then allows transaction information to be retrieved using the Cardano Explorer. For this, one would just have to indicate a transaction identity.
Another feature is that PSG metadata service can be specified using language-neutral protocol buffers. This expands the number of potential uses because client generators support many programming languages, including Python, Java, and Scala. Such extended opportunities make the process of integration with the Cardano blockchain more straightforward.
Accessibility is key
We have also developed a Scala and Java client for the Cardano wallet API, which bundles together calls to the API and makes them easily accessible to more developers. As well as a Java and Scala API, we can provide an executable jar file to give rudimentary access from the command line. You can find details of the PSG Cardano wallet API on GitHub and see how it allows clients to perform tasks such as submitting and listing a transaction, wallet maintenance, and node monitoring.
Working with wallets and Cardano-CLI
Another way of working with metadata is by submitting it directly from a wallet or the Cardano command-line interface (CLI).
These processes require basic coding experience and familiarity with running the Cardano node and CLI. Direct interaction with metadata opens powerful capabilities for building decentralized applications on Cardano because developers can authenticate valuable data in their preferred way.
In the Cardano wallet and the CLI, the structure of the metadata is defined by a mapping from keys to values (key-value pairs) that combine details for multiple purposes into the same transaction.
- Metadata keys act as a schema identifier showing the metadata value. Keys are unsigned integers limited in size up to 64 bits.
- Metadata values are simple terms, consisting of integers, text strings, byte strings, lists, and maps. Values have to be structured, which makes it easier for them to be inspected and managed, particularly by scripts.
The only extra cost involved is that the metadata adds to the size, in bytes, of the transaction and the processing fee is based on transaction size.
Metadata can be constructed using the Concise Binary Object Representation (CBOR) and Concise Data Definition Language (CDDL) notations. For more detailed information, please refer to transaction metadata in the Cardano wallet and see how to use transaction metadata schemes in Cardano CLI.
Transaction metadata is an integral step for Cardano’s evolution into a multi-functional smart contract platform. Further Goguen enhancements will add metadata to specify transaction conditions for smart contracts, opening more opportunities for commercial use and deal settlement. If you want to integrate metadata into your business processes, contact email@example.com with any questions or support requests. And keep following this blog for updates as we continue to build out Goguen functionality.