Development update

Time is ticking on, it's high time we updated you about what we've been working on for the first half of 2019 (and maybe a bit earlier). Most of our work has been focused on Rell, and on refining our dapp development process. This post will focus on updates to our core platform.

Rell 0.6

The first public release of Rell was 0.5.1 in December 2018. Later in the month we pushed 0.6.1 which received important refinements and a fundamental feature addition:

  • Records which define structures which can be serialized to/from GTV. Since our entire protocol is going to be GTV based this means Rell can work with all protocol structures. That is, a system becomes self-referential, which enables complex behaviors.

Rell 0.7

Rell 0.7 was released at the end of February. This was quite a major release, and it adds a range of language goodies and refinements:

  • Singleton objects, which can be used for mutable state
  • enumeration type
  • if operator, which can be used in expressions
  • Arbitrary expressions in update/delete, which greatly reduces verbosity of relational expressions
  • Object updates via attributes again, can be used to make code much shorter in some cases
  • Access to blocks and transaction data from Rell - Rell now can inspect the blockchain it is working with, so we can implement logic such as dynamic throttling in Rell.
  • Log annotation linking immutable objects (e.g. log entries) with transactions
  • chain_context, module args: ability to inspect blockchain configuration from Rell.

We also started packaging Rell code inside the blockchain configuration itself, which is important to Chromia architecture.

Rell 0.8

Rell 0.8 was released in May and includes several noteworthy feature additions:

  • Adds include and namespace. This makes it possible to structure contract code in a complex way. This lays the foundations for libraries and reusable modules.
  • Adds external. This gives dapps the ability to read data from other blockchains hosted on the same node, "blockchain dependencies". This feature will be further developed in future releases.
  • Adds when, tuple unpacking, late val initialization. These are features found in modern languages such as Kotlin, they make code more concise and elegant, and make it easier to write good code.
  • Nullability smart-cast – makes code dealing with nullable values concise and safe. (While it might seem like a minor feature, one of our core developers who is used to a sad state of dealing with null values in Java, wrote: "Wooooow!!! non-nullability, the crown jewel of Kotlin. What a feat!")

Code generator

Another exciting thing that we have been working on for Rell is a code generator. It's a small component, but quite impressive (to us), and very useful.

It allows the developer to take a Rell file with definition of records, queries, operations, and generate a Kotlin or TypeScript file to work with them. Similar to an API wrapper for the client. This makes it much easier to work with Chromia from the client side.

Suppose in Rell we have:

operation transfer (from_account: account, to_account: account, amount: integer, currency) {
// implementation of transfer

The idea is to generate code which would generate transaction with transfers funds, so in JS you will be able to do e.g.

val result = dappModule.tx()
       .transfer(alice_account, bob_account, 100, "USD")

It "tells" TypeScript what operations are in a module so it can check that parameters are correct.

Postchain 3

1. We now converted all protocol structures (block headers, transactions and messages between nodes) to use same format -- GTV -- which can be described via records in Rell. This becomes a basis for features like anchoring and cross-chain transfers.

2. We improved GTV serialization handling in Java to avoid use of closed-source libraries.

3. We also implemented so-called Merkle proofs for GTV, which allows one strip unnecessary detail from GTV while preserving its hash (which allows one to verify data integrity). This makes cross-chain transactions compact.

Next steps

Now our work is focused on supporting sidechains within Postchain and within Rell. Rell 0.9 will introduce mechanisms for cross chain transfers. Crucially, this will allow us demonstrate Chromia's unique SSO mechanism. Stay tuned to our Twitter for more updates!