@@ -19,6 +19,8 @@ pub struct ChunkTask {
1919 pub block_hashes : Vec < B256 > ,
2020 /// The on-chain L1 msg queue hash before applying L1 msg txs from the chunk.
2121 pub prev_msg_queue_hash : B256 ,
22+ /// The on-chain L1 msg queue hash after applying L1 msg txs from the chunk (for validate)
23+ pub post_msg_queue_hash : B256 ,
2224 /// Fork name specify
2325 pub fork_name : String ,
2426}
@@ -81,6 +83,7 @@ impl TryFromWithInterpreter<ChunkTask> for ChunkProvingTask {
8183 version : value. version ,
8284 block_witnesses,
8385 prev_msg_queue_hash : value. prev_msg_queue_hash ,
86+ post_msg_queue_hash : value. post_msg_queue_hash ,
8487 fork_name : value. fork_name ,
8588 validium_inputs,
8689 } )
@@ -102,6 +105,8 @@ pub struct ChunkProvingTask {
102105 pub block_witnesses : Vec < BlockWitness > ,
103106 /// The on-chain L1 msg queue hash before applying L1 msg txs from the chunk.
104107 pub prev_msg_queue_hash : B256 ,
108+ /// The on-chain L1 msg queue hash after applying L1 msg txs from the chunk (for validate)
109+ pub post_msg_queue_hash : B256 ,
105110 /// Fork name specify
106111 pub fork_name : String ,
107112 /// Optional inputs in case of domain=validium.
@@ -205,7 +210,9 @@ impl ChunkProvingTask {
205210
206211 pub fn precheck_and_build_metadata ( & self ) -> Result < ChunkInfo > {
207212 let witness = self . build_guest_input ( ) ;
208- ChunkInfo :: try_from ( witness) . map_err ( |e| eyre:: eyre!( "{e}" ) )
213+ let ret = ChunkInfo :: try_from ( witness) . map_err ( |e| eyre:: eyre!( "{e}" ) ) ?;
214+ assert_eq ! ( ret. post_msg_queue_hash, self . post_msg_queue_hash) ;
215+ Ok ( ret)
209216 }
210217
211218 /// this method check the validate of current task (there may be missing storage node)
0 commit comments