Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
feat!: replace MerkleMembership opcode with ComputeMerkleRoot (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Apr 26, 2023
1 parent 00282dc commit 74bfee8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions acir/src/circuit/black_box_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum BlackBoxFunc {
RANGE,
SHA256,
Blake2s,
MerkleMembership,
ComputeMerkleRoot,
SchnorrVerify,
Pedersen,
// 128 here specifies that this function
Expand All @@ -35,7 +35,7 @@ impl BlackBoxFunc {
match self {
BlackBoxFunc::AES => 0,
BlackBoxFunc::SHA256 => 1,
BlackBoxFunc::MerkleMembership => 2,
BlackBoxFunc::ComputeMerkleRoot => 2,
BlackBoxFunc::SchnorrVerify => 3,
BlackBoxFunc::Blake2s => 4,
BlackBoxFunc::Pedersen => 5,
Expand All @@ -52,7 +52,7 @@ impl BlackBoxFunc {
let function = match index {
0 => BlackBoxFunc::AES,
1 => BlackBoxFunc::SHA256,
2 => BlackBoxFunc::MerkleMembership,
2 => BlackBoxFunc::ComputeMerkleRoot,
3 => BlackBoxFunc::SchnorrVerify,
4 => BlackBoxFunc::Blake2s,
5 => BlackBoxFunc::Pedersen,
Expand All @@ -71,7 +71,7 @@ impl BlackBoxFunc {
match self {
BlackBoxFunc::AES => "aes",
BlackBoxFunc::SHA256 => "sha256",
BlackBoxFunc::MerkleMembership => "merkle_membership",
BlackBoxFunc::ComputeMerkleRoot => "compute_merkle_root",
BlackBoxFunc::SchnorrVerify => "schnorr_verify",
BlackBoxFunc::Blake2s => "blake2s",
BlackBoxFunc::Pedersen => "pedersen",
Expand All @@ -88,7 +88,7 @@ impl BlackBoxFunc {
match op_name {
"aes" => Some(BlackBoxFunc::AES),
"sha256" => Some(BlackBoxFunc::SHA256),
"merkle_membership" => Some(BlackBoxFunc::MerkleMembership),
"compute_merkle_root" => Some(BlackBoxFunc::ComputeMerkleRoot),
"schnorr_verify" => Some(BlackBoxFunc::SchnorrVerify),
"blake2s" => Some(BlackBoxFunc::Blake2s),
"pedersen" => Some(BlackBoxFunc::Pedersen),
Expand Down Expand Up @@ -122,7 +122,7 @@ impl BlackBoxFunc {
BlackBoxFunc::HashToField128Security => {
FuncDefinition { name, input_size: InputSize::Variable, output_size: OutputSize(1) }
}
BlackBoxFunc::MerkleMembership => {
BlackBoxFunc::ComputeMerkleRoot => {
FuncDefinition { name, input_size: InputSize::Variable, output_size: OutputSize(1) }
}
BlackBoxFunc::SchnorrVerify => FuncDefinition {
Expand Down

0 comments on commit 74bfee8

Please sign in to comment.