4514 Commits

Author SHA1 Message Date
Robin Salen
1b7207ee68
Merge pull request #1244 from topos-protocol/block_metadata_doc
Add some doc for BlockMetadata / ExtraBlockData
2023-09-20 06:24:38 -04:00
Robin Salen
459e9b3d29
Merge pull request #1245 from topos-protocol/indexing_tables
Update ranges indices
2023-09-19 19:46:20 -04:00
Robin Salen
d8874c8389
Update ranges indices 2023-09-19 18:39:25 -04:00
Nicholas Ward
c468465ca2
Merge pull request #1243 from tamirhemo/main
refactor: separate witness generation in prove method
2023-09-19 14:32:19 -07:00
Robin Salen
edd3f383a1
Add some doc for BlockMetadata / ExtraBlockData 2023-09-19 15:42:23 -04:00
Hamy Ratoanina
8a19f43678
Merge pull request #1242 from topos-protocol/fix_multi_row_ctl
Fix eval_table, multi-row filters
2023-09-19 21:16:31 +02:00
Tamir Hemo
8839285f4d add trait bound 2023-09-19 11:45:42 -07:00
Tamir Hemo
a44379b5a1 fmt and clippy 2023-09-19 11:39:20 -07:00
Tamir Hemo
7d7f01da46 refactor prove method 2023-09-19 11:32:13 -07:00
Hamy Ratoanina
4eb6a3b57c
Fix eval_table 2023-09-19 14:03:57 -04:00
Robin Salen
b60a3d4b29
Merge pull request #1239 from topos-protocol/mload_mstore_with_packing 2023-09-19 06:23:01 -04:00
Robin Salen
053553d4d7
Reuse new packing instructions for MLOAD and MSTORE 2023-09-18 16:31:46 -04:00
Robin Salen
696377bae7
Merge pull request #1231 from topos-protocol/error_vs_panic
Remove risks of panic
2023-09-18 14:55:55 -04:00
Robin Salen
b5c28bd65e
Rename utility methods for U256 conversion
Co-authored-by: Nicholas Ward <npward@berkeley.edu>
2023-09-18 14:29:11 -04:00
Robin Salen
f07351fc36
Merge pull request #1238 from topos-protocol/cleanup
Cleanup lookup_test module and reduce module visibility
2023-09-18 10:16:55 -04:00
Robin Salen
f3ea95cacc
Merge branch 'main' into error_vs_panic 2023-09-18 09:59:52 -04:00
Robin Salen
c4be838af4
Typo 2023-09-18 09:59:48 -04:00
Robin Salen
d1c00767bd
Cleanup lookup_test module and reduce module visibility 2023-09-18 09:50:31 -04:00
Hamy Ratoanina
15064b3aa7
Merge pull request #1229 from topos-protocol/next_row_ctls
Make next row available to CTLs
2023-09-18 15:19:10 +02:00
Hamy Ratoanina
1a4caaa08f
Move next row logic inside Column
Co-authored-by: Nicholas Ward <npward@berkeley.edu>
2023-09-15 18:59:33 -04:00
Robin Salen
8903aec129
Change padding rule for CPU (#1234)
* Change padding rule for CPU

* Disable memory channels for padding rows

* Apply some of Jacqueline's comments

* Update halt routine

* Add clarifying comment

* Redundant constraints and padding bug

* Revert "Remove is_bootstrap_kernel column"

This reverts commit 49d92cb8f1b0ae9de76872f76af4429699ff692f.

* Make halt_state implicit

* Move halting logic constraints to dedicated module

* Include new module

* Update some comments
2023-09-15 17:46:58 -04:00
Nicholas Ward
1afcafaded
Merge pull request #1236 from topos-protocol/ci
Update clippy in CI
2023-09-15 09:57:24 -07:00
Robin Salen
5db6abf026
Update clippy in CI 2023-09-15 11:52:14 -04:00
Linda Guiga
d4a8026bf9
Combine mstore_general and mload_general into one flag (#1188)
* Combine mstore_general and mload_general into one flag

* Add comments and make stack constraints cleaner.

* Fix number of native instructions

* Ordering

* Cleanup

* Update calls to stack eval from latest main

---------

Co-authored-by: Robin Salen <salenrobin@gmail.com>
2023-09-14 19:51:02 -04:00
Hamy Ratoanina
27d9113feb
Merge branch 'main' into next_row_ctls 2023-09-14 18:38:49 -04:00
Hamy Ratoanina
0b5ac312c0
Merge pull request #1203 from topos-protocol/constrain_nv_stack_len
Constrain next row's stack length
2023-09-14 22:42:32 +02:00
Robin Salen
19220b21d7
Remove redundant Keccak sponge cols (#1233)
* Rename columns in KeccakSponge for clarity

* Remove redundant columns

* Apply comments
2023-09-14 15:27:38 -04:00
Robin Salen
06bc73f7ea
Combine arithmetic flags on the CPU side (#1187)
* Combine FP254 flags

* Combine basic binary ops together and do CTL with opcode value

* Combine ternary ops together

* Combine MUL DIV and MOD

* Combine shift operations

* Combine byte with other binary ops

* Fix tests

* Clean leftover comment

* Update from latest main

* Put the 'is_simulated' flag inside the Operation enum

* Cleaner way to handle "simulated" operations SHL and SHR.

* Fix comments.

* Minor: suggestion for re-expressing `combined_ops`.

* Update comment

---------

Co-authored-by: Hamish Ivey-Law <hamish@ivey-law.name>
2023-09-14 10:36:48 -04:00
Hamy Ratoanina
61a1c246db
Fix CTLs 2023-09-13 10:55:27 -04:00
Hamy Ratoanina
c27fc96a06
Merge branch 'main' into next_row_ctls 2023-09-13 16:46:30 +02:00
Linda Guiga
f944a08b4d
Fix self_balance_gas_cost and basic_smart_contract. (#1227)
* Fix self_balance_gas_cost and basic_smart_contract.

* Fix Clippy
2023-09-13 09:12:56 -04:00
Robin Salen
7ebbb47fcd
Swap ordering in stack macro (#1230)
* Swap ordering in stack macro

* Update comment
2023-09-13 08:39:01 -04:00
Robin Salen
5a1b05acfb
Remove risks of panic 2023-09-12 19:23:16 -04:00
Robin Salen
9508b49090
Move byte packing / unpacking to a distinct table (#1212)
* Duplicate Memory trace into BytePacking one

* Add mload_32bytes instruction

* Use dedicated ops for byte packing trace

* Change witness generation to reduce memory reads for MLOAD_32BYTES

* Remove segments

* Fix stack

* Fix extra product when fixing CTL for byte_packing

* Write output value in trace

* Add constraints for BYTE_PACKING table

* Add recursive constraints for BYTE_PACKING table

* Fix constraints

* Add address in trace and constraints

* Add timestamp and batch inputs into BytePackingOp struct

* Add extra column

* Fix BytePackingStark CTL

* Tiny fix in witness generation

* Fix the Memory CTL

* Add constraints for the new columns

* Remove 1 column

* Remove limb columns

* Fix

* Fix recursive circuit of BytePackingTable

* Fix constraints

* Fix endianness

* Add MSTORE_32BYTES instruction and move decomposition to packing table

* Add missing constraint

* Add range-check for all bytes

* Add extra constraint

* Cleanup

* Remove REMAINING_LEN column

* Add corresponding implementations in interpreter

* Fix recursive version

* Remove debug assertion because of CI

* Remove FILTER column

* Update new test from rebasing

* Reorder STARK modules to match TraceCheckPoint ordering

* Address comments

* Pacify clippy

* Add documentation to the packing module

* Fix doctest
2023-09-13 04:45:37 +10:00
Hamy Ratoanina
3c4f938f85
Make next row available to CTLs 2023-09-12 13:59:50 -04:00
Nicholas Ward
d1c395ef75
Merge pull request #1202 from mir-protocol/keccak-preimage
Keccak STARK: constrain preimage to equal A on first round
2023-09-11 09:05:55 -07:00
Nicholas Ward
3571f09707
Merge pull request #1224 from mir-protocol/latest-nightly
latest nightly in CI and rust-toolchain
2023-09-08 15:18:59 -07:00
Nicholas Ward
9a8a769dc4 more clippy suggestions 2023-09-08 10:44:45 -07:00
Nicholas Ward
55d0514755 clippy suggestions 2023-09-08 10:41:22 -07:00
Nicholas Ward
a4e6c6ae90 clippy suggestions 2023-09-08 10:41:01 -07:00
Nicholas Ward
7415810f19 clippy suggestions 2023-09-08 10:40:31 -07:00
Nicholas Ward
8af3b0feb4 clippy suggestions 2023-09-08 10:40:17 -07:00
Nicholas Ward
ed8bcf9d74 clippy suggestions 2023-09-08 10:34:37 -07:00
Nicholas Ward
1dd77d6d27 fmt 2023-09-08 10:18:39 -07:00
Nicholas Ward
e947a62483 suppress incorrect Clippy error 2023-09-08 10:17:41 -07:00
Nicholas Ward
967f7b1281 latest nightly in CI and rust-toolchain 2023-09-08 10:08:13 -07:00
BGluth
65917f5f23
Merge pull request #1222 from mir-protocol/internal_crate_path_stablization
Now refers to sub-crates using paths (and removed `patch` section)
2023-09-08 11:07:54 -06:00
Nicholas Ward
2f1ed95154
Merge pull request #1220 from mir-protocol/latest_nightly_fix
Latest nightly fix
2023-09-08 10:04:09 -07:00
Nicholas Ward
90ea0318fb
Merge pull request #1223 from succinctlabs/uma/change-witness-visibility
Changed visibilities in `iop/generator` to allow for implementing `generate_partial_witness` outside of crate
2023-09-08 08:35:35 -07:00
Nicholas Ward
faa70e0768
Merge pull request #1219 from succinctlabs/uma/add-mock-feature-flag
Add `mock_build` to allow for faster circuit building and partial witness generation
2023-09-08 08:34:59 -07:00