EVM/Node: bound the size of a transaction inside the tx pool
What
Part. of #7109 (closed): Bound the size of a transaction.
The first commit is a patch on the deserialization function on raw transactions, the inconsistency was observed by @hantang.sun during our offline discussion. I added a fix for it, but if necessary, I can open a seperate MR for it.
Why
To prevent the transaction pool from being overwhelmed. As of right now someone could willingly spam and send valid transactions with huge data. The transaction will never be processed since it can't fit in a L1 level but the malicious sender will never be punished for it. With this MR we just prevent that. If he sends the max limit, it will be allowed, he will just have to pay for it.
How
We just use the size of data to put that limitation.
Manually testing the MR
dune exec etherlink/bin_node/test/main.exe -- --file test_rlp.ml
dune exec etherlink/tezt/tests/main.exe -- --file evm_rollup.ml evm tx_pool max transaction size
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Rodi-Can Bozman