Open 0xmountaintop opened 3 years ago
priority txs
may be implemented later.
I think top priority is to use https://github.com/Fluidex/state_keeper/blob/master/src/bin/global_state_test.rs
to run e2e proving. Input: a big jsonl file https://github.com/Fluidex/circuits/blob/master/test/testdata/msgs_float.jsonl ( generated by dingir-exchange ) or read msgs from MQ https://github.com/Fluidex/dingir-exchange/pull/117 . Output: proof json ( better to be validated in Solidity, it may be a challenge due to too many public circuit inputs now. We may temporarily only keep old merkle root and new merkle root as circuit public inputs? )
It feels weird that in zkSync a block is commited once the corresponding proof is verified? Shouldn't we wait for being propagated onto chain (notified by eth_watcher)?
can implement in this repo or in separate repos.
state_keeper & block_proposer & block_committer communicate via exchange DB.
priority txs (after certain confirmations) are put into DB via eth_watcher.
when block_proposer notices state_keeper accumulating a couple of blocks, proposes tasks into prover_cluster DB.
prover_cluster assign tasks to provers.
When tasks get proved, block_committer mask block proved in state_keeper DB, and send to ETH node via eth_sender.
We may need to double-check state consistence.