pub fn compute_next_layer(
	channel_idx: usize, fri_queue_idx: usize, merkle_queue_idx: usize, n_queries: usize,
	fri_eval_point: Uint256, fri_coset_size: usize, fri_ctx: usize, ctx: &mut Vec<Uint256>
) -> usize {
	
	let fri_queue_end = fri_queue_idx + 3 * n_queries;
	let mut fri_queue_tail = fri_queue_idx;
	let mut fri_queue_head = fri_queue_idx;
	let mut merkle_queue_tail = merkle_queue_idx;

	//Do: get coset inputs and do fri steps while still in fri queue

	let (new_queue_head0, index0, coset_offset0) = gather_coset_inputs(
		channel_idx, fri_ctx, fri_queue_head, fri_coset_size, ctx
	);
	do_fri_steps(
        fri_ctx, fri_queue_tail, coset_offset0, fri_eval_point.clone(), fri_coset_size, index0, merkle_queue_tail, ctx
	);

	merkle_queue_tail += 2;
	fri_queue_tail += 3;
	fri_queue_head = new_queue_head0;


	while fri_queue_head < fri_queue_end {
		let (new_queue_head, index, coset_offset) = gather_coset_inputs(
			channel_idx, fri_ctx, fri_queue_head, fri_coset_size, ctx
		);

		do_fri_steps(
			fri_ctx, fri_queue_tail, coset_offset, fri_eval_point.clone(), fri_coset_size, index, merkle_queue_tail, ctx
		);

		merkle_queue_tail += 2;
		fri_queue_tail += 3;
		fri_queue_head = new_queue_head;
	}

	return (fri_queue_tail - fri_queue_idx) / 3;

}
/*
	Computes the FRI step with eta = log2(friCosetSize) for all the live queries.
	The input and output data is given in array of triplets:
		(query index, FRI value, FRI inversed point)
	in the address friQueuePtr (which is &ctx[mmFriQueue:]).
	The function returns the number of live queries remaining after computing the FRI step.
	The number of live queries decreases whenever multiple query points in the same
	coset are reduced to a single query in the next FRI layer.
	As the function computes the next layer it also collects that data from
	the previous layer for Merkle verification.
*/
Computes the FRI step with eta = log2(friCosetSize) for all the live queries.
The input and output data is given in array of triplets:
(query index, FRI value, FRI inversed point)
in the address friQueuePtr (which is &ctx[mmFriQueue:]).
The function returns the number of live queries remaining after computing the FRI step.
The number of live queries decreases whenever multiple query points in the same
coset are reduced to a single query in the next FRI layer.
As the function computes the next layer it also collects that data from
the previous layer for Merkle verification.
Computes the FRI step with eta = log2 ( friCosetSize ) for all the live queries . The input and output data is given in array of triplets : ( query index FRI value FRI inversed point ) in the address friQueuePtr ( which is &ctx [ mmFriQueue : ] ) . The function returns the number of live queries remaining after computing the FRI step . The number of live queries decreases whenever multiple query points in the same coset are reduced to a single query in the next FRI layer . As the function computes the next layer it also collects that data from the previous layer for Merkle verification .
pub fn compute_next_layer(
	channel_idx: usize, fri_queue_idx: usize, merkle_queue_idx: usize, n_queries: usize,
	fri_eval_point: Uint256, fri_coset_size: usize, fri_ctx: usize, ctx: &mut Vec<Uint256>
) -> usize {
	let fri_queue_end = fri_queue_idx + 3 * n_queries;
	let mut fri_queue_tail = fri_queue_idx;
	let mut fri_queue_head = fri_queue_idx;
	let mut merkle_queue_tail = merkle_queue_idx;
	//Do: get coset inputs and do fri steps while still in fri queue
	let (new_queue_head0, index0, coset_offset0) = gather_coset_inputs(
		channel_idx, fri_ctx, fri_queue_head, fri_coset_size, ctx
	);
	do_fri_steps(
        fri_ctx, fri_queue_tail, coset_offset0, fri_eval_point.clone(), fri_coset_size, index0, merkle_queue_tail, ctx
	);
	merkle_queue_tail += 2;
	fri_queue_tail += 3;
	fri_queue_head = new_queue_head0;
	while fri_queue_head < fri_queue_end {
		let (new_queue_head, index, coset_offset) = gather_coset_inputs(
			channel_idx, fri_ctx, fri_queue_head, fri_coset_size, ctx
		);
		do_fri_steps(
			fri_ctx, fri_queue_tail, coset_offset, fri_eval_point.clone(), fri_coset_size, index, merkle_queue_tail, ctx
		);
		merkle_queue_tail += 2;
		fri_queue_tail += 3;
		fri_queue_head = new_queue_head;
	}
	return (fri_queue_tail - fri_queue_idx) / 3;
}
pub fn compute_next_layer ( channel_idx : usize , fri_queue_idx : usize , merkle_queue_idx : usize , n_queries : usize , fri_eval_point : Uint256 , fri_coset_size : usize , fri_ctx : usize , ctx : & mut Vec < Uint256 > ) -> usize { let fri_queue_end = fri_queue_idx + 3 * n_queries ; let mut fri_queue_tail = fri_queue_idx ; let mut fri_queue_head = fri_queue_idx ; let mut merkle_queue_tail = merkle_queue_idx ; //Do: get coset inputs and do fri steps while still in fri queue let ( new_queue_head0 , index0 , coset_offset0 ) = gather_coset_inputs ( channel_idx , fri_ctx , fri_queue_head , fri_coset_size , ctx ) ; do_fri_steps ( fri_ctx , fri_queue_tail , coset_offset0 , fri_eval_point . clone ( ) , fri_coset_size , index0 , merkle_queue_tail , ctx ) ; merkle_queue_tail += 2 ; fri_queue_tail += 3 ; fri_queue_head = new_queue_head0 ; while fri_queue_head < fri_queue_end { let ( new_queue_head , index , coset_offset ) = gather_coset_inputs ( channel_idx , fri_ctx , fri_queue_head , fri_coset_size , ctx ) ; do_fri_steps ( fri_ctx , fri_queue_tail , coset_offset , fri_eval_point . clone ( ) , fri_coset_size , index , merkle_queue_tail , ctx ) ; merkle_queue_tail += 2 ; fri_queue_tail += 3 ; fri_queue_head = new_queue_head ; } return ( fri_queue_tail - fri_queue_idx ) / 3 ; }
Computes the FRI step with eta = log2(friCosetSize) for all the live queries.
Computes the FRI step with eta = log2 ( friCosetSize ) for all the live queries .
channel_idx
usize
fri_queue_idx
usize
merkle_queue_idx
usize
n_queries
usize
fri_eval_point
Uint256
fri_coset_size
usize
fri_ctx
usize
ctx
&mut Vec<Uint256>
channel_idx
usize
fri_queue_idx
usize
merkle_queue_idx
usize
n_queries
usize
fri_eval_point
Uint256
fri_coset_size
usize
fri_ctx
usize
ctx
&mut Vec<Uint256>