Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inabox readme improvements #643

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 37 additions & 4 deletions inabox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,39 @@
Notice: The scripts for setting up a local geth chain are currently broken. The instructions below use anvil instead

## First time setup
- Go path is in system path
- Go path is in system path. [Instructions for installing go](https://go.dev/doc/install).
- Ensure all submodules are initialized and checked out
```
git submodule update --init --recursive
$ git submodule update --init --recursive
```
- Docker is installed. [Instructions for installing docker](https://www.docker.com/products/docker-desktop/).
- Ensure foundry is installed (comes with `anvil` which we use as a test chain and `forge` which we use for deployment scripting):
```
$ curl -L https://foundry.paradigm.xyz | bash
$ foundryup
```
- `brew` is installed, see instructions [here](https://brew.sh/).
- Localstack CLI is installed (simulates AWS stack on local machine; we also provide instructions for running localstack from docker without the CLI):
```
$ brew install localstack/tap/localstack-cli
```
- grpcurl is installed:
- `grpcurl` is installed:
```
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
$ brew install grpcurl
```
- `aws` is installed, follow instructions [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
- `npm` is installed
```
$ brew install node
```
- `yarn` is installed
```
$ npm install --global yarn
```
- The Graph is installed
```
$ npm install -g @graphprotocol/graph-cli@latest
```

## Run a complete end-to-end test

Expand Down Expand Up @@ -144,6 +159,15 @@ $ grpcurl -plaintext -d '{"data": "'$(tools/kzgpad/bin/kzgpad -e hello)'"}' \
localhost:32003 disperser.Disperser/DisperseBlob
```

This will return a message in the following form:

```
{
"result": "PROCESSING",
"requestId": "$REQUEST_ID"
}
```

Look for logs such as the following to indicate that the disperser has successfully confirmed the batch:
```
TRACE[10-12|22:02:13.365] [batcher] Aggregating signatures... caller=batcher.go:178
Expand All @@ -155,6 +179,13 @@ TRACE[10-12|22:02:13.376] [batcher] AggregateSignatures took duration=10.6
TRACE[10-12|22:02:13.376] [batcher] Confirming batch... caller=batcher.go:198
```

To check the status of that same blob (replace `$REQUEST_ID` with the request ID from the prior step):

```
grpcurl -plaintext -d '{"request_id": "$REQUEST_ID"}' \
localhost:32003 disperser.Disperser/GetBlobStatus
```

### Cleanup

If you followed [Option 1](#option-1-simplest) above, you can run the following command in order to clean up the test infra:
Expand All @@ -164,3 +195,5 @@ make stop-infra
```

If you followed [Option 2](#option-2), you can stop the infra services by `Ctrl-C`'ing in each terminal. For the graph, it's also important to run `docker compose down -v` from within the `inabox/thegraph` directory to make sure that the containers are fully removed.


Loading