Skip to content

Commit

Permalink
Update the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcgary committed Oct 8, 2024
1 parent d47286e commit a9eba60
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 8 deletions.
56 changes: 49 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@

## Environment setup

If you have basic build tools like `make` already installed, you can run:

```bash
make deps
```

If you are starting from a fresh linux install with nothing, run:

```bash
./scripts/installDeps.sh

Expand All @@ -29,25 +30,66 @@ make deps

## Testing

First run:

```bash
make build
```

This will build everything you need, including the sqlite extensions if they have not yet been built.

### Entire suite

```bash
make test
```

### One off tests

# Running
`goTest.sh` is a convenience script that sets up all relevant environment variables and runs the tests.

### Directly using Go
```bash
./scripts/goTest.sh -v ./internal/types/numbers -v -p 1 -run '^Test_Numbers$'
```

*Dependencies*
### Long-running Rewards tests

* Go 1.22
* gRPCurl (for testing)
The rewards tests are time and resource intensive and are not enabled to run by default.

*Download the test data*

```bash
./scripts/downloadTestData.sh testnet-reduced
```
Run the rewards tests

```bash
REWARDS_TEST_CONTEXT=testnet-reduced TEST_REWARDS=true ./scripts/goTest.sh -timeout 0 ./pkg/rewards -v -p 1 -run '^Test_Rewards$'
````

Options:
* `REWARDS_TEST_CONTEXT` determines which test data to use.
* `TEST_REWARDS` enables the rewards tests.

# Build

This will build the go binary and the associated sqlite3 extensions:

```bash
make deps
make build
```

# Running

### Directly using Go

```bash
# Create the directory to hold the sqlite database
mkdir ./sidecar-data || true
go run main.go run \
./bin/sidecar run \
--ethereum.rpc-url="http://34.229.43.36:8545" \
--chain="holesky" \
--etherscan.api-keys="<your etherscan key>" \
Expand Down
8 changes: 7 additions & 1 deletion scripts/downloadTestData.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/usr/bin/env bash

NETWORK=$1
if [[ -z $NETWORK ]]; then
echo "Usage: $0 <network>"
exit 1
fi

version=$(cat .testdataVersion)
bucketName="eigenlayer-sidecar-testdata"

dataUrl="https://${bucketName}.s3.amazonaws.com/${version}.tar"
dataUrl="https://${bucketName}.s3.amazonaws.com/${NETWORK}/${version}.tar"

if [[ -z $version ]]; then
echo "No version found in .testdataVersion"
Expand Down

0 comments on commit a9eba60

Please sign in to comment.