add beacon_hash as arg
This commit is contained in:
parent
f17a1ad70f
commit
d3cc6d3a5b
@ -21,14 +21,15 @@ const CHECK_INPUT_CORRECTNESS: CheckForCorrectness = CheckForCorrectness::No;
|
|||||||
#[allow(clippy::modulo_one)]
|
#[allow(clippy::modulo_one)]
|
||||||
fn main() {
|
fn main() {
|
||||||
let args: Vec<String> = std::env::args().collect();
|
let args: Vec<String> = std::env::args().collect();
|
||||||
if args.len() != 5 {
|
if args.len() != 6 {
|
||||||
println!("Usage: \n<challenge_file> <response_file> <circuit_power> <batch_size>");
|
println!("Usage: \n<challenge_file> <response_file> <circuit_power> <batch_size> <beacon_hash>");
|
||||||
std::process::exit(exitcode::USAGE);
|
std::process::exit(exitcode::USAGE);
|
||||||
}
|
}
|
||||||
let challenge_filename = &args[1];
|
let challenge_filename = &args[1];
|
||||||
let response_filename = &args[2];
|
let response_filename = &args[2];
|
||||||
let circuit_power = args[3].parse().expect("could not parse circuit power");
|
let circuit_power = args[3].parse().expect("could not parse circuit power");
|
||||||
let batch_size = args[4].parse().expect("could not parse batch size");
|
let batch_size = args[4].parse().expect("could not parse batch size");
|
||||||
|
let beacon_hash = args[5];
|
||||||
|
|
||||||
let parameters = CeremonyParams::<Bn256>::new(circuit_power, batch_size);
|
let parameters = CeremonyParams::<Bn256>::new(circuit_power, batch_size);
|
||||||
|
|
||||||
@ -49,9 +50,7 @@ fn main() {
|
|||||||
use rand::chacha::ChaChaRng;
|
use rand::chacha::ChaChaRng;
|
||||||
use rand::SeedableRng;
|
use rand::SeedableRng;
|
||||||
|
|
||||||
// Place block hash here (block number #564321)
|
let mut cur_hash: [u8; 32] = hex!(beacon_hash);
|
||||||
let mut cur_hash: [u8; 32] =
|
|
||||||
hex!("0000000000000000000a558a61ddc8ee4e488d647a747fe4dcc362fe2026c620");
|
|
||||||
|
|
||||||
// Performs 2^n hash iterations over it
|
// Performs 2^n hash iterations over it
|
||||||
const N: u64 = 10;
|
const N: u64 = 10;
|
||||||
|
Loading…
Reference in New Issue
Block a user