Skip to content

chore: update toolchain #309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 68 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
bd84b82
WIP: try with latest stable toolchain
matthiasgoergens Oct 4, 2024
81c09b0
Need nightly
matthiasgoergens Oct 4, 2024
74956b3
Use non-archived action
matthiasgoergens Oct 4, 2024
ab2c19d
cargo make fmt-all
matthiasgoergens Oct 4, 2024
fd6fffb
Revert "cargo make fmt-all"
matthiasgoergens Oct 4, 2024
52323b0
Foo
matthiasgoergens Oct 4, 2024
72389ee
Remove trailing whitespaces
matthiasgoergens Oct 4, 2024
3072d3d
edition instead of style_edition
matthiasgoergens Oct 4, 2024
d1fe6d8
Restore style_edition
matthiasgoergens Oct 4, 2024
029de6e
Merge remote-tracking branch 'origin/master' into matthias/toolchain-…
matthiasgoergens Oct 4, 2024
4e7b4ed
Make clippy happier
matthiasgoergens Oct 4, 2024
12cedf2
Make clippy happier
matthiasgoergens Oct 4, 2024
76644fe
Remove obsolete function
matthiasgoergens Oct 4, 2024
0298b6e
Fix is_power_of_two usage
matthiasgoergens Oct 4, 2024
56cb4f7
Merge branch 'matthias/make-clippy-happier-0' into matthias/toolchain…
matthiasgoergens Oct 4, 2024
9ad3322
Merge remote-tracking branch 'origin/master' into matthias/toolchain-…
matthiasgoergens Oct 7, 2024
9f0ae64
Merge remote-tracking branch 'origin/master' into matthias/toolchain-…
matthiasgoergens Oct 7, 2024
dccb8b6
Fix typo
matthiasgoergens Oct 7, 2024
20e8206
Fix all warnings
matthiasgoergens Oct 14, 2024
6ebab72
Deny warnings on CI
matthiasgoergens Oct 14, 2024
ea7de97
Run clippy almost everywhere
matthiasgoergens Oct 14, 2024
2c83fe0
Exclude cargo-check, too
matthiasgoergens Oct 14, 2024
0444bd9
Fix toolchain
matthiasgoergens Oct 14, 2024
a33ecc4
Cache more
matthiasgoergens Oct 14, 2024
029fe8c
Check tests and examples and benchmarks, too
matthiasgoergens Oct 14, 2024
9af2109
Fix tests and examples, too
matthiasgoergens Oct 14, 2024
a90e10b
Minimise diff
matthiasgoergens Oct 14, 2024
dbc83ef
Minimise diff
matthiasgoergens Oct 14, 2024
528cbf0
Fix benches
matthiasgoergens Oct 14, 2024
b30f6b9
Fix the rest
matthiasgoergens Oct 14, 2024
069c64d
Merge remote-tracking branch 'origin/master' into matthias/fix-some-w…
matthiasgoergens Oct 14, 2024
878de5d
Merge branch 'matthias/fix-some-warnings' into matthias/clippy-everyw…
matthiasgoergens Oct 14, 2024
29a3147
Remove unused and broken singer-pro
matthiasgoergens Oct 14, 2024
47b1a1b
Fix some clippy
matthiasgoergens Oct 14, 2024
fa5e692
More clippy
matthiasgoergens Oct 14, 2024
309850d
Use more default
matthiasgoergens Oct 14, 2024
2c2125e
Make clippy happier
matthiasgoergens Oct 14, 2024
5407ec0
More clippy
matthiasgoergens Oct 14, 2024
06c8e3e
More clippy
matthiasgoergens Oct 14, 2024
8ec6784
Make clippy happy
matthiasgoergens Oct 14, 2024
7b37563
Merge branch 'master' into matthias/clippy-everywhere
matthiasgoergens Oct 14, 2024
4328fe3
Merge remote-tracking branch 'origin/master' into matthias/fix-some-w…
matthiasgoergens Oct 14, 2024
460a151
Remove singer-pro
matthiasgoergens Oct 14, 2024
63a046b
Merge branch 'matthias/fix-some-warnings' into matthias/clippy-everyw…
matthiasgoergens Oct 14, 2024
1211305
new -> default
matthiasgoergens Oct 14, 2024
0dbc26c
new -> default
matthiasgoergens Oct 14, 2024
2992ce3
Make 'not(debug_assertions) work
matthiasgoergens Oct 14, 2024
4c8f14f
Merge branch 'matthias/fix-some-warnings' into matthias/clippy-everyw…
matthiasgoergens Oct 14, 2024
a2605bc
Run cargo check in release mode too
matthiasgoergens Oct 14, 2024
ac943d4
Merge branch 'matthias/fix-some-warnings' into matthias/clippy-everyw…
matthiasgoergens Oct 14, 2024
5be2eef
Clippy in release mode, too
matthiasgoergens Oct 14, 2024
48035ec
Fix release clippy
matthiasgoergens Oct 14, 2024
ef79d32
Merge branch 'master' into matthias/fix-some-warnings
matthiasgoergens Oct 14, 2024
5def6bd
Merge branch 'master' into matthias/clippy-everywhere
matthiasgoergens Oct 14, 2024
6297f7f
Merge remote-tracking branch 'origin/matthias/fix-some-warnings' into…
matthiasgoergens Oct 14, 2024
4b33fbc
Merge remote-tracking branch 'origin/matthias/clippy-everywhere' into…
matthiasgoergens Oct 14, 2024
6721e97
Merge remote-tracking branch 'origin/master' into matthias/toolchain-…
matthiasgoergens Oct 14, 2024
9cef9a5
Merge
matthiasgoergens Oct 14, 2024
df8e72a
Merge remote-tracking branch 'origin/master' into matthias/fix-some-w…
matthiasgoergens Oct 15, 2024
69c76b8
Merge branch 'matthias/fix-some-warnings' into matthias/toolchain-202…
matthiasgoergens Oct 15, 2024
471d4b9
Restore mockprover
matthiasgoergens Oct 15, 2024
aaa3e66
Update toolchain everywhere
matthiasgoergens Oct 15, 2024
5b49d11
Fix warning
matthiasgoergens Oct 15, 2024
70657c6
Provide unsafe feature
matthiasgoergens Oct 15, 2024
40c2f98
Fix warnings
matthiasgoergens Oct 15, 2024
8b602dd
Make clippy happy
matthiasgoergens Oct 15, 2024
d1a2599
fmt
matthiasgoergens Oct 15, 2024
58cb4e2
Make clippy happy
matthiasgoergens Oct 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
components: rustfmt, clippy
targets: riscv32im-unknown-none-elf
# TODO(Matthias): see whether we can keep this in sync with rust-toolchain.toml automatically?
toolchain: nightly-2024-05-02
toolchain: nightly-2024-10-03
- name: Cargo cache
uses: actions/cache@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
targets: riscv32im-unknown-none-elf
# TODO(Matthias): see whether we can keep this in sync with rust-toolchain.toml automatically?
toolchain: nightly-2024-05-02
toolchain: nightly-2024-10-03
- name: Cargo cache
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions ceno_emul/src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ extern crate alloc;
use alloc::collections::BTreeMap;

