-
Notifications
You must be signed in to change notification settings - Fork 614
test(e2e): onchain message delivery harness #24373
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
vezenovm
merged 52 commits into
merge-train/fairies-v5
from
mv/e2e-onchain-delivery-harness
Jul 7, 2026
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
a8e71dc
test(end-to-end): onchain message delivery harness (mode x secret-sou…
vezenovm 082a4ec
refactor: rename ConstrainedDeliveryTest contract to OnchainDeliveryTest
vezenovm 7d9d17a
Merge branch 'merge-train/fairies-v5' into mv/e2e-onchain-delivery-ha…
vezenovm 458ec6c
fmt
vezenovm 6d7d6df
chore(end-to-end): restore #24281 timing_env testEnvironment
vezenovm f6f432e
test cleanup
vezenovm 7a75fed
test(end-to-end): pin rejected-source and cross-mode handshake reuse
vezenovm 648c633
package json field
vezenovm c9e93cd
more cleanup
vezenovm 50d6635
Merge branch 'merge-train/fairies-v5' into mv/e2e-onchain-delivery-ha…
vezenovm e4d7905
lint
vezenovm c68be78
Merge remote-tracking branch 'origin/mv/e2e-onchain-delivery-harness'…
vezenovm 47ebeea
test(end-to-end): pin onchain-delivery discovery boundaries
vezenovm 2bcdacb
more tests and improved harness
vezenovm aa23c9a
Merge branch 'merge-train/fairies-v5' into mv/e2e-onchain-delivery-ha…
vezenovm 27dd6b1
cleanup
vezenovm 4c8289a
test(end-to-end): pin reverse cross-mode handshake reuse
vezenovm 27ad174
improve comments
vezenovm 5210aaa
test cleanup
vezenovm f5c8a4e
move tests
vezenovm 4e06e36
cleanup log test
vezenovm 922952a
fix(pxe): remove unused recipientTaggingStore var in log_service.test.ts
vezenovm 9e769aa
fix(end-to-end): un-nest the arbitrary-secret rejection test
vezenovm 481dac6
docs(end-to-end): explain why the arbitrary-secret test stays top-level
vezenovm d6ae4b1
fix(end-to-end): address onchain-delivery review feedback
vezenovm dfc1ff1
Merge branch 'merge-train/fairies-v5' into mv/e2e-onchain-delivery-ha…
vezenovm eea90a9
fix(end-to-end): assert handshake-reuse hook calls instead of throwing
vezenovm b547463
fix(pxe): update log_service.test.ts to renamed AppTaggingSecret.comp…
vezenovm 4ec5ce0
Merge branch 'merge-train/fairies-v5' into mv/e2e-onchain-delivery-ha…
vezenovm fe1d77d
Merge branch 'merge-train/fairies-v5' into mv/e2e-onchain-delivery-ha…
vezenovm 09392c9
fix(ci): wait for dockerd to finish removing a stale container before…
vezenovm 64e43e4
empty
vezenovm bb65ad0
Merge remote-tracking branch 'origin/mv/e2e-onchain-delivery-harness'…
vezenovm 23ed748
.
vezenovm 5861355
.
vezenovm cb3fd61
Merge branch 'merge-train/fairies-v5' into mv/e2e-onchain-delivery-ha…
vezenovm 0184e78
fix(pxe): pass derived account privacy keys to addAccount in log_serv…
vezenovm 59e55dd
fix(wallet-sdk): use derived contract address in registerContract
AztecBot e5d2b58
Merge branch 'merge-train/fairies-v5' into mv/e2e-onchain-delivery-ha…
vezenovm c524be7
fix(e2e): stop emitting every nested automine test cmd twice
AztecBot 007c178
revert(ci): drop docker_isolate polling loop; dedup makes it unnecessary
AztecBot 05f7619
Merge branch 'merge-train/fairies-v5' into mv/e2e-onchain-delivery-ha…
vezenovm 65c37db
Apply suggestion from @vezenovm
vezenovm 14a6b73
Apply suggestions from code review
vezenovm 5b73de6
Update yarn-project/end-to-end/src/automine/delivery/constrained.test.ts
vezenovm a67c64f
Update yarn-project/end-to-end/src/automine/delivery/constrained.test.ts
vezenovm 77acbbb
Update yarn-project/end-to-end/src/automine/delivery/handshake_reuse.…
vezenovm dd8a1b8
Update yarn-project/end-to-end/src/automine/delivery/handshake_reuse.…
vezenovm 8609059
comments cleanup
vezenovm cdd254f
merge conflicts w/ fairies-v5
vezenovm 25dff72
Pass signing
vezenovm 06fd3cc
Apply suggestion from @vezenovm
vezenovm 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
2 changes: 1 addition & 1 deletion
2
...trained_delivery_test_contract/Nargo.toml → ...onchain_delivery_test_contract/Nargo.toml
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
41 changes: 41 additions & 0 deletions
41
yarn-project/end-to-end/src/automine/delivery/handshake_reuse.test.ts
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,41 @@ | ||
| import { AppTaggingSecretKind } from '@aztec/stdlib/logs'; | ||
|
|
||
| import { buildMessageDeliveryTest } from './onchain_delivery_harness.js'; | ||
|
|
||
| // Pins mode-agnostic handshake reuse: a handshake bootstrapped under one delivery mode must be reused when the other | ||
| // mode sends next. | ||
| describe('handshake_reuse', () => { | ||
| const forwardHookCalls: AppTaggingSecretKind[] = []; | ||
| buildMessageDeliveryTest({ | ||
| strategy: 'non-interactive handshake', | ||
| mode: { events: 'constrained', notes: 'unconstrained' }, | ||
| senderHook: ({ deliveryMode }) => { | ||
| forwardHookCalls.push(deliveryMode); | ||
| return Promise.resolve({ type: 'non-interactive-handshake' }); | ||
| }, | ||
| additionalTests: () => { | ||
| it('the strategy hook fires exactly once, to bootstrap the handshake on the first constrained send', () => { | ||
| expect(forwardHookCalls).toHaveLength(1); | ||
| expect(forwardHookCalls[0]).toBe(AppTaggingSecretKind.CONSTRAINED); | ||
| }); | ||
| }, | ||
| }); | ||
|
|
||
| // Reverse direction also pins the constrained sequence to a fresh index 0 after an unconstrained bootstrap; a leaked | ||
| // unconstrained counter would make the first constrained send require a predecessor nullifier that does not exist. | ||
| const reverseHookCalls: AppTaggingSecretKind[] = []; | ||
| buildMessageDeliveryTest({ | ||
| strategy: 'non-interactive handshake', | ||
| mode: { events: 'unconstrained', notes: 'constrained' }, | ||
| senderHook: ({ deliveryMode }) => { | ||
| reverseHookCalls.push(deliveryMode); | ||
| return Promise.resolve({ type: 'non-interactive-handshake' }); | ||
| }, | ||
| additionalTests: () => { | ||
| it('the strategy hook fires exactly once, to bootstrap the handshake on the first unconstrained send', () => { | ||
| expect(reverseHookCalls).toHaveLength(1); | ||
| expect(reverseHookCalls[0]).toBe(AppTaggingSecretKind.UNCONSTRAINED); | ||
| }); | ||
| }, | ||
| }); | ||
| }); |
47 changes: 47 additions & 0 deletions
47
yarn-project/end-to-end/src/automine/delivery/onchain.test.ts
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,47 @@ | ||
| import { Point } from '@aztec/foundation/curves/grumpkin'; | ||
|
|
||
| import { buildMessageDeliveryTest } from './onchain_delivery_harness.js'; | ||
|
|
||
| describe('onchain delivery', () => { | ||
|
vezenovm marked this conversation as resolved.
|
||
| let arbitrarySecret: Point; | ||
|
|
||
| beforeAll(async () => { | ||
| arbitrarySecret = await Point.random(); | ||
| }); | ||
|
|
||
| buildMessageDeliveryTest({ | ||
| strategy: 'non-interactive handshake', | ||
| mode: 'constrained', | ||
| senderHook: () => Promise.resolve({ type: 'non-interactive-handshake' }), | ||
| }); | ||
|
|
||
| buildMessageDeliveryTest({ | ||
| strategy: 'non-interactive handshake', | ||
| mode: 'unconstrained', | ||
| senderHook: () => Promise.resolve({ type: 'non-interactive-handshake' }), | ||
| }); | ||
|
|
||
| buildMessageDeliveryTest({ | ||
| strategy: 'arbitrary secret', | ||
| mode: 'unconstrained', | ||
| senderHook: () => Promise.resolve({ type: 'arbitrary-secret', secret: arbitrarySecret }), | ||
| recipientRegistration: async (recipientWallet, recipientAddress) => { | ||
| await recipientWallet.registerTaggingSecretSource({ | ||
| kind: 'arbitrary-secret', | ||
| recipient: recipientAddress, | ||
| secret: arbitrarySecret, | ||
| }); | ||
| }, | ||
|
vezenovm marked this conversation as resolved.
|
||
| }); | ||
|
|
||
| // With the recipient registering the sender, | ||
| // the recipient PXE reconstructs the address-derived tag and discovers the delivery. | ||
| buildMessageDeliveryTest({ | ||
| strategy: 'address-derived', | ||
| mode: 'unconstrained', | ||
| senderHook: () => Promise.resolve({ type: 'address-derived' }), | ||
| recipientRegistration: async (recipientWallet, _recipientAddress, senderAddress) => { | ||
| await recipientWallet.registerSender(senderAddress); | ||
| }, | ||
| }); | ||
| }); | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed this file to keep constrained specific tests (unconstrained secret rejection + concurrency/batching)