Skip to content

Conversation

@deffrian
Copy link
Collaborator

@deffrian deffrian commented Jan 9, 2026

Ref: A-207

@AztecBot
Copy link
Collaborator

AztecBot commented Jan 10, 2026

Flakey Tests

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

\033FLAKED\033 (8;;http://ci.aztec-labs.com/632c36884c05af68�632c36884c05af688;;�): yarn-project/end-to-end/scripts/run_test.sh web3signer src/composed/web3signer/e2e_multi_validator_node_key_store.test.ts (38s) (code: 1) (\033Nikita Meshcheriakov\033: tx size limit)
\033FLAKED\033 (8;;http://ci.aztec-labs.com/500a559b9f202f8e�500a559b9f202f8e8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_invalidate_block.parallel.test.ts "proposer invalidates multiple blocks" (603s) (code: 124) group:e2e-p2p-epoch-flakes (\033Nikita Meshcheriakov\033: tx size limit)

@deffrian deffrian force-pushed the nikita/tx-size-limit branch 8 times, most recently from 28340ce to 1b04913 Compare January 15, 2026 01:05
@deffrian deffrian changed the title [WIP]feat: tx size limit feat: tx size limit Jan 15, 2026
add missing file

Change to 512

Add const

Fix size

Fix lint

remove cache

Add const

Fix tests

Change to 512

Add tests

fix test

Cache size
@deffrian deffrian force-pushed the nikita/tx-size-limit branch from 1b04913 to a088f7b Compare January 15, 2026 13:10
@mralj mralj requested a review from PhilWindle January 15, 2026 14:46
@mralj
Copy link
Contributor

mralj commented Jan 15, 2026

@PhilWindle LGTM, but can you plese double-check

Copy link
Collaborator

@PhilWindle PhilWindle left a comment

Choose a reason for hiding this comment

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

This is looking ok so far. There are further changes to be made however.

The aggregate tx validator that you have updated is used by the node when accepting transactions over RPC.

There is then a file /home/phil/aztec/yarn-project/p2p/src/msg_validators/tx_validator/factory.ts. This creates the validator used to validate transactions received over P2P gossip.

Additionally, within /home/phil/aztec/yarn-project/p2p/src/services/libp2p/libp2p_service.ts. There the function createRequestedTxValidator which returns a validator used for requested transactions. Could you move the creation of this validator to the same location at the P2P gossip one please? Then they both need updating.

@PhilWindle
Copy link
Collaborator

PhilWindle commented Jan 16, 2026

This is looking ok so far. There are further changes to be made however.

The aggregate tx validator that you have updated is used by the node when accepting transactions over RPC.

There is then a file /home/phil/aztec/yarn-project/p2p/src/msg_validators/tx_validator/factory.ts. This creates the validator used to validate transactions received over P2P gossip.

Additionally, within /home/phil/aztec/yarn-project/p2p/src/services/libp2p/libp2p_service.ts. There the function createRequestedTxValidator which returns a validator used for requested transactions. Could you move the creation of this validator to the same location at the P2P gossip one please? Then they both need updating.

Looking further. Your change to set the maximum size of decompressed messages should limit the size of transactions received over gossip.

The second additional change is still required however. When transactions are requested directly from peers, they don't have a topic so the default message size of 10MB is used. There could also be multiple transactions received in a single message sowe can't simply apply the single transaction limit to it. I have created a linear issue to be done later on where we define specific limits on responses but we won't do that yet.

We will always need to validate size of individual transactions received over request/response. This is the part performed by the validator returned from createRequestedTxValidator. @mralj FYI

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.

5 participants