Aura/TxPriorityContractAddressconfig option in the node's config. Example config: https://github.com/poanetwork/posdao-test-setup/blob/86d6a3d057a6c1326517a0c58486c2047e130a7b/config/node1.nethermind.json#L39
TX target addressis the
tofield of the transaction. It defines the address the transaction is sent to and can be either a contract or EOA. It cannot be zero address
function's signatureis the first 4 bytes of a transaction's
datafield. It is set as an actual vaue when the
targetis a contract address and we want to prioritize one of its functions. For example, if we want to prioritize the
transfer(address,uint256)function of some ERC20 contract, the
fnSignaturefor that will be
0xa9059cbb(see How to get Ethereum encoded function signatures).
fnSignaturecan be empty (
0x00000000) if we want to prioritize a transaction which sends native coins to a
targetaddress (regardless of whether it's a contract, or not), i.e. when TX's
target + fnSignatureis a
weightdefines the destination's priority: a destination with a higher weight will have a higher priority than another destination with a lower weight. The weight for each destination is unique and cannot be zero.
tofield but with a different signature in the
data(the first 4 bytes), it won't be prioritized because there are no rules (destinations) defined for it.
datafield and the
tofield equal to
fromaddresses which receive top priority (higher than others defined by the
fromfield matching one of the whitelisted addresses, such a transaction will be prioritized higher than others, including those set by the
gasPricelower than the required Min Gas Price, it will not be mined by the validator.
TxPrioritycontract are used to manage Min Gas Prices:
Aura/TxPriorityConfigFilePathoption in node's config. Example: https://github.com/poanetwork/posdao-test-setup/blob/86d6a3d057a6c1326517a0c58486c2047e130a7b/config/node1.nethermind.json#L40
setPriority(0x443321b14f1b1c385cd7e0cc2ef7abe5598c0000, 0x12345678, 1000)
target = 0x443321b14f1b1c385cd7e0cc2ef7abe5598c0000, fnSignature = 0x12345678will have the weight of
2000because the local (off-chain) rule takes precedence over the rule from the TxPriority contract.
whitelistrules are combined from both on-chain and off-chain methods. For example we make the following call:
nonce, the transaction with the higher weight will be picked up (if its destination is prioritized).