Skip to content

Conversation

@benesjan
Copy link
Contributor

@benesjan benesjan commented Jan 2, 2026

In this PR I implement round trip tracking and I use this info as a basis for a roundtrip regression test. This check was placed in yarn-project/end-to-end/src/bench/client_flows/amm.test.ts. This test was a good candidate for this because we already use it for benchmarking and it doesn't communicate with node over http (instead we have a direct access to the instance) - this is great as it makes the dest more deterministic and hence the roundtrip counts should not be brittle (when communicating over network I can imagine that latency or something could result in different counts e.g. when syncing PXE or something - not super sure if this is still the case though but it was the case in the past when we were polling node for new blocks)

In that test I also implemented a debugging functionality that allows for debugging the regression by nicely printing out round trip trace.

To track the round trips I updated ProxiedNode by having an inFlightCount counter tracking num current RPC calls. This allows us to group parallel rpc calls into the same round trip.

Fixes https://linear.app/aztec-labs/issue/F-230/improve-benchmarks

The linked issue seems to have a wider scope than just the round trip measurements so not sure if we want to fully close it with this PR.

Copy link
Contributor Author

benesjan commented Jan 2, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@benesjan benesjan marked this pull request as ready for review January 2, 2026 21:01
@benesjan benesjan force-pushed the 01-02-feat_measuring_node_round_trips branch from 8db5612 to e972bd8 Compare January 5, 2026 16:30
@benesjan benesjan requested review from Thunkar and mverzilli and removed request for Thunkar and mverzilli January 5, 2026 16:41
Copy link
Contributor

@mverzilli mverzilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as I don't see anything that could break, and I ultimately trust your judgment on whether this adds value as-is.

IMO there's problems in how we're measuring things here, and the names we're using to collect those stats can hide those problems. But maybe we find some big issues using this, fix them, archive the whole topic so 🤷‍♂️

@benesjan benesjan requested a review from mverzilli January 7, 2026 18:57
@benesjan benesjan marked this pull request as draft January 13, 2026 18:57
@benesjan benesjan force-pushed the 01-02-feat_measuring_node_round_trips branch 3 times, most recently from 3ef744e to ad87c0f Compare January 14, 2026 21:06
@benesjan benesjan force-pushed the 01-02-feat_measuring_node_round_trips branch 2 times, most recently from 3c91e76 to d2bf40d Compare January 15, 2026 18:33
@benesjan benesjan force-pushed the 01-02-feat_measuring_node_round_trips branch from a158e93 to 5a8ef00 Compare January 15, 2026 19:00
@benesjan benesjan marked this pull request as ready for review January 15, 2026 19:02
@AztecBot
Copy link
Collaborator

AztecBot commented Jan 15, 2026

Flakey Tests

🤖 says: This CI run detected 4 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/806774aa44d4fc6a�806774aa44d4fc6a8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_p2p/gossip_network_no_cheat.test.ts (51s) (code: 1) group:e2e-p2p-epoch-flakes (\033Jan Beneš\033: feat: measuring node round trips (#19291))
\033FLAKED\033 (8;;http://ci.aztec-labs.com/165bc6912882e63c�165bc6912882e63c8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_invalidate_block.parallel.test.ts "committee member invalidates a block if proposer does not come through" (96s) (code: 1) group:e2e-p2p-epoch-flakes (\033Jan Beneš\033: feat: measuring node round trips (#19291))
\033FLAKED\033 (8;;http://ci.aztec-labs.com/21240767ef2fbde6�21240767ef2fbde68;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_invalidate_block.parallel.test.ts "proposer invalidates multiple blocks" (131s) (code: 1) group:e2e-p2p-epoch-flakes (\033Jan Beneš\033: feat: measuring node round trips (#19291))
\033FLAKED\033 (8;;http://ci.aztec-labs.com/10affe6cd855a8c1�10affe6cd855a8c18;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_p2p/multiple_validators_sentinel.parallel.test.ts "collects attestations for validators in proposer node when block is not published" (112s) (code: 1) group:e2e-p2p-epoch-flakes (\033Jan Beneš\033: feat: measuring node round trips (#19291))

Copy link
Contributor

@mverzilli mverzilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Nothing blocking, the only one I would pay some love to is the comment about not needing to use http to communicate with node in this context, which surprised me

In this PR I implement round trip tracking and I use this info as a basis for a roundtrip regression test. This check was placed in `yarn-project/end-to-end/src/bench/client_flows/amm.test.ts`. This test was a good candidate for this because we already use it for benchmarking and it doesn't communicate with node over `http` (instead we have a direct access to the instance) - this is great as it makes the dest more deterministic and hence the roundtrip counts should not be brittle (when communicating over network I can imagine that latency or something could result in different counts e.g. when syncing PXE or something - not super sure if this is still the case though but it was the case in the past when we were polling node for new blocks)

In that test I also implemented a debugging functionality that allows for debugging the regression by nicely printing out round trip trace.

To track the round trips I updated `ProxiedNode` by having an `inFlightCount` counter tracking num current RPC calls. This allows us to group parallel rpc calls into the same round trip.

Fixes https://linear.app/aztec-labs/issue/F-230/improve-benchmarks

The linked issue seems to have a wider scope than just the round trip measurements so not sure if we want to fully close it with this PR.
@AztecBot AztecBot force-pushed the 01-02-feat_measuring_node_round_trips branch from 5a8ef00 to 33dc463 Compare January 16, 2026 16:20
@benesjan benesjan added this pull request to the merge queue Jan 16, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 16, 2026
@benesjan
Copy link
Contributor Author

The e2e_bot flake has already been discussed here so I am re-adding this to queue.

@benesjan benesjan added this pull request to the merge queue Jan 16, 2026
Merged via the queue into next with commit 6d14241 Jan 16, 2026
19 checks passed
@benesjan benesjan deleted the 01-02-feat_measuring_node_round_trips branch January 16, 2026 17:56
AztecBot pushed a commit that referenced this pull request Jan 16, 2026
In this PR I rename `ProxiedNode` as `BenchmarkedNode` because `ProxiedNode` name was just bad (originally discussed [here](#19291 (comment))) and I rename `build_nullifier_read_request_hints.ts` to reflect the name of the class it contains.
AztecBot pushed a commit that referenced this pull request Jan 16, 2026
In this PR I rename `ProxiedNode` as `BenchmarkedNode` because `ProxiedNode` name was just bad (originally discussed [here](#19291 (comment))) and I rename `build_nullifier_read_request_hints.ts` to reflect the name of the class it contains.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants