7-3. Layer 2 Entire Process
Last updated
Last updated
This page explains the structure and processing flow of EMETH Layer 2, which performs off-chain processing, based on the understanding of the Layer 1 flow from the previous page.
Deposit by the Requester
The requester deposits a certain amount of EMETH tokens to the Blockchain (EMETH Core) in advance.
Job registration by the Requester
The requester registers the parent Job information on the EMETH Execution Layer.
The dataset linked to the Job is stored in EMETH Storage, similar to L1.
Before processing begins, the requester can cancel the request by sending a Cancel declaration to the Blockchain.
Generation of SubJobs by L2 Splitter
The L2 Splitter monitors the information on the EMETH Execution Layer, and if there is a Job that can be Split and the requester has allowed Split processing, it performs the following:
Calls the Splitter to divide the dataset.
Divides the Job into multiple SubJobs and registers them with the EMETH Execution Layer, linking them as parent Jobs.
Execution of processing by EMETH Node
EMETH Node monitors unprocessed Jobs or SubJobs on the EMETH Execution Layer and performs the following:
Searches for attractive Jobs or SubJobs based on the Fee to EMETH Node and Deadline.
Sends a declaration of intent to start processing (process) to the EMETH Execution Layer.
Downloads the dataset for the relevant Job or SubJob from EMETH Storage and starts processing.
Stores the processing results in EMETH Storage and sends a completion report (submit) to the EMETH Execution Layer.
EMETH Node can also withdraw after declaring the intent to start processing. In this case, a penalty amount of EMETH tokens is confiscated from the deposit and burned.
Processing of timed-out Jobs by Verifier
The Verifier monitors the information on the EMETH Execution Layer and searches for Jobs or SubJobs that have timed out.
Sends timeout processing (timeout) to the EMETH Execution Layer. At this time, the EMETH Node that was processing will have the timeout penalty amount of EMETH tokens confiscated from the deposit.
Verification of processing results by L2 Verifier
The L2 Verifier monitors completed Jobs or SubJobs on the EMETH Execution Layer.
For the target Job or SubJob, it retrieves the dataset and processing results by EMETH Node from EMETH Storage.
Verifies the processing results for the target Job or SubJob.
Launches the Verifier program corresponding to the ProgramId to verify, and if the verification of the processing results passes, it sends a verify command to the EMETH Execution Layer; if it fails, it sends a rejectResult command. In case of SubJob failure, it re-registers the SubJob.
Ticket issuance by Signer
The Signer monitors the information on the EMETH Execution Layer and searches for Jobs or SubJobs with confirmed status.
The Signer periodically signs Tickets that compress (hash) the contents of multiple Jobs or SubJobs processed by each EMETH Node, and saves them on the EMETH Execution Layer.
Confirmation of SubJob completion by L2 Aggregator
Confirms that all SubJobs have been completed, calls the Aggregator program to integrate the processing results, and records them in EMETH Storage.
Simultaneously updates the Status of the parent Job on the EMETH Execution Layer to Confirmed.
Billing to L1
EMETH Node monitors Tickets on the EMETH Execution Layer, downloads them, and then sends them to L1 (EMETH Core).
Rewards for processing multiple Jobs or SubJobs included in the Ticket are paid to the EMETH Node.
The processing performance of Jobs included in the Ticket is cumulatively counted on EMETH Core as total fuel amount.
In this way, most of the processing in EMETH Layer 2 is executed off-chain, and registration to the blockchain is limited, allowing Job processing to be carried out while minimizing gas consumption.