From 18f0b13c2ad8a556f229805738f489107ffe7bce Mon Sep 17 00:00:00 2001 From: Miha Stopar Date: Fri, 4 Aug 2023 14:50:01 +0200 Subject: [PATCH] is_mod_extension taken out of ParentData and added to both leaves --- .../src/mpt_circuit/account_leaf.rs | 212 +++++++++--------- zkevm-circuits/src/mpt_circuit/extension.rs | 1 - .../src/mpt_circuit/extension_branch.rs | 5 - zkevm-circuits/src/mpt_circuit/helpers.rs | 18 +- zkevm-circuits/src/mpt_circuit/start.rs | 2 - .../src/mpt_circuit/storage_leaf.rs | 55 ++--- ...xtNodeInsertedBefore6After1FirstLevel.json | 2 +- zkevm-circuits/src/mpt_circuit/witness_row.rs | 2 + 8 files changed, 150 insertions(+), 147 deletions(-) diff --git a/zkevm-circuits/src/mpt_circuit/account_leaf.rs b/zkevm-circuits/src/mpt_circuit/account_leaf.rs index b63ddcd9b1..effdd11a1f 100644 --- a/zkevm-circuits/src/mpt_circuit/account_leaf.rs +++ b/zkevm-circuits/src/mpt_circuit/account_leaf.rs @@ -49,6 +49,7 @@ pub(crate) struct AccountLeafConfig { is_balance_mod: IsEqualGadget, is_storage_mod: IsEqualGadget, is_codehash_mod: IsEqualGadget, + is_mod_extension: [Cell; 2], } impl AccountLeafConfig { @@ -92,6 +93,10 @@ impl AccountLeafConfig { let drifted_bytes = ctx.rlp_item(meta, cb, AccountRowType::Drifted as usize); let wrong_bytes = ctx.rlp_item(meta, cb, AccountRowType::Wrong as usize); + for is_s in [true, false] { + config.is_mod_extension[is_s.idx()] = cb.query_bool(); + } + config.main_data = MainData::load("main storage", cb, &ctx.memory[main_memory()], 0.expr()); @@ -105,109 +110,110 @@ impl AccountLeafConfig { let mut codehash_rlc = vec![0.expr(); 2]; let mut leaf_no_key_rlc = vec![0.expr(); 2]; for is_s in [true, false] { - // Key data - let key_data = &mut config.key_data[is_s.idx()]; - *key_data = KeyData::load(cb, &ctx.memory[key_memory(is_s)], 0.expr()); - - // Parent data - let parent_data = &mut config.parent_data[is_s.idx()]; - *parent_data = ParentData::load( - "account load", - cb, - &ctx.memory[parent_memory(is_s)], - 0.expr(), - ); - - // Placeholder leaf checks - config.is_in_empty_trie[is_s.idx()] = - IsEmptyTreeGadget::construct(cb, parent_data.rlc.expr(), &r); - - // Calculate the key RLC - let rlp_key = &mut config.rlp_key[is_s.idx()]; - *rlp_key = ListKeyGadget::construct(cb, &key_items[is_s.idx()]); - - // Storage root and codehash are always 32-byte hashes. - require!(storage_items[is_s.idx()].len() => HASH_WIDTH); - require!(codehash_items[is_s.idx()].len() => HASH_WIDTH); - - // Multiplier after list and key - let mult = rlp_key.rlp_list.rlp_mult(&r) * key_items[is_s.idx()].mult(); - - let nonce_rlp_rlc; - let balance_rlp_rlc; - let storage_rlp_rlc; - let codehash_rlp_rlc; - (nonce_rlc[is_s.idx()], nonce_rlp_rlc) = nonce_items[is_s.idx()].rlc(); - (balance_rlc[is_s.idx()], balance_rlp_rlc) = balance_items[is_s.idx()].rlc(); - (storage_rlc[is_s.idx()], storage_rlp_rlc) = storage_items[is_s.idx()].rlc(); - (codehash_rlc[is_s.idx()], codehash_rlp_rlc) = codehash_items[is_s.idx()].rlc(); - - // Calculate the leaf RLC - let value_rlp_bytes = config.value_rlp_bytes[is_s.idx()].to_expr_vec(); - let value_list_rlp_bytes = config.value_list_rlp_bytes[is_s.idx()].to_expr_vec(); - leaf_no_key_rlc[is_s.idx()] = (value_rlp_bytes.rlc(&r), pow::expr(r.expr(), 2)) - .rlc_chain( - (value_list_rlp_bytes.rlc(&r), pow::expr(r.expr(), 2)).rlc_chain( - (nonce_rlp_rlc.expr(), nonce_items[is_s.idx()].mult()).rlc_chain( - (balance_rlp_rlc.expr(), balance_items[is_s.idx()].mult()) - .rlc_chain( - (storage_rlp_rlc.expr(), pow::expr(r.expr(), 33)) - .rlc_chain(codehash_rlp_rlc.expr()), - ), - ), - ), + ifx! {not!(config.is_mod_extension[is_s.idx()].expr()) => { + // Key data + let key_data = &mut config.key_data[is_s.idx()]; + *key_data = KeyData::load(cb, &ctx.memory[key_memory(is_s)], 0.expr()); + + // Parent data + let parent_data = &mut config.parent_data[is_s.idx()]; + *parent_data = ParentData::load( + "account load", + cb, + &ctx.memory[parent_memory(is_s)], + 0.expr(), ); - let leaf_rlc = - (rlp_key.rlc(&r), mult.expr()).rlc_chain(leaf_no_key_rlc[is_s.idx()].expr()); - // Key - key_rlc[is_s.idx()] = key_data.rlc.expr() - + rlp_key.key.expr( + // Placeholder leaf checks + config.is_in_empty_trie[is_s.idx()] = + IsEmptyTreeGadget::construct(cb, parent_data.rlc.expr(), &r); + + // Calculate the key RLC + let rlp_key = &mut config.rlp_key[is_s.idx()]; + *rlp_key = ListKeyGadget::construct(cb, &key_items[is_s.idx()]); + + // Storage root and codehash are always 32-byte hashes. + require!(storage_items[is_s.idx()].len() => HASH_WIDTH); + require!(codehash_items[is_s.idx()].len() => HASH_WIDTH); + + // Multiplier after list and key + let mult = rlp_key.rlp_list.rlp_mult(&r) * key_items[is_s.idx()].mult(); + + let nonce_rlp_rlc; + let balance_rlp_rlc; + let storage_rlp_rlc; + let codehash_rlp_rlc; + (nonce_rlc[is_s.idx()], nonce_rlp_rlc) = nonce_items[is_s.idx()].rlc(); + (balance_rlc[is_s.idx()], balance_rlp_rlc) = balance_items[is_s.idx()].rlc(); + (storage_rlc[is_s.idx()], storage_rlp_rlc) = storage_items[is_s.idx()].rlc(); + (codehash_rlc[is_s.idx()], codehash_rlp_rlc) = codehash_items[is_s.idx()].rlc(); + + // Calculate the leaf RLC + let value_rlp_bytes = config.value_rlp_bytes[is_s.idx()].to_expr_vec(); + let value_list_rlp_bytes = config.value_list_rlp_bytes[is_s.idx()].to_expr_vec(); + leaf_no_key_rlc[is_s.idx()] = (value_rlp_bytes.rlc(&r), pow::expr(r.expr(), 2)) + .rlc_chain( + (value_list_rlp_bytes.rlc(&r), pow::expr(r.expr(), 2)).rlc_chain( + (nonce_rlp_rlc.expr(), nonce_items[is_s.idx()].mult()).rlc_chain( + (balance_rlp_rlc.expr(), balance_items[is_s.idx()].mult()) + .rlc_chain( + (storage_rlp_rlc.expr(), pow::expr(r.expr(), 33)) + .rlc_chain(codehash_rlp_rlc.expr()), + ), + ), + ), + ); + let leaf_rlc = + (rlp_key.rlc(&r), mult.expr()).rlc_chain(leaf_no_key_rlc[is_s.idx()].expr()); + + // Key + key_rlc[is_s.idx()] = key_data.rlc.expr() + + rlp_key.key.expr( + cb, + rlp_key.key_value.clone(), + key_data.mult.expr(), + key_data.is_odd.expr(), + &r, + ); + // Total number of nibbles needs to be KEY_LEN_IN_NIBBLES. + let num_nibbles = + num_nibbles::expr(rlp_key.key_value.len(), key_data.is_odd.expr()); + require!(key_data.num_nibbles.expr() + num_nibbles.expr() => KEY_LEN_IN_NIBBLES); + + // Check if the account is in its parent. + // Check is skipped for placeholder leaves which are dummy leaves + ifx! {not!(and::expr(&[not!(config.parent_data[is_s.idx()].is_placeholder), config.is_in_empty_trie[is_s.idx()].expr()])) => { + require!((1, leaf_rlc, rlp_key.rlp_list.num_bytes(), config.parent_data[is_s.idx()].rlc) => @KECCAK); + }} + + // Check the RLP encoding consistency. + // RLP encoding: account = [key, "[nonce, balance, storage, codehash]"] + // We always store between 55 and 256 bytes of data in the values list. + require!(value_rlp_bytes[0] => RLP_LONG + 1); + // The RLP encoded list always has 2 RLP bytes. + require!(value_rlp_bytes[1] => value_list_rlp_bytes[1].expr() + 2.expr()); + // The first RLP byte of the list is always RLP_LIST_LONG + 1. + require!(value_list_rlp_bytes[0] => RLP_LIST_LONG + 1); + // The length of the list is `#(nonce) + #(balance) + 2 * (1 + #(hash))`. + require!(value_list_rlp_bytes[1] => nonce_items[is_s.idx()].num_bytes() + balance_items[is_s.idx()].num_bytes() + (2 * (1 + 32)).expr()); + // Now check that the the key and value list length matches the account length. + // The RLP encoded string always has 2 RLP bytes. + let value_list_num_bytes = value_rlp_bytes[1].expr() + 2.expr(); + // Account length needs to equal all key bytes and all values list bytes. + require!(config.rlp_key[is_s.idx()].rlp_list.len() => config.rlp_key[is_s.idx()].key_value.num_bytes() + value_list_num_bytes); + + // Key done, set the starting values + KeyData::store_defaults(cb, &ctx.memory[key_memory(is_s)]); + // Store the new parent + ParentData::store( cb, - rlp_key.key_value.clone(), - key_data.mult.expr(), - key_data.is_odd.expr(), - &r, + &ctx.memory[parent_memory(is_s)], + storage_rlc[is_s.idx()].expr(), + true.expr(), + false.expr(), + storage_rlc[is_s.idx()].expr(), ); - // Total number of nibbles needs to be KEY_LEN_IN_NIBBLES. - let num_nibbles = - num_nibbles::expr(rlp_key.key_value.len(), key_data.is_odd.expr()); - require!(key_data.num_nibbles.expr() + num_nibbles.expr() => KEY_LEN_IN_NIBBLES); - - // Check if the account is in its parent. - // Check is skipped for placeholder leaves which are dummy leaves - ifx! {not!(and::expr(&[not!(config.parent_data[is_s.idx()].is_placeholder), config.is_in_empty_trie[is_s.idx()].expr()])) => { - require!((1, leaf_rlc, rlp_key.rlp_list.num_bytes(), config.parent_data[is_s.idx()].rlc) => @KECCAK); - }} - - // Check the RLP encoding consistency. - // RLP encoding: account = [key, "[nonce, balance, storage, codehash]"] - // We always store between 55 and 256 bytes of data in the values list. - require!(value_rlp_bytes[0] => RLP_LONG + 1); - // The RLP encoded list always has 2 RLP bytes. - require!(value_rlp_bytes[1] => value_list_rlp_bytes[1].expr() + 2.expr()); - // The first RLP byte of the list is always RLP_LIST_LONG + 1. - require!(value_list_rlp_bytes[0] => RLP_LIST_LONG + 1); - // The length of the list is `#(nonce) + #(balance) + 2 * (1 + #(hash))`. - require!(value_list_rlp_bytes[1] => nonce_items[is_s.idx()].num_bytes() + balance_items[is_s.idx()].num_bytes() + (2 * (1 + 32)).expr()); - // Now check that the the key and value list length matches the account length. - // The RLP encoded string always has 2 RLP bytes. - let value_list_num_bytes = value_rlp_bytes[1].expr() + 2.expr(); - // Account length needs to equal all key bytes and all values list bytes. - require!(config.rlp_key[is_s.idx()].rlp_list.len() => config.rlp_key[is_s.idx()].key_value.num_bytes() + value_list_num_bytes); - - // Key done, set the starting values - KeyData::store_defaults(cb, &ctx.memory[key_memory(is_s)]); - // Store the new parent - ParentData::store( - cb, - &ctx.memory[parent_memory(is_s)], - storage_rlc[is_s.idx()].expr(), - true.expr(), - false.expr(), - false.expr(), - storage_rlc[is_s.idx()].expr(), - ); + }}; } // Proof types config.is_non_existing_account_proof = IsEqualGadget::construct( @@ -249,6 +255,7 @@ impl AccountLeafConfig { &key_rlc, &leaf_no_key_rlc, &drifted_bytes, + &config.is_mod_extension, &ctx.r, ); @@ -405,6 +412,12 @@ impl AccountLeafConfig { let mut key_data = vec![KeyDataWitness::default(); 2]; let mut parent_data = vec![ParentDataWitness::default(); 2]; for is_s in [true, false] { + self.is_mod_extension[is_s.idx()].assign( + region, + offset, + account.is_mod_extension[is_s.idx()].scalar(), + )?; + for (cell, byte) in self.value_rlp_bytes[is_s.idx()] .iter() .zip(account.value_rlp_bytes[is_s.idx()].iter()) @@ -479,7 +492,6 @@ impl AccountLeafConfig { storage_rlc[is_s.idx()], true, false, - false, storage_rlc[is_s.idx()], )?; } diff --git a/zkevm-circuits/src/mpt_circuit/extension.rs b/zkevm-circuits/src/mpt_circuit/extension.rs index 56f9fa1f9c..28e63e8d0d 100644 --- a/zkevm-circuits/src/mpt_circuit/extension.rs +++ b/zkevm-circuits/src/mpt_circuit/extension.rs @@ -55,7 +55,6 @@ impl ExtensionGadget { key_data: &KeyData, parent_data: &[ParentData; 2], is_placeholder: &[Cell; 2], - is_mod_extension: &[Cell; 2], ) -> Self { let r = ctx.r.clone(); diff --git a/zkevm-circuits/src/mpt_circuit/extension_branch.rs b/zkevm-circuits/src/mpt_circuit/extension_branch.rs index a5e2ad6ada..3bd42f95de 100644 --- a/zkevm-circuits/src/mpt_circuit/extension_branch.rs +++ b/zkevm-circuits/src/mpt_circuit/extension_branch.rs @@ -94,7 +94,6 @@ impl ExtensionBranchConfig { &config.key_data, &config.parent_data, &config.is_placeholder, - &config.is_mod_extension, ); let ext = config.extension.get_post_state(); ( @@ -158,7 +157,6 @@ impl ExtensionBranchConfig { branch.mod_rlc[is_s.idx()].expr(), false.expr(), false.expr(), - config.is_mod_extension[is_s.idx()].expr(), 0.expr(), ); } elsex { @@ -180,7 +178,6 @@ impl ExtensionBranchConfig { config.parent_data[is_s.idx()].rlc.expr(), config.parent_data[is_s.idx()].is_root.expr(), true.expr(), - config.is_mod_extension[is_s.idx()].expr(), branch.mod_rlc[is_s.idx()].expr(), ); }} @@ -288,7 +285,6 @@ impl ExtensionBranchConfig { mod_node_hash_rlc[is_s.idx()], false, false, - extension_branch.is_mod_extension[is_s.idx()], 0.scalar(), )?; } else { @@ -310,7 +306,6 @@ impl ExtensionBranchConfig { parent_data[is_s.idx()].rlc, parent_data[is_s.idx()].is_root, true, - extension_branch.is_mod_extension[is_s.idx()], mod_node_hash_rlc[is_s.idx()], )?; } diff --git a/zkevm-circuits/src/mpt_circuit/helpers.rs b/zkevm-circuits/src/mpt_circuit/helpers.rs index 37d52e72f0..280ed958f5 100644 --- a/zkevm-circuits/src/mpt_circuit/helpers.rs +++ b/zkevm-circuits/src/mpt_circuit/helpers.rs @@ -516,7 +516,6 @@ pub(crate) struct ParentData { pub(crate) rlc: Cell, pub(crate) is_root: Cell, pub(crate) is_placeholder: Cell, - pub(crate) is_mod_extension: Cell, pub(crate) drifted_parent_rlc: Cell, } @@ -525,7 +524,6 @@ pub(crate) struct ParentDataWitness { pub(crate) rlc: F, pub(crate) is_root: bool, pub(crate) is_placeholder: bool, - pub(crate) is_mod_extension: bool, pub(crate) drifted_parent_rlc: F, } @@ -540,7 +538,6 @@ impl ParentData { rlc: cb.query_cell(), is_root: cb.query_cell(), is_placeholder: cb.query_cell(), - is_mod_extension: cb.query_cell(), drifted_parent_rlc: cb.query_cell(), }; circuit!([meta, cb.base], { @@ -552,7 +549,6 @@ impl ParentData { parent_data.rlc.expr(), parent_data.is_root.expr(), parent_data.is_placeholder.expr(), - parent_data.is_mod_extension.expr(), parent_data.drifted_parent_rlc.expr(), ], ); @@ -566,12 +562,11 @@ impl ParentData { rlc: Expression, is_root: Expression, is_placeholder: Expression, - is_mod_extension: Expression, drifted_parent_rlc: Expression, ) { memory.store( &mut cb.base, - &[rlc, is_root, is_placeholder, is_mod_extension, drifted_parent_rlc], + &[rlc, is_root, is_placeholder, drifted_parent_rlc], ); } @@ -582,7 +577,6 @@ impl ParentData { rlc: F, force_hashed: bool, is_placeholder: bool, - is_mod_extension: bool, placeholder_rlc: F, ) -> Result<(), Error> { memory.witness_store( @@ -591,7 +585,6 @@ impl ParentData { rlc, force_hashed.scalar(), is_placeholder.scalar(), - is_mod_extension.scalar(), placeholder_rlc, ], ); @@ -610,15 +603,13 @@ impl ParentData { self.rlc.assign(region, offset, values[0])?; self.is_root.assign(region, offset, values[1])?; self.is_placeholder.assign(region, offset, values[2])?; - self.is_mod_extension.assign(region, offset, values[3])?; - self.drifted_parent_rlc.assign(region, offset, values[4])?; + self.drifted_parent_rlc.assign(region, offset, values[3])?; Ok(ParentDataWitness { rlc: values[0], is_root: values[1] == 1.scalar(), is_placeholder: values[2] == 1.scalar(), - is_mod_extension: values[3] == 1.scalar(), - drifted_parent_rlc: values[4], + drifted_parent_rlc: values[3], }) } } @@ -1048,6 +1039,7 @@ impl DriftedGadget { expected_key_rlc: &[Expression], leaf_no_key_rlc: &[Expression], drifted_item: &RLPItemView, + is_mod_extension: &[Cell; 2], r: &Expression, ) -> Self { let mut config = DriftedGadget::default(); @@ -1055,7 +1047,7 @@ impl DriftedGadget { ifx! {parent_data[true.idx()].is_placeholder.expr() + parent_data[false.idx()].is_placeholder.expr() => { config.drifted_rlp_key = ListKeyGadget::construct(cb, drifted_item); for is_s in [true, false] { - ifx! {and::expr(&[parent_data[is_s.idx()].is_placeholder.expr(), not!(parent_data[is_s.idx()].is_mod_extension.expr())]) => { + ifx! {and::expr(&[parent_data[is_s.idx()].is_placeholder.expr(), not!(is_mod_extension[is_s.idx()].expr())]) => { // Check that the drifted leaf is unchanged and is stored at `drifted_index`. // TODO(Brecht): Length can change so need to add RLP consistency checks? diff --git a/zkevm-circuits/src/mpt_circuit/start.rs b/zkevm-circuits/src/mpt_circuit/start.rs index 840420ac8c..d32d101d27 100644 --- a/zkevm-circuits/src/mpt_circuit/start.rs +++ b/zkevm-circuits/src/mpt_circuit/start.rs @@ -72,7 +72,6 @@ impl StartConfig { root[is_s.idx()].expr(), true.expr(), false.expr(), - false.expr(), root[is_s.idx()].expr(), ); KeyData::store_defaults(cb, &ctx.memory[key_memory(is_s)]); @@ -129,7 +128,6 @@ impl StartConfig { root[is_s.idx()], true, false, - false, root[is_s.idx()], )?; KeyData::witness_store( diff --git a/zkevm-circuits/src/mpt_circuit/storage_leaf.rs b/zkevm-circuits/src/mpt_circuit/storage_leaf.rs index e55b73643e..002633c43d 100644 --- a/zkevm-circuits/src/mpt_circuit/storage_leaf.rs +++ b/zkevm-circuits/src/mpt_circuit/storage_leaf.rs @@ -47,6 +47,7 @@ pub(crate) struct StorageLeafConfig { wrong: WrongGadget, is_storage_mod_proof: IsEqualGadget, is_non_existing_storage_proof: IsEqualGadget, + is_mod_extension: [Cell; 2], } impl StorageLeafConfig { @@ -77,6 +78,10 @@ impl StorageLeafConfig { let drifted_item = ctx.rlp_item(meta, cb, StorageRowType::Drifted as usize); let wrong_item = ctx.rlp_item(meta, cb, StorageRowType::Wrong as usize); + for is_s in [true, false] { + config.is_mod_extension[is_s.idx()] = cb.query_bool(); + } + config.main_data = MainData::load("main storage", cb, &ctx.memory[main_memory()], 0.expr()); @@ -86,13 +91,14 @@ impl StorageLeafConfig { let mut key_rlc = vec![0.expr(); 2]; let mut value_rlc = vec![0.expr(); 2]; let mut value_rlp_rlc = vec![0.expr(); 2]; + for is_s in [true, false] { - // Parent data - let parent_data = &mut config.parent_data[is_s.idx()]; - *parent_data = - ParentData::load("leaf load", cb, &ctx.memory[parent_memory(is_s)], 0.expr()); + ifx! {not!(config.is_mod_extension[is_s.idx()].expr()) => { + // Parent data + let parent_data = &mut config.parent_data[is_s.idx()]; + *parent_data = + ParentData::load("leaf load", cb, &ctx.memory[parent_memory(is_s)], 0.expr()); - ifx! {not!(parent_data.is_mod_extension) => { // Key data let key_data = &mut config.key_data[is_s.idx()]; *key_data = KeyData::load(cb, &ctx.memory[key_memory(is_s)], 0.expr()); @@ -169,27 +175,20 @@ impl StorageLeafConfig { require!(leaf_rlc => parent_data.rlc); }} }} - - // Key done, set the default values - KeyData::store_defaults(cb, &ctx.memory[key_memory(is_s)]); - // Store the new parent - ParentData::store( - cb, - &ctx.memory[parent_memory(is_s)], - 0.expr(), - true.expr(), - false.expr(), - false.expr(), - 0.expr(), - ); }}; - } - /* - TODO - ifx!{and::expr(&[not!(config.parent_data[0].is_mod_extension.expr()), not!(config.parent_data[1].is_mod_extension.expr())]) => { - }}; - */ + // Key done, set the default values + KeyData::store_defaults(cb, &ctx.memory[key_memory(is_s)]); + // Store the new parent + ParentData::store( + cb, + &ctx.memory[parent_memory(is_s)], + 0.expr(), + true.expr(), + false.expr(), + 0.expr(), + ); + } // Proof types config.is_storage_mod_proof = IsEqualGadget::construct( @@ -216,6 +215,7 @@ impl StorageLeafConfig { &key_rlc, &value_rlp_rlc, &drifted_item, + &config.is_mod_extension, &ctx.r, ); @@ -298,6 +298,12 @@ impl StorageLeafConfig { let mut key_rlc = vec![0.scalar(); 2]; let mut value_rlc = vec![0.scalar(); 2]; for is_s in [true, false] { + self.is_mod_extension[is_s.idx()].assign( + region, + offset, + storage.is_mod_extension[is_s.idx()].scalar(), + )?; + parent_data[is_s.idx()] = self.parent_data[is_s.idx()].witness_load( region, offset, @@ -370,7 +376,6 @@ impl StorageLeafConfig { F::ZERO, true, false, - false, F::ZERO, )?; diff --git a/zkevm-circuits/src/mpt_circuit/tests/ExtNodeInsertedBefore6After1FirstLevel.json b/zkevm-circuits/src/mpt_circuit/tests/ExtNodeInsertedBefore6After1FirstLevel.json index 0fe4ec547f..637b71bad3 100644 --- a/zkevm-circuits/src/mpt_circuit/tests/ExtNodeInsertedBefore6After1FirstLevel.json +++ b/zkevm-circuits/src/mpt_circuit/tests/ExtNodeInsertedBefore6After1FirstLevel.json @@ -1 +1 @@ -[{"start":{"proof_type":"StorageChanged"},"extension_branch":null,"account":null,"storage":null,"values":[[160,196,2,26,26,106,225,221,12,76,37,34,74,179,183,124,197,101,241,185,190,58,194,167,226,94,223,48,69,159,146,219,99,0],[160,217,89,108,220,152,53,96,78,250,32,99,38,54,193,98,242,246,41,106,183,38,23,39,247,138,25,252,254,199,143,91,34,0]],"keccak_data":[]},{"start":null,"extension_branch":{"is_extension":false,"is_mod_extension":[false,false],"is_placeholder":[false,false],"extension":{"list_rlp_bytes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"branch":{"modified_index":13,"drifted_index":13,"list_rlp_bytes":[[249,1,17],[249,1,17]]}},"account":null,"storage":null,"values":[[160,191,224,199,202,171,53,31,93,165,38,178,144,29,54,22,236,1,39,138,129,79,69,153,206,45,132,10,154,161,201,173,27,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,171,140,219,128,140,131,3,187,97,251,72,226,118,33,123,233,119,15,168,62,207,63,144,242,35,77,85,136,133,245,171,241,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,26,105,126,129,71,88,40,25,114,252,209,59,201,112,125,188,210,241,149,152,107,5,70,61,123,120,66,101,8,68,90,4,0],[160,181,215,169,27,229,238,39,60,206,39,226,173,154,22,13,47,170,221,90,107,165,24,211,132,1,155,104,114,138,79,98,244,0],[160,1,93,157,250,143,77,232,32,221,142,47,226,14,13,43,14,192,75,172,229,153,193,44,126,18,79,209,97,168,55,182,199,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,46,13,134,195,190,253,23,127,87,74,32,172,99,128,69,50,136,144,119,233,85,50,12,147,97,205,16,183,204,111,88,9,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,99,1,179,155,46,168,164,77,248,176,53,97,32,219,100,183,136,231,31,82,225,215,166,48,157,13,46,91,134,254,231,203,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,7,217,139,33,31,135,69,136,168,155,137,71,170,155,249,239,114,36,88,170,13,85,20,253,26,96,139,16,76,181,115,139,0],[160,102,167,102,40,17,73,27,61,53,46,150,149,6,180,32,210,105,232,181,26,34,79,87,75,59,56,179,70,63,67,240,9,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"keccak_data":[[249,1,17,128,160,171,140,219,128,140,131,3,187,97,251,72,226,118,33,123,233,119,15,168,62,207,63,144,242,35,77,85,136,133,245,171,241,128,128,160,26,105,126,129,71,88,40,25,114,252,209,59,201,112,125,188,210,241,149,152,107,5,70,61,123,120,66,101,8,68,90,4,160,181,215,169,27,229,238,39,60,206,39,226,173,154,22,13,47,170,221,90,107,165,24,211,132,1,155,104,114,138,79,98,244,160,1,93,157,250,143,77,232,32,221,142,47,226,14,13,43,14,192,75,172,229,153,193,44,126,18,79,209,97,168,55,182,199,128,160,46,13,134,195,190,253,23,127,87,74,32,172,99,128,69,50,136,144,119,233,85,50,12,147,97,205,16,183,204,111,88,9,128,160,99,1,179,155,46,168,164,77,248,176,53,97,32,219,100,183,136,231,31,82,225,215,166,48,157,13,46,91,134,254,231,203,128,128,160,7,217,139,33,31,135,69,136,168,155,137,71,170,155,249,239,114,36,88,170,13,85,20,253,26,96,139,16,76,181,115,139,160,102,167,102,40,17,73,27,61,53,46,150,149,6,180,32,210,105,232,181,26,34,79,87,75,59,56,179,70,63,67,240,9,128,128],[249,1,17,128,160,171,140,219,128,140,131,3,187,97,251,72,226,118,33,123,233,119,15,168,62,207,63,144,242,35,77,85,136,133,245,171,241,128,128,160,26,105,126,129,71,88,40,25,114,252,209,59,201,112,125,188,210,241,149,152,107,5,70,61,123,120,66,101,8,68,90,4,160,181,215,169,27,229,238,39,60,206,39,226,173,154,22,13,47,170,221,90,107,165,24,211,132,1,155,104,114,138,79,98,244,160,1,93,157,250,143,77,232,32,221,142,47,226,14,13,43,14,192,75,172,229,153,193,44,126,18,79,209,97,168,55,182,199,128,160,46,13,134,195,190,253,23,127,87,74,32,172,99,128,69,50,136,144,119,233,85,50,12,147,97,205,16,183,204,111,88,9,128,160,99,1,179,155,46,168,164,77,248,176,53,97,32,219,100,183,136,231,31,82,225,215,166,48,157,13,46,91,134,254,231,203,128,128,160,191,224,199,202,171,53,31,93,165,38,178,144,29,54,22,236,1,39,138,129,79,69,153,206,45,132,10,154,161,201,173,27,160,102,167,102,40,17,73,27,61,53,46,150,149,6,180,32,210,105,232,181,26,34,79,87,75,59,56,179,70,63,67,240,9,128,128]]},{"start":null,"extension_branch":{"is_extension":false,"is_mod_extension":[false,false],"is_placeholder":[false,false],"extension":{"list_rlp_bytes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"branch":{"modified_index":14,"drifted_index":14,"list_rlp_bytes":[[248,81],[248,81]]}},"account":null,"storage":null,"values":[[160,63,14,220,71,237,7,186,192,180,244,23,225,13,152,157,235,66,43,251,216,50,207,153,79,92,4,226,223,80,223,196,118,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,237,47,186,19,31,173,234,222,177,8,47,86,95,255,22,206,176,8,246,147,5,110,49,64,32,71,22,192,115,156,241,224,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,50,25,52,182,32,166,70,162,117,162,223,32,246,234,30,143,83,192,162,83,137,150,99,53,135,78,15,98,145,162,237,192,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"keccak_data":[[248,81,128,128,128,128,128,160,237,47,186,19,31,173,234,222,177,8,47,86,95,255,22,206,176,8,246,147,5,110,49,64,32,71,22,192,115,156,241,224,128,128,128,128,128,128,128,128,160,50,25,52,182,32,166,70,162,117,162,223,32,246,234,30,143,83,192,162,83,137,150,99,53,135,78,15,98,145,162,237,192,128,128],[248,81,128,128,128,128,128,160,237,47,186,19,31,173,234,222,177,8,47,86,95,255,22,206,176,8,246,147,5,110,49,64,32,71,22,192,115,156,241,224,128,128,128,128,128,128,128,128,160,63,14,220,71,237,7,186,192,180,244,23,225,13,152,157,235,66,43,251,216,50,207,153,79,92,4,226,223,80,223,196,118,128,128]]},{"start":null,"extension_branch":null,"account":{"address":[222,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184],"list_rlp_bytes":[[248,105],[248,105]],"value_rlp_bytes":[[184,70],[184,70]],"value_list_rlp_bytes":[[248,68],[248,68]],"drifted_rlp_bytes":[0],"wrong_rlp_bytes":[248,105]},"storage":null,"values":[[160,32,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184,0],[160,32,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,178,52,245,124,146,121,71,104,224,244,106,101,49,104,216,192,36,154,13,33,172,6,170,90,32,189,179,225,220,154,181,25,0],[160,197,210,70,1,134,247,35,60,146,126,125,178,220,199,3,192,229,0,182,83,202,130,39,59,123,250,216,4,93,133,164,112,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,22,181,3,85,36,7,250,7,215,28,195,199,57,98,216,54,21,83,211,187,107,55,193,94,61,117,188,27,185,232,249,168,0],[160,197,210,70,1,134,247,35,60,146,126,125,178,220,199,3,192,229,0,182,83,202,130,39,59,123,250,216,4,93,133,164,112,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,32,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184,0]],"keccak_data":[[248,105,160,32,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184,184,70,248,68,128,128,160,178,52,245,124,146,121,71,104,224,244,106,101,49,104,216,192,36,154,13,33,172,6,170,90,32,189,179,225,220,154,181,25,160,197,210,70,1,134,247,35,60,146,126,125,178,220,199,3,192,229,0,182,83,202,130,39,59,123,250,216,4,93,133,164,112],[248,105,160,32,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184,184,70,248,68,128,128,160,22,181,3,85,36,7,250,7,215,28,195,199,57,98,216,54,21,83,211,187,107,55,193,94,61,117,188,27,185,232,249,168,160,197,210,70,1,134,247,35,60,146,126,125,178,220,199,3,192,229,0,182,83,202,130,39,59,123,250,216,4,93,133,164,112]]},{"start":null,"extension_branch":{"is_extension":true,"is_mod_extension":[true,false],"is_placeholder":[true,false],"extension":{"list_rlp_bytes":[229]},"branch":{"modified_index":4,"drifted_index":5,"list_rlp_bytes":[[248,81],[248,81]]}},"account":null,"storage":null,"values":[[160,150,211,202,176,95,39,99,148,53,7,78,23,103,60,54,151,214,125,33,77,252,210,129,205,147,239,148,121,185,128,44,121,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,150,211,202,176,95,39,99,148,53,7,78,23,103,60,54,151,214,125,33,77,252,210,129,205,147,239,148,121,185,128,44,121,0],[160,134,147,35,135,237,115,34,121,72,150,200,140,117,199,41,175,235,226,105,245,236,184,245,102,63,223,69,122,89,102,42,103,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[131,0,18,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,12,35,7,155,156,85,183,211,57,104,206,89,248,170,4,245,54,226,201,78,219,117,50,253,135,98,7,168,230,100,142,223,0],[0,0,2,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,12,35,7,155,156,85,183,211,57,104,206,89,248,170,4,245,54,226,201,78,219,117,50,253,135,98,7,168,230,100,142,223,0]],"keccak_data":[[248,81,128,128,128,128,160,150,211,202,176,95,39,99,148,53,7,78,23,103,60,54,151,214,125,33,77,252,210,129,205,147,239,148,121,185,128,44,121,160,134,147,35,135,237,115,34,121,72,150,200,140,117,199,41,175,235,226,105,245,236,184,245,102,63,223,69,122,89,102,42,103,128,128,128,128,128,128,128,128,128,128,128],[248,81,128,128,128,128,160,150,211,202,176,95,39,99,148,53,7,78,23,103,60,54,151,214,125,33,77,252,210,129,205,147,239,148,121,185,128,44,121,160,134,147,35,135,237,115,34,121,72,150,200,140,117,199,41,175,235,226,105,245,236,184,245,102,63,223,69,122,89,102,42,103,128,128,128,128,128,128,128,128,128,128,128],[229,131,0,18,52,160,12,35,7,155,156,85,183,211,57,104,206,89,248,170,4,245,54,226,201,78,219,117,50,253,135,98,7,168,230,100,142,223],[229,131,0,18,52,160,12,35,7,155,156,85,183,211,57,104,206,89,248,170,4,245,54,226,201,78,219,117,50,253,135,98,7,168,230,100,142,223]]},{"start":null,"extension_branch":null,"account":null,"storage":{"list_rlp_bytes":[[226],[226]],"value_rlp_bytes":[[0],[130]],"drifted_rlp_bytes":[0],"wrong_rlp_bytes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"values":[[158,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[158,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[129,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"keccak_data":[[226,158,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,129,187],[226,158,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,129,187]]},{"start":{"proof_type":"Disabled"},"extension_branch":null,"account":null,"storage":null,"values":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"keccak_data":[]}] \ No newline at end of file +[{"start":{"proof_type":"StorageChanged"},"extension_branch":null,"account":null,"storage":null,"values":[[160,225,153,66,206,34,187,187,237,46,128,158,11,239,2,175,201,225,73,160,242,33,18,117,91,6,122,232,181,255,25,179,96,0],[160,4,228,215,248,250,25,167,144,173,93,143,111,129,26,110,117,39,195,210,121,161,168,122,226,252,189,105,170,2,158,127,72,0]],"keccak_data":[]},{"start":null,"extension_branch":{"is_extension":false,"is_mod_extension":[false,false],"is_placeholder":[false,false],"extension":{"list_rlp_bytes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"branch":{"modified_index":13,"drifted_index":13,"list_rlp_bytes":[[249,1,17],[249,1,17]]}},"account":null,"storage":null,"values":[[160,96,119,75,56,246,21,83,155,174,172,153,143,142,114,203,214,234,255,218,74,246,12,233,190,9,159,0,237,49,218,211,142,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,171,140,219,128,140,131,3,187,97,251,72,226,118,33,123,233,119,15,168,62,207,63,144,242,35,77,85,136,133,245,171,241,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,26,105,126,129,71,88,40,25,114,252,209,59,201,112,125,188,210,241,149,152,107,5,70,61,123,120,66,101,8,68,90,4,0],[160,181,215,169,27,229,238,39,60,206,39,226,173,154,22,13,47,170,221,90,107,165,24,211,132,1,155,104,114,138,79,98,244,0],[160,194,199,153,182,10,12,214,172,212,44,16,21,81,40,114,232,108,24,107,207,25,110,133,6,30,118,132,47,59,124,248,96,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,46,13,134,195,190,253,23,127,87,74,32,172,99,128,69,50,136,144,119,233,85,50,12,147,97,205,16,183,204,111,88,9,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,99,1,179,155,46,168,164,77,248,176,53,97,32,219,100,183,136,231,31,82,225,215,166,48,157,13,46,91,134,254,231,203,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,169,117,229,11,102,201,233,193,55,44,196,145,76,43,10,146,77,86,164,106,209,199,90,71,107,162,153,7,201,0,132,42,0],[160,102,167,102,40,17,73,27,61,53,46,150,149,6,180,32,210,105,232,181,26,34,79,87,75,59,56,179,70,63,67,240,9,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"keccak_data":[[249,1,17,128,160,171,140,219,128,140,131,3,187,97,251,72,226,118,33,123,233,119,15,168,62,207,63,144,242,35,77,85,136,133,245,171,241,128,128,160,26,105,126,129,71,88,40,25,114,252,209,59,201,112,125,188,210,241,149,152,107,5,70,61,123,120,66,101,8,68,90,4,160,181,215,169,27,229,238,39,60,206,39,226,173,154,22,13,47,170,221,90,107,165,24,211,132,1,155,104,114,138,79,98,244,160,194,199,153,182,10,12,214,172,212,44,16,21,81,40,114,232,108,24,107,207,25,110,133,6,30,118,132,47,59,124,248,96,128,160,46,13,134,195,190,253,23,127,87,74,32,172,99,128,69,50,136,144,119,233,85,50,12,147,97,205,16,183,204,111,88,9,128,160,99,1,179,155,46,168,164,77,248,176,53,97,32,219,100,183,136,231,31,82,225,215,166,48,157,13,46,91,134,254,231,203,128,128,160,169,117,229,11,102,201,233,193,55,44,196,145,76,43,10,146,77,86,164,106,209,199,90,71,107,162,153,7,201,0,132,42,160,102,167,102,40,17,73,27,61,53,46,150,149,6,180,32,210,105,232,181,26,34,79,87,75,59,56,179,70,63,67,240,9,128,128],[249,1,17,128,160,171,140,219,128,140,131,3,187,97,251,72,226,118,33,123,233,119,15,168,62,207,63,144,242,35,77,85,136,133,245,171,241,128,128,160,26,105,126,129,71,88,40,25,114,252,209,59,201,112,125,188,210,241,149,152,107,5,70,61,123,120,66,101,8,68,90,4,160,181,215,169,27,229,238,39,60,206,39,226,173,154,22,13,47,170,221,90,107,165,24,211,132,1,155,104,114,138,79,98,244,160,194,199,153,182,10,12,214,172,212,44,16,21,81,40,114,232,108,24,107,207,25,110,133,6,30,118,132,47,59,124,248,96,128,160,46,13,134,195,190,253,23,127,87,74,32,172,99,128,69,50,136,144,119,233,85,50,12,147,97,205,16,183,204,111,88,9,128,160,99,1,179,155,46,168,164,77,248,176,53,97,32,219,100,183,136,231,31,82,225,215,166,48,157,13,46,91,134,254,231,203,128,128,160,96,119,75,56,246,21,83,155,174,172,153,143,142,114,203,214,234,255,218,74,246,12,233,190,9,159,0,237,49,218,211,142,160,102,167,102,40,17,73,27,61,53,46,150,149,6,180,32,210,105,232,181,26,34,79,87,75,59,56,179,70,63,67,240,9,128,128]]},{"start":null,"extension_branch":{"is_extension":false,"is_mod_extension":[false,false],"is_placeholder":[false,false],"extension":{"list_rlp_bytes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"branch":{"modified_index":14,"drifted_index":14,"list_rlp_bytes":[[248,113],[248,113]]}},"account":null,"storage":null,"values":[[160,63,14,220,71,237,7,186,192,180,244,23,225,13,152,157,235,66,43,251,216,50,207,153,79,92,4,226,223,80,223,196,118,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,130,223,138,93,140,13,9,227,196,215,111,173,173,252,115,51,167,29,223,111,193,74,53,34,177,202,24,136,204,186,44,255,0],[160,237,47,186,19,31,173,234,222,177,8,47,86,95,255,22,206,176,8,246,147,5,110,49,64,32,71,22,192,115,156,241,224,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,50,25,52,182,32,166,70,162,117,162,223,32,246,234,30,143,83,192,162,83,137,150,99,53,135,78,15,98,145,162,237,192,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"keccak_data":[[248,113,128,128,128,128,160,130,223,138,93,140,13,9,227,196,215,111,173,173,252,115,51,167,29,223,111,193,74,53,34,177,202,24,136,204,186,44,255,160,237,47,186,19,31,173,234,222,177,8,47,86,95,255,22,206,176,8,246,147,5,110,49,64,32,71,22,192,115,156,241,224,128,128,128,128,128,128,128,128,160,50,25,52,182,32,166,70,162,117,162,223,32,246,234,30,143,83,192,162,83,137,150,99,53,135,78,15,98,145,162,237,192,128,128],[248,113,128,128,128,128,160,130,223,138,93,140,13,9,227,196,215,111,173,173,252,115,51,167,29,223,111,193,74,53,34,177,202,24,136,204,186,44,255,160,237,47,186,19,31,173,234,222,177,8,47,86,95,255,22,206,176,8,246,147,5,110,49,64,32,71,22,192,115,156,241,224,128,128,128,128,128,128,128,128,160,63,14,220,71,237,7,186,192,180,244,23,225,13,152,157,235,66,43,251,216,50,207,153,79,92,4,226,223,80,223,196,118,128,128]]},{"start":null,"extension_branch":null,"account":{"address":[222,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184],"list_rlp_bytes":[[248,105],[248,105]],"value_rlp_bytes":[[184,70],[184,70]],"value_list_rlp_bytes":[[248,68],[248,68]],"drifted_rlp_bytes":[0],"wrong_rlp_bytes":[248,105],"is_mod_extension":[false,false]},"storage":null,"values":[[160,32,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184,0],[160,32,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,178,52,245,124,146,121,71,104,224,244,106,101,49,104,216,192,36,154,13,33,172,6,170,90,32,189,179,225,220,154,181,25,0],[160,197,210,70,1,134,247,35,60,146,126,125,178,220,199,3,192,229,0,182,83,202,130,39,59,123,250,216,4,93,133,164,112,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,22,181,3,85,36,7,250,7,215,28,195,199,57,98,216,54,21,83,211,187,107,55,193,94,61,117,188,27,185,232,249,168,0],[160,197,210,70,1,134,247,35,60,146,126,125,178,220,199,3,192,229,0,182,83,202,130,39,59,123,250,216,4,93,133,164,112,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,32,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184,0]],"keccak_data":[[248,105,160,32,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184,184,70,248,68,128,128,160,178,52,245,124,146,121,71,104,224,244,106,101,49,104,216,192,36,154,13,33,172,6,170,90,32,189,179,225,220,154,181,25,160,197,210,70,1,134,247,35,60,146,126,125,178,220,199,3,192,229,0,182,83,202,130,39,59,123,250,216,4,93,133,164,112],[248,105,160,32,120,246,184,198,61,33,45,197,58,196,129,133,210,48,128,228,223,90,105,143,227,55,221,219,111,227,231,120,76,129,184,184,70,248,68,128,128,160,22,181,3,85,36,7,250,7,215,28,195,199,57,98,216,54,21,83,211,187,107,55,193,94,61,117,188,27,185,232,249,168,160,197,210,70,1,134,247,35,60,146,126,125,178,220,199,3,192,229,0,182,83,202,130,39,59,123,250,216,4,93,133,164,112]]},{"start":null,"extension_branch":{"is_extension":true,"is_mod_extension":[true,false],"is_placeholder":[true,false],"extension":{"list_rlp_bytes":[229]},"branch":{"modified_index":4,"drifted_index":5,"list_rlp_bytes":[[248,81],[248,81]]}},"account":null,"storage":null,"values":[[160,150,211,202,176,95,39,99,148,53,7,78,23,103,60,54,151,214,125,33,77,252,210,129,205,147,239,148,121,185,128,44,121,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,150,211,202,176,95,39,99,148,53,7,78,23,103,60,54,151,214,125,33,77,252,210,129,205,147,239,148,121,185,128,44,121,0],[160,134,147,35,135,237,115,34,121,72,150,200,140,117,199,41,175,235,226,105,245,236,184,245,102,63,223,69,122,89,102,42,103,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[131,0,18,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,12,35,7,155,156,85,183,211,57,104,206,89,248,170,4,245,54,226,201,78,219,117,50,253,135,98,7,168,230,100,142,223,0],[0,0,2,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[160,12,35,7,155,156,85,183,211,57,104,206,89,248,170,4,245,54,226,201,78,219,117,50,253,135,98,7,168,230,100,142,223,0]],"keccak_data":[[248,81,128,128,128,128,160,150,211,202,176,95,39,99,148,53,7,78,23,103,60,54,151,214,125,33,77,252,210,129,205,147,239,148,121,185,128,44,121,160,134,147,35,135,237,115,34,121,72,150,200,140,117,199,41,175,235,226,105,245,236,184,245,102,63,223,69,122,89,102,42,103,128,128,128,128,128,128,128,128,128,128,128],[248,81,128,128,128,128,160,150,211,202,176,95,39,99,148,53,7,78,23,103,60,54,151,214,125,33,77,252,210,129,205,147,239,148,121,185,128,44,121,160,134,147,35,135,237,115,34,121,72,150,200,140,117,199,41,175,235,226,105,245,236,184,245,102,63,223,69,122,89,102,42,103,128,128,128,128,128,128,128,128,128,128,128],[229,131,0,18,52,160,12,35,7,155,156,85,183,211,57,104,206,89,248,170,4,245,54,226,201,78,219,117,50,253,135,98,7,168,230,100,142,223],[229,131,0,18,52,160,12,35,7,155,156,85,183,211,57,104,206,89,248,170,4,245,54,226,201,78,219,117,50,253,135,98,7,168,230,100,142,223]]},{"start":null,"extension_branch":null,"account":null,"storage":{"list_rlp_bytes":[[226],[226]],"value_rlp_bytes":[[0],[130]],"drifted_rlp_bytes":[0],"wrong_rlp_bytes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"is_mod_extension":[true,false]},"values":[[158,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[158,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[129,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"keccak_data":[[226,158,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,129,187],[226,158,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,129,187]]},{"start":{"proof_type":"Disabled"},"extension_branch":null,"account":null,"storage":null,"values":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"keccak_data":[]}] \ No newline at end of file diff --git a/zkevm-circuits/src/mpt_circuit/witness_row.rs b/zkevm-circuits/src/mpt_circuit/witness_row.rs index 9ac0d2fb03..5d9595ebae 100644 --- a/zkevm-circuits/src/mpt_circuit/witness_row.rs +++ b/zkevm-circuits/src/mpt_circuit/witness_row.rs @@ -102,6 +102,7 @@ pub struct AccountNode { pub(crate) value_list_rlp_bytes: [Vec; 2], pub(crate) drifted_rlp_bytes: Vec, pub(crate) wrong_rlp_bytes: Vec, + pub(crate) is_mod_extension: [bool; 2], } /// MPT storage node @@ -111,6 +112,7 @@ pub struct StorageNode { pub(crate) value_rlp_bytes: [Vec; 2], pub(crate) drifted_rlp_bytes: Vec, pub(crate) wrong_rlp_bytes: Vec, + pub(crate) is_mod_extension: [bool; 2], } /// MPT node