intro to r3 - meetupfiles.meetup.com/19726545/corda hyperledger london presentation… ·...

31
Intro to R3 05/12/16. R3 Engineering

Upload: others

Post on 30-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Intro to R3

05/12/16.

R3 Engineering

Page 2: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

How is R3 enabling collaboration?

Create a Product

Market it and sell it

Refine it (maybe)

Create a Consortium

Collaborate on requirements; open source

Build it together

70+ global institutions

1400 + passionate

people

Most Start-ups:

R3:

Page 3: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

R3 Global Members

Page 4: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Hype

POCs Early Scaled Deployments

Talk

Main StreamDeployments

Early Adoptions

ValueDefinition

Building Blocks

Collaboration

Tipping Point

Market Interfaces

“The Norm”

StandardsRegulationTechnology

GovernanceCollaboration

Bridging the gap towards mainstream adoption

We are here

Page 5: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Consortium Projects

Page 6: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

The Empire Strikes Back!

December 6th 2016.

Page 7: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Stuff we will cover• Interesting features

• Unusual design decisions

• Next steps

Caveat: will mix implemented vs pending work. Will call out what’s not coded with a *

p7.

Page 8: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

That’s us!

Corda @ HyperLedger London p8.

Page 9: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

OK, so how does it work?

Page 10: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Basics you must know• No block chains, no mining

• Permissioned networks

• JVM based

• Open source reference implementation, unfinished

• Tech white paper is a design doc

Corda @ HyperLedger London p10.

Page 11: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Bitcoin-esque tx structure

Corda @ HyperLedger London p11.

• Ledger is composed of (output) states• Execution of code for both inputs and outputs• Signatures external to the transaction data• Platform checks signatures, contract code

only checks presence of pubkeys• Commands parameterise transactions• Key randomisation with separable identities*

Page 12: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

p12.

Page 13: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

But with extras …

Corda @ HyperLedger London p13.

Transactions can have attachments.

Attachments are zip files referred to by hash. Can contain:

• Contract bytecode• Legal documents explaining what it’s meant to do• Static reference data (e.g. holiday calendars)• Identity certificates• Anything else

Attachments form a per-tx filesystem and files cannot overlap.

Attachments are deduplicated on the wire.

Page 14: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

But with extras …

Corda @ HyperLedger London p14.

Transactions are structured as a Merkle tree. Can selectively reveal different parts.

States (outputs) can contain arbitrary object graphs

(at present – may restrict this soon)

Encumbrances allow you to combine different contract logic.

Page 15: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Unusual design decision 1No broadcast: transactions resolved lazily

Consequence: DoS handling is simpler

Consequence: bulk data import is silent

Consequence: must specify where data is sentCorda @ HyperLedger London p15.

Page 16: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

P2P network structure• All communication bidirectional

• Messages organised into flows

• A “flow” is an uber-thread that survives process restarts, stored in the database

• Uses fibers behind the scenesHow?

p16.

Page 17: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Flows• Flows specify the identities to which messages are sent

• Flows are type safe

• Corda network is SMTP-like– Messages are buffered to disk and delivery is retried up to

the event horizon

• Flows can interact with people* and internal systems

• Protocol is AMQP/1.0 + TLS, node is services connected to an MQ broker

Corda @ HyperLedger London p17.

Page 18: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Flows• Flows have progress tracking

• Flows can read/write to the node’s relational database

• Flows can invoke sub-flows

• Corda provides a standard library of flows for common tasks

Corda @ HyperLedger London p18.

Page 19: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

<show flow code>

Page 20: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

SQL supportPity the fool who tries to build a block chain app!

New databases are hip but:

• How to analyse data in them?• How to combine with private data?• Don’t even think about migrating existing apps or

data …

Most platforms give you REST and then you’re aloneCorda @ HyperLedger London p20.

Page 21: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

SQL supportCorda built on the JVM

Embeds the H2 relational database. JDBC access.Support for other external DBs in future*

State schemas can be JPA annotated with conversion code in the smart contract

“Relevant” states written to DB tables

State schemas commonly contain slots for join keys

Corda @ HyperLedger London p21.

Page 22: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

p22.

Page 23: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Notaries and consensus• Pluggable consensus algorithms

• “Notaries” can be/should be distributed

• Notary implementations:– Onebox: for local testing/dev work– Raft: robust against node failure, not malice– Above x2 for non-validating modes– In future, BFT-SMaRT*

Corda @ HyperLedger London p23.

Page 24: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Deterministic JVMCorda contracts defined using restricted, cut down bytecode

Most features are gone, e.g.

• No threading or finalisers• No access to external data (files, networks, RNGs, clocks)• Object.hashCode modified to be derived from tx hash*• No native code• Bytecode instrumented to do cost accounting• Exception handlers adjusted to prevent thread termination• strictfp enforced everywhere• No invokedynamic• Class libraries bytecode rewritten as well

(+more!)Corda @ HyperLedger London p24.

Page 25: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Client RPCPrimary comms is via Client RPC

• Small (~800 loc) RPC stack that operates over MQ

• Can marshal Rx observables: streaming of results is natural

• Can handle temporary connection problems, backpressure management*, buffering etc …

• Thin client library exposes reactive collections that can be directly bound to JavaFX UI and mapped/filtered/sorted

Functional, pipeline oriented programming.

Corda @ HyperLedger London p25.

Page 26: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Experimental universal contractval one_touch = arrange {

actions {highStreetBank may {

"expire".givenThat(after("2017-09-01")) {zero

}}acmeCorp may {

"knock in".givenThat(EUR / USD gt 1.3) {highStreetBank.owes(acmeCorp, 1.M, USD)

}}

}}

Corda @ HyperLedger London p26.

Page 27: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Lots more!• Novel design for client-side signing devices (e.g. TREZOR)*• Identity management*• Event scheduling• Type system for modelling nettable obligations, assets,

fungibility• Network permissioning infrastructure• Data distribution groups*

Corda @ HyperLedger London p27.

Page 28: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Corda: Next steps

Page 29: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

The 4 s’sUntil now: experimentation and design

Starting now: the road to production

• Security

• Serialisation

• Scalability

• Finishing the features

Corda @ HyperLedger London p29.

Page 30: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

Privacy and scalability• Start random key usage once identity cert

management is done

• Novel privacy research in prototype phase that we will talk about more if/when it’s more mature

• Implement vault soft-locks and start load testing, eliminating bugs

Corda @ HyperLedger London p30.

Page 31: Intro to R3 - Meetupfiles.meetup.com/19726545/Corda HyperLedger London presentation… · Bitcoin-esque tx structure Corda @ HyperLedger London p11. • Ledger is composed of (output)

Secondary color palette

Dark Grey150 150 150

Light Grey209 211 212

Dark Red18936 40

Light Red247 150 121

Blue43121240

Light Blue112 179 255

tertiary colorpalette

Green0

15189

Light Green0

212 117

Orange255 1260

Light Orange255 187 94

Dark Yellow180 17030

Yellow24821413

p31.

Goal

API and protocol stability by

EOQ3 2017