Skip to content

Commit ba87d6f

Browse files
committed
Reverting to Architecture Document 0.8.1
1 parent bce3209 commit ba87d6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+597
-566
lines changed

README.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
UNPUBLISHED DRAFT. NOT FOR RELEASE
2-
31
*****************************
42
RChain-Architecture
53
*****************************
@@ -29,7 +27,7 @@ For Windows users:
2927

3028
Get source code
3129
--------------------------------------------------------------------------------
32-
* git clone: https://github.com/ethereum/homestead-guide.git
30+
* git clone: https://github.com/rchain/architecture-docs.git
3331

3432
Build and view html
3533
--------------------------------------------------------------------------------

applications.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.. _applications:
2+
3+
################################################################################
4+
Applications
5+
################################################################################
6+
7+
Any number and variety of applications can be built on top of the RChain Platform
8+
that provide a decentralized public compute utility. These include, for example:
9+
10+
* Wallets
11+
* Exchanges
12+
* Oracles & External Adapters
13+
* Custom Protocols
14+
* Smart Contracts
15+
* Smart Properties
16+
* DAOs
17+
* Social Networks
18+
* Marketplaces
19+
20+
Several application providers are already committed to this platform, including
21+
RChain for its social product, `LivelyGig`_ for its marketplaces, `weWOWwe`_ for
22+
its sports-based social network, and `Nobex Radio`_ for a to-be-announced product.
23+
24+
.. _LivelyGig: http://www.livelygig.com
25+
.. _weWOWwe: http://wewowwe.com
26+
.. _Nobex Radio: http://www.nobexpartners.com

introduction/approach.rst renamed to architecture-approach.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _approach:
1+
.. _architecture-approach:
22

33
################################################################################
44
Architectural Approach

architecture-overview.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.. _architecture-overview:
2+
3+
################################################################################
4+
Architecture Overview
5+
################################################################################
6+
7+
The primary components of the architecture are depicted below:
8+
9+
.. image:: img/architecture-overview.png
10+
:width: 600px
11+
:align: center
12+
13+
Like all "layer cake" views of architecture, this diagram is a simplification of the actual architecture. At first glance, you’ll notice there are components expected in blockchain architectures, but also components that might not be as expected All data managed by the platform requires some associated payment. Of course, an application could also manage its own data, and that data could be referenced via a pointer stored on the blockchain.
14+
15+
In addition to the datastore at the base of the architecture, a consensus protocol and peer-to-peer gossip network form the foundation.
16+
17+
Above that, the SpecialK Data & Continuation Access and Cache layer is an evolution of the existing SpecialK technology (including its decentralized content delivery, key-value database, inter-node messaging, data access patterns, and privacy protecting agent model).
18+
19+
The Casper consensus protocols assure that nodes reach agreement about the contracts, contract state, and transactions for which each node is interested.
20+
21+
Blockchain contracts (aka smart contracts, protocols, or programs) will be written in a new domain-specific language for contracts called Rholang (or in contract languages that compile to Rholang) and then executed on the Rho Virtual Machine on a number of native platforms.
22+
23+
Smart Contracts include some essential system contracts as well as those providing capabilities for tokens and application-supplied contracts.
24+
25+
A metered and monetized content delivery network (CDN) is enabled through token and micro-payment contracts, accessing a mix of blockchain and off-chain data.
26+
27+
The Attention & Reputation Economy provides a model and set of interactions for motivating respectful and economic creation and dissemination of information within social networks.
28+
29+
In the architecture, there will be several APIs, especially at the top layers. Typed APIs will provide access to the RhoVM, Contract Services, and individual contracts. In addition other APIs (including RESTful APIs) will be provided for accessing the CDN, and the Attention & Reputation Economy.
30+
31+
We'll detail these components in the sections below, from the bottom-up. But first, let’s discuss the requirements and software architecture approach motivating this platform solution.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. _attention-and-reputation-economy:
2+
3+
################################################################################
4+
Attention & Reputation Economy
5+
################################################################################
6+
7+
From a user-centric perspective, this economy aims to directly but unobstructedly allow value to be placed on the content’s creation, consumption, and promotion. This applies to many types of content. For example, a short textual post is created, sent to an initial distribution list, read, promoted (liked), and made available to even more readers. Or, a short movie can go through the same workflow. Along these paths, attention is given, and rewards can flow back to the content originator and to promoters. Based on one’s own engagement with the content exchanged to/from one’s connections, each connection’s reputation is computed. The reputation rank can be used subsequently to present content in a manner consistent with how the user has demonstrated attention in the recent past.
8+
9+
For more information, see the original whitepaper, `RChain - The Decentralized and
10+
Distributed Social Network`_. The latest thinking about Attention & Reputation Economy
11+
will be described in Slack discussions and blog posts.
12+
13+
.. image:: img/attention-economy.png
14+
:width: 400px
15+
:align: center
16+
17+
.. _RChain - The Decentralized and Distributed Social Network: http://www.synereo.com/whitepapers/synereo.pdf

