Commit Graph

98 Commits

Author SHA1 Message Date
Leo
c5b35ea4b0 remove podwr vm from main repo (#3231)
- Remove all crates that are not linked with `autoprecompiles`,
`openvm`, `constraint-solver`
- Remove tests and artifacts linked with removed crates
- Adjust CI
2025-08-28 10:03:36 +00:00
chriseth
ffc3395056 Increase number of runners. (#3189) 2025-08-18 14:54:04 +00:00
Leo
fe3b3550d6 update openvm (#3163)
If this works we can merge the openvm PR
2025-08-12 10:10:01 +00:00
Leo
00bf223efe Fix Rust 1.88 requirement by fresh deps of OpenVM (#3159)
When installing `cargo-openvm` for the openvm-reth related tests, the
installation pulls fresh versions of the dependencies that are not
pinned. Some of these dependencies only work with Rust >= 1.88.

I made a [test PR in
powdr-labs/openvm](https://github.com/powdr-labs/openvm/pull/37) which
the changes here point to to get the `cargo-openvm` crate.

We can merge the PR above which would force us to change powdr as well,
but for now it may be enough to merge this PR to get the test passing,
and then change the openvm hash in powdr together with the Rust version
in a follow-up PR.
2025-08-11 12:52:12 +00:00
Thibaut Schaeffer
86bd7c5db3 Update reth hash in CI (#3096) 2025-07-28 16:20:47 +00:00
Thibaut Schaeffer
9f36102a16 Keep openvm program intact (#3075)
Since #3055, we don't need to change the program anymore.
This PR keeps the program intact in openvm, passing the apc opcodes to
openvm through a new API in openvm.
See https://github.com/powdr-labs/openvm/pull/36
Related: https://github.com/powdr-labs/openvm-reth-benchmark/pull/26
2025-07-28 14:48:10 +00:00
Leo
4446c7298f Replace broken udeps action by direct calls (#3071)
The action itself seems broken with JS errors in every PR recently.
Only merge if the `udeps` job passes.
2025-07-22 11:12:28 +00:00
Thibaut Schaeffer
3ab2dba41f Update openvm (#3062) 2025-07-19 22:41:42 +00:00
Steve Wang
4471c7580d Update reth CI commit hash (#2999)
Final one to be merged after
https://github.com/powdr-labs/openvm-reth-benchmark/pull/21/files
2025-07-04 13:58:23 +00:00
Leo
6e2f272403 Compile reth test also for prs (#2965)
Let's see if this works
2025-07-01 15:28:05 +00:00
chriseth
5f5b8996dc Run slow tests only on nightly. (#2824) 2025-06-04 07:25:24 +00:00
chriseth
0dd06f9c1b Mark some tests as slow (#2823) 2025-06-03 10:11:52 +00:00
chriseth
0bed8b7a8c Run bench on nightly only. (#2822)
Bench takes 20 minutes, that's too long for us not really using it.
2025-06-03 09:27:17 +00:00
Thibaut Schaeffer
ef11e48462 Fix nightly tests and simplify CI (#2760)
- remove target triple
- more succinct rustup command
- install 2025-02-14 for openvm in nightly tests
2025-05-24 07:44:56 +00:00
Thibaut Schaeffer
3ae17c7fcb Remove halo2 (#2740)
Remove halo2 from the backends, as well as the tutorials which heavily
reference it.
2025-05-21 12:08:50 +00:00
Thibaut Schaeffer
aafe2570be Remove estark (#2739)
Following #2735 , remove all of estark
2025-05-20 17:50:33 +00:00
Thibaut Schaeffer
2d6708bbc5 Add openvm crates (#2714)
Based on commit 1dbe4db
- Split into two crates, lib and cli
- upgrade stwo, marked one stwo test `should_panic` @ShuangWu121 
- various clippy and fmt fixes linked to the rust version update
- bring all rust versions to 2025-05-14. CI still installs other
versions for openvm which uses them internally. The stable rust version
we test on is bumped to 1.85
- remove `examples` and related tests, which test the powdr crate on the
previous version of powdr (since it uses another nightly). Happy to
discuss this if it's important @leonardoalt
2025-05-16 14:30:09 +00:00
chriseth
81e410cd1c No cache for examples because it is not used anyway. (#2701) 2025-05-13 08:12:18 +00:00
chriseth
bfe7604684 Check out cache, set mtime and re-check out actual commit. (#2655)
Instead of setting `mtime` to the committed date, which @lvella noted is
error-prone, this PR does the following so that we can utilize the build
cache:

- check out the commit the build cache was built for
- set mtime to the time the cache was built
- check out the commit we are running the tests on

This hopefully has the effect that all modified files will have the
current time as mtime and will trigger re-builds correctly
2025-04-24 10:31:20 +00:00
Lucas Clemente Vella
f02fd626e2 Revert "CI: Avoid rebuilding cached files. (#2648)" (#2650)
Don't fix the problem, due to depth=1, and might even cause others, due
to git timestamp being unreliable to track changes since last build.
2025-04-16 16:57:48 +00:00
Lucas Clemente Vella
2d44e9ff95 CI: Avoid rebuilding cached files. (#2648)
Sets the timestamp of files to the commit timestamp, so that cargo can
know which files were not modified in the PR.
2025-04-15 14:50:11 +00:00
chriseth
6639f00b3e Mark some tests fast. (#2609) 2025-03-30 18:22:59 +00:00
Steve Wang
8ed49876fd Optimize PR test workflow (Simple starter version) (#2581)
This PR increases the number of `test_slow` PR test bins from 8 to 17,
thereby strictly reducing the time spent on `test_slow`.

We have three types of runners: 
- `warp-ubuntu-2404-x64-8x` for: build, run_examples, bench. I think
this is a paid server: https://www.warpbuild.com/, which @leonardoalt
last changed in #2187, so I have a question: why don't we use the GitHub
Workflow free ones? Besides, I think we can parallelize `run_examples`,
which is a bottleneck of 38 minutes currently run single threaded, so
there can be some immediate time improvement if we run it on multiple
runner instances. Is this server charged by the number of runners or the
number of minutes?
- `ubuntu-24.04` for: test_quick, test_estark_polygon, test_slow.
- `ubuntu-22.04` for: udeps.

**BEFORE Optimization**
<img width="346" alt="Screen Shot 2025-03-24 at 17 25 11"
src="https://github.com/user-attachments/assets/b197eca3-9994-4113-8f4d-1e7b106b064c"
/>

**AFTER Optimization**
See run time of this PR.

**Future Optimization**
In #2580, I'm working on creating 14 bins with 4 threads each because we
have 55 tests in total and each can run on a separate thread. This would
reduce the `test_slow` run time to that of the longest test, which is
~10 minutes.

This requires computing the bin-thread assignment because `nextest` only
supports the hash method for partitions, which isn't ideal in this case.
2025-03-26 12:08:39 +00:00
Lucas Clemente Vella
2583f7f057 Checking formatting first because it fails faster. (#2590) 2025-03-26 07:32:55 +00:00
Thibaut Schaeffer
bc8aed95db Remove pilcom (#2575)
- remove the `connect_no_witgen` test
- use the mock prover instead, when applicable
2025-03-25 08:50:06 +00:00
chriseth
efb30a75cf Install another nightly for benches. (#2519) 2025-03-05 11:00:11 +00:00
chriseth
65a2fdd6a4 Unify single step and block processor. (#2317)
Extracts the common code in single step processor and block processor
into a unified "processor".

---------

Co-authored-by: Georg Wiese <georgwiese@gmail.com>
2025-01-10 23:15:50 +00:00
Leo
c8d2703d86 free input data (#2239)
This PR allows for free runtime data besides free compile time data,
based on `initial_memory`.

- Replaces `cbor` by `bincode` in prover queries (bincode is more
efficient and cbor crashed with `u128`)
- Allows the prover to pass a runtime initial memory, only possible with
continuations (from https://github.com/powdr-labs/powdr/pull/2251, was
already merged into here, see commits list)
- Changes the `powdr` lib, which already always uses continuations, to
always use this mechanism for prover data
- Provides a new stdin-stream-like function to read inputs in sequence,
like other zkVMs.
- The function above is called `read_stdin` which I'm not super happy
with, ideally it'd just be called `read` but the QueryCalldata function
is already called `read`. I think we could just keep this as is and
change later.

---------

Co-authored-by: Lucas Clemente Vella <lvella@powdrlabs.com>
2024-12-30 19:56:46 +00:00
Georg Wiese
409ecbba42 Reduce POWDR_JIT_OPT_LEVEL in CI (#2286)
This should speed up the test. If I remember correctly, with this
compilation is only 2-3s for Poseidon (instead of ~10min). At runtime,
it is about as "fast" as runtime witgen.
2024-12-29 11:47:37 +00:00
ShuangWu121
2e978667b2 Update stwo dependency to the latest version (#2264)
### PR: Update Powdr's `stwo` Dependency and Align Toolchain

This PR updates Powdr's `stwo` dependency to the latest version, which
now uses the `nightly-2024-12-17` Rust toolchain. To ensure
compatibility, Powdr's toolchain has also been aligned with this new
nightly version.

As part of this update:
- Several modifications were made to address stricter rules and lints
introduced by the newer version of Clippy.
- System dependencies, including `uuid-dev` and `libgrpc++-dev`, were
added to resolve build and runtime issues brought about by updated
dependencies and toolchain requirements.
2024-12-23 11:48:52 +00:00
Georg Wiese
a737ed851f Call JIT (#2242)
This PR puts together the pieces to run compile-time witgen for block
machines. There are still many cases where it doesn't work yet, in which
case it falls back to run-time solving. These cases should be fixed in
future PRs.

It also fixes two bugs:
- When multiplying two affine expression, the case where one of them is
zero is now handled properly.
- `WitgenInference` now handles intermediate columns.

Note that this PR could slow down witgen by attempting to compile code
once per incoming connection and input / output combination, in block
machines. I think this should be negligible though and it gives us that
much of the new pipeline is already running in the tests and elsewhere.

# Benchmark results

I tested the code with different opt levels on a benchmark that computes
ca. $2^{16}$ Poseidon hashes.

## Baseline

```
 == Witgen profile (393220 events)
   93.0% (   30.8s): Secondary machine 0: main_poseidon (BlockMachine)
    4.1% (    1.4s): witgen (outer code)
    2.3% ( 750.8ms): Main machine (Dynamic)
    0.6% ( 204.4ms): FixedLookup
    0.0% (   3.2µs): range constraint multiplicity witgen
  ---------------------------
    ==> Total: 33.109672458s
```

## JIT (opt level 1)

```
 == Witgen profile (393222 events)
   52.3% (    7.7s): JIT-compilation
   32.0% (    4.7s): Secondary machine 0: main_poseidon (BlockMachine)
    9.2% (    1.3s): witgen (outer code)
    5.1% ( 748.3ms): Main machine (Dynamic)
    1.4% ( 213.5ms): FixedLookup
    0.0% ( 417.0ns): range constraint multiplicity witgen
  ---------------------------
    ==> Total: 14.729149333s
```

## JIT (opt level 3)

```
== Witgen profile (393222 events)
   94.6% (  107.9s): JIT-compilation
    3.4% (    3.9s): Secondary machine 0: main_poseidon (BlockMachine)
    1.1% (    1.3s): witgen (outer code)
    0.7% ( 746.5ms): Main machine (Dynamic)
    0.2% ( 204.1ms): FixedLookup
    0.0% ( 542.0ns): range constraint multiplicity witgen
  ---------------------------
    ==> Total: 114.036571291s
```
2024-12-18 20:27:49 +00:00
chriseth
0a12ffe188 Remove dependencies on build (#2217)
These runs make no use of the artefacts created in build and do a full
re-build, so we might as well run them from the start.
2024-12-10 13:28:44 +00:00
Leo
c40099e8b9 fix udeps and add to pr-tests (#2214)
This PR fixes udeps again and finally adds it to the pr-tests so it
fails in a PR already.
2024-12-10 11:52:53 +00:00
Thibaut Schaeffer
ad858a1d7d Run cargo bench in PR CI tests and report result to PR and Github Pages (#2198)
Run benchmarks in PRs, fail and warn on the PR if we got more than 20%
slower, add benchmark results to https://docs.powdr.org/dev/bench/
2024-12-09 14:51:20 +00:00
Leo
60860b7317 Expose stdout/stderr in Session (#2189)
This PR:
- Makes explicit the notion that 0=stdin, 1=stdout, 2=stdout in the
QueryCallback's "FS"
- Exposes the outputs in Session
- Removes printing to stdout and stderr in the callback itself. This is
now the responsibility of the host if needed.
- Adds the Fibonacci test with stdout to CI using the write mechanism

The idea is that after this we should also expose the proof's publics
and make a stream mechanism for inputs and outputs
2024-12-04 20:57:53 +00:00
Leo
a124dc6265 update CI ubuntu (#2187) 2024-12-03 17:32:45 +00:00
Lucas Clemente Vella
2049a358a9 Inlining system calls when possible. (#2087)
Solves #2040.
2024-11-15 22:03:58 +00:00
Lucas Clemente Vella
5b0d9a0536 Fixing CI to an specific ubuntu image (#1993) 2024-10-30 16:10:47 +00:00
Lucas Clemente Vella
cf099fc109 Builds on better runner. (#1988)
Also, shallow git clones and more verbose build output, to make it
easier to diagnose why something was rebuilt.
2024-10-30 11:59:58 +00:00
Lucas Clemente Vella
fe3a4f0ef4 Attempt to make cache more useful for PR builds. (#1959)
The same build steps is now performed in both cache build and PR build.
2024-10-25 21:23:38 +00:00
ShuangWu121
d4ea38837b change toolchain to nightly (#1908)
related to [this PR](https://github.com/powdr-labs/powdr/pull/1898)
we need to change to nightly toolchain to integrate stwo

I kept the toolchain related to riscv to be "nightly-2024-08-01" as it
is handled separately in workflow, so I made the least change to make
stwo integrate-able for now.

fix some clippy issues about the comment format on some files.

---------

Co-authored-by: chriseth <chris@ethereum.org>
2024-10-16 20:01:45 +00:00
Lucas Clemente Vella
d91e4cafa2 Replacing the old cache without deleting it first. (#1909)
Working on the assumption that there is a race condition between the
delete command and the push new cache command, that is why some days we
have no cache.
2024-10-15 15:53:51 +00:00
Leo
b16709d180 fix publics bug halo2 (#1814)
Fixes a bug where circuits with publics can't be verified properly. This
was caused by a difference in the circuit when the verification key is
generated (without witnesses) vs when the user requests a proof (with).

---------

Co-authored-by: Leo Alt <leo@ethereum.org>
2024-10-10 05:45:32 +00:00
Lucas Clemente Vella
7b7e727a81 Using Warpbuild instead of BuildJet (#1860)
BuildJet cache is broken and they won't answer support ticket.
2024-10-02 13:07:53 +00:00
Lucas Clemente Vella
a68d0b7100 Remove RISC-V assembler (#1852)
Removal of a quite important feature.

Better get many approvals.
2024-10-02 10:50:23 +00:00
Thibaut Schaeffer
0358dec845 Upgrade Rust to 1.81 (#1846)
This is a prerequisite for #1845 

TODO:
- [x] narrow down or remove the dead_code exception
2024-09-27 14:08:26 +00:00
Lucas Clemente Vella
83e2c841e6 Trying buildjet CI runner (#1777) 2024-09-11 08:53:12 +00:00
chriseth
72cacd2c78 Use cache v4 (#1774) 2024-09-10 11:06:30 +00:00
chriseth
e061ad0685 Use checkout v4 (#1773) 2024-09-10 11:05:51 +00:00
chriseth
2b5d2e1ca1 Use artifact v4 actions (#1772) 2024-09-10 09:55:04 +00:00