You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cad/000_principles/README.md
+14-13Lines changed: 14 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,27 @@
1
1
# CAD000: Design Principles
2
2
3
-
This document details general design and engineering principles deployed in the implementation and documentation of Convex.
3
+
We are building a platform for global decentralised computation and data, based on lattice technology and as a shared public utility network. As such, we are developing a set of open standards based on sound principles and values that will serve the long term vision.
4
+
5
+
This document details general design and engineering principles deployed in the implementation and documentation of Convex. All CADs should refer to and align with these principles.
4
6
5
7
## Technical Principles
6
8
7
9
### Values are Immutable
8
10
9
-
We adopt immutability as a standard principle for all values in Convex. Immutability is important for several reasons:
11
+
We adopt immutability for all values in Convex. Immutability is important for several reasons:
10
12
11
13
- Enables hash codes to be used for value identity (value IDs) - essential for content-addressable storage
12
-
- Enables structural sharing in persistent data structures
14
+
- Enables structural sharing in persistent data structures, especially when shared on the lattice
13
15
- Easier to reason about immutable values, especially with pure functions
14
16
- Better suited for concurrency
15
17
16
-
Mutability in implementations is permitted (e.g. a mutable cached value for performance reasons), however such mutability should not be externally visible (e.g. should not affect the Encoding of Values).
18
+
Mutability may occur as an implementation detail (e.g. a mutable cached value for performance reasons), however such mutability should not be externally visible (e.g. should not affect the encoding of values or CVM behaviour).
17
19
18
-
An important presentation on the topic: https://www.infoq.com/presentations/Value-Values/
20
+
A useful presentation on the topic: https://www.infoq.com/presentations/Value-Values/
19
21
20
22
### Bounded Resources
21
23
22
-
We are building a system for distibuted computation and data in the context of a global internet where many parties with access to the Convex network may be untrusted.
24
+
We are building a system for distributed computation and data in the context of a global internet where many parties with access to the Convex network may be untrusted.
23
25
24
26
It is therefore necessary to place a bound on the size of resources used. This is essential to ensure that the CVM does not ever attempt to process data of unbounded size, which could allow DoS attacks by adversaries constructing arbitrarily sized input.
25
27
@@ -29,17 +31,17 @@ Where input to Convex may be effectively unbounded (e.g. the size of data struct
29
31
30
32
### Security First
31
33
32
-
Convex is a system intended to support high value economic transactions. As such, security issues should be automatically regarded as the highest priority. We MUST NOT release core software with known severe security defects.
34
+
Convex supports high value economic transactions. As such, security issues should be automatically regarded as the highest priority. We MUST NOT release core software with known severe security defects that might place digital assets at risk.
33
35
34
-
We SHOULD use existing, proven algorithms and cryptography wherever practically possible: there is no need to reinvent the wheel in crypto.
36
+
We SHOULD use existing, proven algorithms and cryptography wherever practical: there is no need to "reinvent the wheel" in crypto.
35
37
36
38
### Favour Simplicity
37
39
38
-
Especially in API design, there may be a tendency to want to add new features for user convenience, e.g. additional optional arguments for core functions.
40
+
Especially in API design, there is a tendency to want to add new features for user convenience, e.g. additional optional arguments for core functions.
39
41
40
42
In such cases we SHOULD strongly resist the temptation to add additional complexity, and prefer the simplest possible implementation, especially within core Convex functionality. It is more important that core functionality is clean, simple and maintainable than superficially easy to use. Users have a powerful language with macro capabilities if they wish to implement more convenient programmatic interfaces appropriate for their own use case or design tastes.
41
43
42
-
An Excellent talk by Rich Hickey on this topic: https://www.infoq.com/presentations/Simple-Made-Easy-QCon-London-2012/
44
+
An excellent talk by Rich Hickey on this topic: https://www.infoq.com/presentations/Simple-Made-Easy-QCon-London-2012/
43
45
44
46
### Design for Composition
45
47
@@ -78,14 +80,13 @@ Such features MAY make sense in P2P off-chain usage, e.g. the Data Lattice. We e
78
80
79
81
### Apply Judgement
80
82
81
-
Principles are rarely absolute. There are always tradeoffs in engineering decisions that must be considered. Discussion is encouraged to ensure relevant aspects are considered from a number of perspectives.
83
+
Principles are rarely absolute. There are always trade-offs in engineering decisions that must be considered. Discussion is encouraged to ensure relevant aspects are considered from a number of perspectives.
82
84
83
85
## CAD Style Conventions
84
86
85
-
86
87
Literal code (e.g. Convex Lisp forms) should be quoted in a fixed width font `(like this)`
87
88
88
-
Type names like Vector or the Java type Object should be capitalised.
89
+
Type names like the Convex Vector or the Java type Object should be capitalised. They SHOULD NOT be quoted as code unless they are intended as a code example.
89
90
90
91
Where possible, follow RFC style MUST, SHOULD, MAY, SHOULD NOT etc. in formal specifications.
| `:CODE` | CVM code execution | `:CAST` error in user code
230
231
231
232
Error sources are not formally part of the Convex Network / CVM specification, but are important additional information normally returned alongside transaction results. Be aware that a malicious peer could fabricate the error source, so it may be useful to independently validate results.
Copy file name to clipboardExpand all lines: docs/intro.md
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,3 +4,6 @@ sidebar_position: 1
4
4
5
5
# Convex Intro
6
6
7
+
Convex is an open platform for building decentralised applications that require a high performance, trusted global state without needing to depend on centralised services.
8
+
9
+
It delivers the promise of the Internet of Value, offering flexibility and scalability far beyond the capabilities of traditional blockchains. In particular, it is supports high volume, interactive applications used directly by end users such as for mobile apps, payments and gaming.
Copy file name to clipboardExpand all lines: docs/overview/convex-whitepaper.md
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,8 @@
1
1
---
2
-
title: White Paper
2
+
title: Convex White Paper
3
3
authors: [convex]
4
4
tags: [convex, technology]
5
+
permalink: white-paper
5
6
---
6
7
# Convex White Paper
7
8
@@ -314,7 +315,7 @@ Convex eschews the idea of selecting a leader. We maintain the principle that **
314
315
- Blocks can be **independent of all previous Blocks** - they do not necessarily form a "chain" linked by cryptographic hashes.
315
316
- It is possible for multiple Peers to propose Blocks **concurrently** for inclusion in consensus at the same time. This removes a major bottleneck compared to systems that require on some form of sequential leadership e.g. ??????.
316
317
317
-
An Ordering includes all Blocks up to the current Consensus Point. A Peer may propose a novel Block for consensus by appending it to the Ordering plus additional Blocks remaining to be confirmed in consensus.
318
+
An ordering includes all blocks up to the current consensus point. A peer may propose a novel block for consensus by appending it to the ordering (alongside any other additional blocks still to be confirmed in consensus).
318
319
319
320
#### Convergent Consensus
320
321
@@ -337,9 +338,9 @@ The Ordering of one or more other peers could be removed by from the Belief of a
337
338
338
339
During the convergence process conflicts in proposed block Orderings from different Peers are resolved by a system of convergent stake-weighted voting. [A diagram would be really helpful here] At each belief merge step, peers compute the total share of stake voting for each proposed block in the next position after the current Consensus Point. Peers have a view of the Orderings proposed by all other Peers.
339
340
340
-
Stake-weighted voting is applied iteratively to future proposed blocks, but only counting the votes by peers that have supported the winning ordering up to this point. Supporting a minority block causes peers to be temporarily excluded from the considered vote in following blocks. Peers that vote for orderings inconsistent with the majority cannot influence the ordering of any subsequent blocks.
341
+
Stake-weighted voting is applied iteratively to future proposed blocks, but only counting the votes by peers that have supported the winning ordering up to this point. Supporting a minority block causes peers to be temporarily excluded from the vote on following blocks. Peers that vote for orderings inconsistent with the majority cannot influence the ordering of any subsequent blocks. There is therefore an incentive for peers to adopt an ordering consistent with the majority.
341
342
342
-
Once the overall winning ordering has been determined, any peer can append any new Blocks it wishes to propose, adopting this ordering as its own proposal. This ordering is signed and incorporated into the pPeer's own belief, which is then propagated onwards to other peers.
343
+
Once the overall winning ordering has been determined, any peer can append any new blocks it wishes to propose, adopting this ordering as its own proposal. This ordering is signed and incorporated into the peer's own belief, which is then propagated onwards to other peers.
343
344
344
345
As an illustration, consider three Peers that are initially in consensus with respect to an ordering of blocks `XXXX` but peers `A` and `B` propose new blocks `Y` and `Z`:
345
346
@@ -771,7 +772,7 @@ The CVM therefore constrains **time**, **space** and **depth**.
771
772
772
773
Convex constrains time by placing a "juice cost" on each CVM operation performed. Any transaction executed has a "juice limit" that places a bound on the total amount of computational work that can be performed within the scope of the transaction.
773
774
774
-
The originating account for a transaction must reserve juice by paying an amount `[juice limit] x [juice price]` at the start of the transaction. Any unused juice at the end of the transaction is refunded at the same rate. The juice price a dynamically varying price that adjusts with amount of execution performed per unit time by the Convex network as a whole: this is a cryptoeconomic mechanism to disincentivise transactions from being submitted at peak periods, and as a protection from DoS attacks by making it prohibitively expensive to flood the compute capacity of the network for a sustained period of time.
775
+
The originating account for a transaction must reserve juice by paying an amount `[juice limit] x [juice price]` at the start of the transaction. Any unused juice at the end of the transaction is refunded at the same rate. The juice price is a dynamically varying price that adjusts with the amount of load on the Convex network as a whole: this is a cryptoeconomic mechanism to disincentivise transactions from being submitted at peak periods, and as a protection from DoS attacks by making it prohibitively expensive to flood the compute capacity of the network for a sustained period of time.
775
776
776
777
If the juice limit has been exceeded, the CVM terminates transaction execution with an exception, and rolls back any state changes. No juice is refunded in such a situation - this penalises users who attempt excessive resource consumption either carelessly or maliciously.
777
778
@@ -1053,15 +1054,15 @@ Memory Consumption is computed at the end of each transaction, and is defined as
1053
1054
1054
1055
`Memory Consumption = [CVM State Size at end of Transaction] - [CVM State Size at start of Transaction]`
1055
1056
1056
-
If a transaction has zero Memory Consumption, it will complete normally with no effect from the Memory Accounting subsystem
1057
+
If a transaction has zero memory consumption, it will complete normally with no effect from the memory accounting subsystem
1057
1058
1058
-
If a transaction would complete normally, but has a positive Memory Consumption, the following resolutions are attempted, in this order:
1059
+
If a transaction would complete normally, but has a positive memory consumption, the following resolutions are attempted, in this order:
1059
1060
1060
-
1. If the user has sufficient Allowance, the additional memory requirement will be deducted from the allowance, and the transaction will complete normally
1061
+
1. If the user has sufficient allowance, the additional memory requirement will be deducted from the allowance, and the transaction will complete normally
1061
1062
2. If the transaction execution context has remaining juice, and attempt will be made to automatically purchase sufficient memory from the Memory Exchange. The maximum amount paid will be the current juice price multiplied by the remaining juice for the transaction. If this succeeds, the transaction will complete successfully with the additional memory purchase included in the total juice cost.
1062
1063
3. The transaction will fail with a MEMORY Error, and any state changes will be rolled back. The User will still be charged the juice cost of the transaction
1063
1064
1064
-
If a transaction has negative Memory Consumption, the memory allowance of the user will be increased by the absolute size of this value. In effect, this is a refund granted for releasing storage requirements.
1065
+
If a transaction has negative memory consumption, the memory allowance of the user will be increased by the absolute size of this value. In effect, this is a refund granted for releasing storage requirements.
1065
1066
1066
1067
1067
1068
#### Allowance transfers
@@ -1076,7 +1077,7 @@ It is permissible to make an allowance transfer directly between accounts. This
1076
1077
1077
1078
#### Actor Considerations
1078
1079
1079
-
All Accounts, including actors, have a memory allowance. However, in most cases actors have no use for a memory allowance: any memory consumed during interaction with an actor will be accounted for via the user account account that originated the transaction.
1080
+
All Accounts, including actors, have a memory allowance. However, in most cases actors have no need for a memory allowance: any memory consumed during interaction with an actor will be accounted for via the user account account that originated the transaction.
1080
1081
1081
1082
One exception to this is with scheduled execution, where an actor itself may be the origin for a transaction.
Copy file name to clipboardExpand all lines: docs/overview/faq.md
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -6,20 +6,18 @@ tags: [convex]
6
6
7
7
Some answers to common questions can be found here.
8
8
9
-
10
9
## Is Convex Free?
11
10
12
-
Yes! Convex is free for anyone to use and build applications upon, and always will be. We are building Convex for everyone to support the Internet of Value.
11
+
Yes! Convex is free for anyone to use, and always will be. We are building Convex as an open public utility network for everyone to support the Internet of Value.
13
12
14
-
To make use of the resources of the network, small transaction fees are charged using Convex Coins, which is the native utility token of the network. This is important for several reasons:
13
+
When transacting on the network, small fees are charged using Convex Coins, which is the native utility token of the network. This is necessary for several reasons:
15
14
16
-
- Compensate those who provide important secure infrastructure to the network (i.e. peer operators)
15
+
- Compensate fairly those who provide important secure infrastructure to the network (i.e. peer operators)
17
16
- Prevent denial of service attacks by people flooding the network with wasteful transactions. This makes it very expensive to launch such attacks.
18
17
- Create an economic incentive to use the network as efficiently as possible (both for users and developers of smart contracts)
19
18
20
19
Our goal is to keep transaction fees small, so that it is never a significant issue for legitimate network users.
21
20
22
-
23
21
## How fast is Convex?
24
22
25
23
Convex can comfortably process many thousands of complex transactions per second (e.g. transfers and smart contract calls). The CVM itself has been benchmarked at over 1,000,000 TPS on a modern desktop PC. And as we continue making performance improvements it is getting faster by the day.
Copy file name to clipboardExpand all lines: docs/overview/manifesto.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -228,7 +228,7 @@ Initially, the governance role will be performed by the Convex Foundation, a non
228
228
In the longer term, we will implement decentralised governance. This will happen once we have sufficient confidence that it is practical to implement, secure against plausible threats and fully serves the interest of Convex users and society as a whole.
229
229
230
230
Key governance roles include:
231
-
- Authorising official updates to the peer network / protocol
231
+
- Authorising official updates to the peer network or protocol
232
232
- Preventing forks in the global state: the entire point of a global state is to act as a single source of truth. As a public utility that records important economic information on a decentralised basis, the network must avoid forks since these present a significant risk of confusion and loss to participants in the ecosystem. Forks are not desirable in a system designed to act as a single source of truth for asset ownership, contract state and account balances etc.
233
233
- Ensuring that issuance of Convex Coins is fair, secure and consistent with out principles of rewarding ecosystem contribution
Copy file name to clipboardExpand all lines: docs/overview/performance.md
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,9 @@ We care primarily about two different measurements of performance:
9
9
10
10
Convex performance is based around a key idea: We implement consensus using a **CRDT** (conflict-free replicated data type) where the Peers achieve consensus by simply sharing a Belief data structure which is repeatedly merged with other Beliefs to form consensus. CRDTs are guaranteed to eventually converge to a consistent value under reasonable assumptions, which gives the desired properties of safety and liveness to the network. Peers, therefore, have a simple primary task: merge and propagate new beliefs to the network as quickly as possible.
11
11
12
+
Here are some performance figured validated in the EU's Next Generation Internet (NGI) OntoChain Project.
Copy file name to clipboardExpand all lines: docs/products/convex-desktop/index.md
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,10 @@
1
+
---
2
+
title: Convex Desktop
3
+
authors: [convex]
4
+
tags: [convex]
5
+
sidebar_position: 0
6
+
---
7
+
1
8
# Convex Desktop
2
9
3
10
Convex Desktop is a GUI tool for interacting with Convex. Designed for developers and power users, it puts all the capabilities of Convex at your fingertips.
0 commit comments