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

[Load Testing] gherkin/go implementation of test plan #1 #432

Merged
merged 113 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
61c8dc8
feat: Implement proof's smt and signature validations
red-0ne Mar 1, 2024
6239e74
[Proof] refactor: ring client for on-chain use (#411)
bryanchriswhite Mar 5, 2024
835889e
refactor: make session comparaison more generic
red-0ne Mar 6, 2024
a01cb26
chore: add comments
red-0ne Mar 6, 2024
8a91394
Merge branch 'main' into feat/proof-validation
bryanchriswhite Mar 7, 2024
6e381a0
test: proof module integration - claim creation
bryanchriswhite Mar 5, 2024
fd80fc9
refactor: session hydrator errors
bryanchriswhite Mar 6, 2024
763e4f0
test: improve claim creation error assertions & add cases
bryanchriswhite Mar 6, 2024
64d96c7
cleanup: remove unused test helpers
bryanchriswhite Mar 6, 2024
0b82243
[PubKeyClient] Implement PubKeyClient for on/off-chain usage (#413)
red-0ne Mar 7, 2024
74e7a09
chore: Address review change requests
red-0ne Mar 7, 2024
e4484be
chore: Update keeper query clients in-code documentation
red-0ne Mar 8, 2024
3f277e7
chore: Add godoc comments
red-0ne Mar 8, 2024
5ad9efb
fixup: review feedback improvements
bryanchriswhite Mar 11, 2024
f1f8905
Merge remote-tracking branch 'pokt/feat/proof-validation' into test/p…
bryanchriswhite Mar 11, 2024
90d89ec
fixup! Merge remote-tracking branch 'pokt/feat/proof-validation' into…
bryanchriswhite Mar 11, 2024
2d5af98
fix: test error msg assertion
red-0ne Mar 11, 2024
3f17fce
Merge remote-tracking branch 'pokt/feat/proof-validation' into test/p…
bryanchriswhite Mar 12, 2024
2bd35a0
fixup! fixup: review feedback improvements
bryanchriswhite Mar 12, 2024
422e82f
refactor: relay min difficulty bits as gov param
bryanchriswhite Mar 12, 2024
fc0755f
test: submit proof message success
bryanchriswhite Mar 12, 2024
caea47c
test: submit proof message error
bryanchriswhite Mar 12, 2024
4bf0b9f
chore: Address review change requests
red-0ne Mar 13, 2024
75db907
chore: Add missing change requests
red-0ne Mar 13, 2024
f7f28bf
Merge remote-tracking branch 'origin/main' into feat/proof-validation
red-0ne Mar 13, 2024
3357fea
chore: Remove pubkey client
red-0ne Mar 14, 2024
f90ca76
chore: Fix unit tests and ring client removal consideration
red-0ne Mar 14, 2024
46c61dd
Offline review of 406
Olshansk Mar 19, 2024
9179ac1
Merge remote-tracking branch 'pokt/main' into feat/proof-validation
bryanchriswhite Mar 19, 2024
b2a78c2
review: feedback improvement
bryanchriswhite Mar 22, 2024
e20e9c1
review: feedback improvement
bryanchriswhite Mar 22, 2024
7b28d62
fixup! review: feedback improvement
bryanchriswhite Mar 22, 2024
a5dca2b
fixup! review: feedback improvement
bryanchriswhite Mar 22, 2024
a262455
Merge branch 'feat/proof-validation' into test/proof-integration
bryanchriswhite Mar 22, 2024
61d83ea
Merge remote-tracking branch 'pokt/main' into test/proof-integration
bryanchriswhite Mar 22, 2024
2a137ce
fixup! Merge remote-tracking branch 'pokt/main' into test/proof-integ…
bryanchriswhite Mar 22, 2024
5f5705e
Merge remote-tracking branch 'pokt/main' into test/proof-integration-2
bryanchriswhite Mar 22, 2024
49bcab3
chore: copy limiter from storj/common
bryanchriswhite Mar 18, 2024
ecbcb8f
chore: add circuit breaker
bryanchriswhite Mar 18, 2024
4962a05
wip: gherkin/go load testing
bryanchriswhite Mar 15, 2024
cce5eb3
refactor: use gocuke.TestingT in testblock pkg
bryanchriswhite Mar 15, 2024
db950a1
revertme: fix relayminer config (incl. in #429)
bryanchriswhite Mar 15, 2024
030643e
fixup! wip: gherkin/go load testing
bryanchriswhite Mar 18, 2024
1f6de3f
fixup! wip: gherkin/go load testing
bryanchriswhite Mar 19, 2024
b76d486
chore: update go.mod
bryanchriswhite Mar 19, 2024
2272ab6
fixup! wip: gherkin/go load testing
bryanchriswhite Mar 19, 2024
a475c98
defunct: need to refactor as observable pipeline
bryanchriswhite Mar 19, 2024
2dbad68
wip: cleanup
bryanchriswhite Mar 20, 2024
38fa7e9
wip: observable pipeline
bryanchriswhite Mar 20, 2024
029ee01
wip
bryanchriswhite Mar 21, 2024
fb9ca50
wip: observable pipeline working
bryanchriswhite Mar 21, 2024
d6738f5
wip
bryanchriswhite Mar 22, 2024
dd397be
wip
bryanchriswhite Mar 22, 2024
75a88ea
Merge remote-tracking branch 'origin/main' into test/gherkin-load
red-0ne Mar 28, 2024
a1a5dcf
WIP: add tx and send relays
red-0ne Apr 2, 2024
149647a
wip: working on-chain scaling
red-0ne Apr 3, 2024
85c0e27
wip: loop based relays load
red-0ne Apr 4, 2024
1e2f145
fix: wait for block
red-0ne Apr 4, 2024
3221aaf
chore: Comment test suite
red-0ne Apr 5, 2024
b9399f0
chore: remove genesis staked gateway
red-0ne Apr 5, 2024
fd84bdb
Merge remote-tracking branch 'origin/main' into test/gherkin-load
red-0ne Apr 8, 2024
c9ac7fa
Merge remote-tracking branch 'origin/main' into test/gherkin-load
red-0ne Apr 10, 2024
5bd0b9a
feat: Refactor send tx, calculate app funding, add manifest
red-0ne Apr 10, 2024
1f7467b
chore: update go.mod
bryanchriswhite Apr 12, 2024
ce4bf0e
wip: identified claim/proof seq. issue
bryanchriswhite Apr 12, 2024
530d296
Merge remote-tracking branch 'pokt/main' into test/gherkin-load
bryanchriswhite Apr 16, 2024
17c2b02
wip: Add tx tracking
red-0ne Apr 16, 2024
5dfa7ea
wip: finalize tx assertion structure
red-0ne Apr 16, 2024
546d24a
fix: relayminer queries correct block hash for proof path seed
bryanchriswhite Apr 17, 2024
1ef80c0
fix: relayminer claim/proof seq.
bryanchriswhite Apr 17, 2024
5cf13c8
fix: batch limiting & exit boundary condition
bryanchriswhite Apr 17, 2024
974f778
wip: failing delegation
red-0ne Apr 17, 2024
264e574
Merge remote-tracking branch 'origin/test/gherkin-load' into test/ghe…
red-0ne Apr 17, 2024
83af61b
fixup: HEAD:HEAD^^
bryanchriswhite Apr 17, 2024
f587f9b
delve on localnet
okdas Apr 17, 2024
0d6fb50
flip other svcs
okdas Apr 17, 2024
904e195
we use 40004 on all containers by default
okdas Apr 17, 2024
cfbce6c
Merge remote-tracking branch 'origin/dlv-localnet' into HEAD
red-0ne Apr 18, 2024
19b6ebc
fix: working on-chain scaling, fix relay distribution
red-0ne Apr 18, 2024
6724f49
feat: update max delegations param
red-0ne Apr 18, 2024
8571a3b
chore: Review comments and helper methods order
red-0ne Apr 22, 2024
e5cec05
fix: working with relays
red-0ne Apr 23, 2024
653cca4
feat: multiple pipleline steps
red-0ne Apr 23, 2024
3149993
fix: gateway url query update
red-0ne Apr 23, 2024
a681a64
Merge remote-tracking branch 'origin/main' into test/gherkin-load
red-0ne Apr 23, 2024
5e5d30b
chore: remove useless diffs with main
red-0ne Apr 23, 2024
f1f3604
chore: remove stale comment
red-0ne Apr 23, 2024
dc19470
wip: refactor: relays stress test suite & helpers
bryanchriswhite Apr 25, 2024
e1e152a
refactor: relays stress test suite & helpers & add wip claim/proof as…
bryanchriswhite Apr 25, 2024
d146f6e
fix: load test make target
bryanchriswhite Apr 25, 2024
9b38ef7
Merge remote-tracking branch 'origin/main' into test/gherkin-load
red-0ne Apr 25, 2024
711d30a
chore: add load test dashboard
bryanchriswhite Apr 26, 2024
0bd797f
chore: cache-break load test make target
bryanchriswhite Apr 26, 2024
79baf26
Merge remote-tracking branch 'pokt/main' into test/gherkin-load
bryanchriswhite Apr 26, 2024
66ef72f
Merge remote-tracking branch 'origin/main' into test/gherkin-load
red-0ne Apr 29, 2024
8c89c87
fix: Adapt test pipeline to new ReplayClient
red-0ne Apr 29, 2024
09ee656
refactor: sessions manager block query client dependency
bryanchriswhite Apr 26, 2024
a61fbc6
chore: review feedback
bryanchriswhite May 8, 2024
9be3c2e
chore: review improvements
bryanchriswhite May 8, 2024
87ba008
chore: review improvements
bryanchriswhite May 8, 2024
90d6c8d
Merge remote-tracking branch 'pokt/main' into test/gherkin-load
bryanchriswhite May 8, 2024
0d7fb32
chore: review feedback improvements
bryanchriswhite May 8, 2024
5cce5fb
chore: review improvements
bryanchriswhite May 8, 2024
1222986
Merge branch 'main' into test/gherkin-load
Olshansk May 10, 2024
e6ad73c
chore: review feedback improvements
bryanchriswhite May 13, 2024
537a4fc
chore: review improvements
bryanchriswhite May 13, 2024
4c64603
chore: review improvements
bryanchriswhite May 13, 2024
83554f9
Merge remote-tracking branch 'pokt/main' into test/gherkin-load
bryanchriswhite May 13, 2024
2de601f
fix: linter errors
bryanchriswhite May 14, 2024
f2408fd
Merge remote-tracking branch 'pokt/main' into test/gherkin-load
bryanchriswhite May 14, 2024
cde544b
fix: logger & build constraint issues
bryanchriswhite May 15, 2024
d1cefaf
Merge remote-tracking branch 'pokt/main' into test/gherkin-load
bryanchriswhite May 15, 2024
16f2082
fix: block query client mock issue
bryanchriswhite May 15, 2024
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
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ test_e2e_settlement: test_e2e_env ## Run only the E2E suite that exercises the s

.PHONY: test_load_relays_stress
test_load_relays_stress: test_e2e_env ## Run the stress test for E2E relays.
go test -v ./load-testing/tests/... -tags=e2e,test --features-path=relays_stress.feature
go test -v -count=1 ./load-testing/tests/... -tags=load,test -run LoadRelays

.PHONY: go_test_verbose
go_test_verbose: check_go_version ## Run all go tests verbosely
Expand Down Expand Up @@ -415,10 +415,6 @@ go_develop: check_ignite_version proto_regen go_mockgen ## Generate protos and m
.PHONY: go_develop_and_test
go_develop_and_test: go_develop go_test ## Generate protos, mocks and run all tests

.PHONY: load_test_simple
load_test_simple: ## Runs the simplest load test through the whole stack (appgate -> relayminer -> anvil)
k6 run load-testing/tests/appGateServerEtherium.js

#############
### TODOS ###
#############
Expand Down
10 changes: 8 additions & 2 deletions app/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,14 @@ var (
Config: appconfig.WrapAny(&gatewaymodulev1.Module{}),
},
{
Name: applicationmoduletypes.ModuleName,
Config: appconfig.WrapAny(&applicationmodulev1.Module{}),
Name: applicationmoduletypes.ModuleName,
Config: appconfig.WrapAny(&applicationmodulev1.Module{
// TODO_BLOCKER(#486): hardcoded authority address used to update max
// delegated gateways for load testing purposes.
// To remove when we have proper governance in place.
// NB: pnf key address; see `poktrolld keys list --keyring-backend test`.
Authority: "pokt1eeeksh2tvkh7wzmfrljnhw4wrhs55lcuvmekkw",
}),
},
{
Name: suppliermoduletypes.ModuleName,
Expand Down
1 change: 1 addition & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ validators:
timeout_propose: "2s"
instrumentation:
prometheus: true
log_level: "info"
client:
chain-id: poktroll

Expand Down
10 changes: 10 additions & 0 deletions load-testing/config/errors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package config

import sdkerrors "cosmossdk.io/errors"

var (
codespace = "load_test_manifest"
ErrLoadTestManifestEmpty = sdkerrors.Register(codespace, 2100, "empty load test manifest")
ErrLoadTestManifestUnmarshalYAML = sdkerrors.Register(codespace, 2101, "manifest reader cannot unmarshal yaml content")
ErrLoadTestInvalidManifest = sdkerrors.Register(codespace, 2102, "invalid load test manifest")
)
66 changes: 0 additions & 66 deletions load-testing/config/index.js

This file was deleted.

76 changes: 76 additions & 0 deletions load-testing/config/load_test_manifest_reader.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
package config

import (
"net/url"

"gopkg.in/yaml.v2"
)

// ProvisionedActorConfig is used to represent the signing key used & URL exposed
// by the pre-provisioned gateway & supplier actors that the load test expects.
type ProvisionedActorConfig struct {
// KeyName is the **name** of the key in the keyring to be used by the given actor.
KeyName string `yaml:"key_name"`
// ExposedUrl is the URL where the actor is expected to be reachable.
ExposedUrl string `yaml:"exposed_url"`
}

// LoadTestManifestYAML is the struct which the load test manifest is deserialized into.
// It contains the list of suppliers and gateways that the load test expects to be pre-provisioned.
type LoadTestManifestYAML struct {
Suppliers []ProvisionedActorConfig `yaml:"suppliers"`
Gateways []ProvisionedActorConfig `yaml:"gateways"`
}

// ParseLoadTestManifest reads the load test manifest from the given byte slice
// and returns the parsed LoadTestManifestYAML struct.
// It returns an error if the manifest is empty, or if it fails to unmarshal.
func ParseLoadTestManifest(manifestContent []byte) (*LoadTestManifestYAML, error) {
var parsedManifest LoadTestManifestYAML

if len(manifestContent) == 0 {
return nil, ErrLoadTestManifestEmpty
}

if err := yaml.Unmarshal(manifestContent, &parsedManifest); err != nil {
return nil, ErrLoadTestManifestUnmarshalYAML.Wrapf("%s", err)
}

if len(parsedManifest.Gateways) == 0 {
return nil, ErrLoadTestInvalidManifest.Wrap("empty gateways entry")
}

if len(parsedManifest.Suppliers) == 0 {
return nil, ErrLoadTestInvalidManifest.Wrap("empty suppliers entry")
}

for _, supplier := range parsedManifest.Suppliers {
if supplier.KeyName == "" {
return nil, ErrLoadTestInvalidManifest.Wrap("empty supplier key name")
}

if supplier.ExposedUrl == "" {
return nil, ErrLoadTestInvalidManifest.Wrap("empty supplier server url")
}

if _, err := url.Parse(supplier.ExposedUrl); err != nil {
return nil, ErrLoadTestInvalidManifest.Wrapf("invalid supplier server url: %s", err)
}
}

for _, gateway := range parsedManifest.Gateways {
if gateway.KeyName == "" {
return nil, ErrLoadTestInvalidManifest.Wrap("empty gateway key name")
}

if gateway.ExposedUrl == "" {
return nil, ErrLoadTestInvalidManifest.Wrap("empty gateway server url")
}

if _, err := url.Parse(gateway.ExposedUrl); err != nil {
return nil, ErrLoadTestInvalidManifest.Wrapf("invalid supplier server url: %s", err)
}
}

return &parsedManifest, nil
}
39 changes: 0 additions & 39 deletions load-testing/modules/sendJsonRPCRequest.js

This file was deleted.

26 changes: 0 additions & 26 deletions load-testing/scenarios/requestBlockNumberEtherium.js

This file was deleted.

15 changes: 15 additions & 0 deletions load-testing/tests/anvil.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Feature: Loading anvil node only

# This scenario loads test the anvil node independently as a baseline for the
# volume that it can handle independent of the poktroll infrastructure and actors.
Scenario Outline: Anvil can handle the maximum number of concurrent users
bryanchriswhite marked this conversation as resolved.
Show resolved Hide resolved
Given anvil is running
And load of <num_requests> concurrent requests for the "eth_blockNumber" JSON-RPC method
Then load is handled within <timeout> seconds

Examples:
| num_requests | timeout |
| 10 | 1 |
| 100 | 1 |
| 1000 | 5 |
| 10000 | 10 |
17 changes: 0 additions & 17 deletions load-testing/tests/anvil.js

This file was deleted.

Loading
Loading