1
Create an account (optional)
First you’ll need to obtain or create a standard Ethereum account (secp256k1 keypair). We highly recommend storing your account in a password protected keystore file, rather than storing the private key unencrypted. If you plan to fund this account with a non-trivial amount of ETH, please independently verify any tools and/or procedures you adopt.If you already have a keystore generated, or want to use an existing L1 account’s keystore, you’re good to move on from this step.Otherwise the quickest way to generate a new keystore is to install geth and create the file in a single command:
Convert an existing private key file into a keystore
Convert an existing private key file into a keystore
❯_
Create a new keystore file programmatically
Create a new keystore file programmatically
Import geth as a dependency in your golang project and programmatically create a new keystore file. Read more here.
2
Bridge to the mev-commit chain
In order to fund your account on the mev-commit chain, you’ll need to bridge ETH from an L1 account. We suggest using our web interface:
- Visit mev-commit.xyz/bridge for mainnet. Testnet bridge frontend is coming soon.
- Connect your wallet (MetaMask or WalletConnect supported)
- Select Ethereum as the source chain and mev-commit as the destination
- Enter the amount of ETH you want to transfer
- Click “Bridge” and approve the transaction
Testnet currently requires using the bridge CLI.
Alternatively use the bridge CLI
Alternatively use the bridge CLI
For automated or programmatic bridging, you can use our CLI tool by first confirming your operating system and architecture by running The binary will then be available in your $HOME directory as
uname -sm
, then downloading the appropriate bridge user CLI binary from the releases page.Or use the following command which automatically downloads and extracts the latest bridge user CLI binary for your system into your $HOME directory:user-cli
.The CLI application provides two sub-commands to bridge to and from the settlement chain. For more details go the the bridge CLI documentation. When using the bridge CLI, make sure to specify the newly generated account address from the previous step as the destination address for the bridge command.
❯_ example
3
Run a mev-commit node
Navigate to the mev-commit releases page and download the appropriate binary for your system. Since you’re reading the Run
v1.2.x
version of the docs, choose a release starting with v1.2
.You can use the following command which automatically downloads and extracts the latest mev-commit binary for your system into your $HOME directory:cd $HOME
if you used the command above.Now execute the node binary, selecting either a bidder or provider configuration based on your role in the network. Bidders must set a target-deposit-amount
which will be deposited for each valid provider, in order to send bids.Mainnet
Testnet
❗🕵️♂️ Tips
❗🕵️♂️ Tips
❗ The
keystore-path
flag expects the directory path for your keystore, not the file path itself. Example: if your keystore file is at /Users/bob/keystore/30d2db95-keystore.json
you would use --keystore-path /Users/bob/keystore
.❗ If you get an could not decrypt key with given password
error, make sure there’s no other keystore files in the relevant directory.❗ If you really don’t want to use a keystore, priv-key-file
can replace the keystore-path
and keystore-password
flags.❗ The --peer-type
flag can be used to run a provider
or bidder
node.❗ In order to run a provider node, the machine needs to be publicly accessible. Also, the mev-commit node will have to be configured with the public IP of the node using the nat-addr
parameter.See the CLI reference by running ./mev-commit --help
.4
If bidder, send a bid
If you’ve started a bidder node, open a new terminal window to send a bid and receive commitments from providers. Run the following command:
You can change the values in the fields
❯_ example
Bid Structure Details
Bid Structure Details
Key | Description |
---|---|
txHashes | Array of transaction hashes as strings |
amount | Bid amount in wei |
blockNumber | L1 block number targeted for bid inclusion |
decayStartTimestamp | Start timestamp for bid decay (in Unix milliseconds) |
decayEndTimestamp | End timestamp for bid decay (in Unix milliseconds) |
revertingTxHashes | Array of transaction hashes as strings that can revert |
rawTransactions | Array of hexadecimal encoded raw signed transaction payloads |
slashAmount | Amount to be slashed from provider stake in case of a failed bid |
amount
, blockNumber
, decayStartTimestamp
, decayEndTimestamp
and revertingTxHashes
as desired. The rawTransactions
field contains hexadecimal string of the RLP encoded raw transaction payloads, include raw transaction payloads in your bid in the atomic sequence in which they need to be placed in the block. Only one out of txHashes
or rawTransactions
need to be sent in a bid.Make sure your bid amount is sufficiently high for the commitment you’re requesting, and your target L1 block number is accurate. It’s up to the providers to commit to your bid, so try to ensure a commitment is feasible to your bid by its construction. Selecting a target block of n+1 where n is the current block number generally makes it easy to receive a commitment for standard bid amounts.Congrats, you just sent your first L1 preconfirmation bid! You should be receiving commitments nearly instantly.
txHashes
field instead of rawTransactions
to refer to a transaction a provider has in their own environment using its hash. This method also allows you to bid on others’ behalf using their transaction hashes.
❯_ example
Make sure to check System Requirements to better understand what is needed to run mev-commit without any interruptions.