Lanes
The lane mechanism is used to ensure that messages that submit keyshares are executed before other messages to avoid front-running.
Invariants
The keyshare lane only contains transactions that contain
MsgSubmitDecryptionKey
messages.The default lane does not contain any transactions with
MsgSubmitDecryptionKey
messages.
Test coverage
The tests in abci/checktx/check_tx_test.go
test inserting transactions into a mempool that makes use of the lane mechanism. The tests in lanes/keyshare/utils_test.go
test that transactions are encoded consistently with block-sdk, which the lane mechanism uses.
Attack surface
PrepareLaneHandler
The PrepareLaneHandler
function is called as part of PrepareProposal
by the block proposer. It extracts transactions containing MsgSubmitDecryptionKey
from the mempool and places them in the KeyshareLane
, validating them with VerifyTx
, and discarding transactions that exceed MaxTxBytes
.
ProcessLaneHandler
The ProcessLaneHandler
function is called as part of ProcessProposal
by all validators. It ensures that the keyshare lane only contains keyshare transactions and that no non-keyshare transactions are in the default lane.