From b009a59e1d927be46aeb09e87b24d7a51480ece7 Mon Sep 17 00:00:00 2001 From: Alexander B <137616408+alexanderblv@users.noreply.github.com> Date: Thu, 13 Jun 2024 08:14:02 +0300 Subject: [PATCH 1/5] Update test_ctx.rs --- mock/src/test_ctx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mock/src/test_ctx.rs b/mock/src/test_ctx.rs index dcf3877da3..5fc0b58b18 100644 --- a/mock/src/test_ctx.rs +++ b/mock/src/test_ctx.rs @@ -1,4 +1,4 @@ -//! Mock types and functions to generate Test enviroments for ZKEVM tests +//! Mock types and functions to generate Test environments for ZKEVM tests use crate::{eth, MockAccount, MockBlock, MockTransaction, MOCK_WALLETS}; #[cfg(feature = "scroll")] From 6fab099b1f07fd35719da085ec30a900b916d9c3 Mon Sep 17 00:00:00 2001 From: Alexander B <137616408+alexanderblv@users.noreply.github.com> Date: Thu, 13 Jun 2024 08:20:50 +0300 Subject: [PATCH 2/5] Update State_Circuit.md --- docs/State_Circuit.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/State_Circuit.md b/docs/State_Circuit.md index 6ec068f737..766c24554a 100644 --- a/docs/State_Circuit.md +++ b/docs/State_Circuit.md @@ -178,7 +178,7 @@ We illustrate the `Queries` data structure as below: - `selector`: this is the `selector` from State Circuit's configuration - `rw_table`: `RwRableQueries`, this follows from `rw_table` and adds some previous data. It includes the following items: `rw_counter`, `prev_rw_counter`, `is_write`, `tag`, `id`, `prev_id`, `address`, `prev_address`, `field_tag`, `storage_key`, `value`, `value_prev` - `mpt_update_table`: `MptUpdateTableQueries`, this is the same as in MPT table. It includes the following items: `address`, `storage_key`, `proof_type`, `new_root`, `old_root`, `new_value`, `old_value` - - `lexicographic_ordering_selector`: this is the selector column for the `lexigoragphic_ordering` chip + - `lexicographic_ordering_selector`: this is the selector column for the `lexicoragphic_ordering` chip - `rw_counter`: `MpiQueries`, this is the query for `multiple_precision_integer` chip. It contains the limbs with number = `N_LIMBS_RW_COUNTER` and the previous limbs - `tag_bits`: the 4-bit representation for the `tag` column in `rw_table` - `id`: `MpiQueries`, limbs and previous limbs for `id` with number = `N_LIMBS_ID` From 547cc4aa6ea6888a5f6a70ef6bd29d98ac66f0b2 Mon Sep 17 00:00:00 2001 From: Alexander B <137616408+alexanderblv@users.noreply.github.com> Date: Thu, 13 Jun 2024 08:27:12 +0300 Subject: [PATCH 3/5] Update State_Circuit.md --- docs/State_Circuit.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/State_Circuit.md b/docs/State_Circuit.md index 766c24554a..0b88676b06 100644 --- a/docs/State_Circuit.md +++ b/docs/State_Circuit.md @@ -176,7 +176,7 @@ SubConfigurations --> ConstraintSystem We illustrate the `Queries` data structure as below: - `Queries` - `selector`: this is the `selector` from State Circuit's configuration - - `rw_table`: `RwRableQueries`, this follows from `rw_table` and adds some previous data. It includes the following items: `rw_counter`, `prev_rw_counter`, `is_write`, `tag`, `id`, `prev_id`, `address`, `prev_address`, `field_tag`, `storage_key`, `value`, `value_prev` + - `rw_table`: `RwTableQueries`, this follows from `rw_table` and adds some previous data. It includes the following items: `rw_counter`, `prev_rw_counter`, `is_write`, `tag`, `id`, `prev_id`, `address`, `prev_address`, `field_tag`, `storage_key`, `value`, `value_prev` - `mpt_update_table`: `MptUpdateTableQueries`, this is the same as in MPT table. It includes the following items: `address`, `storage_key`, `proof_type`, `new_root`, `old_root`, `new_value`, `old_value` - `lexicographic_ordering_selector`: this is the selector column for the `lexicoragphic_ordering` chip - `rw_counter`: `MpiQueries`, this is the query for `multiple_precision_integer` chip. It contains the limbs with number = `N_LIMBS_RW_COUNTER` and the previous limbs From 7c974ef43d436446a1d659c0a792b27eaadea5ff Mon Sep 17 00:00:00 2001 From: Alexander B <137616408+alexanderblv@users.noreply.github.com> Date: Thu, 13 Jun 2024 08:29:01 +0300 Subject: [PATCH 4/5] Update State_Circuit.md --- docs/State_Circuit.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/State_Circuit.md b/docs/State_Circuit.md index 0b88676b06..7df2cdbd79 100644 --- a/docs/State_Circuit.md +++ b/docs/State_Circuit.md @@ -236,7 +236,7 @@ This chip helps to check a list of values are all 0. This is applied to check wh ### Constraints -Since there is a large number of misallenous constraints in the State Circuit, here we'll only take one example to give the reader an impression of the style of constraints in State Circuit. +Since there is a large number of miscellaneous constraints in the State Circuit, here we'll only take one example to give the reader an impression of the style of constraints in State Circuit. We discuss account constraints, which are established in the `ConstraintBuilder`. From 28e2219fc41280393839ced39e2644b13a240e50 Mon Sep 17 00:00:00 2001 From: Alexander B <137616408+alexanderblv@users.noreply.github.com> Date: Thu, 13 Jun 2024 08:34:12 +0300 Subject: [PATCH 5/5] Update State_Circuit.md --- docs/State_Circuit.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/State_Circuit.md b/docs/State_Circuit.md index 7df2cdbd79..5fbb15639f 100644 --- a/docs/State_Circuit.md +++ b/docs/State_Circuit.md @@ -71,7 +71,7 @@ State Circuit aims to prove that the `rw_table` is formed correctly. This result ### Circuit Layout -State Circuit is configured as a constraint system through various smaller gadgets and chips, where each gadget or chip may consist of Halo2 columns (fixed or advice) or even smaller gadgets or chips. Due to this reason, although we can think of the State Circuit layout in a geometric way as horizontally aligned regions of columns belonging to each of its sub-configurations, it may be better to think in a hierarchical way (tree-like structure). In the below, we describe this hierarchy through the configuration of State Circuit, where each sub-configuration at its smallest gratuity of bifurcation lands in some column of the circuit layout (one can click the interior nodes of the hierarchy tree below to expand/contract the next level): +State Circuit is configured as a constraint system through various smaller gadgets and chips, where each gadget or chip may consist of Halo2 columns (fixed or advice) or even smaller gadgets or chips. Due to this reason, although we can think of the State Circuit layout in a geometric way as horizontally aligned regions of columns belonging to each of its sub-configurations, it may be better to think in a hierarchical way (tree-like structure). In the below, we describe this hierarchy through the configuration of State Circuit, where each sub-configuration at its smallest granularity of bifurcation lands in some column of the circuit layout (one can click the interior nodes of the hierarchy tree below to expand/contract the next level): ```markmap # State Circuit Configuration