2022-09-29 23:09:32 -07:00
|
|
|
global main:
|
2022-11-09 10:47:15 +11:00
|
|
|
// First, initialise the shift table
|
|
|
|
|
%shift_table_init
|
2022-12-01 16:23:39 -08:00
|
|
|
|
2022-11-09 10:47:15 +11:00
|
|
|
// Second, load all MPT data from the prover.
|
2022-12-01 16:23:39 -08:00
|
|
|
PUSH hash_initial_tries
|
2022-09-30 13:04:16 -07:00
|
|
|
%jump(load_all_mpts)
|
|
|
|
|
|
2023-03-06 21:57:51 -08:00
|
|
|
global hash_initial_tries:
|
2022-10-02 11:14:07 -07:00
|
|
|
%mpt_hash_state_trie %mstore_global_metadata(@GLOBAL_METADATA_STATE_TRIE_DIGEST_BEFORE)
|
|
|
|
|
%mpt_hash_txn_trie %mstore_global_metadata(@GLOBAL_METADATA_TXN_TRIE_DIGEST_BEFORE)
|
|
|
|
|
%mpt_hash_receipt_trie %mstore_global_metadata(@GLOBAL_METADATA_RECEIPT_TRIE_DIGEST_BEFORE)
|
2022-09-30 13:04:16 -07:00
|
|
|
|
2022-12-06 23:05:47 -08:00
|
|
|
global txn_loop:
|
2022-09-29 23:09:32 -07:00
|
|
|
// If the prover has no more txns for us to process, halt.
|
|
|
|
|
PROVER_INPUT(end_of_txns)
|
2022-09-30 13:04:16 -07:00
|
|
|
%jumpi(hash_final_tries)
|
2022-09-29 23:09:32 -07:00
|
|
|
|
2022-09-30 13:04:16 -07:00
|
|
|
// Call route_txn. When we return, continue the txn loop.
|
|
|
|
|
PUSH txn_loop
|
2022-09-29 23:09:32 -07:00
|
|
|
%jump(route_txn)
|
2022-09-30 13:04:16 -07:00
|
|
|
|
2022-12-06 23:05:47 -08:00
|
|
|
global hash_final_tries:
|
2022-10-02 11:14:07 -07:00
|
|
|
%mpt_hash_state_trie %mstore_global_metadata(@GLOBAL_METADATA_STATE_TRIE_DIGEST_AFTER)
|
|
|
|
|
%mpt_hash_txn_trie %mstore_global_metadata(@GLOBAL_METADATA_TXN_TRIE_DIGEST_AFTER)
|
|
|
|
|
%mpt_hash_receipt_trie %mstore_global_metadata(@GLOBAL_METADATA_RECEIPT_TRIE_DIGEST_AFTER)
|
2022-09-30 13:04:16 -07:00
|
|
|
%jump(halt)
|