77 Commits

Author SHA1 Message Date
Alonso González
6ef0a3c738
Apply suggestions from code review
Co-authored-by: Linda Guiga <101227802+LindaGuiga@users.noreply.github.com>
2024-01-11 10:55:04 +01:00
4l0n50
99a1eb5c85 Missing review comments 2024-01-10 17:58:41 +01:00
4l0n50
ae4a720a74 Address comments 2024-01-10 17:26:34 +01:00
Alonso González
92aaa404da
Apply suggestions from code review
Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com>
2024-01-10 13:55:09 +01:00
4l0n50
1715573c22 Fix problems after address bundling 2024-01-09 14:15:16 +01:00
Robin Salen
2dacbfe2ff
Address bundling (#1426)
* Start

* Scale TxnFields

* Speed-up

* Misc fixes

* Other fixes

* Fix

* Fix offset

* One more fix

* And one more fix

* Fix

* Fix

* Fix init

* More interpreter fixes

* Final fixes

* Add helper methods

* Clippy

* Apply suggestions

* Comments

* Update documentation

* Regenerate pdf

* minor

* Rename some macros for consistency

* Add utility method for unscaling segments and scaled metadata

* Address comments
2024-01-08 10:46:26 +00:00
4l0n50
1a95f7aa72 Clippy 2023-12-28 16:39:12 +01:00
4l0n50
a85f9872f1 Fix bug in jumpdest proof generation and check that jumpdest addr < code_len 2023-12-28 14:04:23 +01:00
4l0n50
24ae0d9de0 Clippy 2023-12-20 15:27:27 +01:00
4l0n50
3e78865d64 Remove aborts for invalid jumps and Rebase 2023-12-20 15:02:32 +01:00
4l0n50
11d668f5e6 Remove aborts for invalid jumps 2023-12-20 14:29:57 +01:00
4l0n50
4e569484c2 Improve proof generation 2023-12-20 14:29:57 +01:00
4l0n50
c4025063de Clippy 2023-12-20 14:29:57 +01:00
4l0n50
aaa38b33ba Fix fmt 2023-12-20 14:29:57 +01:00
4l0n50
5acabad72d Eliminate nested simulations 2023-12-20 14:29:54 +01:00
Alonso González
0bec627899 Apply suggestions from code review
Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com>
2023-12-20 14:29:08 +01:00
4l0n50
ed260980b2 Fix jumpdest analisys test 2023-12-20 14:29:08 +01:00
4l0n50
ff3dc2e516 Refactor run_next_jumpdest_table_proof 2023-12-20 14:29:04 +01:00
4l0n50
9e39d88ab8 Rebase to main 2023-12-20 14:28:38 +01:00
Hamy Ratoanina
170ce5f27c
Preinitialize all code segments (#1409)
* Preinitialize all code segments

* Add zero writes after code_size

* Use preinitializing for extcodesize

* Fix gas calculation

* Extend logic to extcodecopy

* Apply comments
2023-12-07 12:49:46 -05:00
Linda Guiga
a90aa40b7a
Implement MPT preinitialization (#1406)
* Implement MPT preinitialization

* Apply comments

* Replace GlobalMetadata reads with stores in the kernel

* Change memory specs

* Remove trie data length as a prover input
2023-12-07 12:08:47 -05:00
Alonso González
471ff68d51
Optimize num_bytes and hex_prefix_rlp (#1384)
* Compute num_bytes non-deterministically

* Optimize hex_prefix_rlp

* Clean code

* Clippy

* Apply suggestions

Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com>

* Clean

* Add endline

* Change 1^256 to U256_MAX

* Apply suggestions from code review

Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com>

---------

Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com>
2023-11-29 10:43:50 -05:00
Hamy Ratoanina
6d751b13c1
Remove values of last memory channel (#1291)
* Remove values of last memory channel

Co-authored-by: Linda Guiga <lindaguiga3@gmail.com>

* Fix merge

* Apply comments

* Fix ASM

* Top stack documentation (#7)

* Add doc file

* Apply comments

* Apply comments

* Fix visibility

* Fix visibility

---------

Co-authored-by: Linda Guiga <lindaguiga3@gmail.com>
2023-11-13 11:03:50 -05:00
Robin Salen
954d1a77c6
Remove logic for multiple txns at once (#1341)
* Have prover take only a single txn at most

* Update comment

* Apply review
2023-11-09 09:34:12 -05:00
wborgeaud
fa93454c5c
Add withdrawals (#1322)
* Withdrawals

* Remove AllRecursiveCircuits in withdrawals test

* Fix ERC20 test
2023-11-07 12:20:54 +01:00
Robin Salen
03a9558198
Handle additional panics (#1250)
* Remove some panic risks

* Remove more panics

* Handle jump with empty stack

* Handle last expect

* More panics

* Handle from_big_endian

* Handle from_little_endian

* Remove remaining risky as_usize()

* Remove explicit panic

* Clippy

* Handle unwrap

* Make error messages more explicit

* Simplify u256 to usize conversion
2023-09-26 11:13:57 -04:00
Linda Guiga
42f7038031
Add blockhash sys opcode 2023-09-07 09:43:59 +01:00
Nicholas Ward
152e395903
Merge pull request #1137 from topos-protocol/fix-kernel-panic
Change context used in `bignum_modmul`
2023-07-17 08:41:27 -07:00
Linda Guiga
1af1afcff4
Change current context in bignum_modmul 2023-07-17 10:17:52 +01:00
Robin Salen
f116c855aa
Fix risk of division by zero 2023-07-16 15:01:36 -04:00
wborgeaud
ba705703a5
Use current context for pairing memory (#1091) 2023-06-12 22:55:38 +02:00
Robin Salen
df5a90cca4
Provide methods for serializing Kernel 2023-04-15 11:01:40 -04:00
Nicholas Ward
90f7ba9a23 addressed final comments 2023-04-04 13:33:20 -07:00
Nicholas Ward
c18377d12f Merge branch 'main' into bignum-modexp 2023-03-28 11:15:27 -07:00
Nicholas Ward
91fb4fc02e fix modexp test 2023-03-28 11:15:01 -07:00
Dmitry Vagner
cf5a4edc8b prover input minor improvements 2023-03-27 18:20:22 -07:00
Dmitry Vagner
1627a9a0d3 tests pass 2023-03-22 09:55:35 -07:00
Dmitry Vagner
392c29f412 compiles 2023-03-21 21:16:19 -07:00
Dmitry Vagner
9ea0ebd78f skeleton 2023-03-21 21:10:01 -07:00
Dmitry Vagner
143225f449 finish 2023-03-21 19:19:02 -07:00
Nicholas Ward
d928423c63 cleanup 2023-03-21 16:18:53 -07:00
Nicholas Ward
d59501e6a7 fixes, testing, and in-progress debugging 2023-03-21 16:03:54 -07:00
Nicholas Ward
902bc66a1f fmt 2023-03-20 13:09:42 -07:00
Nicholas Ward
ad85d61e51 fix 2023-03-20 13:09:42 -07:00
Nicholas Ward
4cef5aaa84 modmul and modexp 2023-03-20 13:09:42 -07:00
Dmitry Vagner
e3e5c67834 Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2023-02-25 10:30:46 -08:00
Daniel Lubarov
29f0692efc Fix a few issues found by EVM tests 2023-02-24 23:37:08 -08:00
Dmitry Vagner
5e3e40a094 more general kernel peek 2023-02-19 16:05:39 -08:00
Dmitry Vagner
ec4cddb7c9 inv as method 2023-01-23 14:59:08 +07:00
Dmitry Vagner
7b52438173 en route to ownership 2023-01-21 16:38:43 +07:00