Skip to content
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

latest nightly in CI and rust-toolchain #1224

Merged
merged 9 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-06-30
toolchain: nightly
override: true

- name: rust-cache
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-06-30
toolchain: nightly
override: true
components: rustfmt, clippy

Expand Down
2 changes: 1 addition & 1 deletion evm/src/arithmetic/modular.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ fn bigint_to_columns<const N: usize>(num: &BigInt) -> [i64; N] {
/// NB: `operation` can set the higher order elements in its result to
/// zero if they are not used.
pub(crate) fn generate_modular_op<F: PrimeField64>(
lv: &mut [F],
lv: &[F],
nv: &mut [F],
filter: usize,
pol_input: [i64; 2 * N_LIMBS - 1],
Expand Down
4 changes: 2 additions & 2 deletions evm/src/cpu/bootstrap_kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ pub(crate) fn eval_bootstrap_kernel_circuit<F: RichField + Extendable<D>, const
let one = builder.one_extension();

// IS_BOOTSTRAP_KERNEL must have an init value of 1, a final value of 0, and a delta in {0, -1}.
let local_is_bootstrap = builder.add_many_extension(local_values.op.into_iter());
let local_is_bootstrap = builder.add_many_extension(local_values.op.iter());
let local_is_bootstrap = builder.sub_extension(one, local_is_bootstrap);
let next_is_bootstrap = builder.add_many_extension(next_values.op.into_iter());
let next_is_bootstrap = builder.add_many_extension(next_values.op.iter());
let next_is_bootstrap = builder.sub_extension(one, next_is_bootstrap);
let constraint = builder.sub_extension(local_is_bootstrap, one);
yield_constr.constraint_first_row(builder, constraint);
Expand Down
2 changes: 1 addition & 1 deletion evm/src/cpu/kernel/tests/bignum/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ fn test_add_bignum(a: BigUint, b: BigUint, expected_output: BigUint) -> Result<(
fn test_addmul_bignum(a: BigUint, b: BigUint, c: u128, expected_output: BigUint) -> Result<()> {
let len = bignum_len(&a).max(bignum_len(&b));
let mut memory = pad_bignums(&[a, b], len);
memory.splice(len..len, vec![0.into(); 2].iter().cloned());
memory.splice(len..len, [0.into(); 2].iter().cloned());

let a_start_loc = 0;
let b_start_loc = len + 2;
Expand Down
6 changes: 3 additions & 3 deletions evm/src/cpu/kernel/tests/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn test_log_2() -> Result<()> {
let logs_entry = KERNEL.global_labels["log_n_entry"];
let address: Address = thread_rng().gen();
let num_topics = U256::from(2);
let topics = vec![4.into(), 5.into()];
let topics = [4.into(), 5.into()];
let data_len = U256::from(3);
let data_offset = U256::from(0);

Expand Down Expand Up @@ -109,7 +109,7 @@ fn test_log_4() -> Result<()> {
let logs_entry = KERNEL.global_labels["log_n_entry"];
let address: Address = thread_rng().gen();
let num_topics = U256::from(4);
let topics = vec![45.into(), 46.into(), 47.into(), 48.into()];
let topics = [45.into(), 46.into(), 47.into(), 48.into()];
let data_len = U256::from(1);
let data_offset = U256::from(2);

Expand Down Expand Up @@ -170,7 +170,7 @@ fn test_log_5() -> Result<()> {
let logs_entry = KERNEL.global_labels["log_n_entry"];
let address: Address = thread_rng().gen();
let num_topics = U256::from(5);
let topics = vec![1.into(), 2.into(), 3.into(), 4.into(), 5.into()];
let topics = [1.into(), 2.into(), 3.into(), 4.into(), 5.into()];
let data_len = U256::from(0);
let data_offset = U256::from(0);

Expand Down
4 changes: 2 additions & 2 deletions evm/src/cpu/kernel/tests/receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ fn test_mpt_insert_receipt() -> Result<()> {
}

// stack: transaction_nb, value_ptr, retdest
let initial_stack = vec![retdest, cur_trie_data.len().into(), 0.into()];
let initial_stack = [retdest, cur_trie_data.len().into(), 0.into()];
for i in 0..initial_stack.len() {
interpreter.push(initial_stack[i]);
}
Expand Down Expand Up @@ -487,7 +487,7 @@ fn test_mpt_insert_receipt() -> Result<()> {

// Get updated TrieData segment.
cur_trie_data = interpreter.get_memory_segment(Segment::TrieData);
let initial_stack2 = vec![retdest, cur_trie_data.len().into(), 1.into()];
let initial_stack2 = [retdest, cur_trie_data.len().into(), 1.into()];
for i in 0..initial_stack2.len() {
interpreter.push(initial_stack2[i]);
}
Expand Down
2 changes: 1 addition & 1 deletion evm/src/cpu/membus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub mod channel_indices {
pub const NUM_CHANNELS: usize = channel_indices::GP.end;

/// Calculates `lv.stack_len_bounds_aux`. Note that this must be run after decode.
pub fn generate<F: PrimeField64>(lv: &mut CpuColumnsView<F>) {
pub fn generate<F: PrimeField64>(lv: &CpuColumnsView<F>) {
let cycle_filter: F = COL_MAP.op.iter().map(|&col_i| lv[col_i]).sum();
if cycle_filter != F::ZERO {
assert!(lv.is_kernel_mode.to_canonical_u64() <= 1);
Expand Down
2 changes: 1 addition & 1 deletion evm/src/recursive_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ where
let circuit = buffer.read_circuit_data(gate_serializer, generator_serializer)?;
let target_vec = buffer.read_target_vec()?;
let init_challenger_state_target =
<C::Hasher as AlgebraicHasher<F>>::AlgebraicPermutation::new(target_vec.into_iter());
<C::Hasher as AlgebraicHasher<F>>::AlgebraicPermutation::new(target_vec);
let zero_target = buffer.read_target()?;
let stark_proof_target = StarkProofTarget::from_buffer(buffer)?;
let ctl_challenges_target = GrandProductChallengeSet::from_buffer(buffer)?;
Expand Down
2 changes: 1 addition & 1 deletion evm/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ fn add_data_write<F, const D: usize>(
where
F: RichField + Extendable<D>,
{
let mut row = vec![F::ZERO; 13];
let mut row = [F::ZERO; 13];
row[0] = F::ZERO; // is_read
row[1] = F::ZERO; // context
row[2] = segment;
Expand Down
2 changes: 1 addition & 1 deletion evm/src/witness/transition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ fn try_perform_instruction<F: Field>(state: &mut GenerationState<F>) -> Result<(
perform_op(state, op, row)
}

fn log_kernel_instruction<F: Field>(state: &mut GenerationState<F>, op: Operation) {
fn log_kernel_instruction<F: Field>(state: &GenerationState<F>, op: Operation) {
// The logic below is a bit costly, so skip it if debug logs aren't enabled.
if !log_enabled!(log::Level::Debug) {
return;
Expand Down
6 changes: 3 additions & 3 deletions evm/src/witness/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub(crate) fn mem_read_with_log<F: Field>(
pub(crate) fn mem_write_log<F: Field>(
channel: MemoryChannel,
address: MemoryAddress,
state: &mut GenerationState<F>,
state: &GenerationState<F>,
val: U256,
) -> MemoryOp {
MemoryOp::new(
Expand Down Expand Up @@ -96,7 +96,7 @@ pub(crate) fn mem_read_code_with_log_and_fill<F: Field>(
pub(crate) fn mem_read_gp_with_log_and_fill<F: Field>(
n: usize,
address: MemoryAddress,
state: &mut GenerationState<F>,
state: &GenerationState<F>,
row: &mut CpuColumnsView<F>,
) -> (U256, MemoryOp) {
let (val, op) = mem_read_with_log(MemoryChannel::GeneralPurpose(n), address, state);
Expand All @@ -120,7 +120,7 @@ pub(crate) fn mem_read_gp_with_log_and_fill<F: Field>(
pub(crate) fn mem_write_gp_log_and_fill<F: Field>(
n: usize,
address: MemoryAddress,
state: &mut GenerationState<F>,
state: &GenerationState<F>,
row: &mut CpuColumnsView<F>,
val: U256,
) -> MemoryOp {
Expand Down
3 changes: 3 additions & 0 deletions plonky2/src/gates/selectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ pub(crate) fn selector_polynomials<F: RichField + Extendable<D>, const D: usize>

// Special case if we can use only one selector polynomial.
if max_gate_degree + num_gates - 1 <= max_degree {
// We *want* `groups` to be a vector containing one Range (all gates are in one selector group),
// but Clippy doesn't trust us.
#[allow(clippy::single_range_in_vec_init)]
return (
vec![PolynomialValues::new(
instances
Expand Down
1 change: 1 addition & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nightly
Loading