mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 06:13:07 +00:00
Merge pull request #1224 from mir-protocol/latest-nightly
latest nightly in CI and rust-toolchain
This commit is contained in:
commit
3571f09707
@ -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
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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],
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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]);
|
||||
}
|
||||
@ -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]);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)?;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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(
|
||||
@ -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);
|
||||
@ -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 {
|
||||
|
||||
@ -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
|
||||
|
||||
1
rust-toolchain
Normal file
1
rust-toolchain
Normal file
@ -0,0 +1 @@
|
||||
nightly
|
||||
Loading…
x
Reference in New Issue
Block a user