Skip to content

Commit

Permalink
Fast-forward main into feat/cancun (#1517)
Browse files Browse the repository at this point in the history
* Fix merging of jumpdest and keccak_general.

* Add test for selfdestruct (#1321)

* Add test for selfdestruct

* Comment

* Constrain uninitialized memory to 0 (#1318)

* Fix typos in comments

* Fix typos in comments

* Add test for ERC20 transfer (#1331)

* Working test

* Minor

* Cleaning

* Remove `len` column in `KeccakSpongeStark` (#1334)

* Remove len column in KeccakSpongeStark

* Apply comment

Co-authored-by: Robin Salen <[email protected]>

---------

Co-authored-by: Robin Salen <[email protected]>

* Add withdrawals (#1322)

* Withdrawals

* Remove AllRecursiveCircuits in withdrawals test

* Fix ERC20 test

* Add memory checks for prover_input, as well as range_checks for prover_input, syscalls/exceptions (#1168)

* Add memory checks for prover_input and range_checks for prover_input, syscalls and exceptions

* Replace u32 by U256, and remove extra CTLs

* Add column in ArithmeticStark to use ctl_arithmetic_base_rows for is_range_check

* Fix CTLs and circuit constraint.

* Fix CTLs

* restore `no-std` support (#1335)

* perform test action on `x86_64-unknown-linux-gnu` and `wasm32-unknown-unknown`

Signed-off-by: muraca <[email protected]>

* make `plonky2` build on `wasm32-unknown-unknown`

Signed-off-by: muraca <[email protected]>

* make `starky` build on `wasm32-unknown-unknown`
small oversight on `plonky2` fixed

Signed-off-by: muraca <[email protected]>

* skip `evm` folder if target is `wasm32-unknown-unknown`

Signed-off-by: muraca <[email protected]>

* add `default: true` to toolchain

Signed-off-by: muraca <[email protected]>

* skip `test` if target is `wasm32-unknown-unknown`

Signed-off-by: muraca <[email protected]>

* single ticks instead of double

Signed-off-by: muraca <[email protected]>

* explicit target

Signed-off-by: muraca <[email protected]>

* wasm32 job

Signed-off-by: muraca <[email protected]>

* added `--no-default-features` to checks

Signed-off-by: muraca <[email protected]>

---------

Signed-off-by: muraca <[email protected]>

* Move empty_check inside final iteration

* Remove logic for multiple txns at once (#1341)

* Have prover take only a single txn at most

* Update comment

* Apply review

* Constrain clock (#1343)

* Fix ranges in AllRecursiveCircuits initialization for log_opcode aggregation test (#1345)

* Root out some unwraps

* Range-check keccak sponge inputs to bytes (#1342)

* Range-check keccak sponge inputs to bytes

* Move outside of inner loop

* Apply review

* Charge gas for native instructions in interpreter (#1348)

* Charge gas for native instructions in interpreter

* Apply comment

* Format

* Remove unnecessary code duplication (#1349)

* Remove unnecessary code duplication

* Clippy

* Add run_syscall and tests for sload and sstore (#1344)

* Add run_syscall and tests for sload and sstore

* Replace panics with errors and address comments

* Apply comments

* Change last addr name in prepare_interpreter

* Fix kernel_mode in tests

* Minor cleanup

* Reduce visibility for a bunch of structs and methods in EVM crate (#1289)

* Reduce visibility for a bunch of structs and methods

* Remove redundant

* Remove values of last memory channel (#1291)

* Remove values of last memory channel

Co-authored-by: Linda Guiga <[email protected]>

* 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 <[email protected]>

* Fix MSTORE_32BYTES in interpreter (#1354)

* Fix parsing of non-legacy receipts (#1356)

* Fix parsing of non-legacy receipts

* Clippy

* Refactor JUMPDEST analysis (#1347)

* Use table for JUMPDEST

* Refactor jumpdest loop

* Update comment

---------

Co-authored-by: Robin Salen <[email protected]>

* Add push constraints (#1352)

* Add push constraints

* Fix ranges

* Add stack constraints

* Implement out of gas exception (#1328)

* Implement out of gas exception

* Use gas constants in gas_cost_for_opcode

* Remove comment

* Merge public values inside prove_aggreg (#1358)

* Constrain is_keccak_sponge (#1357)

* Revert "Make gas fit in 2 limbs (#1261)" (#1361)

* Revert "Make gas fit in 2 limbs (#1261)"

This reverts commit 0f19cd0.

* Comment

* Update Memory in specs (#1362)

* Update Memory specs

* Apply comment

Co-authored-by: Robin Salen <[email protected]>

---------

Co-authored-by: Robin Salen <[email protected]>

* Add doc for privileged instructions (#1355)

* Add doc for privileged instructions

* Comment

* Update specs for Logic and Arithmetic Tables (#1363)

* Update specs for Logic and Arithmetic

* Apply comments

* Reduce visibility (#1364)

* Add specs for KeccakSponge (#1366)

* Add specs for KeccakSponge

* Apply comments

* Update Keccak-f specs. (#1365)

* Update Keccak-f specs.

* Apply comments

* wip

* Create README.md

* Update README.md

* Update README.md

Link 2 EVM Tests Repo

* Update README.md

* Update README.md (#1371)

* CTL and range-check documentation (#1368)

* CTL and range-check documentation

* Apply comments

* Add exceptions to specs (#1372)

* Add exceptions to specs

* Apply comments

* Starting the specs for the CPU logic (#1377)

* Add CPU logic section to specs

* Add kernel specs

* Apply comments

---------

Co-authored-by: Hamy Ratoanina <[email protected]>

* Initialize blockhashes (#1370)

* Initialize blockhashes

* Update comment

* Check is_kernel_mode when halting (#1369)

* Add specs for BytePackingStark (#1373)

* Start

* Finish documenting BytePackingStark

* Apply comments

* Apply comment

---------

Co-authored-by: Robin Salen <[email protected]>

* Add range check constraints for the looked table (#1380)

* Add constraints to check that looked tables are well constructed for range checks

* Fix comments

* Explain difference between simple opcodes and syscalls (#1378)

* Explain difference between simple opcodes and syscalls

* Apply comment

* Add specs for the CPU table (#1375)

* Add specs for the CPU table

* Add general columns

* Apply comments

* Apply comments

* Backporting gas handling to the specs (#1379)

* Backporting gas handling to the specs

* Fix typo and syscall handling

* Add specs for stack handling (#1381)

* Add specs for stack handling

* Apply comments

* Add MPT specs

* Update evm/spec/mpts.tex

Co-authored-by: David <[email protected]>

* Update evm/spec/mpts.tex

Co-authored-by: David <[email protected]>

* Update evm/spec/mpts.tex

Co-authored-by: David <[email protected]>

* Update evm/spec/mpts.tex

Co-authored-by: David <[email protected]>

* Update evm/spec/mpts.tex

Co-authored-by: David <[email protected]>

* Update evm/spec/mpts.tex

Co-authored-by: David <[email protected]>

* Fix typo in evm/spec/mpts.tex

Co-authored-by: David <[email protected]>

* Address comment

* Remove redundant sect about MPT

* Update evm/spec/mpts.tex

Co-authored-by: wborgeaud <[email protected]>

* Fix genesis block number in `prove_block` (#1382)

* Fix genesis block number target

* Add consistency check

* Fix genesis block number

* Revert pruning

* Cleanup

* Update error message with hashes

* Fix and add comment

* Make comment more explicit

* Fix run_syscall in interpreter. (#1351)

* Fix syscall and change sload test to catch the error

* Update comment

* Cleanup

* comment

* Remove extra rows in BytePackingStark (#1388)

* Have at most one row per (un)packing operation in BytePackingStark

* Change specs

* Fix comment

* Fix tests and apply comments

* Fix log_opcodes

* Add upgradeability to `AllRecursiveCircuits` and output verifier data (#1387)

* Add upgradeable preprocessed sizes

* Add verifier data

* Changes in interpreter and implement interpreter version for add11 (#1359)

* Fix interpreter, turn syscall opcodes into actual syscalls, create interpreter test for add11

* Rename test_add11 to test_add11_yml

* Apply comments

* Cleanup add11_yml interpreter test

* Make stack_top() return a Result, and remove Result from add11_yml test

* Apply comment

* Move stack_len_bounds_aux to general columns (#1360)

* Move stack_len_bounds_aux to general columns

* Update specs

* Apply comments

* Apply comment

* VerifierCircuitData Clone,PartialEq,Eq

* chore: from_values takes ref

* 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 <[email protected]>

* Clean

* Add endline

* Change 1^256 to U256_MAX

* Apply suggestions from code review

Co-authored-by: Robin Salen <[email protected]>

---------

Co-authored-by: Robin Salen <[email protected]>

* Revert "chore: from_values takes ref"

This reverts commit 7cc123e.

* chore: Remove TODOs about `from_values` taking a reference

* Remove bootstrapping (#1390)

* Start removing bootstrapping

* Change the constraint for kernel code initializing

* Update specs

* Apply comments

* Add new global metadata to circuit methods

* Change zero-initializing constraint

* Apply comment

* Update circuit size range for recursive test

* Remove intermediary block bloom filters (#1395)

* Remove intermediary block blooms

* Update specs

* Regenerate pdf

* Apply comment, remove unneeded segment

* Fix kernel codehash discrepancy (#1400)

* Fix set_context constraints (#1401)

* Fix set_context constraints

* Apply comment

* Pacify clippy (#1403)

* Update stack op cost (#1402)

* Update stack op cost

* Update from review

* Use logUp for CTLs (#1398)

* Use LogUp for CTLs

* Update specs

* Invert in batch

* Reorder framework sections

* Implement `PublicValues` retrieval from public inputs (#1405)

* Implement PublicValues retrieval from public inputs

* Use utility method

* Remove generic argument

* Typo

* Make some functions const (#1407)

* Implement degree 2 filters (#1404)

* Implement degree 2 filters

* Apply comments

* Remove GenerationOutputs (#1408)

* Optimize asserts (#1411)

* 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

* 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

* Remove is_keccak_sponge (#1410)

* Remove is_keccak_sponge

* Apply comment

* Use mstore_32bytes to optimize decode_int_given_len (#1413)

* chore: fix some comment typos

* Merge MSTORE_32BYTES and MLOAD_32BYTES columns (#1414)

* Merge MSTORE_32BYTES and MLOAD_32BYTES columns

* Fix circuit functions

* Apply comments

* Check that limbs after the length are 0 (#1419)

* Check that limbs after the length are 0

* Update comments

* Update comments

* Add `Checkpoint` heights (#1418)

* typo fix

* typo fix

* minor typo fix

* typo fix

* Fix a minor typo in evm/spec/cpulogic.tex

* Merge `push` and  `prover_input` flags (#1417)

* Merge PUSH and PROVER_INPUT flags

* Apply comment

* Rebase to main

* Refactor run_next_jumpdest_table_proof

* Fix jumpdest analisys test

* Constrain MSTORE_32BYTES new offset limbs (#1415)

* Apply suggestions from code review

Co-authored-by: Robin Salen <[email protected]>

* fix: make `from_noncanonical_biguint` work for zero (#1427)

* Eliminate nested simulations

* Remove U256::as_u8 in comment

* Fix fmt

* Clippy

* Add aborting signal (#1429)

* Add aborting signal

* Clippy

* Update to Option following comment

* Add ERC721 test (#1425)

* Add ERC721 test

* Add IS_READ column to BytePacking CTL

* Apply comment

* Change context to current context for BN precompiles (#1428)

* Change context to current for BN precompiles

* Rename segments

* rustfmt

* Added a Discord badge to `README.md`

* Regenerate tries upon Kernel failure during `hash_final_tries` (#1424)

* Generate computed tries in case of failure

* Only output debug info when hashing final tries

* Clippy

* Apply comments

* Add exceptions handling to the interpreter (#1393)

* Add exceptions handling to the interpreter

* Apply comments

* Fix comments

* Filter range checks (#1433)

* Add filtering to range-checks

* Cleanup

* Fix Clippy

* Apply comment

* Constrain new top to loaded value in MLOAD_GENERAL (#1434)

* Minor cleanup (#1435)

* Improve proof generation

* Constrain first offset of a segment (#1397)

* Constrain first offset of a segment

* Apply comment, revert debugging code

* Modify specs

* Apply comments

* Remove aborts for invalid jumps

* Rebase to main

* Refactor run_next_jumpdest_table_proof

* Fix jumpdest analisys test

* Apply suggestions from code review

Co-authored-by: Robin Salen <[email protected]>

* Eliminate nested simulations

* Remove U256::as_u8 in comment

* Fix fmt

* Clippy

* Improve proof generation

* Remove aborts for invalid jumps

* Remove aborts for invalid jumps and Rebase

* Clippy

* add Debug trait to PartitionWitness to enable trace information output (#1437)

* Refactor encode_empty_node and encode_branch_node

Clean code

Not important

Restore jumpdets_analysis.asm

Refactor encode_empty_node and encode_branch_node

* Constrain partial_channel (#1436)

* Add alternative method to prove txs without pre-loaded table circuits (#1438)

* Rebase to main

Refactor encode_empty_node and encode_branch_node

Add constant and store encoded empty node in an other position

Remove child segment

Clean code

Apply suggestions from code review

Co-authored-by: Robin Salen <[email protected]>

Remive global label

Move encoded empty nodes

* Remove duplicated label

* Restore simple_transfer and Clippy

* Clippy

* Pacify latest clippy (#1442)

* Add initial constraint z polynomial (#1440)

* Prevent some lints from being allowed (#1443)

* Add packed verification

* Fix minor error

* Minor

* Apply suggestions from code review

Co-authored-by: Linda Guiga <[email protected]>
Co-authored-by: Robin Salen <[email protected]>

* Address comments

* Remove assertion in packed verif

* Remove assertion

* Add some more explicit doc on plonky2 crate

* Rustdoc

* Add comment

* Remove gas check in sys_stop (#1448)

* 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

* Remove unused macro

* Add crate-level documentation (#1444)

* Add crate-level documentation

* Revert change

* Skip

* Typo

* Apply comments

* Rephrase paragraph

* Apply comments

* Adress reviewer comments

* Add some more + module doc

* chore: fix typos (#1451)

* Some more

* Fix `after_mpt_delete_extension_branch` (#1449)

* Fix after_mpt_delete_extension_branch

* Rename test

* PR feedback

* Address review comments

* Improve some calls to `%mstore_rlp` (#1452)

* Improve some calls to mstore_rlp

* Remove comment

* Add Boolean constraints for `ArithmeticStark` (#1453)

* Constrain IS_READ to be boolean

* Constrain arithmetic flags to be boolean

* Comment on memory stark

* Implement CTL bundling (#1439)

* Implement CTL bundling

* Cleanup

* Clippy

* Preallocate memory

* Apply comments and remove unnecessary functions.

* Start removing clones

* Set columns and filters inside if condition.

* Remove extra CTL helper columns

* Add circuit version, with cleanup and fixes

* Remove some overhead

* Use refs

* Pacify clippy

---------

Co-authored-by: Robin Salen <[email protected]>

* Intra doc link

* chore(evm,field,plonky2):fix typos (#1454)

* Use current context in ecrecover (#1456)

* Apply suggestions from code review

Co-authored-by: Robin Salen <[email protected]>

* Address comments

* Missing review comments

* Free up some CPU cycles (#1457)

* Free up some cycles

* Comments

* Apply suggestions from code review

Co-authored-by: Linda Guiga <[email protected]>

* Constrain syscall/exceptions filter to be boolean (#1458)

* Adress review comments

* Update empty_txn_list

* Fix comment

* Apply review

* Interpreter GenerationInputs (#1455)

* Add initialization with GenerationInputs to the interpreter

* Add new_with_generation_inputs_and_kernel

* Apply comments

* Remove full memory channel (#1450)

* Remove a full memory channel

* Remove unnecessary uses

* Revert PDF change

* Apply comments

* Apply more comments

* Move disabling functions to cpu_stark.rs

* Apply comments

* Bumped `eth_trie_utils`

- Contains important fixes.

* Add files via upload

* Update README.md

Add License / Contributing to readme

* Update Cargo.toml

Add license field to cargo manifest

* Packed rlp prover inputs (#1460)

* Pack rlp prover inputs

* Fix endianness bug

* Remove debug info and fix clippy

* Fix clippy (#1464)

* Fix fill_gaps (#1465)

* Add math rendering with Katex (#1459)

* fix: make add_generators public (#1463)

* proofreading (#1466)

* Fix simulation for jumpdest analysis (#1467)

* Remove some CPU cycles (#1469)

* Amortize mload_packing

* Reduce stack overhead

* Amortize mstore_unpacking

* Speed-up stack operation in hash.asm

* Misc

* Small tweaks

* Misc small optims

* Fix comments

* Fix main access to withdrawals

* Fix stack description

* minor: rename label

* Comments

---------

Co-authored-by: Linda Guiga <[email protected]>

* Remove some more CPU cycles (#1472)

* Speed-up some mload/mstore calls

* Misc

* Improve logs loop

* Speed-up bloom

* Speed-up access_lists loops

* Fix

* Speed up selfdestruct loop

* Speed-up touched_addresses loop

* Speed-up receipt loop

* Skip rep loop

* Fix

* Misc

* Review

* Fix touched_addresses removal (#1473)

* chore: update ci workflow (#1475)

* chore: bump `actions/checkout` and `actions/cache`

* chore: use `dtolnay/rust-toolchain` and `Swatinem/rust-cache` instead of outdated github actions

* chore: use `cargo test`

* chore: remove `actions-rs/cargo`

* fix: typo

* chore: enable to cancel in-progress jobs

* chore: add job timeouts

* Fix typos (#1479)

* Fix interpreter jumps (#1471)

* Fix interpreter jumps

* Apply comments

* Improve SHA2 precompile (#1480)

* Improve SHA2 precompile

* Review

* Add removed global label

* Improve `blake2f` call (#1477)

* Improve on blake2 operations

* Comments

* Remove swap_mstore calls by changing stack macros

* Speed-up `bn254` pairing operation (#1476)

* Speed-up bn254 operations

* Add comment for write_fp254_12_unit macro

* Refactor some macros

* nit: comment

* Add newline

* Improve `BIGNUM` operations (#1482)

* Fix bugs in jumpdest analysis (#1474)

* Fix simulation for jumpdest analysis

* Fix bugs in jumpdest analysis

* Update evm/src/cpu/kernel/asm/core/jumpdest_analysis.asm

Co-authored-by: Robin Salen <[email protected]>

* Address reviews

---------

Co-authored-by: Robin Salen <[email protected]>

* Fix circuit sizes (#1484)

* Use web_time crate instead of std::time (#1481)

* Use usize::BITS and wrapping_shr in reverse_index_bits_in_place_small (#1478)

* Add LA audit report

* Cleanup imports (#1492)

* Fix BaseSumGenerator and BaseSplitGenerator Ids (#1494)

* fix: different ids for generators with different bases

required for correct serialisation

Signed-off-by: electron-team <[email protected]>

* fixing wasm32 build issue

Signed-off-by: electron-team <[email protected]>

* fix fmt issue

Signed-off-by: electron-team <[email protected]>

---------

Signed-off-by: electron-team <[email protected]>

* Make CTLs more generic (#1493)

* Make number of tables generic

* Remove dependency on Table in the CTL module

* Remove needless conversion

* Remove more needless conversion

* Clippy

* Apply reviews

* Reorganize lookup / ctl modules (#1495)

* Reorganize lookup / ctl modules

* Apply review

* Some cleanup (#1498)

* Remove StarkProofWithMetadata (#1497)

* Add missing constraints mentioned by auditors (#1499)

* Fix nightly version

* Fix workflow

* Switch permutation argument for logUp in `starky` (#1496)

* Switch permutation argument for logUp in starky

* Apply comments

* Refactor check_lookup_options

* Comments

* Add more visibility

* std -> core

* Revert "Add more visibility"

This reverts commit 2b4e50e.

* Add more visibility to lookup items

* Fix no-std tests and add corresponding jobs in the CI (#1501)

* Revert "Remove StarkProofWithMetadata (#1497)" (#1502)

This reverts commit af0259c.

* Update new tests for Cancun

---------

Signed-off-by: muraca <[email protected]>
Signed-off-by: electron-team <[email protected]>
Co-authored-by: Linda Guiga <[email protected]>
Co-authored-by: wborgeaud <[email protected]>
Co-authored-by: Hamy Ratoanina <[email protected]>
Co-authored-by: shuoer86 <[email protected]>
Co-authored-by: Linda Guiga <[email protected]>
Co-authored-by: Matteo Muraca <[email protected]>
Co-authored-by: David Palm <[email protected]>
Co-authored-by: Paul Gebheim <[email protected]>
Co-authored-by: Chris Tian <[email protected]>
Co-authored-by: 4l0n50 <[email protected]>
Co-authored-by: puma314 <[email protected]>
Co-authored-by: yanziseeker <[email protected]>
Co-authored-by: Ben <[email protected]>
Co-authored-by: Pioua <[email protected]>
Co-authored-by: Ayush Shukla <[email protected]>
Co-authored-by: BGluth <[email protected]>
Co-authored-by: Icer <[email protected]>
Co-authored-by: vuittont60 <[email protected]>
Co-authored-by: Ratan Kaliani <[email protected]>
Co-authored-by: Ursulafe <[email protected]>
Co-authored-by: Léo Vincent <[email protected]>
Co-authored-by: Thabokani <[email protected]>
Co-authored-by: Vivek Pandya <[email protected]>
Co-authored-by: Daniel Lubarov <[email protected]>
Co-authored-by: Utsav Jain <[email protected]>
  • Loading branch information
1 parent 1d8a841 commit ae857c8
Show file tree
Hide file tree
Showing 357 changed files with 17,652 additions and 9,781 deletions.
30 changes: 30 additions & 0 deletions .cargo/katex-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"
integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"
integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz"
crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI"
crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
renderMathInElement(document.body, {
fleqn: false,
macros: {
"\\F": "\\mathbb{F}",
"\\G": "\\mathbb{G}",
"\\O": "\\mathcal{O}",
"\\(": "\\left(",
"\\)": "\\right)",
"\\norm": "\\left\\vert #1 \\right\\vert",
"\\set": "\\mathcal{ #1 }",
},
delimiters: [
{ left: "$$", right: "$$", display: true },
{ left: "\\(", right: "\\)", display: false },
{ left: "$", right: "$", display: false },
{ left: "\\[", right: "\\]", display: true }
]
});
});
</script>
157 changes: 98 additions & 59 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,72 +10,130 @@ on:
branches:
- "**"

jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
timeout-minutes: 30
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install nightly toolchain
id: rustc-toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: nightly
override: true
toolchain: nightly-2024-02-01

- name: rust-cache
uses: actions/cache@v3
- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: rustc-test-${{ steps.rustc-toolchain.outputs.rustc_hash }}-cargo-${{ hashFiles('**/Cargo.toml') }}
cache-on-failure: true

- name: Check in plonky2 subdirectory
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path plonky2/Cargo.toml
run: cargo check --manifest-path plonky2/Cargo.toml
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

- name: Check in starky subdirectory
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path starky/Cargo.toml
run: cargo check --manifest-path starky/Cargo.toml
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

- name: Check in evm subdirectory
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path evm/Cargo.toml
run: cargo check --manifest-path evm/Cargo.toml
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

- name: Run cargo test
uses: actions-rs/cargo@v1
run: cargo test --workspace
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

wasm:
name: Check wasm32 compatibility
runs-on: ubuntu-latest
timeout-minutes: 30
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@master
with:
command: test
args: --workspace
toolchain: nightly-2024-02-01
targets: wasm32-unknown-unknown

- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Check in plonky2 subdirectory for wasm targets
run: cargo check --manifest-path plonky2/Cargo.toml --target wasm32-unknown-unknown --no-default-features
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

- name: Check in starky subdirectory for wasm targets
run: cargo check --manifest-path starky/Cargo.toml --target wasm32-unknown-unknown --no-default-features
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

no_std:
name: Test Suite in no-std
runs-on: ubuntu-latest
timeout-minutes: 30
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-02-01

- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Run cargo test in plonky2 subdirectory (no-std)
run: cargo test --manifest-path plonky2/Cargo.toml --no-default-features --lib
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

- name: Run cargo test in starky subdirectory (no-std)
run: cargo test --manifest-path starky/Cargo.toml --no-default-features --lib
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
Expand All @@ -85,44 +143,25 @@ jobs:
lints:
name: Formatting and Clippy
runs-on: ubuntu-latest
timeout-minutes: 10
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install nightly toolchain
id: rustc-toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: nightly
override: true
toolchain: nightly-2024-02-01
components: rustfmt, clippy

- name: rust-cache
uses: actions/cache@v3
- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: rustc-lints-${{ steps.rustc-toolchain.outputs.rustc_hash }}-cargo-${{ hashFiles('**/Cargo.toml') }}
cache-on-failure: true

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
env:
CARGO_INCREMENTAL: 1
run: cargo fmt --all --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --all-targets -- -D warnings -A incomplete-features
env:
# Seems necessary until https://github.com/rust-lang/rust/pull/115819 is merged.
CARGO_INCREMENTAL: 0
run: cargo clippy --all-features --all-targets -- -D warnings -A incomplete-features
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Plonky2 & more
[![Discord](https://img.shields.io/discord/743511677072572486?logo=discord)](https://discord.gg/QZKRUpqCJ6)

This repository was originally for Plonky2, a SNARK implementation based on techniques from PLONK and FRI. It has since expanded to include tools such as Starky, a highly performant STARK implementation.

Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions evm/.cargo/katex-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../../.cargo/katex-header.html
7 changes: 6 additions & 1 deletion evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "plonky2_evm"
description = "Implementation of STARKs for the Ethereum Virtual Machine"
version = "0.1.1"
license = "MIT or Apache-2.0"
authors = ["Daniel Lubarov <[email protected]>", "William Borgeaud <[email protected]>"]
readme = "README.md"
repository = "https://github.com/0xPolygonZero/plonky2"
Expand All @@ -13,7 +14,7 @@ edition = "2021"
anyhow = "1.0.40"
bytes = "1.4.0"
env_logger = "0.10.0"
eth_trie_utils = { git = "https://github.com/0xPolygonZero/eth_trie_utils.git", rev = "e9ec4ec2aa2ae976b7c699ef40c1ffc716d87ed5" }
eth_trie_utils = { git = "https://github.com/0xPolygonZero/eth_trie_utils.git", rev = "7fc3c3f54b3cec9c6fc5ffc5230910bd1cb77f76" }
ethereum-types = "0.14.0"
hex = { version = "0.4.3", optional = true }
hex-literal = "0.4.1"
Expand Down Expand Up @@ -59,3 +60,7 @@ required-features = ["asmtools"]
[[bench]]
name = "stack_manipulation"
harness = false

# Display math equations properly in documentation
[package.metadata.docs.rs]
rustdoc-args = ["--html-in-header", ".cargo/katex-header.html"]
Loading

0 comments on commit ae857c8

Please sign in to comment.