Ontology launches Layer 2, contributing to a more comprehensive public chain platform

Ontology launches Layer 2, contributing to a more comprehensive public chain platform

foreword

Imagine a scenario in which a blockchain platform is rapidly evolving and the number of users is growing rapidly, reaching tens of millions, which leads to a sharp increase in associated costs in a short time. What strategies are needed at this stage to maintain operational efficiency without compromising the pace of development due to complex approval and validation processes? As many businesses will agree, scalability should be a priority.

As an off-chain scaling technology, Ontology Layer 2 offers higher performance and lower rates. Enterprises can securely store large amounts of transaction records off-chain and then transfer them on-chain when they need to interact, reducing transaction costs for users and boosting productivity dramatically.

Introduction

As outlined in the Aristotle 2020 roadmap, when combined with Ontology cross-chains, Wasm-JIT, Multi-VM, and other advanced core technologies, Ontology Layer 2 now performs better than other Tier 2 solutions. This is reflected in its low cost per storage, multilingual support and full compatibility of versions of analysis and execution. Ensure that deployment contracts interact seamlessly, such as running multiple virtual operating systems on the same machine, which improves execution efficiency and reduces processing costs.

The working process

Level 2 Ontology consists of 3 main parts: Ontology Level 2 deposit, Level 2 Ontology withdrawals, Level 2 transactions and security guarantee.

In the Level 2 trading center, users can make transactions, execute contract requests, and sign contracts. This transaction may or may not be the same as the Ontology main chain transaction format. Transaction collectors (called "Collectors", hereinafter referred to as "collector") are responsible for collecting Level 2 transactions of the user. There may be multiple collectors throughout the process. Users can also broadcast their Layer 2 transactions to multiple collectors.

The Collector periodically packages the collected Layer 2 transactions and runs them to create a new state. The collector is also responsible for passing the root of the new state to the main Ontology chain. After executing the transactions packed in the Level 2 block, the root of the new state becomes the Level 2 block state. The challenger is responsible for checking the state of the Level 2 block submitted by the Collector to the main Ontology chain. This requires the Challenger to synchronize the Layer 2 block through the Collector in order to maintain full global state.

ACCOUNT STATUS CONFIRMATION INCLUDES ACCOUNT STATUS INFORMATION AND ITS CONFIRMATION WHICH CAN BE OBTAINED FROM COLLECTOR AND CHALLENGER REQUESTS. ONLY THEY MAINTAIN FULL GLOBAL STATE.

Deposit at Level 2

  1. First, the user performs a "Deposit" operation on the main Ontology chain. The main chain contract freezes the user's deposit funds and locks the state of this fund at Level 2. At the moment, the status is “unreleased”.
  2. The Collector is then notified that a Deposit operation is pending on the Ontology main chain. The collector will change its state at level 2 according to the deposit operation. The faucet then adds a Deposit to release the transaction and packs it, along with other user transactions, into a Level 2 block. When the level 2 block state reaches the Ontology main chain, it notifies the system to release the deposit.
  3. The main chain contract executes the deposit release operation and changes the status of the deposit fund to “released”.

Conclusions from Ontology

  1. The user creates a Level 2 Withdrawal transaction and submits it to the faucet.
  2. The Collector modifies its state according to Withdraw and simultaneously packs the Withdraw transaction and other user transactions together into a Tier 2 block. When the Tier 2 block state is sent to the Ontology main chain, a Withdraw request will be sent.
  3. The main chain contract executes the withdrawal request, registers the fund record, and sets the status to "not released".
  4. After confirming the status, the user sends a request to withdraw funds from the account.
  5. The main chain contract executes the withdrawal request from the account, transfers the funds to the target account, and sets the withdrawal record to "released".

Layer 2 transactions and security

Level 2 transactions

  1. The user creates a Level 2 "Transfer" transaction and sends it to the Collector.
  2. The collector packs the transfer transaction and other transactions into a Layer 2 block, executes the transactions in the block, and pushes the state of that layer 2 block to the Ontology main chain.
  3. Wait for status confirmation.

Security guarantee

After the Operator submits the Level 2 block state to the Ontology main chain, the Challenger can also execute a Level 2 block transaction and verify that the Level 2 block state is correct. If something is not correct, the Challenger will collect evidence of fraud and submit a Level 2 smart contract to challenge the Operator.

How to use

Currently, Ontology Level 2 is available on the Ontology TestNet for developers to experiment with.

Link

Link for documentation

In the next article, we will present a detailed performance comparison with Tier 2 on other chains.

Appendix: Terms

Level 2 transactions

The user has made a request for the transfer or performance of a Level 2 contract and has already signed it. This transaction may or may not be the same as the Ontology main chain transaction format.

Collector

The Collector is a Layer 2 transaction collector. It is responsible for collecting the user's Layer 2 transactions, validating and executing the transaction. Each time a Layer 2 block is generated, the collector is responsible for executing the transactions in the block, updating the status, and generating Layer 2 contracts that can be interpreted as proof of the state used for security.

Level 2 block

The Collector periodically packs the collected Layer 2 transactions, generates a block containing all the Layer 2 transactions, and generates a new Layer 2 block.

Level 2 state

The Collector executes batch transactions in a Layer 2 block, updates the state, sorts all updated state data to create a Merkle tree, and computes the root hash of the Merkle tree. The root hash is the state of the Level 2 block.

Operator

The operator is responsible for Tier 2 security and is responsible for monitoring whether a token transfer to Tier 2 or a token transfer transaction from Tier 2 to the Ontology main chain occurs. It is also the responsibility of the operator to periodically send a Level 2 status confirmation. As a confirmation, you can go to the Ontology network.

Applicant

The Applicant is responsible for verifying the confirmation of status submitted by the Operator to the Ontology main chain. This requires the challenger to synchronize Layer 2 transactions from the operator or chain in order to maintain full global state. After the Challenger synchronously executes the transaction and updates the status, it can verify the correctness of the status confirmation presented by the Operator on the network. If there are problems, the Challenger can create a fraud proof challenge that a Level 2 contract can explain.

Account Status Confirmation

Achieved with Merkle Proof, proof of account status can be obtained from Operators and Claimants. They are the only parties that maintain full global state.

Fraud proof

Fraud verification includes verification of account status prior to the current Level 2 block update.

The previous level 2 block status certificate and the presented account status certificate confirm the legitimacy of the old state before the upgrade. Proof that the old state is legal can be obtained by running the current block.

Enterprise-focused Ontology blockchain is ready to help enterprises transform and modernize their business. If you have issues with offline scalability, virtual machines, or the full range of technical systems, please contact us at [email protected].

Learn more about Ontology

Fresh, up-to-date information and pleasant communication in our Telegram chatTelegram English

Also, subscribe and study our: Ontology websiteGitHubDiscordTwitterReddit

Source: habr.com

Add a comment