2️⃣ Workflow
Last updated
Last updated
Here’s the essential workflow of Axonum, without considering mechanisms such as pre-confirmation or force exit:
The basic workflow begins with users sending L2 transactions (we allow native AI inference in the smart contract) to a batcher node, usually the sequencer.
Once the sequencer receives a certain number of transactions, it will post them into an L1 smart contract as a batch.
A validator node will read these transactions from the L1 smart contract and execute them on their local copy of the L2 state. As for the AI inference execution, the validator needs to download the model from model DA and conduct the AI inference within the opML engine.
Once processed, a new L2 state is generated locally and the validator will post this new state root into an L1 smart contract. (Note that this validator can also be the sequencer.)
Then, all other validators will process the same transactions on their local copies of the L2 state.
They will compare their resultant L2 state root with the original one posted to the L1 smart contract.
If one of the validators gets a different state root than the one posted to L1, they can begin a challenge on L1.
The challenge will require the challenger and the validator who posted the original state root to take turns proving what the correct state root should be. This challenge process is also known as fraud proof. The fraud proof of Axonum includes the fraud proof of L2 state transition and the fraud proof of opML.
Whichever user loses the challenge, gets their initial deposit (stake) slashed. If the original L2 state root posted was invalid, it will be destroyed by future validators and will not be included in the L2 chain.