Skip to content

Instantly share code, notes, and snippets.

@drcircuit
Last active January 15, 2018 11:23
Show Gist options
  • Select an option

  • Save drcircuit/b726db45c3be34a09c86bf5b002cacb3 to your computer and use it in GitHub Desktop.

Select an option

Save drcircuit/b726db45c3be34a09c86bf5b002cacb3 to your computer and use it in GitHub Desktop.

My investigations into the Corda Framework and the Kotlin programming language.

Corda

Corda is a blockchain ledger framework written in Kotlin. It runs on the JVM 8 or later.

Kotlin

Kotlin is a multi-paradigm programming language for the JVM. Even though it supports a traditional strict object oriented programming style, it is super biased towards guiding you into a functional approach. Not that different from C# after C# 6.0. It has a lot of productivity gains over regular Java, since it provides things like getters / setter implicitly and does type inference. It strictly enforces immutability, so it forces you to use good programming practices and coding diciplines to create your applications.

SLOC count is held pretty low because you are not required to write heaps of boilerplate code like you do in Java.

CordApp

This is an application based on the Corda Framework. It can be written in Java or Kotlin, but most documentation and examples are in Kotlin. The framework itself is written entirely in Kotlin. Kotlin is therefore the prefered and recommended language to use.

Node

An instance of a specific Corda application. The noden has a copy of the corda runtime, corda web server, and the cordapp with associated dependencies. Each node is responsible for its part of the blockchain, and has persistent data on disk of all transactions they have participated in.

node.conf

Here is the configuration file for the node. It contains information about the node's role, identity, and network configuration.

Roles

  • Notary This is the node that serves as the central authority for authorizing transactions, as well as keeping track of members in the network.
  • Party These are nodes that function as work nodes. These initiate transactions.

State

This is the primary data holder. It holds a single state change of the ledger. It is signed as per required by the contract.

Flows

This is the model of the business process we are trying to do. It orchestrates the transaction proposal, and handles the honoring of the contracts involved, and issues the state transitions to the relevant parties.

Contracts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment