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/concepts/accounts.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
2
tags:
3
-
- testnet 2.0
3
+
- testnet 3
4
4
---
5
5
6
6
# Accounts
7
7
8
8
**Account** is the basic identity of an agent on the blockchain. An account is identified by its address.
9
9
10
-
In `testnet 2.0`, accounts are divided into two types:
10
+
In `testnet 3`, accounts are divided into two types:
11
11
12
12
-__Externally Owned Accounts (EOA)__: the address of EOA is public key of the keypair which is `ed25519_dalek` compatible.
13
13
-__Contract Accounts__: contract account is created from contract deployment. The address is hash of the concatenation of a contract's bytecode and the deployer's address (which can itself be a smart contract) and nonce of the EOA that deploys the contract.
- The canonical sequence or 'chain' of blocks and the raw data directly available in this sequence, for example: block hashes, transactions, and events.
16
16
- The above, but further including data that is derivable from raw block data. This includes, most prominently, the world state.
17
-
- The network of full nodes and light clients that maintain the correctness and consistency of the blockchain data structure.
17
+
- The network of full nodes and clients that maintain the correctness and consistency of the blockchain data structure.
18
18
19
19
## What's in a block?
20
20
---
21
21
22
-
-`Blockchain ID` - Id of the blockchain
23
-
-`Block version number` - Version number of the block
22
+
-`App ID` - Id of the blockchain
23
+
-`Block Hash` - Block hash of this block
24
+
-`Height` - Identifier for a height of a block on the blockchain encoded as a number
25
+
-`Justify` - Quorum Certificate
26
+
-`Data Hash` - Hash over Data
27
+
-`Version number` - Identifier for the set of block validation rules for the blockchain
24
28
-`Timestamp` - Unix timestamp (number of seconds since 1970-01-01)
25
-
-`Previous block hash` - Block hash of previous block
26
-
-`This block hash` - Block hash of this block
29
+
-`Transaction Trie root hash` - Merkle Tree root hash of transactions
27
30
-`State root hash` - Merkle Tree root hash of current world-state
28
-
-`Transaction root hash` - Merkle Tree root hash of transactions
29
-
-`Receipt root hash` - Merkle Tree root hash of receipts
30
-
-`Proposer public key` - Public key of proposer
31
-
-`Signature on the block header` - A digital Signature on the block header
31
+
-`Receipt Trie root hash` - Merkle Tree root hash of receipts
32
32
-`Transactions` - the transactions included in the block
33
33
-`Receipts` - the execution result of transactions which are included in the block
**Gas**: Gas is a representation of cost incurred by computational resources per transaction. ParallelChain F assigns a cost to every transaction through gas metering.
11
10
@@ -15,7 +14,7 @@ Gas costs are divided into two components:
15
14
- The storage costs in bytes required to store/update data in the world state.
16
15
- The compute costs for precompile functions used by developers to deploy smart contracts on ParallelChain F.
17
16
18
-
WASM supports a total of 513 opcodes which aid sequential, vectorized, memory, logical operations and exception handling. ParallelChain F ecosystem categorizes these opcodes on basis of their operations. Some opcode families induce non-determinism when executed. These are identified and disallowed in the ParallelChain F ecosystem with the help of a custom middleware.
17
+
WASM supports over 500 opcodes which aid sequential, vectorized, memory, logical operations and exception handling. ParallelChain F ecosystem categorizes these opcodes on basis of their operations. Some opcode families induce non-determinism when executed. These are identified and disallowed in the ParallelChain F ecosystem with the help of a custom middleware.
19
18
20
19
## WASM Opcode Categories
21
20
---
@@ -40,171 +39,75 @@ A subset of these opcodes are known to induce non-determinism when executed.Thes
40
39
41
40
Gas fees for each WASM opcode family are defined in terms of the total latency of the corresponding x86-64 Assembly Instructions, each opcode is translated into. For defining latency of each x86-64 Assembly Instruction, we refer to one specific CPU model from Coffee Lake Refresh, Intel's 9th Generation microprocessor family (family: 06, model: 9E). These costs have been tabulated below.
Copy file name to clipboardExpand all lines: docs/concepts/mempool.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
tags:
3
-
- testnet 2.0
3
+
- testnet 3
4
4
---
5
5
6
6
# Mempool
@@ -11,7 +11,7 @@ tags:
11
11
**Mempool**: A broad term which can refer to:
12
12
13
13
- A component of validating and full nodes which accepts not-yet-finalized transactions for future inclusion in a block (only validating nodes can produce new blocks).
14
-
- The fuzzy set of not-yet-finalized transactions included in the network's individual mempools. This set is fuzzy because individual mempools are unlikely to consistent at any given time due to network delays and and partitions.
14
+
- The fuzzy set of not-yet-finalized transactions included in the network's individual mempools. This set is fuzzy because individual mempools are unlikely to be consistent at any given time due to network delays and partitions.
Smart contract is a program that runs on blockchain. In Parallelchain F, smart contract is an executable WASM binary and it resides in the blockchain as an account which also own its address, balance and nonce. External-owned account can make a transaction with smart contract as transaction data, which is the deployment process. A valid smart contract contains an entrypoint that can be executed when an account makes a transaction to its address.
12
-
13
-
**Entrypoint**: A starting point of contract execution.
11
+
Contracts are the run-time programmability mechanism of ParallelChain F networks. They allow users (Account owners) to implement arbitrary logic in a global, decentralized, and Byzantine Fault Tolerant replicated state machine to support their most business-critical applications.
14
12
13
+
Theoretically, any WebAssembly (WASM) module that implements the Contract ABI Subprotocol can be deployed onto a ParallelChain F blockchain. Practically, however, all developers (except perhaps those who like to experiment, or that would like to stretch the limits of the system) will want to use the types and macros in this pchain-sdk to write a Contract in Rust, and the commands in pchain-compile to compile the Rust source code into WASM bytecode that can be included in a Deploy Transaction.
15
14
16
15
## Smart Contract Programming Model
17
16
---
18
17
19
-
`Rust` is the primitive programing language to create a smart contract. Parallelchain F Smart Contract SDK considers the contract as a `struct` that stores fields as data in world-state, and its `impl` consists of methods representing entrypoints that can be executed.
18
+
The Contract Programming Model is inspired by Object-Oriented Programming (OOP). In the Model, a Contract can be thought of as a `Rust``struct` that controls access to persistent Storage. Accounts interact with Contracts by making EtoC Transactions calling its public methods, or just Methods for short. The following two sections elaborate on the two essential concepts of programming with the Contract Programming Model: Contract Methods, and Contract Storage.
19
+
20
+
See [Develop Contract](../smart_contract_sdk/develop_contract.md)
0 commit comments