-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(avm): make fixed tables use constant polys (#7744)
The witnesses are gone but these columns are still NOT correctly loaded from the pk/vk.
- Loading branch information
Showing
15 changed files
with
684 additions
and
791 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
include "fixed/byte_lookup.pil"; | ||
|
||
namespace binary(256); | ||
|
||
pol commit clk; | ||
|
||
// Selector for Binary Operation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
namespace byte_lookup(256); | ||
// These columns are commited for now, but will be migrated to constant/fixed when | ||
// we support more *exotic* code generation options | ||
pol commit table_op_id; // identifies if operation is AND/OR/XOR | ||
pol commit table_input_a; // column of all 8-bit numbers | ||
pol commit table_input_b; // column of all 8-bit numbers | ||
pol commit table_output; // output = a AND/OR/XOR b | ||
pol constant table_op_id; // identifies if operation is AND/OR/XOR | ||
pol constant table_input_a; // column of all 8-bit numbers | ||
pol constant table_input_b; // column of all 8-bit numbers | ||
pol constant table_output; // output = a AND/OR/XOR b | ||
// Selector to indicate when to utilise the lookup table | ||
// TODO: Support for 1-sided lookups may make this redundant. | ||
pol commit sel_bin; | ||
pol constant sel_bin; | ||
|
||
// These two columns are a mapping between instruction tags and their byte lengths | ||
// {U8: 1, U16: 2, ... , U128: 16} | ||
pol commit table_in_tags; // Column of U8,U16,...,U128 | ||
pol commit table_byte_lengths; // Columns of byte lengths 1,2,...,16; | ||
pol constant table_in_tags; // Column of U8,U16,...,U128 | ||
pol constant table_byte_lengths; // Columns of byte lengths 1,2,...,16; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
namespace gas(256); | ||
// TODO: WILL BE FIXED - we should be able to have this be a fixed column / the lookup tables are fixed so require no selectors | ||
// TODO: All the columns here will have to be constant (when supported by our powdr fork and proving system) | ||
pol commit sel_gas_cost; | ||
pol constant sel_gas_cost; | ||
|
||
// TODO(ISSUE_NUMBER): Constrain variable gas costs | ||
pol commit l2_gas_fixed_table; | ||
pol commit da_gas_fixed_table; | ||
|
||
// DUMMY RELATIONS to force creation of hpp. | ||
sel_gas_cost - sel_gas_cost = 0; | ||
l2_gas_fixed_table - l2_gas_fixed_table = 0; | ||
da_gas_fixed_table - da_gas_fixed_table = 0; | ||
pol constant l2_gas_fixed_table; | ||
pol constant da_gas_fixed_table; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.