# Welcome to the Corda repository!

Warning

This build of the docs is from the master branch, not a milestone release. It may not reflect the current state of the code.

This documentation describes Corda, a proposed architecture for distributed ledgers, the vision for which is outlined in the Corda Introductory Whitepaper.

The goal of this prototype is to explore fundamentally better designs for distributed ledgers than what presently exists on the market, tailor made for the needs of the financial industry. We are attempting to prove or disprove the following hypothesis:

The combination of

- An upgraded state transition model
- Industry standard, production quality virtual machines and languages
- An advanced orchestration framework
- Limited data propagation
- Conflict resolution without proof of work or blocks

is sufficiently powerful to justify the creation of a new platform implementation.

Read on to learn:

Overview

- What’s included?
  - Kotlin
- Getting set up
  - If IntelliJ complains about lack of an SDK
  - Doing it without IntelliJ
- Data model
  - Overview
  - Comparison with Bitcoin
  - Comparison with Ethereum
  - Rationale for and tradeoffs in adopting a UTXO-style model
  - Rationale
  - Pros
  - Cons
- Data types
  - Amount
  - State
  - NamedByHash and UniqueIdentifier
  - FungibleAssets and Cash
  - Transaction lifecycle types
  - Party and PublicKey
  - Date support
  - Cryptography & maths support
- Consensus model
  - Notary
  - Multiple notaries
  - Validation
  - Timestamping
  - Running a Notary Service
  - Obtaining a signature
  - Changing notaries
- Networking and messaging
  - Messaging types
  - Network Map Service
- Creating a Cordapp
  - App Plugins
  - Services
  - Starting Nodes
  - Installing Apps
  - Starting your Node
  - Debugging your Node
- Running the demos
  - Trader demo
  - IRS demo
  - IRS web demo
- Node administration
  - Monitoring your node
  - Uploading and downloading attachments
  - Uploading interest rate fixes
- The Corda Configuration File
  - Configuration File Location
  - Configuration File Format
  - Configuration File Examples
  - Configuration File Fields

Contracts

- Contract catalogue
  - Cash
  - Commodity
  - Commercial Paper
  - Interest Rate Swap
  - Obligation
- Interest Rate Swaps
  - Creating an instance and lifecycle
  - Technical Details

Tutorials

- Where to start
  - The trader demo
- Writing a contract
  - Where to put your code
  - Starting the commercial paper class
  - States
  - Commands
  - The verify function
  - Using state groups
  - Checking the requirements
  - How to test your contract
  - Adding a generation API to your contract
  - How multi-party transactions are constructed and transmitted
  - Non-asset-oriented smart contracts
  - Making things happen at a particular time
  - Clauses
- Writing a contract using clauses
  - Commercial paper class
  - Clauses
  - Group Clause
  - Summary
  - Debugging
- Writing a contract test
  - Testing single transactions
  - Chaining transactions
- Protocol state machines
  - Introduction
  - Theory
  - A two party trading protocol
  - Suspendable functions
  - Starting your protocol
  - Implementing the seller
  - Subprotocols
  - Implementing the buyer
  - Progress tracking
  - Unit testing
  - Versioning
  - Future features
- Writing oracle services
  - Introduction
  - The two basic approaches
  - Asserting continuously varying data
  - Pay-per-play oracles
- Event scheduling
  - Introduction
  - How to implement scheduled events
  - An example

Appendix

- Release process
- Steps to cut a release
- Release notes
  - Milestone 3
  - Milestone 2
  - Milestone 1
  - Milestone 0
- Using the visualiser
- Code style guide
  - 1. General style
  - 2. Comments
  - 3. Threading
  - 4. Assertions and errors
  - 5. Properties
  - 6. Compiler warnings
- Building the documentation
  - Requirements
  - Build