blockchain-data.rst

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
.. _blockchain-data:
2+
3+
################################################################################
4+
Blockchain Data
5+
################################################################################
6+
7+
Data Semantics
8+
================================================================================
9+
10+
Like Ethereum, the RChain blockchain will store contracts and their serialized state. UTXO-style transactions will be implemented with simpler system-level contracts. Like Bitcoin and Ethereum, tamper-proof blockchain semantics will be used to create a history of blocks. The blockchain’s main purpose is to efficiently store essential state, any necessary sequencing, and timestamping.
11+
12+
Note that the math underlying this blockchain semantic structure is known as a
13+
Traced Monoidal Category. For more detail see Masahito Hasegawa's paper on this
14+
topic, `Recursion from Cyclic Sharing - Traced Monoidal Categories and Models of
15+
Cyclic Lambda Calculi`_.
16+
17+
The RChain design considers all storage “conserved”, although not all data will be conserved forever. Instead, data storage will be leased and will cost producers of that data in proportion to its size, contract complexity, and lease duration. Unlike Bitcoin and Ethereum, immutable data is not promised to be truly forever; however, a very long lease duration is equivalent.
18+
19+
The simple economic reason justifying leasing is that storage must be paid by someone or it cannot be maintained. We’ve chosen to make the economic mechanism direct. It is really an environmentally unfriendly idea that storage is made "free" only to subsidize it by an unrelated process. A small part of the real cost is measurable in the heat signatures of the data centers that are growing to staggering size. This charging for data as it is accessed also helps reduce "attack" storage, the storage of illegal content to discredit the technology.
20+
21+
A variety of data is supported, including public unencrypted json, encrypted blobs, or a mix. This data can also reference off-platform data stored in private, consortium, public, or obscure locations and formats.
22+
23+
.. _Recursion from Cyclic Sharing - Traced Monoidal Categories and Models of Cyclic Lambda Calculi: http://www.kurims.kyoto-u.ac.jp/~hassei/papers/tlca97.pdf
24+
25+
Data Storage
26+
===============================================================================
27+
28+
Data will be accessed using the SpecialK semantics and physically stored in a key-value database. A given node can choose which address namespaces it cares about, so not all data needs to be replicated in every node.
29+
30+
Addresses and Sharding/Compositionality
31+
===============================================================================
32+
33+
In contrast to other blockchains, where addresses are public keys (or hashes
34+
thereof), RChain’s address space will be structured. This is similar to how both
35+
the Internet and the web works, with IP addresses and URLs, respectively. A
36+
structured addressing approach allows programs to talk about “location” in a
37+
much more nuanced and fine-grained way. This design choice enables fast datalog
38+
queries based on those namespaces and better system performance by analyzing
39+
communication patterns to optimize the sharding solution.
40+
41+
This sharding solution allows:
42+
43+
* Dynamic composable sharding based on namespace interaction
44+
* Concurrent betting on and committing of blocks that don’t conflict.
45+
* Clients to subscribe to select address spaces without downloading the entire blockchain. Able to impose different policies such as maximum transaction size on different address ranges.
46+
* Arbitrary number of levels of address namespace.
47+
48+
For additional information, see Linear Types Can Change The Blockchain
49+
(`pdf`_, `lex`_, `hangout video`_), which describes the inspirational math
50+
and thinking in this area. Linear Types provide a nice way to decompose the
51+
blockchain in a scalable fashion. It already has sharding semantics in it,
52+
that is in the type system.
53+
54+
.. _pdf: https://github.com/leithaus/pi4u/blob/master/ltcctbc/ltcctbc.pdf
55+
.. _lex: https://github.com/leithaus/pi4u/tree/master/ltcctbc
56+
.. _hangout video: https://plus.google.com/u/0/events/cmqejp6d43n5cqkdl3iu0582f4k
57+
58+
Namespace Definition and Policy
59+
===============================================================================
60+
61+
In order to support many of the use cases that users of Bitcoin find valuable as well as broader use cases, namespace definitions will have a corresponding policy set that constrains its use, for example by setting:
62+
63+
* maximum contract code size,
64+
* maximum data size,
65+
* minimum lease time,
66+
* maximum lease time, and
67+
* other parameters
68+
69+
With policies such as these, a namespace can be defined to provide better guarantees of fast transaction speed and immutability, for example.
70+
71+
Contract Ownership, Transactions, and Messages
72+
===============================================================================
73+
74+
RChain’s contract accounts, transactions, and messages are analogous to `those in Ethereum`_.
75+
76+
.. _those in Ethereum: http://ethdocs.org/en/latest/contracts-and-transactions/account-types-gas-and-transactions.html
77+
78+
Rate-limiting Mechanism
79+
===============================================================================
80+
81+
RChain’s VM will implement a rate-limiting mechanism that is related to some
82+
calculation of processing, memory, storage, and bandwidth resources. This mechanism
83+
is needed in order to recover costs for the hardware and related operations.
84+
Although Bitcoin and Ethereum (gas) have similar needs, the mechanisms are different.
85+
Specifically, the metering will not be done at the VM level, but will be injected
86+
in the contract code (via source-to-source translation that is part of the compilation
87+
process [#f1]_).
88+
89+
Tokens
90+
===============================================================================
91+
92+
Somewhat similar to Omni Layer, multiple types of tokens will be supported. These tokens will have different properties depending on their type, including parameters such as:
93+
94+
* supply (initial supply, supply growth function, and final supply),
95+
* fungibility, and
96+
* other properties
97+
98+
For each type of token, there will be a link between its class (i.e., its set of distinguishing properties) and the rate-limiting mechanism.
99+
100+
.. [#f1] Ethereum 2.0 is intending on following the same technique.

call-for-participation.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. _call-for-participation:
2+
3+
################################################################################
4+
Call for Participation
5+
################################################################################
6+
7+
We invite you to participate in RChain's Slack channels, joining via http://slack.rchain.coop.
8+
9+
We need a variety of talent, but most urgently programmers with solid computer
10+
science, formal methods, and ideally experience with mobile process calculi and
11+
functional programming. Or, individuals who can demonstrate their ability to
12+
quickly learn these disciplines.
13+
14+
We need investors to help fund the building out this architecture. Note that there
15+
are many forward-looking statements in this document, and are subject to many risks.
16+
17+
Contact Lucius Gregory Meredith and / or Ed Eykholt for more information.

introduction/comparison-of-blockchains.rst renamed to comparison-of-blockchains.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ Bitcoin, Ethereum, and RChain as currently planned.
3535
| | *Runtime architecture* | Script runs on Bitcoin Core, Libbitcoin, and other native implementations | Ethereum Virtual Machine implemented on multiple platforms | RhoVM implemented on multiple platforms |
3636
+ +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3737
| | *Programming language* | Script | Solidity, Serpent, LLL and any other languages that get implemented on the EVM. | Rholang and any other languages that get implemented on the RhoVM. |
38-
+ +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
39-
| | *Name* | A smart contract (concept) is not named, but,implemented at an address with a transaction’s locking and unlocking scripts. | Has one address | Instance may have multiple names; may exist in multiple namespaces. |
40-
+---------------+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
41-
| **Latency** | *Block confirmation time* | 10 minutes for 1 block, 30 minutes for de-facto finality. | Current: 14 seconds for 1 block, 3 min for de-facto finality. | Variable. Target is sub-second for 1 block. TBD for de-facto finality. |
42-
+ +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
43-
| | *Block confirmation time* | Affected by large blocks and need for global consensus | Affected by large blocks and need for global consensus | Improved by sharding, bet-by-proposition (versus block), nodes listen to only portion of blockchain |
4438
+---------------+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4539
| **Block Size** | 1MB | Dynamic | Dynamic |
4640
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
# built documents.
5656
#
5757
# The short X.Y version.
58-
version = u'0.8'
58+
version = u'0.8.1'
5959
# The full version, including alpha/beta/rc tags.
60-
release = u'0.8'
60+
release = u'0.8.1'
6161

6262
# The language for content autogenerated by Sphinx. Refer to documentation
6363
# for a list of supported languages.

0 commit comments

Comments
 (0)