-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into md/04-12-feat_example_caller_and_address_o…
…pcode
- Loading branch information
Showing
105 changed files
with
4,887 additions
and
724 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
95d4d133d1eb5e0eb44cd928d8183d890e970a13 | ||
b541e793e20fa3c991e0328ec2ff7926bdcdfd45 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,8 @@ | ||
use dep::protocol_types::{address::{AztecAddress, PartialAddress, PublicKeysHash}, grumpkin_point::GrumpkinPoint}; | ||
|
||
#[oracle(getPublicKeyAndPartialAddress)] | ||
fn get_public_key_and_partial_address_oracle(_address: AztecAddress) -> [Field; 3] {} | ||
|
||
unconstrained fn get_public_key_and_partial_address_internal(address: AztecAddress) -> [Field; 3] { | ||
get_public_key_and_partial_address_oracle(address) | ||
} | ||
use dep::protocol_types::{address::AztecAddress, grumpkin_point::GrumpkinPoint}; | ||
use crate::oracle::keys::get_public_keys_and_partial_address; | ||
|
||
// To be nuked in my next PR: https://github.com/AztecProtocol/aztec-packages/pull/6219 | ||
pub fn get_public_key(address: AztecAddress) -> GrumpkinPoint { | ||
let result = get_public_key_and_partial_address_internal(address); | ||
let pub_key = GrumpkinPoint::new(result[0], result[1]); | ||
let partial_address = PartialAddress::from_field(result[2]); | ||
|
||
// TODO(#5830): disabling the following constraint until we update the oracle according to the new key scheme | ||
// let calculated_address = AztecAddress::compute(PublicKeysHash::compute(pub_key), partial_address); | ||
// assert(calculated_address.eq(address)); | ||
|
||
pub_key | ||
let result = get_public_keys_and_partial_address(address); | ||
result.0[1] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.