Corda is an open source blockchain project, designed for business from the start. Only Corda allows you to build interoperable blockchain networks that transact in strict privacy. Corda's smart contract technology allows businesses to transact directly, with value.
Go to file
2015-11-06 14:56:00 +01:00
gradle/wrapper Initial import 2015-11-03 17:54:17 +01:00
notes Initial import 2015-11-03 17:54:17 +01:00
src Move Cash into new contracts subfolder, move base code into core 2015-11-06 14:56:00 +01:00
tests/contracts Move Cash into new contracts subfolder, move base code into core 2015-11-06 14:56:00 +01:00
.gitignore Build/git stuff: minor tweaks 2015-11-06 13:56:04 +01:00
build.gradle Build/git stuff: minor tweaks 2015-11-06 13:56:04 +01:00
gradlew Initial import 2015-11-03 17:54:17 +01:00
gradlew.bat Initial import 2015-11-03 17:54:17 +01:00
README.md Add a README 2015-11-05 16:32:55 +01:00
settings.gradle Initial import 2015-11-03 17:54:17 +01:00

This source tree contains experimental code written by Mike Hearn. It explores a simple DSL for a state transition model with the following characteristics:

  • A blockchain-esque UTXO model is used in which immutable states are consumed as inputs by transactions yielding outputs. Transactions do not specify the code to run directly: rather, each state contains a pointer to a program called a contract which defines a verification function for the transaction. Every state's contract must accept for the transaction to be valid.
  • The language used is Kotlin, a new general purpose JVM targeting language from JetBrains. It can be thought of as a much simpler Scala, or alternatively, a much more convenient and concise Java.
  • Kotlin has some DSL-definition abilities in it. These are used to define some trivial extension for the purposes of mapping English requirements to verification logic, and for defining unit tests.
  • As a base case, it defines a contract and states for expressing cash claims against an institution, verifying movements of those claims between parties and generating transactions to perform those moves (a simple "wallet").

A part of this work is to explore to what extent contract logic can expressed more concisely and correctly using the type and DSL system that Kotlin provides, in order to answer the question: how powerful does a DSL system need to be to achieve good results?

This code may evolve into a runnable prototype that tests the clarity of thought behind the R3 architectural proposals.