From b087099af41f7301be5ece1343e079c78a14cd43 Mon Sep 17 00:00:00 2001 From: aloknerurkar Date: Mon, 2 Oct 2023 20:35:39 +0530 Subject: [PATCH 1/2] Update README.md --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/README.md b/README.md index a75f066d..5e628f13 100644 --- a/README.md +++ b/README.md @@ -1 +1,52 @@ # 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 + +``` + From 5b514460fe0992ff7de3c3b2e6dc13c0714b0ce3 Mon Sep 17 00:00:00 2001 From: aloknerurkar Date: Mon, 2 Oct 2023 20:46:52 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 5e628f13..41a21428 100644 --- a/README.md +++ b/README.md @@ -50,3 +50,26 @@ OPTIONS: ``` +- 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 + } + ] + } +} +```