Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ include ./makefiles/warnings.mk
include ./makefiles/todos.mk
include ./makefiles/checks.mk
include ./makefiles/tests.mk
include ./makefiles/tests_load.mk
include ./makefiles/localnet.mk
include ./makefiles/query.mk
include ./makefiles/testnet.mk
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ require (
github.com/go-kit/kit v0.13.0
github.com/gogo/status v1.1.0
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/protobuf v1.5.4
github.com/gorilla/mux v1.8.1
github.com/gorilla/websocket v1.5.3
github.com/grpc-ecosystem/grpc-gateway v1.16.0
Expand Down Expand Up @@ -266,14 +266,15 @@ require (
github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gobwas/ws v1.2.1 // indirect
github.com/goccy/go-json v0.10.4 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gofrs/flock v0.12.1 // indirect
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.2.4 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
github.com/golangci/go-printf-func-name v0.1.0 // indirect
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
Expand Down
7 changes: 4 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,8 @@ github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
github.com/gobwas/ws v1.2.1 h1:F2aeBZrm2NDsc7vbovKrWSogd4wvfAxg0FQ89/iqOTk=
github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk=
github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM=
github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0=
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
Expand Down Expand Up @@ -787,8 +787,9 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk=
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 h1:WUvBfQL6EW/40l6OmeSBYQJNSif4O11+bmWEz+C7FYw=
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32/go.mod h1:NUw9Zr2Sy7+HxzdjIULge71wI6yEg1lWQr7Evcu8K0E=
github.com/golangci/go-printf-func-name v0.1.0 h1:dVokQP+NMTO7jwO4bwsRwLWeudOVUPPyAKJuzv8pEJU=
Expand Down
76 changes: 76 additions & 0 deletions localnet_load_testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Localnet Load Testing

## Infra Prep

1. Pull poktroll repo
2. Pull path repo
3. Pull path helm chart repo
4. Start localnet
5. Update `localnet_config.yaml` to reflect `path_local_repo` to true
6. Update `localnet_config.yaml` to reflect `grove_helm_chart_local_repo` to true
7. Set `defaultDashboardsEnabled` to true in `localnet/kubernetes/prometheus/prometheus.yaml`

## Running the test

```bash
make localnet_up
make acc_initialize_pubkeys
make test_load_relays_stress_localnet_single_supplier

go test -v ./load-testing/... -tags=e2e,test,load --features-path=tests/relays_stress_single_supplier.feature
```

## Check params

```bash
pocketd q shared params
```

Check blocks:

```
pocketd q block -o json | tail -n 1 | jq '.header.height'
```

```bash
faucet:
enabled: true
grove_helm_chart_local_repo:
enabled: true
path: ../grove-helm-charts
helm_chart_local_repo:
enabled: false
path: ../helm-charts
hot-reloading: true
indexer:
clone_if_not_present: false
enabled: false
repo_path: ../pocketdex
observability:
enabled: true
grafana:
defaultDashboardsEnabled: true
ollama:
enabled: false
model: qwen:0.5b
path_gateways:
count: 1
path_local_repo:
enabled: true
path: ../path
relayminers:
count: 1
delve:
enabled: false
logs:
level: debug
rest:
enabled: true
validator:
cleanupBeforeEachStart: true
delve:
enabled: false
logs:
format: json
level: info
```
18 changes: 0 additions & 18 deletions makefiles/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,6 @@ test_e2e_params: test_e2e_env ## Run only the E2E suite that exercises parameter
test_e2e_oneshot: test_e2e_env ## Run only the E2E suite that exercises the oneshot module.
go test -v -count=1 ./e2e/tests/... -tags=e2e,oneshot --run=OneshotTaggedFeatures

.PHONY: test_load_relays_stress_custom
test_load_relays_stress_custom: ## Run the stress test for E2E relays using custom manifest. "loadtest_manifest_example.yaml" manifest is used by default. Set 'LOAD_TEST_CUSTOM_MANIFEST' environment variable to use the different manifest.
go test -v -count=1 ./load-testing/tests/... \
-tags=load,test -run LoadRelays --log-level=debug --timeout=30m \
--manifest ./load-testing/$(LOAD_TEST_CUSTOM_MANIFEST)

.PHONY: test_load_relays_stress_localnet
test_load_relays_stress_localnet: test_e2e_env warn_message_local_stress_test ## Run the stress test for E2E relays on LocalNet.
go test -v -count=1 ./load-testing/tests/... \
-tags=load,test -run TestLoadRelays --log-level=debug --timeout=30m \
--manifest ./load-testing/loadtest_manifest_localnet.yaml

.PHONY: test_load_relays_stress_localnet_single_supplier
test_load_relays_stress_localnet_single_supplier: test_e2e_env warn_message_local_stress_test ## Run the stress test for E2E relays on LocalNet using exclusively one supplier.
go test -v -count=1 ./load-testing/tests/... \
-tags=load,test -run TestSingleSupplierLoadRelays --log-level=debug --timeout=30m \
--manifest ./load-testing/loadtest_manifest_localnet_single_supplier.yaml

.PHONY: test_verbose
test_verbose: check_go_version ## Run all go tests verbosely
go test -count=1 -v -race -tags test ./...
Expand Down
22 changes: 22 additions & 0 deletions makefiles/tests_load.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

.PHONY: test_load_relays_stress_custom
test_load_relays_stress_custom: ## Run the stress test for E2E relays using custom manifest. "loadtest_manifest_example.yaml" manifest is used by default. Set 'LOAD_TEST_CUSTOM_MANIFEST' environment variable to use the different manifest.
go test -v -count=1 ./load-testing/tests/... \
-tags=load,test -run LoadRelays --log-level=debug --timeout=30m \
--manifest ./load-testing/$(LOAD_TEST_CUSTOM_MANIFEST)

.PHONY: test_load_relays_stress_localnet_single_supplier
test_load_relays_stress_localnet_single_supplier: test_e2e_env warn_message_local_stress_test ## Run the stress test for E2E relays on LocalNet using exclusively one supplier.
go test -v -count=1 ./load-testing/tests/... \
-tags=load,test -run TestSingleSupplierLoadRelays --log-level=debug --timeout=30m \
--manifest ./load-testing/loadtest_manifest_localnet_single_supplier.yaml

.PHONY: test_load_relays_stress_localnet_multi_suppliers
test_load_relays_stress_localnet_multi_suppliers: test_e2e_env warn_message_local_stress_test ## Run the stress test for E2E relays on LocalNet using multiple suppliers.
go test -v -count=1 ./load-testing/tests/... \
-tags=load,test -run TestLoadRelays --log-level=debug --timeout=30m \
--manifest ./load-testing/loadtest_manifest_localnet_multiple_suppliers.yaml

.PHONY test_load_anvil
test_load_anvil: ## Run the stress test for E2E relays on LocalNet using multiple suppliers.
(cd ./tools/scripts/load_anvil && go run main.go)
28 changes: 28 additions & 0 deletions tools/scripts/load_anvil/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module tx_spammer

go 1.24.3

require github.com/ethereum/go-ethereum v1.16.0

require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/bits-and-blooms/bitset v1.20.0 // indirect
github.com/consensys/gnark-crypto v0.18.0 // indirect
github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect
github.com/ethereum/go-verkle v0.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/holiman/uint256 v1.3.2 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/supranational/blst v0.3.14 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/sync v0.12.0 // indirect
golang.org/x/sys v0.31.0 // indirect
)
Loading
Loading