Transaction Priority System #174
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
WIRE-195
This PR implements a transaction priority system, allowing
sysiosystem contract to configure custom priorities (increase or decrease) for transactions based on their actions.Changes
System Contract (
sysio.system)contracts/sysio.system/include/sysio.system/trx_priority.hpp,contracts/sysio.system/src/trx_priority.cpp)trxprioritytable: Stores priority configurations with receiver, action name, match type, and priority valuetrxpglobalsingleton: Tracks last update timestamp for cache invalidationaddtrxpaction: Register new transaction priority rules (requires system authority)deltrxpaction: Remove existing priority rules (requires system authority)only: Matches transactions with exactly one actionfirst: Matches the first action in a transactionany: Matches any action in a transactionProducer Plugin
trx_priority_dbcomponent (plugins/producer_plugin/include/sysio/producer_plugin/trx_priority_db.hpp,plugins/producer_plugin/src/trx_priority_db.cpp)flat_multimapindexed by receiver accountWhen merged with #163 the priority values will not interfere with non-trx priority tasks. Requires #163.