Skip to content
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

Unlimited spamming of TxPool #2021

Open
xgreenx opened this issue Jul 5, 2024 · 0 comments
Open

Unlimited spamming of TxPool #2021

xgreenx opened this issue Jul 5, 2024 · 0 comments

Comments

@xgreenx
Copy link
Collaborator

xgreenx commented Jul 5, 2024

Currently, TxPool doesn't have any mechanism to prevent its spamming with transactions. The attacker can submit a lot of transactions that require running of heavy predicates and block the node's TxPool from broadcasting transactions.

It is okay if the TxPool is filled with valid transactions. But the problem is that they could be invalid, and it is a waste of resources.

  • The predicate verification should be random to prevent cases where the transaction has 255 predicates, and the last predicate returns false.

  • We need to validate the existence of the inputs on-chain before executing predicates.

  • We need to track the reputation of input owners and decrease it based on the consumed gas. If the transaction is successfully included in the block, then we can refund the gas back. It basically will blacklist malicious inputs. We also need to have some mechanism that, with time, will increase the reputation of this owner, giving them a second chance.

All these techniques also will decrease the load for the network since we will not broadcast invalid transactions.

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

No branches or pull requests

1 participant