Skip to content

Commit

Permalink
fix: note about raw aptos mempool
Browse files Browse the repository at this point in the history
  • Loading branch information
l-monninger authored Mar 5, 2025
1 parent 50c51fc commit 63e370d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ The relevant code from the `CoreMempool` can be identified here: https://github.

The Aptos Mempool will only throw a `SEQUENCE_NUMBER_TOO_OLD` error if the sequence number is invalidated by the VM as too old. Aptos will remove sequence numbers which are too old from the mempool, as in theory gas has already been paid. This invalidation is lightweight and thus is considered DoS resistant, and since gas was already charged for the transaction, it is also sybil resistant.

Aptos will throw a `SEQUENCE_NUMBER_TOO_NEW` error if the sequence number is validated by the VM as too new. This is a more serious error, as it indicates that the transaction is not yet valid. `reject_transaction` does not remove the transaction from the mempool as the user must be required to pay gas for this transaction at some point. If it were not the case, then the user could load up the mempool with transactions that would never be executed.
Aptos will throw a `SEQUENCE_NUMBER_TOO_NEW` error if the sequence number is validated by the VM as too new. This is a more serious error, as it indicates that the transaction is not yet valid. `reject_transaction` does not remove the transaction from the mempool as the user must be required to pay gas for this transaction at some point. If it were not the case, then the user could load up the mempool with transactions that would never be executed. At the time of writing, it would seem this is still possible using the raw Aptos Mempool.

Unfortunately, our asynchronous usage of the mempool may require us to reintroduce a tolerance as was introduced in #597.

0 comments on commit 63e370d

Please sign in to comment.