-
Notifications
You must be signed in to change notification settings - Fork 599
feat: process tagged logs #9623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
56ed296
wip
Thunkar c9a9432
Merge branch 'master' of github.com:AztecProtocol/aztec-packages into…
Thunkar 6892598
fixes and cleanup
Thunkar 7e362f3
fmt
Thunkar d1f8825
fixes
Thunkar 674464e
removed unused oracle
Thunkar 65611bf
comment
Thunkar 91bd465
Merge branch 'master' of github.com:AztecProtocol/aztec-packages into…
Thunkar 5d0dc8f
fmt
Thunkar 7f277c3
refining oracles
Thunkar 6ef6052
fmt
Thunkar 0216142
clarified comments
Thunkar 643bfba
Merge branch 'master' into gj/process_tagged_logs
Thunkar e3fa943
handle deferred and nullified notes
Thunkar e21c5ca
Merge branch 'master' into gj/process_tagged_logs
Thunkar 5e51491
Merge branch 'master' into gj/process_tagged_logs
Thunkar 15a0564
Update noir-projects/aztec-nr/aztec/src/oracle/notes.nr
Thunkar 63af392
Update noir-projects/aztec-nr/aztec/src/oracle/notes.nr
Thunkar 27b3480
Update yarn-project/circuit-types/src/interfaces/aztec-node.ts
Thunkar 4de9b3b
comments from review
Thunkar 224fc01
Merge branch 'gj/process_tagged_logs' of github.com:AztecProtocol/azt…
Thunkar 407dcf7
Merge branch 'master' into gj/process_tagged_logs
Thunkar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,51 @@ | ||
| import { Fr } from '@aztec/circuits.js'; | ||
| import { BufferReader, numToUInt32BE } from '@aztec/foundation/serialize'; | ||
|
|
||
| import { EncryptedL2NoteLog, TxHash } from '../index.js'; | ||
| import { type ExtendedUnencryptedL2Log } from './extended_unencrypted_l2_log.js'; | ||
|
|
||
| /** | ||
| * It provides documentation for the GetUnencryptedLogsResponse type. | ||
| */ | ||
| export type GetUnencryptedLogsResponse = { | ||
| /** | ||
| * An array of ExtendedUnencryptedL2Log elements. | ||
| */ | ||
| logs: ExtendedUnencryptedL2Log[]; | ||
|
|
||
| /** | ||
| * Indicates if a limit has been reached. | ||
| */ | ||
| maxLogsHit: boolean; | ||
| }; | ||
|
|
||
| export class TxScopedEncryptedL2NoteLog { | ||
| constructor( | ||
| /* | ||
| * Hash of the tx where the log is included | ||
| */ | ||
| public txHash: TxHash, | ||
| /* | ||
| * The next available leaf index for the note hash tree for this transaction. It is stored | ||
| * with the log so the noteHashIndex can be reconstructed after decryption. | ||
| */ | ||
| public dataStartIndexForTx: number, | ||
| /* | ||
| * The encrypted note log | ||
| */ | ||
| public log: EncryptedL2NoteLog, | ||
| ) {} | ||
|
|
||
| toBuffer() { | ||
| return Buffer.concat([this.txHash.toBuffer(), numToUInt32BE(this.dataStartIndexForTx), this.log.toBuffer()]); | ||
| } | ||
|
|
||
| static fromBuffer(buffer: Buffer) { | ||
| const reader = BufferReader.asReader(buffer); | ||
| return new TxScopedEncryptedL2NoteLog( | ||
| TxHash.fromField(reader.readObject(Fr)), | ||
| reader.readNumber(), | ||
| EncryptedL2NoteLog.fromBuffer(reader.readToEnd()), | ||
| ); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.