
The purpose of mev-tendermint is to create a private mempool (the “sidecar”) containing atomic bundles of txs and gossip bundles of transactions specifically to the proposer of the next block.
The design goals of MEV-Tendermint is to allow & preserve:
🏦 Auction
n+1 , the Skip Sentinel infrastructure selects an auction-winning bundle (or bundles) to include at the top of block n+1n )🗣️ Gossip
n+1 is created, the Skip sentinel gossips the auction-winning bundle(s) to whichever nodes belonging to that proposer it can access (e.g. sentries if the validator is using a sentry configuration, or validator replicas if it’s using horcrux)personal_peer_ids) and takes place over a new channel, but it is secured using the same authentication handshake Tendermint uses to secure all other forms of p2p communication[reinforce that we have different channels on the same reactor]
🏒 Handling Transactions
sidecar[reinforce that we have a new transaction data structure]
🚜 Reaping
[reinforce reaping of bundle goes to top if available]
#1 The Sidecar
bundles of transactions
mempool/clist_sidecar.goSidecarChannelpersonal_peers
personal_peers for each node are set to be:
#2 The Mempool Reactor
SidecarChannel over which only gossip for SidecarTxs can be handled
mempool/reactor.goSidecarTxs have new metadata that is transmitted over gossip, including
BundleId - the global order of the bundle this SidecarTx is in, per heightBundleOrder - the local order of this SidecarTx within its bundleDesiredHeight - the height of the bundle this SidecarTx was submitted forBundleSize - the total size of the bundle this SidecarcarTx is inTotalFee - the total fee of the bundle this SidecarTx is in#3 Selective Reaping
sidecarTxs (i.e. bundles) in addition to regular txs, and orders the former before the latter
mempool/clist_mempool.go, state/execution.goIn the go.mod file of the directory you use to compile your chain binary, you need to replace the imported version of tendermint with the correct mev-tendermint version, like so:
github.com/skip-mev/mev-tendermint/v0.34.21-mev// ---------------------------------
replace (
// Other stuff...
github.com/tendermint/tendermint => github.com/skip-mev/mev-tendermint v0.34.21-mev
)
🚨 After modifying the replace statement, run go mod tidy in your base directory
mev-tendermint introduces a new section of config in config.toml called sidecar, which contains 2 settings that you must configure in order to receive bundles from the skip sentinel:
relayer_id : This is the Tendermint p2p id of the Skip Sentinel that is used to establish a secret, authenticated handshake between your node and the Skip sentinel
personal_peer_ids: These are the Tendermint p2p ids of all the nodes that your node will gossip side car transactions with. To ensure trader privacy, these should only include p2p ids of nodes that you manage.
ids of all your sentry nodesids of all your other sentry nodes, and your validatorIn order to participate in the network, you must share with Skip (feel free to contact us at on our website):
“address” field of the priv_validator_key.json file generated by Tendermint)tendermint show-node-idThat’s it! After making the changes above, you can recompile your binary like junod (probably using make install), and restart your node(s)! You will now begin receiving MEV bundles from Skip.