Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Where can I read details about BOC flags, including CRC ?

Where can I read details about BOC flags, including CRC ?


This question was imported from Telegram Chat:
https://t.me/tondev_eng/26701
https://t.me/tondev_eng/26711

Votes Newest

Answers


To better understand the role of CRC-32 in the TON network and its relation to Bag of Cells (BOCs), it is essential to first learn about the concept of Cyclic Redundancy Check (CRC) and its primary purpose.

CRC is a widely employed method for verifying the integrity of digital data. As an error-detecting algorithm, it checks for errors in digital data during transmission or storage.

A CRC generates a short checksum or hash of the data being transmitted or stored, which is then appended to the data itself. Upon receiving or retrieving the data, the CRC is recalculated and compared to the original checksum. If the two checksums match, it is assumed that the data has not been corrupted. However, if they do not match, it indicates that an error has occurred, and the data must be resent or retrieved again.

CRC-32, a 32-bit variation of the CRC algorithm, is designed to detect accidental changes to raw data in digital networks and storage devices. By calculating a 32-bit checksum for the input data, it helps maintain data integrity during transmission or storage.

**Within the TON network, CRC-32 is used as a component of the Bag of Cells (BOC) serialization format to ensure data integrity.** BOC is a binary format representing a tree of cells, used for data storage and transmission in the TON network. Each cell in a BOC contains a small piece of data and may have references to other cells.

During the serialization or deserialization of a BOC, a CRC-32 checksum is calculated for the cell data to ensure that it has not been corrupted during transmission or storage. If the calculated CRC-32 checksum does not match the one stored in the BOC, it indicates that the data is corrupted and needs to be retransmitted or retrieved again.


For more information on CRC-32 and its usage within the TON network, refer to the following resources:

1
1
Posted 10 months ago
Edited 10 months ago
Howard Peng
10 × 1 Administrator
6K Views
1 Answer
10 months ago
10 months ago
Tags