This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from primevprotocol/aloknerurkar-patch-1
Update README.md
- Loading branch information
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,75 @@ | ||
# mev-commit | ||
mev-commit is a P2P software that creates a network of builders and searchers. Searchers can use it to broadcast bids to multiple builders and get pre-confirmations from them. | ||
|
||
## Quickstart | ||
- The software needs an ECDSA private key. This key creates the ethereum address for the node as well as used for the P2P network. Users can use an existing key or create a new key using the `create-key` command. | ||
``` | ||
NAME: | ||
mev-commit create-key | ||
USAGE: | ||
mev-commit create-key [command options] [arguments...] | ||
OPTIONS: | ||
--help, -h show help | ||
``` | ||
|
||
- Once the key is available the users need to create a yaml config file. Example config files are available in the `config` folder. The important options are defined below: | ||
``` | ||
# Path to private key file. | ||
priv_key_file: ~/.mev-commit/keys/nodekey | ||
# Type of peer. Options are builder and searcher. | ||
peer_type: builder | ||
# Port used for P2P traffic. If not configured, 13522 is the default. | ||
p2p_port: 13522 | ||
# Port used for HTTP traffic. If not configured, 13523 is the default. | ||
http_port: 13523 | ||
# Secret for the node. This is used to authorize the nodes. The value doesnt matter as long as it is sufficiently unique. It is signed using the private key. | ||
secret: hello | ||
# Format used for the logs. Options are "text" or "json". | ||
log_fmt: text | ||
# Log level. Options are "debug", "info", "warn" or "error". | ||
log_level: debug | ||
# Bootnodes used for bootstrapping the network. | ||
bootnodes: | ||
- /ip4/35.91.118.20/tcp/13524/p2p/16Uiu2HAmAG5z3E8p7o19tEcLdGvYrJYdD1NabRDc6jmizDva5BL3 | ||
``` | ||
|
||
- After the config file is ready, run `mev-commit start` with the config option. | ||
``` | ||
NAME: | ||
mev-commit start - Start mev-commit | ||
USAGE: | ||
mev-commit start [command options] [arguments...] | ||
OPTIONS: | ||
--config value path to config file [$MEV_COMMIT_CONFIG] | ||
--help, -h show help | ||
``` | ||
|
||
- After the node is started, users can check the status of the peers connected to the node using the `/topology` endpoint on the HTTP port. | ||
``` | ||
{ | ||
self: { | ||
Addresses: [ | ||
"/ip4/127.0.0.1/tcp/13526", | ||
"/ip4/192.168.1.103/tcp/13526", | ||
"/ip4/192.168.100.5/tcp/18625" | ||
], | ||
Ethereum Address: "0x55B3B672DEB14178615F648911e76b7FE1B23e5D", | ||
Peer Type: "builder", | ||
Underlay: "16Uiu2HAmBykfyf9A5DnRguHNS1mvSaprzYEkjRf6uafLU4javG4L" | ||
}, | ||
connected_peers: { | ||
builders: [ | ||
{ | ||
EthAddress: "0xca61596ccef983eb7cae42340ec553dd89881403", | ||
Type: 1 | ||
} | ||
] | ||
} | ||
} | ||
``` |