Skip to content

Commit ac87db5

Browse files
XeartyPetarKirov
authored andcommitted
refactor(): Miscellaneous improvements from the Veridise audit
1 parent 1aab03e commit ac87db5

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

beacon-light-client/plonky2/crates/circuits/src/deposit_accumulator_balance_aggregator_diva/inner_level.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use plonky2::{
1818
use plonky2_crypto::biguint::CircuitBuilderBiguint;
1919

2020
use super::first_level::{
21-
DivaAccumulatedDataTarget, DepositAccumulatorBalanceAggregatorDivaFirstLevel,
21+
DepositAccumulatorBalanceAggregatorDivaFirstLevel, DivaAccumulatedDataTarget,
2222
};
2323

2424
pub struct DepositAccumulatorBalanceAggregatorDivaInnerLevel;
@@ -38,7 +38,7 @@ impl Circuit for DepositAccumulatorBalanceAggregatorDivaInnerLevel {
3838
fn define(
3939
builder: &mut CircuitBuilder<Self::F, D>,
4040
circuit_data: &Self::Params,
41-
) -> Self::Target where {
41+
) -> Self::Target {
4242
let proof1 = verify_proof(builder, &circuit_data);
4343
let proof2 = verify_proof(builder, &circuit_data);
4444

beacon-light-client/plonky2/crates/circuits/src/deposits_accumulator_balance_aggregator/first_level.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ mod test {
896896
pw.set_proof_with_pis_target(&targets.bls_verification_proof, &bls_proof);
897897

898898
let s = Instant::now();
899-
let proof = circuit.prove(pw).unwrap();
899+
let _proof = circuit.prove(pw).unwrap();
900900
println!("Proof generated in {:?}", s.elapsed());
901901
}
902902
}

beacon-light-client/plonky2/crates/circuits/src/utils/circuit/hashing/merkle/sha256.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ pub fn assert_merkle_proof_is_valid_const_sha256<
102102
gindex: u64,
103103
) {
104104
let is_valid = validate_merkle_proof_const_sha256(builder, leaf, root, branch, gindex);
105-
let _true = builder._true();
106-
builder.connect(is_valid.target, _true.target);
105+
builder.assert_true(is_valid);
107106
}
108107

109108
pub fn hash_tree_root_sha256<F: RichField + Extendable<D>, const D: usize>(

beacon-light-client/solidity/contracts/balance_verifier/BalanceVerifier.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ abstract contract BalanceVerifier is Ownable, IBalanceVerifier {
4444
bytes calldata proof,
4545
uint256[] memory publicInputs
4646
) internal {
47-
// Make the call using `address(this).call`
4847
(bool success, bytes memory returnData) = verifier.call(
4948
// Encode the call to the `verify` function with the public inputs
5049
abi.encodeWithSelector(PlonkVerifier.Verify.selector, proof, publicInputs)

0 commit comments

Comments
 (0)