65 Commits

Author SHA1 Message Date
BGluth
ab05d181bc Bumped eth_trie_utils
- Contains important fixes.
2024-01-11 11:10:59 -07:00
BGluth
a02a2ecb97 Updated mir-protocol --> 0xPolygonZero
- Recently the underlying org name on Github changed to `0xPolygonZero`.
- This was causing some issues with dependencies downstream where a
  dependency pointing to the old org name was seen as a different
  dependency that was using the new org name.
- Using a `[patch] section in `Cargo.toml` was running into issues where
  we couldn't get it to get all dependency versions using a single org
  name.
2023-10-12 11:11:17 -06: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
Robin Salen
c0b4f155f4
Implement receipts and logs
Co-authored-by: Hamy Ratoanina <hamy.ratoanina@toposware.com>
Co-authored-by: Linda Guiga <lindaguiga3@gmail.com>
2023-08-22 20:00:49 +01:00
Nicholas Ward
8432195517 update versions in cross-crate references 2023-07-31 16:34:27 -07:00
Nicholas Ward
3a55602909 update versions for crates.io updates 2023-07-31 16:31:22 -07:00
dependabot[bot]
5d513207ef
Update itertools requirement from 0.10.3 to 0.11.0
Updates the requirements on [itertools](https://github.com/rust-itertools/itertools) to permit the latest version.
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.3...v0.11.0)

---
updated-dependencies:
- dependency-name: itertools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 23:00:00 +00:00
Nicholas Ward
4400757f3f
Merge pull request #1128 from mir-protocol/dependabot/cargo/hex-literal-0.4.1
Update hex-literal requirement from 0.3.4 to 0.4.1
2023-07-13 15:59:07 -07:00
Nicholas Ward
dc1709155a
Merge pull request #1131 from mir-protocol/dependabot/cargo/criterion-0.5.1
Update criterion requirement from 0.4.0 to 0.5.1
2023-07-13 15:58:18 -07:00
Nicholas Ward
0f284ca6a7
Merge pull request #1130 from mir-protocol/dependabot/cargo/hashbrown-0.14.0
Update hashbrown requirement from 0.12.3 to 0.14.0
2023-07-13 15:57:56 -07:00
dependabot[bot]
b0c5ddc070
Update criterion requirement from 0.4.0 to 0.5.1
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version.
- [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.1)

---
updated-dependencies:
- dependency-name: criterion
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 22:33:22 +00:00
dependabot[bot]
fc70f36c2e
Update hashbrown requirement from 0.12.3 to 0.14.0
Updates the requirements on [hashbrown](https://github.com/rust-lang/hashbrown) to permit the latest version.
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.12.3...v0.14.0)

---
updated-dependencies:
- dependency-name: hashbrown
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 22:33:00 +00:00
dependabot[bot]
413f589e6c
Update hex-literal requirement from 0.3.4 to 0.4.1
Updates the requirements on [hex-literal](https://github.com/RustCrypto/utils) to permit the latest version.
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.3.4...hex-literal-v0.4.1)

---
updated-dependencies:
- dependency-name: hex-literal
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 22:32:41 +00:00
Matthias Goergens
4b0fc861b3 Remove unused dependency blake2 from evm crate 2023-07-13 12:18:09 +08:00
BGluth
db93badaf2 Bumped eth_trie_utils to 0.6.0 2023-04-20 11:05:34 -06:00
Robin Salen
df5a90cca4
Provide methods for serializing Kernel 2023-04-15 11:01:40 -04:00
Robin Salen
6124e4d6a3
Fix BlockCircuitData proofs 2023-04-08 14:31:10 -04:00
BGluth
60ad9e03ba Bumped eth_trie_utils to 0.5.0 2023-03-27 17:30:11 -06:00
Nicholas Ward
b16b82613e
Merge pull request #881 from mir-protocol/bignum-basic
Basic bignum operations
2023-03-20 13:09:17 -07:00
Hamish Ivey-Law
692575a24b
Bump eth_trie_utils version. (#923) 2023-03-21 02:20:11 +11:00
Nicholas Ward
fa605d7b22 basic bignum 2023-03-07 17:47:09 -08:00
Daniel Lubarov
2133c7f3ba Use new plonky2 2023-02-25 09:36:25 -08:00
Daniel Lubarov
137bc78565 Prep for publishing to crates.io 2023-01-30 13:18:06 -08:00
Nicholas Ward
f3937e9977 deps fix 2022-12-13 10:29:03 -08:00
Nicholas Ward
d3a7201348 fixes 2022-12-13 10:08:36 -08:00
Nicholas Ward
dd29ec1f46 fixes and test infrastructure 2022-12-13 10:08:30 -08:00
BGluth
b34b3875f7 Removed unused deps unovered by cargo-udeps
Some deps were moved to `[dev-dependencies]`.
2022-12-12 18:23:22 -07:00
Daniel Lubarov
fbb26546dd Jemalloc for EVM
Also update the version used elsewhere.
2022-12-04 10:15:28 -08:00
Brandon H. Gomes
812a5d468a
chore: merge branch main
Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
2022-11-15 01:54:30 -05:00
Brandon H. Gomes
14c2a6dd1f
Fork Update (#3)
* Use static `KERNEL` in tests

* Print opcode count

* Update criterion

* Combine all syscalls into one flag (#802)

* Combine all syscalls into one flag

* Minor: typo

* Daniel PR comments

* Check that `le_sum` won't overflow

* security notes

* Test reverse_index_bits

Thanks to Least Authority for this

* clippy

* EVM shift left/right operations (#801)

* First parts of shift implementation.

* Disable range check errors.

* Tidy up ASM.

* Update comments; fix some .sum() expressions.

* First full draft of shift left/right.

* Missed a +1.

* Clippy.

* Address Jacqui's comments.

* Add comment.

* Fix missing filter.

* Address second round of comments from Jacqui.

* Remove signed operation placeholders from arithmetic table. (#812)

Co-authored-by: wborgeaud <williamborgeaud@gmail.com>
Co-authored-by: Daniel Lubarov <daniel@lubarov.com>
Co-authored-by: Jacqueline Nabaglo <jakub@mirprotocol.org>
Co-authored-by: Hamish Ivey-Law <426294+unzvfu@users.noreply.github.com>
2022-11-15 01:51:29 -05:00
Brandon H. Gomes
38e467f1c0
chore: fix serde-cbor and run cargo-sort
Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
2022-11-03 11:41:12 -07:00
Brandon H. Gomes
e2cdd5a954
feat: upgrade Sampling APIs
Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
2022-11-03 08:26:03 -07:00
BGluth
8736435ea9 Updated eth_trie_utils to 0.4.0 2022-10-31 15:15:20 -06:00
BGluth
2e7da17554 Bumped eth_trie_utils to 0.3.1 2022-10-31 15:03:34 -06:00
Daniel Lubarov
7f366cdace Treat storage tries as sub-tries of the state trie
I.e. have leaves in the state trie point to the root of a storage trie
2022-10-16 20:26:37 -07:00
BGluth
06475c2b61 Bumped patch version 2022-10-11 22:07:32 -06:00
BGluth
cb2e69a2c9 Updated eth_trie_utils to 0.2.0 2022-10-11 20:57:46 -06:00
Hamish Ivey-Law
d7bb47318c
Modular operations for the EVM arithmetic unit (#755)
* First draft of 256-bit addition.

* Update comment.

* cargo fmt

* Rename addition evaluation file.

* Port ALU logic from SZ.

* Give a name to some magic numbers.

* `addition.rs` -> `add.rs`; fix carry propagation in add; impl sub.

* Clippy.

* Combine hi and lo parts of the output.

* Implement MUL.

* Suppress Clippy's attempt to make my code even harder to read.

* Next draft of MUL.

* Make all limbs (i.e. input and output) 16-bits.

* Tidying.

* Use iterators instead of building arrays.

* Documentation.

* Clippy is wrong; also cargo fmt.

* Un-refactor equality checking, since it was wrong for sub.

* Daniel comments.

* Daniel comments.

* Rename folder 'alu' -> 'arithmetic'.

* Rename file.

* Finish changing name ALU -> Arithmetic Unit.

* Finish removing dependency on array_zip feature.

* Remove operations that will be handled elsewhere.

* Rename var; tidy up.

* Clean up columns; mark places where range-checks need to be done.

* Import all names in 'columns' to reduce verbiage.

* cargo fmt

* Fix aux_in calculation in mul.

* Remove redundant 'allow's; more precise range-check size.

* Document functions.

* Document MUL instruction verification technique.

* Initial tests for ADD.

* Minor test fixes; add test for SUB.

* Fix bugs in generate functions.

* Fix SUB verification; refactor equality verification.

* cargo fmt

* Add test for MUL and fix some bugs.

* Update doc.

* Quiet incorrect clippy error.

* Initial implementation of ADDMOD and MOD.

* Fixes to addmod.

* Update doc.

* Do 1000 random tests instead of just 1.

* Documentation fix.

* Working version of ADDMOD.

* Working version of MOD.

* Name magic number; do multiple MUL tests.

* Add code and test for special case; add some docs.

* Fix spelling mistake.

* Simplify asserts.

* Tidy comment.

* Remove unused module.

* cargo fmt

* Check that output is reduced.

* Add conversion of canonical `i64` to a `Field64`.

* Handle zero modulus within degree constraint.

* cargo fmt

* Fix some comments.

* Check that the top half of the product is zero!

* Start of refactor.

* Refactoring.

* Remove zero and reduction handling from addmod.

* Refactoring; renaming; bug fixes.

* Reuse intermediate calculations across all modular operations; don't negate quot poly unnecessarily.

* Fix bug where last elt of q*m wasn't checked.

* Refactoring.

* Move circuit poly functions to utils.rs.

* Rename ADDMOD stuff to MODULAR.

* Rename module addmod -> modular.

* Handle zero modulus.

* Verify that output is reduced.

* Implement recursive version of modular circuits.

* clippy

* Tidy up i64 -> Field conversion following Jacqui's comments.

* cargo fmt

* Improved documentation.

* Address Jacqui's comments.

* Save some gates by using builder.arithmetic_extension().
2022-10-07 17:15:50 +11:00
BGluth
bf57fe9835 Now uses eth_trie_utils on crates.io 2022-10-04 22:07:43 -06:00
Daniel Lubarov
d8bf30150f
Merge pull request #756 from mir-protocol/rlp_fixes
RLP related fixes
2022-10-04 15:34:38 -07:00
Daniel Lubarov
0ccb340e40 RLP related fixes 2022-10-04 15:18:31 -07:00
Dmitry Vagner
53014b732f almost done 2022-10-03 15:30:17 -07:00
Nicholas Ward
42320d815e fix 2022-10-03 13:34:16 -07:00
Nicholas Ward
e482bc7f0c addressed comments 2022-10-03 13:34:16 -07:00
Nicholas Ward
f4207e75a4 sha2 testing infrastructure 2022-10-03 13:34:16 -07:00
BGluth
7e6844963a Few small changes related to switching to H256 2022-09-29 17:24:23 -06: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
BGluth
d7d8803d0a Replaced PartialTrie definitions with eth-trie-utils crate
- There were enough dependencies that it made sense to move
  `PartialTrie` logic to its own crate.
2022-09-19 11:05:48 -06:00
Daniel Lubarov
19162db596 Tweak features 2022-09-07 15:10:40 -07:00
Sladuca
e72152eed8 fix default features in starky & evm 2022-09-06 14:56:48 -04:00