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
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
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
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
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
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
BGluth
5936c67f59
Now refers to sub-crates using paths (and removed patch section)
...
- Previously refered to specific `crates.io` versions.
- Motivation for this is to allow external projects to be able use
specific revisions of this repo. Without this, a `[patch]` section
is almost always required in the external project in order to force
the internal plonky2 sub-crates to the same version, an approach which
comes with its own issues.
2023-09-07 16:36:38 -06:00
Linda Guiga
180c20942b
Merge pull request #1208 from topos-protocol/blockhash_opcode
...
Add blockhash opcode
2023-09-07 23:21:37 +01:00
Robin Salen
71b2ece148
Merge pull request #1216 from topos-protocol/checkpoint_lengths
...
Display actual trace lengths instead of number of ops
2023-09-07 16:01:07 -04:00
Robin Salen
05e9fc0bed
Apply Nick's comment
2023-09-07 15:37:53 -04:00
Robin Salen
d0379e9428
Apply Nick's comment
2023-09-07 15:35:34 -04:00
BGluth
6d3d2cb283
Now builds on the latest nightly
2023-09-07 13:32:07 -06:00
Linda Guiga
170f7d838a
Fix Clippy
2023-09-07 12:35:36 +01:00
Linda Guiga
9a06fc9b95
Fix memop reads, from_prover_inputs and cleanup.
2023-09-07 12:15:17 +01:00
Linda Guiga
ddf2b81733
Clippy
2023-09-07 09:44:00 +01:00
Linda Guiga
1c01d682aa
Fix overflow check and test. Remove [..8] when using h256_limbs.
2023-09-07 09:44:00 +01:00
Linda Guiga
c30b18346f
Change h256_ulimbs
2023-09-07 09:44:00 +01:00
Linda Guiga
4e0fe74a74
Apply comments
2023-09-07 09:43:59 +01:00
Linda Guiga
42f7038031
Add blockhash sys opcode
2023-09-07 09:43:59 +01:00
Robin Salen
258b075fd2
Remove filter column for KeccakStark
2023-09-06 20:17:07 -04:00
Robin Salen
fa9aae1fdc
Remove duplicate code
2023-09-06 15:15:33 -04:00
Linda Guiga
6207f4465a
Merge pull request #1206 from topos-protocol/missing-public-value-links
...
Add missing links between public values
2023-09-06 18:53:15 +01:00
Robin Salen
8dcb29e5ad
Display actual trace lengths instead of number of ops
2023-09-06 12:31:17 -04:00
Linda Guiga
a7096546f1
Merge pull request #1209 from topos-protocol/receipts-all-types
...
Implement receipts of types 1 and 2
2023-09-06 15:24:16 +01:00
Linda Guiga
d4b71c5686
Replace genesis state trie check with TODO
2023-09-06 15:12:00 +01:00
Linda Guiga
6bd17e29c1
Apply comments
2023-09-06 01:19:31 +01:00
Nicholas Ward
ac89c7cd40
Fix comment in proof.rs
2023-09-05 14:20:46 -07:00
Linda Guiga
bf21b278d8
Apply comments
2023-09-05 08:22:53 +01:00
Linda Guiga
9ba2b895b9
Implement receipts of types 1 and 2
2023-09-04 15:03:18 +01:00
Linda Guiga
b07644368f
Add missing links between public values
2023-08-31 13:40:13 +01:00
Hamy Ratoanina
8beba56903
Constrain next row's stack length
2023-08-28 16:32:04 -04:00
Nicholas Ward
ea03e4183f
Keccak STARK: constraint preimage to equal A on first round
2023-08-28 12:42:01 -07:00
Ayush Shukla
301aedf072
fix: constrain higher bits of reg_preimage
2023-08-27 22:32:44 +02:00
Robin Salen
7196714734
Update range from ReceiptTrie PR
2023-08-25 09:58:20 -07:00
BGluth
975fd451e8
Made PublicValues serializable
...
- Needed by the prover scheduler.
2023-08-23 12:36:11 -06:00
Linda Guiga
6a2e24232d
Clippy
2023-08-22 20:00:49 +01:00
Linda Guiga
caae038cec
Cleanup
2023-08-22 20:00:49 +01:00
Linda Guiga
5b962f3c06
Change receipts_trie in basic_smart_contract and self_balance_gas_cost
2023-08-22 20:00:49 +01:00
Linda Guiga
ad9796cb10
Fix tests and address comments
2023-08-22 20:00:49 +01:00