Nicholas Ward
d6f6fc7599
fixes
2022-10-03 13:34:16 -07:00
Nicholas Ward
e4521c481f
a great many fixes
2022-10-03 13:34:16 -07:00
Nicholas Ward
87e06946b9
first test, and fixes
2022-10-03 13:34:16 -07:00
Nicholas Ward
eb6095cd04
message schedule progress
2022-10-03 13:34:16 -07:00
Nicholas Ward
94e2e98430
fixes
2022-10-03 13:34:16 -07:00
Nicholas Ward
4378ff0fc2
progress
2022-10-03 13:34:16 -07:00
Dmitry Vagner
1e7c33e83c
extraxt box into own module
2022-10-03 12:35:49 -07:00
Dmitry Vagner
cb88dadd29
clean up macros, remove ripemd segment
2022-10-03 12:21:43 -07:00
Dmitry Vagner
0dc1a40306
Merge branch 'main' of github.com:mir-protocol/plonky2 into ripeMD
2022-10-03 12:09:10 -07:00
Daniel Lubarov
9f9143d6f6
Finish some misc storage logic
2022-10-02 11:14:19 -07:00
Daniel Lubarov
12247047ae
MPT hashing logic, part 1
2022-09-30 17:02:25 -07:00
Dmitry Vagner
b26a28454f
Merge branch 'main' of github.com:mir-protocol/plonky2 into ripeMD
2022-09-30 09:41:04 -07:00
Daniel Lubarov
c721155e23
Main function, txn processing loop
2022-09-29 23:15:33 -07:00
Dmitry Vagner
ea31a803ca
merge
2022-09-27 00:35:21 -07:00
Daniel Lubarov
c7b03cfe9a
More MPT logic
2022-09-24 20:49:19 -07:00
Dmitry Vagner
14488b2a58
Merge branch 'main' of github.com:mir-protocol/plonky2 into ripeMD
2022-09-23 11:17:13 -07:00
Daniel Lubarov
37d92b55ac
Basic MPT logic
...
For now this contains most of the basic framework/structure. Logic for things like insertions will come later.
2022-09-22 11:25:37 -07:00
Dmitry Vagner
172bde8028
everything is parsing
2022-09-20 10:29:43 -07:00
Dmitry Vagner
9f1e97edc4
fix bugs
2022-09-20 10:11:45 -07:00
Dmitry Vagner
c127f80bfa
add to include files
2022-09-20 10:00:40 -07:00
Jacqueline Nabaglo
4c52d37546
Save columns by verifying invalid opcodes in software ( #701 )
...
* Save columns by verifying invalid opcodes in software
* Autogenerate invalid opcode bitfield (Daniel comment)
* Remove unnecessary panic label
2022-08-30 13:06:03 -07:00
Daniel Lubarov
cc61c7211c
Core transaction processing logic
...
With lots of TODOs to fill in afterward; this is just a start.
2022-08-12 17:20:18 -07:00
Daniel Lubarov
ccc4202de3
Packing memory operations
2022-08-05 13:44:08 -04:00
Daniel Lubarov
7423124e36
Split up memory asm and add more helper functions
2022-08-03 22:18:29 -07:00
Daniel Lubarov
90be4749ef
Merge branch 'main' into optimizer
2022-08-03 09:58:54 -07:00
Daniel Lubarov
3f08cca116
More constants for kernel ASM
...
- `GlobalMetadata` - offsets for global kernel variables in memory
- `ContextMetadata` - offsets for context-specific kernel variables in memory
- `GAS_CONSTANTS`, based on the yellowpaper
Also move constants to a separate module since `aggregator` was getting long.
2022-08-01 18:18:22 -07:00
Daniel Lubarov
497b26dee6
Some simple optimization rules
...
Depends on #647 .
2022-07-31 13:00:27 -07:00
Daniel Lubarov
7a6d996fe7
Move couple asm files
2022-07-31 09:28:16 -07:00
Daniel Lubarov
718b3c0961
Move ecrecover
2022-07-31 09:24:04 -07:00
Daniel Lubarov
56d814e467
fix
2022-07-31 09:22:13 -07:00
Daniel Lubarov
f49170a8b8
fix
2022-07-30 22:31:07 -07:00
Daniel Lubarov
86a797b1db
Add a asm/curve/ directory
2022-07-30 22:24:11 -07:00
wborgeaud
2bae8f92f0
Merge pull request #635 from mir-protocol/nondeterministic_ec_ops
...
Use non-determinism in EC ops
2022-07-29 13:05:12 +02:00
wborgeaud
87640d7e98
PR feedback
2022-07-28 10:35:53 +02:00
Jacqueline Nabaglo
c160c4032d
Inter-row program counter constraints ( #639 )
...
* Beginning of control flow support
* Fixes to halt spin loop
2022-07-27 11:36:33 -07:00
wborgeaud
8053215841
Inverse for other fields
2022-07-27 16:49:26 +02:00
Daniel Lubarov
0ba6078984
Merge branch 'main' into rlp_3
2022-07-25 19:47:43 -07:00
Daniel Lubarov
1db5b7374d
Move storage asm
2022-07-24 08:42:06 -07:00
Daniel Lubarov
544c84b420
Transaction (RLP) parsing
...
Will add tests once we have the interpreter support for other segmnets.
2022-07-23 21:39:01 -07:00
Daniel Lubarov
78fb34a9b6
Minor
2022-07-20 00:10:52 -07:00
Daniel Lubarov
80d32f89b6
fixes
2022-07-18 15:58:12 -07:00
Daniel Lubarov
50144a638f
Enable assertions, now working
2022-07-18 13:48:51 -07:00
Daniel Lubarov
71b9705a0d
Merge pull request #618 from mir-protocol/asm_assertions
...
More basic ASM macros
2022-07-18 09:31:34 -07:00
wborgeaud
a268677936
Merge branch 'main' into ecrecover_kernel
...
# Conflicts:
# evm/src/cpu/kernel/aggregator.rs
2022-07-18 14:01:10 +02:00
wborgeaud
fd991a4eef
Merge pull request #614 from mir-protocol/evm_interpreter_memory
...
Implement memory for the EVM interpreter
2022-07-18 13:52:39 +02:00
Daniel Lubarov
4aaceabd18
Include assertions, disabled for now
2022-07-17 16:08:58 -07:00
Daniel Lubarov
ab5abc391d
Organize segments in an enum
...
It's a bit more type-safe (can't mix up segment with context or virtual addr), and this way uniqueness of ordinals is enforced, partially addressing a concern raised in #591 .
To avoid making `Segment` public (which I don't think would be appropriate), I had to make some other visibility changes, and had to move `generate_random_memory_ops` into the test module.
2022-07-16 10:16:12 -07:00
wborgeaud
292bb4a024
Implement memory for the interpreter
2022-07-15 11:10:10 +02:00
Daniel Lubarov
0802d6c021
Continue work on bootstrapping
...
The kernel is hashed using a Keccak based sponge for now. We could switch to Poseidon later if our kernel grows too large.
Note that we use simple zero-padding (pad0*) instead of the standard pad10* rule. It's simpler, and we don't care that the prover can add extra 0s at the end of the code. The program counter can never reach those bytes, and even if it could, they'd be 0 anyway given the EVM's zero-initialization rule.
In one CPU row, we can do a whole Keccak hash (via the CTL), absorbing 136 bytes. But we can't actually bootstrap that many bytes of kernel code in one row, because we're also limited by memory bandwidth. Currently we can write 4 bytes of the kernel to memory in one row.
So we treat the `keccak_input_limbs` columns as a buffer. We gradually fill up this buffer, 4 bytes (one `u32` word) at a time. Every `136 / 4 = 34` rows, the buffer will be full, so at that point we activate the Keccak CTL to absorb the buffer.
2022-07-14 11:59:01 -07:00
wborgeaud
33a5934255
Passing tests
2022-07-14 14:26:01 +02:00