You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Primev Docs Testnet Ver 41c24e77a73e47e0966d54365efbbfc8.md
+43-52Lines changed: 43 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ Users bidding for execution services include **mev searchers, AA bundlers, solv
153
153
154
154
The current bid structure being sent to the internal API is as follows:
155
155
156
-
```bash
156
+
```text
157
157
# Example Bid Structure:
158
158
# txn_hash: arbitrary string value representing txn hash
159
159
# bid_amt: amount to bid in wei
@@ -177,7 +177,7 @@ Note that the prepay amount a bidder has set needs to be 10 times higher than th
177
177
178
178
Commitments represent promises made by providers in a cryptographically verifiable manner.
179
179
180
-
```bash
180
+
```text
181
181
# commitmentDigest: Represents the hash of the bid structure, including the bid signature
182
182
# commitmentSignature: Represents an ECDSA signature of the [commitmentDigest]
183
183
{
@@ -369,7 +369,7 @@ mev-commit software operates as a command-line interface (CLI) tool, designed fo
369
369
370
370
Example:
371
371
372
-
```sql
372
+
```text
373
373
❯ mev-commit -h
374
374
NAME:
375
375
mev-commit - Entry point for mev-commit
@@ -394,20 +394,16 @@ GLOBAL OPTIONS:
394
394
395
395
- Open your command line and run:
396
396
397
-
```
398
-
Copy code
397
+
```shell
399
398
buf generate
400
-
401
399
```
402
400
403
401
3. **Compile mev-commit**:
404
402
405
403
- In the command line, execute:
406
404
407
-
```go
408
-
goCopy code
405
+
```shell
409
406
go build -o mev-commit ./cmd/main.go
410
-
411
407
```
412
408
413
409
### If you're using Docker:
@@ -417,10 +413,8 @@ GLOBAL OPTIONS:
417
413
- Open your terminal and navigate to where your Dockerfile is located.
418
414
- Run:
419
415
420
-
```sql
421
-
sqlCopy code
416
+
```shell
422
417
docker build -t mev-commit:latest .
423
-
424
418
```
425
419
426
420
## Cryptographic Stack
@@ -489,7 +483,7 @@ Please refer to System Requirements section [here.](Primev%20Docs%20Testnet%20Ve
489
483
490
484
- An ECDSA private key is required to create an Ethereum address for the node as well as to use for the P2P network. Bidders can add an existing key or create a new key using the `create-key` command.
491
485
492
-
```sql
486
+
```text
493
487
NAME:
494
488
mev-commit create-key - Create a new ECDSA private key and save it to a file
495
489
@@ -505,7 +499,7 @@ Please refer to System Requirements section [here.](Primev%20Docs%20Testnet%20Ve
505
499
- Use the examples in the **`config`** folder of the project as a reference.
506
500
- Once the key is available, create a yaml config file. Example config files are available in the [config](https://github.com/primevprotocol/mev-commit/tree/main/config) folder. The important options are defined below:
507
501
508
-
```sql
502
+
```yaml
509
503
# Path to private key file.
510
504
priv_key_file: ~/.mev-commit/keys/nodekey
511
505
@@ -543,7 +537,7 @@ Please refer to System Requirements section [here.](Primev%20Docs%20Testnet%20Ve
543
537
- Place your config file in a **`.mev-commit`** folder in your home directory.
544
538
- Once this is done, users can start the node using the `start` command.
545
539
546
-
```sql
540
+
```text
547
541
NAME:
548
542
mev-commit start - Start the mev-commit node
549
543
@@ -559,7 +553,7 @@ Please refer to System Requirements section [here.](Primev%20Docs%20Testnet%20Ve
559
553
560
554
- Use **`/topology`** endpoint on the HTTP port to check peer connections.
561
555
562
-
```
556
+
```json
563
557
{
564
558
"self": {
565
559
"Addresses": [
@@ -583,17 +577,14 @@ Please refer to System Requirements section [here.](Primev%20Docs%20Testnet%20Ve
583
577
584
578
- To start the nodes, run:
585
579
586
-
```css
580
+
```shell
587
581
docker-compose up --build
588
-
589
582
```
590
583
591
584
- To stop the service:
592
585
593
-
```
594
-
586
+
```shell
595
587
docker-compose down
596
-
597
588
```
598
589
599
590
## API Integration
@@ -613,13 +604,13 @@ Users can find the protobuf file in the [repository(opens in a new tab)](https:
613
604
614
605
There are two main APIs:
615
606
616
-
```
607
+
```protobuf
617
608
// ReceiveBids is called by the execution provider to receive bids from the mev-commit node. // The mev-commit node will stream bids to the execution provider. rpc ReceiveBids(EmptyMessage) returns (stream Bid) {} // SendProcessedBids is called by the provider to send processed bids to the mev-commit node. // The execution provider will stream processed bids to the mev-commit node. rpc SendProcessedBids(stream BidResponse) returns (EmptyMessage) {}
To join the mev-commit chain testnet with your own full-node, use [mev-commit geth (opens in a new tab)](https://github.com/primevprotocol/go-ethereum). We've modified go-ethereum to achieve shorter block periods than mainnet Ethereum, and to enable seamless native token bridging capabilities. Geth configuration will vary based on environment, but an example is provided below:
The bidder needs to prepay a certain amount onto the primev contracts to allow them to send bids and receive commitments. This is to ensure that providers can pull funds once the bids have been completed.
919
910
To prepay, first **********\*\***********\*\***********\*\***********open a new terminal**********\*\***********\*\***********\*\*********** and run the following command:
920
-
```bash
911
+
```shell
921
912
curl -X POST http://localhost:13523/v1/bidder/prepay/1000000000000000000
922
913
```
923
914
This will prepay `1000000000000000000 wei` into your account.
@@ -928,7 +919,7 @@ First you can set the local environment variables to set your KEY and ADDERSS. C
928
919
929
920
Setting these will make running the commands to interact with your account easier.
This command is used to ensure that your provider has been registered with a stake in our protocol. This is used to ensure it can connect with the mev-commit-p2p network. Ensure you run this command in the mev-commit directory.
0 commit comments