Skip to content

Commit 1c33d90

Browse files
committed
Infinity Sharding Paradigm section supplemented
1 parent 2709372 commit 1c33d90

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

docs/develop/blockchain/sharding-lifecycle.mdx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ ISP underpins the TON Blockchain's design, treating each account as part of its
1414

1515
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.
1616

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.
22+
1723
## Sharding Example
1824

1925
![](/img/docs/blockchain-fundamentals/split-merge.svg)
@@ -49,16 +55,18 @@ The non-split parts are crucial for ensuring global consistency, reduced to inte
4955

5056
Key components of the non-split part of a shardchain block include:
5157

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`).
5460

5561
#### Block Header and Validator Signatures
5662

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.
5865

5966
#### Outbound Message Queue
6067

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.
6270

6371
#### Shard Split and Merge Mechanics
6472

docs/develop/blockchain/shards.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,8 @@ A simple example:
6666

6767
An actual example:
6868
* 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).
69+
70+
## See Also
71+
72+
* [Infinity Sharding Paradigm](sharding-lifecycle)
73+
* [Whitepapers](/learn/docs)

0 commit comments

Comments
 (0)