Skip to content

Conversation

@benesjan
Copy link
Contributor

@benesjan benesjan commented Jan 2, 2026

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

In this PR I measure the number of node round trips. This is achieved by updating ProxiedNode to track this. This is done by having an inFlightCount counter tracking num current rpc calls. This allows us to group parallel rpc calls into the same round trip.

Note that the ProxiedNode is not used on next but when I activated it with the following change:

  #getSimulatorForTx(overrides?: { contracts?: ContractOverrides }) {
    const proxyContractDataProvider = ProxiedContractDataProviderFactory.create(
      this.contractDataProvider,
      overrides?.contracts,
    );

    return new ContractFunctionSimulator(
      proxyContractDataProvider,
      this.noteDataProvider,
      this.keyStore,
      this.addressDataProvider,
-      this.node,
+      ProxiedNodeFactory.create(this.node),
      this.anchorBlockDataProvider,
      this.senderTaggingDataProvider,
      this.recipientTaggingDataProvider,
      this.senderAddressBook,
      this.capsuleDataProvider,
      this.privateEventDataProvider,
      this.simulator,
    );
  }

I got what looks like reasonable values when running src/bench/client_flows/amm.test.ts:

    {
        "name": "ecdsar1+amm_add_liquidity_1_recursions+private_fpc/round_trips",
        "value": 89,
        "unit": "round_trips"
    },
    {
        "name": "ecdsar1+amm_add_liquidity_1_recursions+private_fpc/round_trips_blocking_time",
        "value": 166.96370199995,
        "unit": "ms"
    }

The linked issue F-230 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
@AztecBot
Copy link
Collaborator

AztecBot commented Jan 2, 2026

Flakey Tests

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

\033FLAKED\033 (\0338;;http://ci.aztec-labs.com/a1f5cd07558b8638�a1f5cd07558b86388;;�\033): yarn-project/scripts/run_test.sh ethereum/src/l1_tx_utils/l1_tx_utils.test.ts (64s) (code: 1) group:e2e-p2p-epoch-flakes (\033benesjan\033: fix)

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.

3 participants