Commit Graph

31 Commits

Author SHA1 Message Date
Leo
101829b230 Split Rust compilation into its own CLI bin (#1348)
As suggested by @lvella .
I'm not too sure about this actually. I agree that compiling Rust ->
powdr-asm should have a separate pipeline somewhere, but before we could
do Rust -> proof in a single command, and with this we can't anymore.

- Do we expose the `prove` command and everything else here as well?
That'd be a lot of duplicated code.
- Do we force the user to first run `powdr-rs compile <rust_proj>` then
`powdr pil/prove ...`? That's potentially worse UX than right now.
- Do we keep all the Rust stuff in the `cli` crate?
2024-05-13 08:33:15 +00:00
chriseth
62c3eadc4c Re-enable non-inlined format args (#1362)
Fixes https://github.com/powdr-labs/powdr/issues/1360
2024-05-08 16:27:22 +00:00
Leo
c1f76f9bbf Halo2 single/aggr SNARK with Solidity verifier (#1256)
Co-authored-by: Georg Wiese <georgwiese@gmail.com>
Co-authored-by: Lucas Clemente Vella <lvella@powdrlabs.com>
2024-05-03 18:47:51 +00:00
Lucas Clemente Vella
5063ad670c Restore outputing commits and constants in the pipeline. (#1325) 2024-04-30 10:02:40 +00:00
Lucas Clemente Vella
ac9dcfda87 zkEVM prover backend (#1211)
Similar to #1193, but in here I am just interested in having it working
end-to-end, at least for a few cases, so that everybody can try it and
build upon.

<!--

Please follow this protocol when creating or reviewing PRs in this
repository:

- Leave the PR as draft until review is required.
- When reviewing a PR, every reviewer should assign themselves as soon
as they
start, so that other reviewers know the PR is covered. You should not be
discouraged from reviewing a PR with assignees, but you will know it is
not
  strictly needed.
- Unless the PR is very small, help the reviewers by not making forced
pushes, so
that GitHub properly tracks what has been changed since the last review;
use
  "merge" instead of "rebase". It can be squashed after approval.
- Once the comments have been addressed, explicitly let the reviewer
know the PR
  is ready again.

-->

---------

Co-authored-by: Leo <leo@powdrlabs.com>
2024-04-18 09:16:09 +00:00
Lucas Clemente Vella
9d104c2088 Removing pub and "test_" from test functions. (#1274)
One is unecessary, the other is redundant.

Co-authored-by: Lucas Clemente Vella <lucas.vella@powdrlabs.com>
2024-04-15 20:01:47 +00:00
Leo
001bd9a753 expose publics in CLI (#1236) 2024-04-04 11:29:27 +00:00
Leandro Pacheco
50eaab464e Coprocessors refactor (#1224)
- Refactor `CoProcessors` into a `Runtime` with submachines and syscalls
- Calls into prover functionality and submachines done via `ecall`
instead of "call symbol replacement"
- Call `poseidon_gl` machine with riscv registers by using the stack
(~50% speedup in many_chunks benchmark)
- New `riscv-syscalls` crate keeps the list of syscalls and related
constants
2024-04-03 18:37:32 +00:00
Vu Vo
6d6b4c9e14 Add log option in powdr command line (#1212)
# Context 
Now powdr can allow handle log in cli option. 

Example 

```bash
powdr --log DEBUG pil test_data/asm/book/hello_world.asm --field bn254 --force --inputs 0
``` 

--log value is LevelFilter 

```rust
pub enum LevelFilter {
    /// A level lower than all log levels.
    Off,
    /// Corresponds to the `Error` log level.
    Error,
    /// Corresponds to the `Warn` log level.
    Warn,
    /// Corresponds to the `Info` log level.
    Info,
    /// Corresponds to the `Debug` log level.
    Debug,
    /// Corresponds to the `Trace` log level.
    Trace,
} 
```

Fixes #164
2024-04-02 08:31:43 +00:00
Leandro Pacheco
02c52b5cb3 Remove support for running stand-alone rust files (#1220)
Change both tests and CLI to only support running rust crates
2024-04-01 18:45:40 +00:00
Leo Alt
2908938726 simplify coprocessors 2024-03-22 19:58:44 +01:00
Georg Wiese
80fafbe19c Spell-check 2024-03-20 16:12:55 +01:00
Leo Alt
b9b1d24455 allow riscv_executor::execute to take in the initial memory state 2024-03-19 20:49:21 +01:00
Georg Wiese
06866e4408 Fix soundness bug in mul instruction of RISC-V machine 2024-03-19 12:32:54 +01:00
Leo Alt
efe11f40fc enum declarations 2024-03-18 22:09:44 +01:00
chriseth
349f9aa461 Parse numbers as integers. 2024-03-08 15:48:49 +01:00
Leo Alt
18ddc65ef9 refactor pipeline to be a DAG instead of a linear path 2024-02-23 16:41:37 +01:00
Leo Alt
ef663bc649 make pilo output opt in 2024-02-22 14:19:06 +01:00
Champii1
0cf2b977dc Add versioning for the analyzed types and schema validation
Remove dangling function in  macro

Fix variable name in schema_update.rs

Read the version number at runtime instread of compile time

Fix version_number parsing and write new schema after it

Add schemars feature `preserve_order`

Change unwrap for expect in schema_update.rs

Moved schema binary in its own crate

Graceful error management in powdr-schema instead of panic

Better graceful error handling in the pipeline and the cli

Fix clippy

Put the magic number at the start of the serialized data

Revert magic at the start of the file

Moved the SerializedAnalyzed to the schemas crate

Changed serialized.rs to analyzed.rs

Changed the magic number to be the ASCII `powdr`
2024-02-15 13:48:16 +01:00
Champii1
0c6ac7d2c2 Add serialization for Analyzed<T> and pipeline resume
Fix pipeline name from file name with suffix

Variable naming

Replace `splitted` with `split`

Co-authored-by: Leo <leo@ethereum.org>

Fix clippy

Add test for serde of PIL

Changed the optimized PIL file extension to .pilo

Changed function names to reflect the operation on pil object
2024-02-13 20:41:40 +01:00
Lucas Clemente Vella
390f3a191f New backend interface. 2024-02-13 11:24:47 +00:00
Lucas Clemente Vella
40950a9feb Cleanup on file reads and writes. 2024-02-09 11:04:08 +00:00
Lucas Clemente Vella
07835e0fec Updating rust version from 1.72 to 1.74. 2024-02-08 19:17:40 +00:00
Leo Alt
45069c968b Add verification key to Halo2 and support to vkey generation and proof
verification in CLI.
2024-02-06 14:50:53 +01:00
Georg Wiese
61b26b67fb Simplify continuations with clonable pipeline 2024-01-30 17:53:49 +01:00
Leo Alt
607c0043d7 add powdr- prefix to all crates 2024-01-23 18:51:29 +01:00
Lucas Clemente Vella
fca134cb9d Binary CLI renamed to powdr 2023-05-18 16:10:08 +01:00
schaeff
0b23b5bd40 make everything generic over FieldElementTrait 2023-05-12 14:56:30 +02:00
chriseth
a323e04671 Auto-detect if argument is crate or not. 2023-04-24 18:40:37 +02:00
schaeff
6616f66d10 workaround regex feature unification issue 2023-04-21 18:39:13 +02:00
schaeff
82cfa54696 split into small crates 2023-04-21 17:16:22 +02:00