mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
305 lines
12 KiB
HTML
305 lines
12 KiB
HTML
|
||
|
||
<!DOCTYPE html>
|
||
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
||
<head>
|
||
<meta charset="utf-8">
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
||
<title>What’s included? — R3 Corda latest documentation</title>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="top" title="R3 Corda latest documentation" href="index.html"/>
|
||
<link rel="next" title="Getting set up" href="getting-set-up.html"/>
|
||
<link rel="prev" title="Welcome to the Corda repository!" href="index.html"/>
|
||
|
||
|
||
<script src="_static/js/modernizr.min.js"></script>
|
||
|
||
</head>
|
||
|
||
<body class="wy-body-for-nav" role="document">
|
||
|
||
<div class="wy-grid-for-nav">
|
||
|
||
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||
<div class="wy-side-scroll">
|
||
<div class="wy-side-nav-search">
|
||
|
||
|
||
|
||
|
||
<a href="index.html" class="icon icon-home"> R3 Corda
|
||
|
||
|
||
|
||
</a>
|
||
|
||
|
||
|
||
|
||
<div class="version">
|
||
latest
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div role="search">
|
||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||
<input type="text" name="q" placeholder="Search docs" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
|
||
|
||
<br>
|
||
<a href="api/index.html">API reference</a>
|
||
|
||
</div>
|
||
|
||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||
|
||
|
||
|
||
<p class="caption"><span class="caption-text">Overview</span></p>
|
||
<ul class="current">
|
||
<li class="toctree-l1 current"><a class="current reference internal" href="#">What’s included?</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="#contracts">Contracts</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#kotlin">Kotlin</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="getting-set-up.html">Getting set up</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="data-model.html">Data model</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="transaction-data-types.html">Transaction Data Types</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="consensus.html">Consensus Model</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="messaging.html">Networking and messaging</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="running-the-demos.html">Running the demos</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="node-administration.html">Node administration</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="irs.html">The Interest Rate Swap Contract</a></li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">Tutorials</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="where-to-start.html">Where to start</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="tutorial-contract.html">Writing a contract</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="protocol-state-machines.html">Protocol state machines</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="oracles.html">Writing oracle services</a></li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">Appendix</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="release-process.html">Release process</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="release-process.html#steps-to-cut-a-release">Steps to cut a release</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="release-notes.html">Release notes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="visualiser.html">Using the visualiser</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="codestyle.html">Code style guide</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="building-the-docs.html">Building the documentation</a></li>
|
||
</ul>
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||
|
||
|
||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||
<a href="index.html">R3 Corda</a>
|
||
</nav>
|
||
|
||
|
||
|
||
<div class="wy-nav-content">
|
||
<div class="rst-content">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||
<ul class="wy-breadcrumbs">
|
||
<li><a href="index.html">Docs</a> »</li>
|
||
|
||
<li>What’s included?</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
|
||
|
||
<a href="_sources/inthebox.txt" rel="nofollow"> View page source</a>
|
||
|
||
|
||
</li>
|
||
</ul>
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
<div itemprop="articleBody">
|
||
|
||
<div class="section" id="what-s-included">
|
||
<h1>What’s included?<a class="headerlink" href="#what-s-included" title="Permalink to this headline">¶</a></h1>
|
||
<p>The current prototype consists of a small amount of code that defines:</p>
|
||
<ul class="simple">
|
||
<li>Key data structures.</li>
|
||
<li>Algorithms that work with them, such as serialising, hashing, signing, and verification of the signatures.</li>
|
||
<li>Two smart contracts that implement a notion of a cash claim and basic commercial paper (implemented twice, in two
|
||
different programming languages). These are simplified versions of the real things.</li>
|
||
<li>Unit tests that check the algorithms do what is expected, and which verify the behaviour of the smart contracts.</li>
|
||
<li>API documentation and tutorials (what you’re reading)</li>
|
||
<li>A simple standalone node that uses an embedded message queue broker as its P2P messaging layer.</li>
|
||
<li>A trading demo that runs the node in either a listening/buying mode, or a connecting/selling mode, and swaps some
|
||
fake commercial paper assets for some self-issued IOU cash, using a generic <em>protocol framework</em>.</li>
|
||
<li>It also includes two oracles: one for precise timestamping and another for interest rate swaps.</li>
|
||
</ul>
|
||
<p>Some things it does not currently include but should gain later are:</p>
|
||
<ul class="simple">
|
||
<li>Sandboxing, distribution or publication of smart contract code</li>
|
||
<li>A peer to peer network</li>
|
||
<li>Database persistence</li>
|
||
<li>An API for integrating external software</li>
|
||
<li>A user interface for administration</li>
|
||
<li>Many other things</li>
|
||
</ul>
|
||
<p>You can browse <a class="reference external" href="https://r3-cev.atlassian.net/">the JIRA bug tracker</a>.</p>
|
||
<p>The prototype’s goal is rapid exploration of ideas. Therefore in places it takes shortcuts that a production system
|
||
would not in order to boost productivity:</p>
|
||
<ul class="simple">
|
||
<li>It uses an object graph serialization framework instead of a well specified, vendor neutral protocol.</li>
|
||
<li>It uses secp256r1, an obsolete elliptic curve.</li>
|
||
<li>It uses the default, out of the box Apache Artemis MQ protocol instead of AMQP/1.0 (although switching should be easy)</li>
|
||
</ul>
|
||
<div class="section" id="contracts">
|
||
<h2>Contracts<a class="headerlink" href="#contracts" title="Permalink to this headline">¶</a></h2>
|
||
<p>The primary goal of this prototype is to implement various kinds of contracts and verify that useful business logic
|
||
can be expressed with the data model, developing and refining an API along the way. To that end there are currently
|
||
two contracts in the repository:</p>
|
||
<ol class="arabic simple">
|
||
<li>Cash</li>
|
||
<li>Commercial paper</li>
|
||
</ol>
|
||
<p><code class="docutils literal"><span class="pre">Cash</span></code> implements the idea of a claim on some quantity of deposits at some institutional party, denominated in some currency,
|
||
identified by some <em>deposit reference</em>. A deposit reference is an opaque byte array which is usable by
|
||
the issuing party for internal bookkeeping purposes.</p>
|
||
<p>Cash states are <em>fungible</em> with each other (can be merged and split arbitrarily) if they use the same currency,
|
||
party and deposit reference.</p>
|
||
<p><code class="docutils literal"><span class="pre">CommercialPaper</span></code> implements an asset with a <em>face value</em> denominated in a certain currency, which may be redeemed at
|
||
the issuing party after a certain time. Commercial paper states define the face value (e.g. $1000) and the time
|
||
at which they may be redeemed. The contract allows the paper to be issued, traded and redeemed. The commercial paper
|
||
contract is implemented twice, once in Java and once in a language called Kotlin.</p>
|
||
<p><code class="docutils literal"><span class="pre">InterestRateSwap</span></code> implements a vanilla OTC same currency bilateral fixed / floating leg swap. For further details,
|
||
see <a class="reference internal" href="irs.html"><span class="doc">The Interest Rate Swap Contract</span></a></p>
|
||
<p>Each contract comes with unit tests.</p>
|
||
</div>
|
||
<div class="section" id="kotlin">
|
||
<h2>Kotlin<a class="headerlink" href="#kotlin" title="Permalink to this headline">¶</a></h2>
|
||
<p>The prototype is written in a language called <a class="reference external" href="https://kotlinlang.org/">Kotlin</a>. Kotlin is a language that targets the JVM
|
||
and can be thought of as a simpler Scala, with much better Java interop. It is developed by and has commercial support
|
||
from JetBrains, the makers of the IntelliJ IDE and other popular developer tools.</p>
|
||
<p>As Kotlin is very new, without a doubt you have not encountered it before. Don’t worry: it is designed as a better
|
||
Java for industrial use and as such, the syntax was carefully designed to be readable even to people who don’t know
|
||
the language, after only a few minutes of introduction.</p>
|
||
<p>Due to the seamless Java interop the use of Kotlin to extend the platform is <em>not</em> required and the tutorial shows how
|
||
to write contracts in both Kotlin and Java. You can <a class="reference external" href="https://medium.com/@octskyward/why-kotlin-is-my-next-programming-language-c25c001e26e3">read more about why Kotlin is a potentially strong successor to Java here</a>.</p>
|
||
<p>Kotlin programs use the regular Java standard library and ordinary Java frameworks. Frameworks used at this time are:</p>
|
||
<ul class="simple">
|
||
<li>JUnit for unit testing</li>
|
||
<li>Kryo for serialisation (this is not intended to be permanent)</li>
|
||
<li>Gradle for the build</li>
|
||
<li>Guava for a few utility functions</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<footer>
|
||
|
||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||
|
||
<a href="getting-set-up.html" class="btn btn-neutral float-right" title="Getting set up" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||
|
||
|
||
<a href="index.html" class="btn btn-neutral" title="Welcome to the Corda repository!" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||
|
||
</div>
|
||
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>
|
||
© Copyright 2016, Distributed Ledger Group, LLC.
|
||
|
||
</p>
|
||
</div>
|
||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||
|
||
</footer>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</section>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<script type="text/javascript">
|
||
var DOCUMENTATION_OPTIONS = {
|
||
URL_ROOT:'./',
|
||
VERSION:'latest',
|
||
COLLAPSE_INDEX:false,
|
||
FILE_SUFFIX:'.html',
|
||
HAS_SOURCE: true
|
||
};
|
||
</script>
|
||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||
|
||
|
||
|
||
|
||
|
||
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||
|
||
|
||
|
||
|
||
<script type="text/javascript">
|
||
jQuery(function () {
|
||
SphinxRtdTheme.StickyNav.enable();
|
||
});
|
||
</script>
|
||
|
||
|
||
</body>
|
||
</html> |