feat: testing private events from Aztec.nr#20640
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
e3ee438 to
21ff0cc
Compare
557d5c7 to
58006da
Compare
58006da to
7d799f3
Compare
7d799f3 to
74001a2
Compare
74001a2 to
7dc8ff2
Compare
|
@nchamo LMK if you would not feel comfortable enough yet to review this. Can re-assing if that's the case. |
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
3660419 to
908c4d6
Compare
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
| /// Returns up to `MAX_PRIVATE_EVENTS_PER_TXE_QUERY` private events of type `Event` that were emitted by | ||
| /// `contract_address` and available in `scope`. |
There was a problem hiding this comment.
This is inaccurate as it is missing the fact that it only searches the last block. It also does not explain wtf scope is.
There was a problem hiding this comment.
Somewhat addressed in 3361896
But I am not sure about this:
This is inaccurate as it is missing the fact that it only searches the last block.
Do you mean by that "up to last block"?
By searching only the last block I imagine events emitted in the last block. Or is your mental model here that "last block" contains any state that got accumulated by the chain up to that block?
I don't know the code of TXE enough to be sure here.
There was a problem hiding this comment.
I may have been wrong when I wrote this, as it seems like the oracle does search from genesis all the way to the latest block.
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Wraps the low-level oracle so users don't need to import and call the oracle directly. This provides a higher-level API consistent with the rest of TestEnvironment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Short first paragraph, clarify that only last block is searched, explain what scope means (event recipient), mention self.emit, and point users to TestEnvironment method instead of using the oracle directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move experimental warning to top of section as a note block. Use env.get_private_events instead of importing the oracle directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ents_from_aztec.nr
|
@nventuro Re-requested a review here even though the PR is not yet finished as I need some clarifications - left the questions in unresolved discussions above. Also please LMK if merging |
|
I'd hold this off until we need it, given it's not high priority right now and would either go unused or subject users to API churn. |
|
Giving up on this |

Note: We will probably want to merge
SerializeandDeserializetraits before merging this as it would make the diff smaller - waiting for response from Mitch to see whether it's a good time to do that change.Closes https://linear.app/aztec-labs/issue/F-300/feature-access-events-in-aztecnr-tests