Class TransactionSelectionResult
java.lang.Object
org.hyperledger.besu.plugin.data.TransactionSelectionResult
Represent the result of the selection process of a candidate transaction, during the block
creation phase.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceRepresent the status of a transaction selection result. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TransactionSelectionResultThe transaction has not been selected since its blob price is below the current network blob price, but the selection should continue.static final TransactionSelectionResultThe block already contains the max number of allowed blobs.static final TransactionSelectionResultThe transaction has not been selected because merging its execution access view would exceed the EIP-7928 block access list item budget for the pending block gas limit, but selection should continue.static final TransactionSelectionResultThe transaction has not been selected since the block is full.static final TransactionSelectionResultThere was no more time to add transaction to the blockstatic final TransactionSelectionResultThere was no more time to add transaction to the block, and the transaction is invalidstatic final TransactionSelectionResultThe transaction has not been selected since its current price is below the configured min price, but the selection should continue.static final TransactionSelectionResultThere was an unhandled exception during the evaluation of the transaction.static final TransactionSelectionResultTransaction took too much to evaluate, and it was invalidstatic final TransactionSelectionResultThere was no more time for plugins to add transaction to the blockstatic final TransactionSelectionResultThere was no more time for plugins to add transaction to the block, and the transaction is invalidstatic final TransactionSelectionResultThe transaction has not been selected since its priority fee is below the configured min priority fee per gas, but the selection should continue.static final TransactionSelectionResultThe transaction has been selected to be included in the new blockstatic final TransactionSelectionResultRelate to transactions that are evaluated in group (aka bundle), when a previously selected transaction decision is reverted due to the selection result of a following transaction in the same groupstatic final TransactionSelectionResultThe block creation has been cancelledstatic final TransactionSelectionResultThe transaction has not been selected since its sender already had a previous transaction not selectedstatic final TransactionSelectionResultThe transaction has not been selected since there is not enough remaining block bytes in the block to fit the transaction, but selection should continue.static final TransactionSelectionResultTransaction took too much to evaluate, but it was validstatic final TransactionSelectionResultThe transaction has not been selected since there is not enough remaining blob gas in the block to fit the blobs of the tx, but selection should continue.static final TransactionSelectionResultThe transaction has not been selected since its gas limit is greater than the block remaining gas, but the selection should continue. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate a new transaction selection result with the passed statusprotectedTransactionSelectionResult(TransactionSelectionResult.Status status, String invalidReason) Create a new transaction selection result with the passed status and invalid reason -
Method Summary
Modifier and TypeMethodDescriptionbooleandiscard()Should the candidate transaction removed from the transaction pool?booleaninthashCode()static TransactionSelectionResultReturn a selection result that identify the candidate transaction as permanently invalid, this means that it could be removed safely from the transaction pool.static TransactionSelectionResultinvalidPenalized(String invalidReason) Return a selection result that identify the candidate transaction as temporarily invalid and that it should be penalized, this means that the transaction could become valid at a later time.static TransactionSelectionResultinvalidTransient(String invalidReason) Return a selection result that identify the candidate transaction as temporarily invalid, this means that the transaction could become valid at a later time.Optionally return the reason why the transaction is invalid if presentbooleanpenalize()Should the score of this transaction be decremented?booleanselected()Is the candidate transaction selected for block inclusion?booleanstop()Is the block creation done and the selection process should stop?toString()
-
Field Details
-
SELECTED
The transaction has been selected to be included in the new block -
SELECTED_ROLLBACK
Relate to transactions that are evaluated in group (aka bundle), when a previously selected transaction decision is reverted due to the selection result of a following transaction in the same group -
BLOCK_FULL
The transaction has not been selected since the block is full. -
BLOBS_FULL
The block already contains the max number of allowed blobs. -
SELECTION_CANCELLED
The block creation has been cancelled -
BLOCK_SELECTION_TIMEOUT
There was no more time to add transaction to the block -
BLOCK_SELECTION_TIMEOUT_INVALID_TX
There was no more time to add transaction to the block, and the transaction is invalid -
PLUGIN_SELECTION_TIMEOUT
There was no more time for plugins to add transaction to the block -
PLUGIN_SELECTION_TIMEOUT_INVALID_TX
There was no more time for plugins to add transaction to the block, and the transaction is invalid -
TX_EVALUATION_TOO_LONG
Transaction took too much to evaluate, but it was valid -
INVALID_TX_EVALUATION_TOO_LONG
Transaction took too much to evaluate, and it was invalid -
INTERNAL_ERROR
There was an unhandled exception during the evaluation of the transaction. If this occurs, it indicates there is a bug somewhere. -
TX_TOO_LARGE_FOR_REMAINING_GAS
The transaction has not been selected since its gas limit is greater than the block remaining gas, but the selection should continue. -
TX_TOO_LARGE_FOR_REMAINING_BLOB_GAS
The transaction has not been selected since there is not enough remaining blob gas in the block to fit the blobs of the tx, but selection should continue. -
TOO_LARGE_FOR_REMAINING_BLOCK_SIZE
The transaction has not been selected since there is not enough remaining block bytes in the block to fit the transaction, but selection should continue. -
BLOCK_ACCESS_LIST_ITEM_BUDGET_EXCEEDED
The transaction has not been selected because merging its execution access view would exceed the EIP-7928 block access list item budget for the pending block gas limit, but selection should continue. -
CURRENT_TX_PRICE_BELOW_MIN
The transaction has not been selected since its current price is below the configured min price, but the selection should continue. -
BLOB_PRICE_BELOW_CURRENT_MIN
The transaction has not been selected since its blob price is below the current network blob price, but the selection should continue. -
PRIORITY_FEE_PER_GAS_BELOW_CURRENT_MIN
The transaction has not been selected since its priority fee is below the configured min priority fee per gas, but the selection should continue. -
SENDER_WITH_PREVIOUS_TX_NOT_SELECTED
The transaction has not been selected since its sender already had a previous transaction not selected
-
-
Constructor Details
-
TransactionSelectionResult
Create a new transaction selection result with the passed status- Parameters:
status- the selection result status
-
TransactionSelectionResult
protected TransactionSelectionResult(TransactionSelectionResult.Status status, String invalidReason) Create a new transaction selection result with the passed status and invalid reason- Parameters:
status- the selection result statusinvalidReason- string with a custom invalid reason
-
-
Method Details
-
invalidTransient
Return a selection result that identify the candidate transaction as temporarily invalid, this means that the transaction could become valid at a later time.- Parameters:
invalidReason- the reason why transaction is invalid- Returns:
- the selection result
-
invalidPenalized
Return a selection result that identify the candidate transaction as temporarily invalid and that it should be penalized, this means that the transaction could become valid at a later time.- Parameters:
invalidReason- the reason why transaction is invalid- Returns:
- the selection result
-
invalid
Return a selection result that identify the candidate transaction as permanently invalid, this means that it could be removed safely from the transaction pool.- Parameters:
invalidReason- the reason why transaction is invalid- Returns:
- the selection result
-
stop
public boolean stop()Is the block creation done and the selection process should stop?- Returns:
- true if the selection process should stop, false otherwise
-
discard
public boolean discard()Should the candidate transaction removed from the transaction pool?- Returns:
- true if the candidate transaction should be removed from transaction pool, false otherwise
-
penalize
public boolean penalize()Should the score of this transaction be decremented?- Returns:
- yes if the score of this transaction needs to be decremented
-
selected
public boolean selected()Is the candidate transaction selected for block inclusion?- Returns:
- true if the candidate transaction is included in the new block, false otherwise
-
maybeInvalidReason
-
toString
-
equals
-
hashCode
-