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

[Testing] refractor: param update E2E tests as integration tests #826

Merged
merged 121 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 111 commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
3a7315c
test: make stake_supplier.feature idempotent
bryanchriswhite Sep 11, 2024
9706877
test: speed up stake_supplier.feature
bryanchriswhite Sep 11, 2024
f2ec505
chore: simplification
bryanchriswhite Sep 11, 2024
e5672c1
chore: fix typos
bryanchriswhite Sep 11, 2024
597f75f
refactor: supplier feature steps
bryanchriswhite Sep 12, 2024
f90c752
refactor: rename paramsAnyMap type
bryanchriswhite Sep 12, 2024
526113b
chore: add comment
bryanchriswhite Sep 12, 2024
054d906
chore: add missing param update assertions
bryanchriswhite Sep 12, 2024
8b703c0
refactor: event waiting test helpers
bryanchriswhite Sep 12, 2024
ba1893c
feat: add supplier staking events
bryanchriswhite Sep 12, 2024
d3d51be
fix: test assertion expectation type
bryanchriswhite Sep 12, 2024
adfe8b8
refactor: integration app's base app & db construction
bryanchriswhite Sep 13, 2024
7aeb2e9
refactor: expose integration app's PreGeneratedAccountsIterator
bryanchriswhite Sep 13, 2024
f8cfdbe
refactor: add WithErrorAssertion run config option for integration app
bryanchriswhite Sep 13, 2024
dbd2402
refactor: add authz to integration app
bryanchriswhite Sep 13, 2024
e3725e4
test: begin refactoring update params E2E tests as integration tests
bryanchriswhite Sep 13, 2024
e842a09
wip: refactor: integraiton test suites to improve composability & reu…
bryanchriswhite Sep 13, 2024
8c94aec
wip: refactor: MsgUpdateParam E2E suite as integration suite
bryanchriswhite Sep 13, 2024
2833b6c
wip: test: debugging
bryanchriswhite Sep 13, 2024
98db79c
refactor: integration app base app construction
bryanchriswhite Sep 16, 2024
1908e10
fix: set default params for all poktroll modules
bryanchriswhite Sep 16, 2024
fdb2b91
chore: expose integration app's pre-generated account iterator
bryanchriswhite Sep 16, 2024
03f2de8
chore: add faucet account to integration app
bryanchriswhite Sep 16, 2024
9f38fb1
chore: add error assertion run option to integration app
bryanchriswhite Sep 16, 2024
61e5598
chore: add authz & bank modules to integration app
bryanchriswhite Sep 16, 2024
da70a08
feat: add IntegrationAppSuite & base implementation
bryanchriswhite Sep 16, 2024
942d381
Merge branch 'main' into issues/799/e2e/idempotent-stake-supplier
bryanchriswhite Sep 16, 2024
d5be66d
chore: rename paramsAnyMap type to mitigate variable name shadowing
bryanchriswhite Sep 16, 2024
36dc18d
chore: rename var
bryanchriswhite Sep 16, 2024
4f3664e
Merge branch 'main' into issues/799/e2e/idempotent-stake-supplier
Olshansk Sep 18, 2024
64c5a83
refactor: integration app to support txResult events
bryanchriswhite Sep 18, 2024
e73aa98
chore: extend IntegrationAppSuite
bryanchriswhite Sep 18, 2024
6e7832a
refactor: add IntegrationAppConfig/Options & genesis support
bryanchriswhite Sep 18, 2024
45730d2
fixup: HEAD^
bryanchriswhite Sep 18, 2024
06aa65e
chore: improvements & godoc comments
bryanchriswhite Sep 19, 2024
907b5c3
fix: tokenomics tests, RunMsgs, & NextBlock()
bryanchriswhite Sep 19, 2024
fb1c61b
chore: self-review improvements
bryanchriswhite Sep 19, 2024
d9e9c28
Merge remote-tracking branch 'pokt/main' into issues/799/refactor/int…
bryanchriswhite Sep 19, 2024
21e306e
fix: linter errors
bryanchriswhite Sep 19, 2024
1daf42c
fix: linter errors
bryanchriswhite Sep 19, 2024
2f1af15
Merge remote-tracking branch 'pokt/main' into issues/799/e2e/idempote…
bryanchriswhite Sep 19, 2024
7e71c38
fix: failing E2E test
bryanchriswhite Sep 19, 2024
ba7aaa7
chore: sync shared module default params
bryanchriswhite Sep 19, 2024
5c46e3d
chore: add comment
bryanchriswhite Sep 19, 2024
a2ee2c2
Merge branch 'issues/799/e2e/idempotent-stake-supplier' into issues/7…
bryanchriswhite Sep 19, 2024
3324d17
chore: review feedback improvements
bryanchriswhite Sep 19, 2024
8546244
Merge branch 'issues/799/e2e/param-helpers' into issues/799/feat/supp…
bryanchriswhite Sep 19, 2024
dfb5c05
Merge branch 'issues/799/feat/supplier-stake-events' into issues/799/…
bryanchriswhite Sep 19, 2024
7d4caf9
Merge branch 'issues/799/refactor/integration-app' into issues/799/me…
bryanchriswhite Sep 19, 2024
ba5e052
Merge branch 'issues/799/merge/integration-app_x_sup-stake-evts' into…
bryanchriswhite Sep 19, 2024
4c1c962
fix: update_param e2e test
bryanchriswhite Sep 19, 2024
5f0750a
Merge branch 'issues/799/e2e/idempotent-stake-supplier' into issues/7…
bryanchriswhite Sep 19, 2024
392a23b
Merge branch 'issues/799/e2e/param-helpers' into issues/799/feat/supp…
bryanchriswhite Sep 19, 2024
7cfb00c
chore: add unbonding_height fields & missing JSON tags
bryanchriswhite Sep 19, 2024
08c9b5d
chore: review improvements
bryanchriswhite Sep 19, 2024
8b98715
fix: failing tests
bryanchriswhite Sep 20, 2024
bedc05c
fix: failing tests
bryanchriswhite Sep 20, 2024
8d27279
Merge branch 'issues/799/e2e/idempotent-stake-supplier' into issues/7…
bryanchriswhite Sep 20, 2024
2877614
fix: failing tests
bryanchriswhite Sep 20, 2024
3effa0b
Merge branch 'issues/799/e2e/idempotent-stake-supplier' into issues/7…
bryanchriswhite Sep 20, 2024
68a0805
Merge branch 'issues/799/e2e/param-helpers' into issues/799/feat/supp…
bryanchriswhite Sep 20, 2024
ccced85
Merge branch 'issues/799/feat/supplier-stake-events' into issues/799/…
bryanchriswhite Sep 20, 2024
8fa1be4
chore: regenerate protobufs
bryanchriswhite Sep 20, 2024
0a0ad4e
Merge branch 'issues/799/feat/supplier-stake-events' into issues/799/…
bryanchriswhite Sep 20, 2024
18dbd04
Merge branch 'issues/799/merge/integration-app_x_sup-stake-evts' into…
bryanchriswhite Sep 20, 2024
53d5fcb
chore: review feedback improvements
bryanchriswhite Sep 20, 2024
836bbe3
fixup: HEAD^
bryanchriswhite Sep 20, 2024
55da2e3
Merge branch 'issues/799/refactor/integration-app' into issues/799/me…
bryanchriswhite Sep 20, 2024
0e3941f
Merge branch 'issues/799/merge/integration-app_x_sup-stake-evts' into…
bryanchriswhite Sep 20, 2024
912c09e
fix: post-merge
bryanchriswhite Sep 20, 2024
c0847c2
fix: bugs discovered
bryanchriswhite Sep 20, 2024
f32d585
Merge remote-tracking branch 'pokt/issues/799/refactor/integration-ap…
bryanchriswhite Sep 20, 2024
51cc9fe
Merge branch 'issues/799/merge/integration-app_x_sup-stake-evts' into…
bryanchriswhite Sep 20, 2024
79b18da
chore: add missing build constraint
bryanchriswhite Sep 20, 2024
e05979b
Merge branch 'main' into issues/799/e2e/idempotent-stake-supplier
bryanchriswhite Sep 23, 2024
cbbef67
chore: review feedback improvements
bryanchriswhite Sep 23, 2024
34776cb
Merge remote-tracking branch 'pokt/main' into issues/799/refactor/int…
bryanchriswhite Sep 23, 2024
cf3e04c
resolve: merge conflict
bryanchriswhite Sep 23, 2024
2cda72a
wip: improvements...
bryanchriswhite Sep 23, 2024
24e7234
Empty commit
bryanchriswhite Sep 23, 2024
695ce7c
Merge branch 'issues/799/e2e/idempotent-stake-supplier' into issues/7…
bryanchriswhite Sep 23, 2024
4808996
Merge branch 'main' into issues/799/e2e/param-helpers
bryanchriswhite Sep 23, 2024
463b474
chore: cleanup & comment
bryanchriswhite Sep 23, 2024
a70a084
chore: delete E2E params tests
bryanchriswhite Sep 23, 2024
b77d6a1
Merge remote-tracking branch 'pokt/issues/799/refactor/integration-ap…
bryanchriswhite Sep 23, 2024
9ced306
Merge branch 'issues/799/merge/integration-app_x_sup-stake-evts' into…
bryanchriswhite Sep 23, 2024
730d19f
Merge remote-tracking branch 'pokt/main' into issues/799/e2e/param-he…
bryanchriswhite Sep 23, 2024
21f822b
fix: add missing steps and update module name for moved param
bryanchriswhite Sep 23, 2024
fa8a9b6
Merge branch 'issues/799/e2e/param-helpers' into issues/799/feat/supp…
bryanchriswhite Sep 23, 2024
d4d0014
Merge branch 'issues/799/feat/supplier-stake-events' into issues/799/…
bryanchriswhite Sep 23, 2024
43e5737
Merge branch 'issues/799/merge/integration-app_x_sup-stake-evts' into…
bryanchriswhite Sep 23, 2024
52003cd
fixup: HEAD^
bryanchriswhite Sep 23, 2024
97ed69c
Merge branch 'issues/799/e2e/param-helpers' into issues/799/feat/supp…
bryanchriswhite Sep 23, 2024
268d102
Merge branch 'issues/799/feat/supplier-stake-events' into issues/799/…
bryanchriswhite Sep 23, 2024
e848711
Merge branch 'issues/799/merge/integration-app_x_sup-stake-evts' into…
bryanchriswhite Sep 23, 2024
52902d9
chore: self-review improvements
bryanchriswhite Sep 23, 2024
8baccfc
Merge branch 'main' into issues/799/refactor/integration-app
Olshansk Sep 23, 2024
afd9a60
revert: unintentional unfactoring
bryanchriswhite Sep 23, 2024
1372cd3
chore: review feedback improvements
bryanchriswhite Sep 24, 2024
c77a0a8
chore: review feedback improvements
bryanchriswhite Sep 24, 2024
c9ab047
Merge branch 'main' into issues/799/refactor/integration-app
bryanchriswhite Sep 24, 2024
01ded7f
Merge branch 'issues/799/refactor/integration-app' into issues/799/me…
bryanchriswhite Sep 24, 2024
54b7a8c
Merge branch 'issues/799/merge/integration-app_x_sup-stake-evts' into…
bryanchriswhite Sep 24, 2024
05f0ba6
chore: remove integration build constraints
bryanchriswhite Sep 24, 2024
8783b17
chore: reconcile upstream
bryanchriswhite Sep 24, 2024
e0e757b
fix: linter errors
bryanchriswhite Sep 24, 2024
6590f76
fixup! HEAD^
bryanchriswhite Sep 24, 2024
c914a89
Merge branch 'issues/799/refactor/integration-app' into issues/799/me…
bryanchriswhite Sep 24, 2024
5965522
Merge branch 'issues/799/merge/integration-app_x_sup-stake-evts' into…
bryanchriswhite Sep 24, 2024
d3563f5
fix: linter errors
bryanchriswhite Sep 24, 2024
f4945c4
chore: unexport params test suites
bryanchriswhite Sep 24, 2024
a6c35a9
Merge branch 'main' into issues/799/refactor/integration-app
bryanchriswhite Sep 25, 2024
a995747
chore: review feedback improvements
bryanchriswhite Sep 25, 2024
c6e4fd7
fix: typo
bryanchriswhite Sep 25, 2024
0201369
chore: review feedback improvements
bryanchriswhite Sep 25, 2024
a821cf4
chore: code review improvements
bryanchriswhite Sep 25, 2024
27837ca
chore: review feedback improvements
bryanchriswhite Sep 25, 2024
4dfa301
chore: consolidate param docs
bryanchriswhite Sep 25, 2024
337ea68
Merge branch 'issues/799/refactor/integration-app' into issues/799/me…
bryanchriswhite Sep 25, 2024
09ed9a7
Merge branch 'issues/799/merge/integration-app_x_sup-stake-evts' into…
bryanchriswhite Sep 25, 2024
445b2f7
Merge remote-tracking branch 'pokt/main' into issues/799/tests/params
bryanchriswhite Sep 25, 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
1,700 changes: 1,700 additions & 0 deletions api/poktroll/supplier/event.pulsar.go

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions e2e/tests/0_settlement.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ Feature: Tokenomics Namespace
| proof_requirement_threshold | 839 | coin |
| proof_missing_penalty | 320 | coin |
| proof_submission_fee | 1000000 | coin |
And the "tokenomics" module parameters are set as follows
And all "proof" module params should be updated
And the "shared" module parameters are set as follows
| compute_units_to_tokens_multiplier | 42 | int64 |
And all "shared" module params should be updated
When the supplier "supplier1" has serviced a session with "20" relays for service "anvil" for application "app1"
# Wait for the Claim & Proof lifecycle
And the user should wait for the "proof" module "CreateClaim" Message to be submitted
Expand Down Expand Up @@ -58,8 +60,10 @@ Feature: Tokenomics Namespace
| proof_requirement_threshold | 421 | coin |
| proof_missing_penalty | 320 | coin |
| proof_submission_fee | 1000000 | coin |
And the "tokenomics" module parameters are set as follows
And all "proof" module params should be updated
And the "shared" module parameters are set as follows
| compute_units_to_tokens_multiplier | 42 | int64 |
And all "shared" module params should be updated
# Start servicing
When the supplier "supplier1" has serviced a session with "10" relays for service "anvil" for application "app1"
# Wait for the Claim & Proof lifecycle
Expand Down
10 changes: 10 additions & 0 deletions e2e/tests/params_tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ func (s *suite) sendAuthzExecTx(signingKeyName, txJSONFilePath string) {

// TODO_IMPROVE: wait for the tx to be committed using an events query client
// instead of sleeping for a specific amount of time.
//
// First attempt:
// eventAttrMatchFn := newEventAttributeMatchFn("action", "/cosmos.authz.v1beta1.MsgExec")
// s.waitForTxResultEvent(eventAttrMatchFn)
//
// This resulted in observing many more events than expected, even accounting
// for those corresponding to the param reset step, which is automatically
// registered in a s.Cleanup() below. There are no useful attributes on these
// events such that we can filter out the noise.

s.Logf("waiting %d seconds for the authz exec tx to be committed...", txDelaySeconds)
time.Sleep(txDelaySeconds * time.Second)

Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/params_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type (
paramNameKey = string
)

// paramsAnyMap is a map of param names to param values.
// paramsAnyMap is a map of param names to param any values.
type paramsAnyMap map[paramNameKey]paramAny

// moduleParamsMap is a map of module names to params maps.
Expand Down
4 changes: 3 additions & 1 deletion e2e/tests/session.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ Feature: Session Namespace
| proof_requirement_threshold | 209 | coin |
| proof_missing_penalty | 320 | coin |
| proof_submission_fee | 1000000 | coin |
And the "tokenomics" module parameters are set as follows
And all "proof" module params should be updated
And the "shared" module parameters are set as follows
| compute_units_to_tokens_multiplier | 42 | int64 |
And all "shared" module params should be updated
When the supplier "supplier1" has serviced a session with "5" relays for service "anvil" for application "app1"
And the user should wait for the "proof" module "CreateClaim" Message to be submitted
And the user should wait for the "proof" module "ClaimCreated" tx event to be broadcast
Expand Down
61 changes: 39 additions & 22 deletions e2e/tests/session_steps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ func (s *suite) waitForTxResultEvent(eventIsMatch func(*abci.Event) bool) (match
ctx, cancel := context.WithCancel(s.ctx)

// For each observed event, **asynchronously** check if it contains the given action.
channel.ForEach[*abci.TxResult](
ctx, s.txResultReplayClient.EventsSequence(ctx),
s.forEachTxResult(ctx,
func(_ context.Context, txResult *abci.TxResult) {
if txResult == nil {
return
Expand All @@ -225,13 +224,6 @@ func (s *suite) waitForTxResultEvent(eventIsMatch func(*abci.Event) bool) (match
},
)

select {
case <-time.After(eventTimeout):
s.Fatalf("ERROR: timed out waiting for tx result event")
case <-ctx.Done():
s.Log("Success; message detected before timeout.")
}

return matchedEvent
}

Expand All @@ -245,8 +237,7 @@ func (s *suite) waitForNewBlockEvent(
ctx, done := context.WithCancel(s.ctx)

// For each observed event, **asynchronously** check if it contains the given action.
channel.ForEach[*block.CometNewBlockEvent](
ctx, s.newBlockEventsReplayClient.EventsSequence(ctx),
s.forEachBlockEvent(ctx,
func(_ context.Context, newBlockEvent *block.CometNewBlockEvent) {
if newBlockEvent == nil {
return
Expand All @@ -264,13 +255,6 @@ func (s *suite) waitForNewBlockEvent(
}
},
)

select {
case <-time.After(eventTimeout):
s.Fatalf("ERROR: timed out waiting for NewBlock event")
case <-ctx.Done():
s.Log("Success; message detected before timeout.")
}
}

// waitForBlockHeight waits for a NewBlock event to be observed whose height is
Expand All @@ -280,8 +264,7 @@ func (s *suite) waitForBlockHeight(targetHeight int64) {

// For each observed event, **asynchronously** check if it is greater than
// or equal to the target height
channel.ForEach[*block.CometNewBlockEvent](
ctx, s.newBlockEventsReplayClient.EventsSequence(ctx),
s.forEachBlockEvent(ctx,
func(_ context.Context, newBlockEvent *block.CometNewBlockEvent) {
if newBlockEvent == nil {
return
Expand All @@ -293,12 +276,46 @@ func (s *suite) waitForBlockHeight(targetHeight int64) {
}
},
)
}

// forEachBlockEvent calls blockEventFn for each observed block event **asynchronously**
// and blocks on waiting for the given context to be cancelled. If the context is
// not cancelled before eventTimeout, the test will fail.
func (s *suite) forEachBlockEvent(
ctx context.Context,
blockEventFn func(_ context.Context, newBlockEvent *block.CometNewBlockEvent),
) {
channel.ForEach[*block.CometNewBlockEvent](ctx,
s.newBlockEventsReplayClient.EventsSequence(ctx),
blockEventFn,
)

select {
case <-time.After(eventTimeout):
s.Fatalf("ERROR: timed out waiting new block event")
case <-ctx.Done():
s.Log("Success; new block event detected before timeout.")
}
}

// forEachTxResult calls txResult for each observed tx result **asynchronously**
// and blocks on waiting for the given context to be cancelled. If the context is
// not cancelled before eventTimeout, the test will fail.
func (s *suite) forEachTxResult(
ctx context.Context,
txResultFn func(_ context.Context, txResult *abci.TxResult),
) {

channel.ForEach[*abci.TxResult](ctx,
s.txResultReplayClient.EventsSequence(ctx),
txResultFn,
)

select {
case <-time.After(eventTimeout):
s.Fatalf("ERROR: timed out waiting for block height", targetHeight)
s.Fatalf("ERROR: timed out waiting for tx result")
case <-ctx.Done():
s.Log("Success; height detected before timeout.")
s.Log("Success; tx result detected before timeout.")
}
}

Expand Down
10 changes: 7 additions & 3 deletions e2e/tests/stake_supplier.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Feature: Stake Supplier Namespace
And the user should be able to see standard output containing "code: 0"
And the pocketd binary should exit without error
And the user should wait for the "supplier" module "StakeSupplier" message to be submitted
And the user should wait for the "supplier" module "SupplierStaked" tx event to be broadcast
And the "supplier" for account "supplier2" is staked with "1000070" uPOKT
And the account balance of "supplier2" should be "1000070" uPOKT "less" than before

Expand All @@ -23,8 +24,9 @@ Feature: Stake Supplier Namespace
And the user should be able to see standard output containing "code: 0"
And the pocketd binary should exit without error
And the supplier for account "supplier2" is unbonding
When the user waits for the supplier for account "supplier2" unbonding period to finish
Then the user verifies the "supplier" for account "supplier2" is not staked
And the user should wait for the "supplier" module "SupplierUnbondingBegin" tx event to be broadcast
And a "supplier" module "SupplierUnbondingEnd" end block event is broadcast
And the user verifies the "supplier" for account "supplier2" is not staked
And the account balance of "supplier2" should be "1000070" uPOKT "more" than before

Scenario: User can restake a Supplier waiting for it to become active again
Expand All @@ -40,4 +42,6 @@ Feature: Stake Supplier Namespace
Then the session for application "app1" and service "anvil" contains the supplier "supplier2"
# Cleanup to make this feature idempotent.
And the user unstakes a "supplier" from the account "supplier2"
And the user waits for the supplier for account "supplier2" unbonding period to finish
And the supplier for account "supplier2" is unbonding
And the user should wait for the "supplier" module "SupplierUnbondingBegin" tx event to be broadcast
And a "supplier" module "SupplierUnbondingEnd" end block event is broadcast
25 changes: 2 additions & 23 deletions e2e/tests/stake_supplier_steps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ package e2e

import (
"reflect"
"strings"
"unicode"

"github.com/stretchr/testify/require"

"github.com/pokt-network/poktroll/testutil/cases"
sharedtypes "github.com/pokt-network/poktroll/x/shared/types"
)

Expand Down Expand Up @@ -61,7 +60,7 @@ func paramsAnyMapFromParamsStruct(paramStruct any) paramsAnyMap {
for i := 0; i < paramsReflectValue.NumField(); i++ {
fieldValue := paramsReflectValue.Field(i)
fieldStruct := paramsReflectValue.Type().Field(i)
paramName := toSnakeCase(fieldStruct.Name)
paramName := cases.ToSnakeCase(fieldStruct.Name)

fieldTypeName := fieldStruct.Type.Name()
// TODO_IMPROVE: MsgUpdateParam currently only supports int64 and not uint64 value types.
Expand All @@ -78,23 +77,3 @@ func paramsAnyMapFromParamsStruct(paramStruct any) paramsAnyMap {
}
return paramsMap
}

func toSnakeCase(str string) string {
var result strings.Builder

for i, runeValue := range str {
if unicode.IsUpper(runeValue) {
// If it's not the first letter, add an underscore
if i > 0 {
result.WriteRune('_')
}
// Convert to lowercase
result.WriteRune(unicode.ToLower(runeValue))
} else {
// Otherwise, just append the rune as-is
result.WriteRune(runeValue)
}
}

return result.String()
}
95 changes: 0 additions & 95 deletions e2e/tests/update_params.feature

This file was deleted.

6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ require (
gopkg.in/yaml.v2 v2.4.0
)

require github.com/jhump/protoreflect v1.16.0
require (
cosmossdk.io/x/tx v0.13.4
github.com/jhump/protoreflect v1.16.0
)

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240508200655-46a4cf4ba109.2 // indirect
Expand All @@ -92,7 +95,6 @@ require (
connectrpc.com/connect v1.16.2 // indirect
connectrpc.com/otelconnect v0.7.0 // indirect
cosmossdk.io/collections v0.4.0 // indirect
cosmossdk.io/x/tx v0.13.4 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.1 // indirect
Expand Down
28 changes: 28 additions & 0 deletions proto/poktroll/supplier/event.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
syntax = "proto3";
package poktroll.supplier;

option go_package = "github.com/pokt-network/poktroll/x/supplier/types";
option (gogoproto.stable_marshaler_all) = true;

import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";

import "poktroll/shared/supplier.proto";

// EventSupplierStaked is emitted with the commitment of the supplier stake message.
message EventSupplierStaked {
poktroll.shared.Supplier supplier = 1 [(gogoproto.jsontag) = "supplier"];
}

// EventSupplierUnstaked is emitted with the commitment of the supplier unstake message.
message EventSupplierUnbondingBegin {
poktroll.shared.Supplier supplier = 1 [(gogoproto.jsontag) = "supplier"];
int64 unbonding_height = 2 [(gogoproto.jsontag) = "unbonding_height"];
}

// EventSupplierUnbondingEnd is emitted with the commitment of last block of the
// supplier unbonding period.
message EventSupplierUnbondingEnd {
poktroll.shared.Supplier supplier = 1 [(gogoproto.jsontag) = "supplier"];
int64 unbonding_height = 2 [(gogoproto.jsontag) = "unbonding_height"];
}
Loading
Loading