use crate::addr::WORD_SIZE;
use anyhow::{anyhow, bail, Context, Result};
use elf::{endian::LittleEndian, file::Class, ElfBytes};
use anyhow::{Context, Result, anyhow, bail};
use elf::{ElfBytes, endian::LittleEndian, file::Class};

/// A RISC Zero program
pub struct Program {
Expand Down
2 changes: 1 addition & 1 deletion ceno_emul/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mod addr;
pub use addr::*;

mod platform;
pub use platform::{Platform, CENO_PLATFORM};
pub use platform::{CENO_PLATFORM, Platform};

mod tracer;
pub use tracer::{Change, MemOp, ReadOp, StepRecord, Tracer, WriteOp};
Expand Down
4 changes: 2 additions & 2 deletions ceno_emul/src/rv32im.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use anyhow::{anyhow, Result};
use anyhow::{Result, anyhow};
use std::sync::OnceLock;
use strum_macros::EnumIter;

use super::addr::{ByteAddr, RegIdx, Word, WordAddr, WORD_SIZE};
use super::addr::{ByteAddr, RegIdx, WORD_SIZE, Word, WordAddr};

pub trait EmuContext {
// Handle environment call
Expand Down
13 changes: 5 additions & 8 deletions ceno_emul/src/tracer.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::{collections::HashMap, fmt, mem};

use crate::{
CENO_PLATFORM, PC_STEP_SIZE,
addr::{ByteAddr, Cycle, RegIdx, Word, WordAddr},
rv32im::DecodedInstruction,
CENO_PLATFORM, PC_STEP_SIZE,
};

/// An instruction and its context in an execution trace. That is concrete values of registers and memory.
Expand Down Expand Up @@ -239,13 +239,10 @@ impl Tracer {
/// Return the completed step and advance to the next cycle.
pub fn advance(&mut self) -> StepRecord {
let next_cycle = self.record.cycle + Self::SUBCYCLES_PER_INSN;
mem::replace(
&mut self.record,
StepRecord {
cycle: next_cycle,
..StepRecord::default()
},
)
mem::replace(&mut self.record, StepRecord {
cycle: next_cycle,
..StepRecord::default()
})
}

pub fn store_pc(&mut self, pc: ByteAddr) {
Expand Down
4 changes: 2 additions & 2 deletions ceno_emul/src/vm_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ use std::collections::HashMap;

use super::rv32im::EmuContext;
use crate::{
Program,
addr::{ByteAddr, RegIdx, Word, WordAddr},
platform::Platform,
rv32im::{DecodedInstruction, Emulator, TrapCause},
tracer::{Change, StepRecord, Tracer},
Program,
};
use anyhow::{anyhow, Result};
use anyhow::{Result, anyhow};
use std::iter::from_fn;

/// An implementation of the machine state and of the side-effects of operations.
Expand Down
2 changes: 1 addition & 1 deletion ceno_emul/tests/test_elf.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use anyhow::Result;
use ceno_emul::{ByteAddr, EmuContext, InsnKind, StepRecord, VMState, CENO_PLATFORM};
use ceno_emul::{ByteAddr, CENO_PLATFORM, EmuContext, InsnKind, StepRecord, VMState};

#[test]
fn test_ceno_rt_mini() -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion ceno_emul/tests/test_vm_trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use anyhow::Result;
use std::collections::HashMap;

use ceno_emul::{
ByteAddr, Cycle, EmuContext, InsnKind, StepRecord, Tracer, VMState, WordAddr, CENO_PLATFORM,
ByteAddr, CENO_PLATFORM, Cycle, EmuContext, InsnKind, StepRecord, Tracer, VMState, WordAddr,
};

#[test]
Expand Down
2 changes: 2 additions & 0 deletions ceno_zkvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ glob = "0.3"
default = ["riv32"]
riv32 = []
riv64 = []
non_pow2_rayon_thread = []
flamegraph = ["pprof/flamegraph", "pprof/criterion"]

[[bench]]
name = "riscv_add"
Expand Down
2 changes: 1 addition & 1 deletion ceno_zkvm/benches/riscv_add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::time::{Duration, Instant};
use ark_std::test_rng;
use ceno_zkvm::{
self,
instructions::{riscv::arith::AddInstruction, Instruction},
instructions::{Instruction, riscv::arith::AddInstruction},
scheme::prover::ZKVMProver,
structs::{ZKVMConstraintSystem, ZKVMFixedTraces},
};
Expand Down
8 changes: 4 additions & 4 deletions ceno_zkvm/examples/riscv_opcodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ use clap::Parser;
use const_env::from_env;

use ceno_emul::{
ByteAddr,
ByteAddr, CENO_PLATFORM,
InsnKind::{ADD, BLTU, EANY, JAL},
StepRecord, VMState, CENO_PLATFORM,
StepRecord, VMState,
};
use ceno_zkvm::{
instructions::riscv::ecall::HaltInstruction,
scheme::{constants::MAX_NUM_VARIABLES, verifier::ZKVMVerifier, PublicValues},
scheme::{PublicValues, constants::MAX_NUM_VARIABLES, verifier::ZKVMVerifier},
structs::{ZKVMConstraintSystem, ZKVMFixedTraces, ZKVMWitnesses},
tables::{AndTableCircuit, LtuTableCircuit, U16TableCircuit},
};
Expand All @@ -24,7 +24,7 @@ use goldilocks::GoldilocksExt2;
use mpcs::{Basefold, BasefoldRSParams, PolynomialCommitmentScheme};
use rand_chacha::ChaCha8Rng;
use tracing_flame::FlameLayer;
use tracing_subscriber::{fmt, layer::SubscriberExt, EnvFilter, Registry};
use tracing_subscriber::{EnvFilter, Registry, fmt, layer::SubscriberExt};
use transcript::Transcript;

#[from_env]
Expand Down
2 changes: 1 addition & 1 deletion ceno_zkvm/src/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ mod tests {

use crate::circuit_builder::{CircuitBuilder, ConstraintSystem};

use super::{fmt, Expression, ToExpr};
use super::{Expression, ToExpr, fmt};
use ff::Field;

#[test]
Expand Down
2 changes: 1 addition & 1 deletion ceno_zkvm/src/expression/monomial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ mod tests {
use super::*;
use ff::Field;
use goldilocks::{Goldilocks as F, GoldilocksExt2 as E};
use rand_chacha::{rand_core::SeedableRng, ChaChaRng};
use rand_chacha::{ChaChaRng, rand_core::SeedableRng};

#[test]
fn test_to_monomial_form() {
Expand Down
4 changes: 2 additions & 2 deletions ceno_zkvm/src/gadgets/div.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use std::{fmt::Display, mem::MaybeUninit};
use ff_ext::ExtensionField;

use crate::{
Value,
circuit_builder::CircuitBuilder,
error::ZKVMError,
instructions::riscv::constants::{UInt, UINT_LIMBS},
instructions::riscv::constants::{UINT_LIMBS, UInt},
witness::LkMultiplicity,
Value,
};

use super::AssertLTConfig;
Expand Down
2 changes: 1 addition & 1 deletion ceno_zkvm/src/gadgets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ mod div;
mod is_lt;
mod is_zero;
pub use div::DivConfig;
pub use is_lt::{cal_lt_diff, AssertLTConfig, InnerLtConfig, IsLtConfig};
pub use is_lt::{AssertLTConfig, InnerLtConfig, IsLtConfig, cal_lt_diff};
pub use is_zero::{IsEqualConfig, IsZeroConfig};
Loading
Loading