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

Update make based instructions #260

Merged
merged 13 commits into from
Jul 3, 2024
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ setup/operator/config/keys/bls.json
setup/operator/config/keys/ecdsa.json
setup/plugin/config/keys/bls.json
setup/plugin/config/keys/ecdsa.json

# Near DA RPC libs
libnear_da_rpc_sys.*

13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ start-indexer: ##
cargo run -p indexer --release -- --home-dir ~/.near/localnet run --da-contract-ids da.test.near --rollup-ids 2 --rmq-address "amqp://127.0.0.1:5672"

start-test-relayer: ##
go run relayer/cmd/main.go --rpc-url ws://127.0.0.1:8546 --da-account-id da.test.near
CGO_LDFLAGS="-L ./relayer/libs ${CGO_LDFLAGS}" go run relayer/cmd/main.go run-args --rpc-url ws://127.0.0.1:8546 --da-account-id da.test.near --key-path ~/.near-credentials/localnet/da.test.near.json

run-plugin: ##
go run plugin/cmd/main.go --config config-files/operator.anvil.yaml
Expand All @@ -121,6 +121,17 @@ tests-unit: ## runs all unit tests
tests-contract: ## runs all forge tests
cd contracts/evm && forge test

near-da-rpc-sys:
rm -rf relayer/libs && \
mkdir relayer/libs && \
git clone https://github.com/taco-paco/rollup-data-availability.git && \
cd rollup-data-availability && \
git checkout c9ec12924b27e37b8c40e7ab1a051a64b363cfd6 && \
make da-rpc-sys && \
cp gopkg/da-rpc/lib/* ../relayer/libs && \
cd .. && \
rm -rf rollup-data-availability

# TODO: Currently we cannot use the race detector with `integration_test.go`
tests-integration: ## runs all integration tests
go test ./tests/integration/integration_test.go -v -count=1
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,20 @@ make start-indexer
make setup-near-da
```

Lastly, start the operator and the relayer:
Then, start the operator:

```bash
make start-operator
```

Lastly, start the relayer. For this, certain native dependencies are required which need to be built at least once:

```bash
make near-da-rpc-sys
```

Once the dependencies are built, start the relayer

```bash
make start-test-relayer
```
Expand Down
8 changes: 4 additions & 4 deletions config-files/operator.anvil.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# this sets the logger level (true = info, false = debug)
production: true

operator_address: 0x0000000000000000000000000000000000000000
operator_address: 0xD5A0359da7B310917d7760385516B2426E86ab7f

# EigenLayer Slasher contract address

Expand All @@ -19,15 +19,15 @@ eth_ws_url: ws://localhost:8545
# this should be /operator_keys/ecdsa_key.json as the host path will be asked while running
#
# If you are running locally using go run main.go, this should be full path to your local ecdsa key file
ecdsa_private_key_store_path: tests/keys/ecdsa/1.ecdsa.key.json
ecdsa_private_key_store_path: tests/keys/ecdsa/1/key.json

# If you running this using eigenlayer CLI and the provided AVS packaging structure,
# this should be /operator_keys/bls_key.json as the host path will be asked while running
#
# We are using bn254 curve for bls keys
#
# If you are running locally using go run main.go, this should be full path to your local bls key file
bls_private_key_store_path: tests/keys/bls/1.bls.key.json
bls_private_key_store_path: tests/keys/bls/1/key.json

aggregator_server_ip_port_address: localhost:8090

Expand All @@ -43,7 +43,7 @@ register_operator_on_startup: true
token_strategy_addr: 0x95401dc811bb5740090279Ba06cfA8fcF6113778

near_da_indexer_rmq_ip_port_address: amqp://localhost:5672
near_da_indexer_rollup_ids: [0]
near_da_indexer_rollup_ids: [2, 3]

rollup_ids_to_rpc_urls:
1: ws://localhost:8545
Expand Down
10 changes: 9 additions & 1 deletion docs/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,20 @@ make start-indexer
make setup-near-da
```

Lastly, start the operator and the relayer:
Then, start the operator:

```bash
make start-operator
```

Lastly, start the relayer. For this, certain native dependencies are required which need to be built at least once:

```bash
make near-da-rpc-sys
```

Once the dependencies are built, start the relayer

```bash
make start-test-relayer
```
Expand Down
Loading