Open
Description
Protocol Change Proposal
Summary
In #80 we started to discuss details about properties of transactions (pending, valid), and what influence they have on the mempool: The mempool is a distributed pool of "pending" transactions.
A pending transaction is a "valid" transaction that has been submitted by a
client of the blockchain but has not yet been committed to the blockchain. The purpose of this issue is to get a precise understanding what we mean by "pending" and "valid".
Problem Definition
In an upcoming specification of the mempool, we will need to capture
- definition of pending
- definition of valid; in particular
- relation to the application,
- checktx,
- properties of checktx (what does the return value of checktx depend on. Currently, it depends on
min_gas
, which is not a consensus parameter but a configuration variable, so it can be different at different validators, so at the same application state, validators may disagree on the validity of a transaction, which seems to result in unforeseeable behavior) - monotonicity of validity (checktx): mostly we assume the case that a transaction can transition from being valid to being invalid at most once (and never back). This is, in fact, an implicit assumption on the application (whatever we decide to do about it, we need to make it explicit and capture it in the spec). If we assume that transactions can go from invalid to valid, this has to be explicitly treated somehow
- currently it seems that the mempool does not ensure anything for such transactions; they may or may not be dropped and consequently eventually be put into a block or not. We can maintain this but should make this explicit in the properties (e.g., we can give guarantees only for transaction that can go from being invalid to being valid)
- We might decide that applications need stronger guarantees. Then we would need to change the implementation as invalid transaction should not be dropped automatically
Proposal
We need to properly define the above notions and the behavior we expect from the application (checktx), and from the mempool. This result of this work should go into an upcoming mempool specification.