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/develop/blockchain/sharding-lifecycle.mdx
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,12 @@ ISP underpins the TON Blockchain's design, treating each account as part of its
14
14
15
15
Each shardchain, or more precisely, each shardchain block, is identified by a combination of `workchain_id` and a binary prefix `s` of the account_id.
16
16
17
+
## Messages and Instant Hypercube Routing (Instant Hypercube Routing)
18
+
19
+
In the infinite sharding paradigm, each account (or smart-contract) is treated as if it were itself in a separate shardchain.
20
+
Interaction between accounts occurs solely through the sending of messages, which is part of the actor model where accounts act as actors. An efficient messaging system between shardchains is critical to the operation of the TON blockchain.
21
+
A feature of TON is Instant Hypercube Routing, which enables fast delivery and processing of messages between shardchains, ensuring that messages created in a block of one shardchain are processed in the next block of the target shardchain, regardless of their number in the system.
@@ -49,16 +55,18 @@ The non-split parts are crucial for ensuring global consistency, reduced to inte
49
55
50
56
Key components of the non-split part of a shardchain block include:
51
57
52
-
-**InMsgDescr**: Descriptions of all messages imported into the block.
53
-
-**OutMsgDescr**: Descriptions of all messages exported or generated by the block.
58
+
-**InMsgDescr**: Descriptions of all messages imported into the block (i.e., either processed by the transaction included in the block or forwarded to the output queue, in the case of a transient message traveling along a path dictated by `Hypercube Routing`).
59
+
-**OutMsgDescr**: Descriptions of all messages exported or generated by the block (i.e. either messages generated by a transaction included in the block, or transit messages with a destination not belonging to the current shardchain, forwarded from `InMsgDescr`).
54
60
55
61
#### Block Header and Validator Signatures
56
62
57
-
The block header, another non-split component, contains essential information like workchain_id, binary prefix of account_ids, and various hashes (e.g., of the immediate predecessor). Validator signatures are appended to the unsigned block, forming the signed block.
63
+
The block header, another non-split component, contains essential information like `workchain_id`, binary prefix of `account_ids`, block sequence number (defined as the smallest non-negative integer greater than the sequence numbers of its predecessors), logical time, and unixtime generation. It also contains a hash of the immediate predecessor of the block (or its two immediate predecessors in the case of a preceding
64
+
shardchain merge event), hashes of its initial and final states (i.e., the states of the shardchain immediately before and immediately after the current block is processed), and a hash of the most recent masterchain block known at the time the shardchain block was generated. Validator signatures are appended to the unsigned block, forming the signed block.
58
65
59
66
#### Outbound Message Queue
60
67
61
-
OutMsgQueue in the shardchain state is a critical non-split part. It holds undelivered messages from OutMsgDescr until they are processed or delivered to their destination.
68
+
`OutMsgQueue` in the shardchain state is a critical non-split part. It contains undelivered messages included in `OutMsgDescr`, either by the last shardchain block leading to this state or by one of its predecessors.
69
+
Initially, each outgoing message is included in the `OutMsgQueue` and stored there, until they are processed or delivered to their destination.
Copy file name to clipboardExpand all lines: docs/develop/blockchain/shards.mdx
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -66,3 +66,8 @@ A simple example:
66
66
67
67
An actual example:
68
68
* In masterchain block `seqno=34626306` two of five shards with last blocks `(0,a000000000000000,40492030)` and `(0,e000000000000000,40492216)` merged into one with block `(0,c000000000000000,40492217)` (https://toncenter.com/api/v2/shards?seqno=34626306 and https://toncenter.com/api/v2/shards?seqno=34626307).
0 commit comments