-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes: #9380 Implements the logic to sync tagged note logs from the node, taking into account the indices of "last seen" ones. Unfortunately, the approach of modularizing it as oracles and putting the logic in the contract itself was met with limitations in noir (namely, nested slices) and even the code is ready and close to becoming separate oracles, it cannot be done (yet! or at least without major caveats and performance implications)
- Loading branch information
Showing
16 changed files
with
301 additions
and
44 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
4 changes: 3 additions & 1 deletion
4
noir-projects/noir-protocol-circuits/crates/types/src/indexed_tagging_secret.nr
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,10 +1,12 @@ | ||
use crate::traits::Deserialize; | ||
use super::address::aztec_address::AztecAddress; | ||
use std::meta::derive; | ||
|
||
pub global INDEXED_TAGGING_SECRET_LENGTH: u32 = 2; | ||
pub global INDEXED_TAGGING_SECRET_LENGTH: u32 = 3; | ||
|
||
#[derive(Deserialize)] | ||
pub struct IndexedTaggingSecret { | ||
secret: Field, | ||
recipient: AztecAddress, | ||
index: u32, | ||
} |
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
9 changes: 0 additions & 9 deletions
9
yarn-project/circuits.js/src/structs/indexed_tagging_secret.ts
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { type AztecAddress } from '@aztec/foundation/aztec-address'; | ||
import { Fr } from '@aztec/foundation/fields'; | ||
|
||
export class TaggingSecret { | ||
constructor(public secret: Fr, public recipient: AztecAddress) {} | ||
|
||
toFields(): Fr[] { | ||
return [this.secret, this.recipient]; | ||
} | ||
} | ||
|
||
export class IndexedTaggingSecret extends TaggingSecret { | ||
constructor(secret: Fr, recipient: AztecAddress, public index: number) { | ||
super(secret, recipient); | ||
} | ||
|
||
override toFields(): Fr[] { | ||
return [this.secret, this.recipient, new Fr(this.index)]; | ||
} | ||
} |
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.