-
Notifications
You must be signed in to change notification settings - Fork 581
feat: tx size limit #19472
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
base: next
Are you sure you want to change the base?
feat: tx size limit #19472
Conversation
Flakey Tests🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
28340ce to
1b04913
Compare
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
1b04913 to
a088f7b
Compare
|
@PhilWindle LGTM, but can you plese double-check |
PhilWindle
left a comment
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.
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 |
Ref: A-207