Skip to content

Commit

Permalink
Use Challenge api for Bytecode circuit (privacy-scaling-exploration…
Browse files Browse the repository at this point in the history
…s#770)

* feat: use `Challenge` api for Bytecode circuit

* fix: apply suggestion and add a helper `query_expression` to avoid create dummy gate manually
  • Loading branch information
han0110 authored Sep 21, 2022
1 parent 946f759 commit 5a47f97
Show file tree
Hide file tree
Showing 13 changed files with 272 additions and 220 deletions.
3 changes: 1 addition & 2 deletions integration-tests/tests/circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,14 @@ async fn test_tx_circuit_block(block_num: u64) {

pub async fn test_bytecode_circuit_block(block_num: u64) {
const DEGREE: u32 = 16;
let randomness = Fr::from(123456);

log::info!("test bytecode circuit, block number: {}", block_num);
let cli = get_client();
let cli = BuilderClient::new(cli).await.unwrap();
let (builder, _) = cli.gen_inputs(block_num).await.unwrap();
let bytecodes: Vec<Vec<u8>> = builder.code_db.0.values().cloned().collect();

test_bytecode_circuit(DEGREE, bytecodes, randomness);
test_bytecode_circuit::<Fr>(DEGREE, bytecodes);
}

pub async fn test_copy_circuit_block(block_num: u64) {
Expand Down
Loading

0 comments on commit 5a47f97

Please sign in to comment.