Тон 2й урок. Русский перевод. Через Яндекс смотреть

Alex Markov
11 Oct 202309:29

Summary

TLDRThe script delves into the architecture of the TON blockchain, emphasizing its ledger of state transitions beyond simple transfers. It highlights the flexibility of smart contracts, which can alter data and code, and the self-contained nature of contracts ensuring scalability. The synchronous nature of TON, where contracts communicate via messages and transactions, is explained. The script also covers the prevention of double spends through consensus mechanisms like proof of stake, the sharding of validators, and the two-tier system of the Masterchain and base chains. It concludes with the transaction processing latency and the typical short chains of messages in TON.

Takeaways

  • 📚 The TON ecosystem includes a blockchain architecture that serves as a ledger of state transitions, not just transfers.
  • 💡 Smart contracts in TON are accounts with their own storage, unique address, balance of TON coins, and program code.
  • 🛠️ Developers have unlimited flexibility to design smart contract logic using the syntax supported by the TON Virtual Machine (TVM).
  • 🔒 Contracts are self-contained and isolated from each other, ensuring infinite scalability of the TON blockchain.
  • 🌐 Contracts can only interact with the outside world through incoming and outgoing messages, similar to computers on the internet.
  • 🔄 The blockchain provides guarantees such as verifying the address of incoming messages and cryptographic assurance for message delivery.
  • 💌 Messages are the means of interaction between contracts, carrying coins and data to a contract address, processed to create new transactions.
  • 🔗 Transactions are recorded on the blockchain as a result of contract activity, including state updates and new message emissions.
  • 🔒 Consensus mechanisms, such as Proof of Stake, prevent double spends and ensure message delivery in the TON network.
  • 🔑 The Masterchain in TON is a central, non-shardable blockchain that records the state of accounts and configurations of the network.
  • ⏱️ Transaction processing in TON involves a latency of about 10 to 12 seconds for a globally visible commitment due to the two-tier system of base and Masterchain.

Q & A

  • What is the primary function of the TON blockchain?

    -The TON blockchain serves as a ledger of state transitions, recording changes in the state of arbitrary accounts, including smart contracts, which have their own storage, unique addresses, and can store TON coins, program code, and data.

  • How does the TON blockchain ensure scalability?

    -The TON blockchain ensures scalability through the isolation of smart contracts from each other, allowing each contract to process messages independently without visibility into other contracts, thus enabling infinite sharding.

  • What is a smart contract in the context of TON?

    -A smart contract in TON is an account with its own storage, unique address, and balance of TON coins. It also contains program code that developers can design using the syntax supported by the TON Virtual Machine (TVM).

  • How can developers change the data and code of a smart contract on TON?

    -Developers can change the data and code of a smart contract throughout its lifetime by sending messages to the contract, which then processes these messages, updates its state, and can even alter its code.

  • What is the significance of the synchronous nature of the TON blockchain?

    -The synchronous nature of the TON blockchain means that contracts cannot immediately read the state of other contracts. They must send outgoing messages and wait for a reply, which mimics the behavior of independent computers on the internet.

  • What guarantees does the TON blockchain provide to developers?

    -The TON blockchain guarantees that messages will be delivered and provides cryptographic assurance about the code behind an address. Developers can verify the address of incoming messages and trust the specific code associated with it.

  • What is the difference between a message and a transaction in TON?

    -A message in TON is a unit that carries coins and data between contracts. A transaction, on the other hand, records the activity on a contract, such as updating the state and emitting new messages, as a result of processing an incoming message.

  • How does the TON blockchain handle double spends?

    -To prevent double spends, the TON blockchain relies on consensus mechanisms, such as proof of stake, where validators put up a security deposit to ensure they do not misbehave, and the network ensures that only one valid transaction is recorded.

  • What is the role of the Masterchain in the TON blockchain architecture?

    -The Masterchain in TON is a central, non-shardable blockchain where every validator participates. It records the state of accounts and serves as a load chain containing the configuration of the network and snapshots of subchains from various validator groups.

  • What is the typical latency for transaction processing in TON?

    -The initial transaction on the TON blockchain takes around 5 to 6 seconds to be committed, and then another 5 to 6 seconds to be committed to the Masterchain, resulting in a total delay of approximately 10 to 12 seconds for a single transaction to become globally visible.

  • How does the TON blockchain handle long chains of messages?

    -Long chains of messages in TON can be routed through multiple shards or separate blocks. While waiting for the final transaction confirmation might take longer, the initial transaction confirmation often allows predicting the results of subsequent transactions, making it less of a concern in many scenarios.

Outlines

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Mindmap

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Keywords

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Highlights

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Transcripts

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now
Rate This

5.0 / 5 (0 votes)

Related Tags
TON BlockchainSmart ContractsScalabilityConsensusShardingTVMAccount IsolationMessage RoutingTransaction DelayDeveloper Assurance