Skip to content

Commit

Permalink
Information for network testing (#4961)
Browse files Browse the repository at this point in the history
* Documentation for network testing

* Update doc
  • Loading branch information
AgeManning authored Dec 21, 2023
1 parent c55608b commit a7e5926
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions testing/network_testing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Lighthouse live network testing


## DISCLAIMER

This document describes how to run a lighthouse node with minimal resources and time on a live
network.

This procedure should ONLY be used for testing networks and never in production and never with
attached validators. The Lighthouse node described in this state is only a partially functioning
node.


## Overview

We are going to run a single lighthouse node connected to a live network, without syncing and
without an execution engine. This should only ever be done for testing.

There two main components needed.

1. A lighthouse node that doesn't sync
2. A fake execution client that does nothing

We will start with the second

## Mock-EL

This is a service that runs and fakes an execution engine. We firstly need to install the lighthouse
`lcli` tool.

```
$ make install-lcli
```

Once installed, run the fake execution client:

```
$ lcli mock-el --jwt-output-path /tmp/mockel.jwt
```

This will create a server listening on localhost:8551

## Lighthouse no sync

To create a lighthouse node that doesn't sync we need to compile it with a special flag.

```
$ cargo build --release --bin lighthouse --features network/disable-backfill
```

Once built, it can run via checkpoint sync on any network, making sure we point to our mock-el

Prater testnet:

```
$ lighthouse --network prater bn --execution-jwt /tmp/mockel.jwt --checkpoint-sync-url
https://prater.checkpoint.sigp.io --execution-endpoint http://localhost:8551
```

Mainnet:

```
$ lighthouse --network prater bn --execution-jwt /tmp/mockel.jwt --checkpoint-sync-url
https://checkpoint.sigp.io --execution-endpoint http://localhost:8551
```

Additional flags, such as metrics may be added.


## Additional Notes

The above is assuming that you have not run the command in the past. If you have a database in
existence for the network you are testing, checkpoint sync will not start. You may need to add the
`--purge-db` flag to remove any past database and force checkpoint sync to run.

0 comments on commit a7e5926

Please sign in to comment.