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

[Morse->Shannon Migration] scaffold: MsgClaimMorseSupplier #1094

Merged
merged 216 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
216 commits
Select commit Hold shift + click to select a range
7cdced6
refactor: fixture generator testutil
bryanchriswhite Jan 29, 2025
7811f49
scaffold: message import-morse-claimable-accounts --module migration …
bryanchriswhite Feb 13, 2025
bb0809a
chore: update types/fields
bryanchriswhite Feb 13, 2025
dc4be6f
feat: implement MsgImportMorseClaimableAccounts
bryanchriswhite Feb 14, 2025
2edeb3f
fix: linter errors
bryanchriswhite Feb 14, 2025
66d7870
chore: add omitted files
bryanchriswhite Feb 14, 2025
1b102b7
chore: self-review improvement
bryanchriswhite Feb 14, 2025
fa66108
fix: imports
bryanchriswhite Feb 14, 2025
c9fd7be
chore: self-review improvements
bryanchriswhite Feb 14, 2025
ac5ab60
refactor: morse src address & shannon dest address
bryanchriswhite Feb 17, 2025
fc252cf
scaffold: message claim_morse_account --module migration --signer sha…
bryanchriswhite Feb 17, 2025
9b0af5e
chore: update types, fix test, regenerate protobufs
bryanchriswhite Feb 17, 2025
a1ec09c
chore: update autocli
bryanchriswhite Feb 17, 2025
42481a2
fix: imports
bryanchriswhite Feb 17, 2025
29f2e65
chore: self review improvements
bryanchriswhite Feb 17, 2025
5af7f01
chore: self review improvements
bryanchriswhite Feb 17, 2025
9bf879f
refactor: add bank & acct mod deps to migration mod
bryanchriswhite Feb 17, 2025
0bcc12b
chore: add mint permission to migration module
bryanchriswhite Feb 17, 2025
869f596
chore: add EventMorseAccountClaimed proto type
bryanchriswhite Feb 17, 2025
774713d
feat: implement morse account claiming
bryanchriswhite Feb 17, 2025
44165d4
test: unit Morse account claiming
bryanchriswhite Feb 17, 2025
9280288
test: integration morse account claim
bryanchriswhite Feb 17, 2025
8e1a533
chore: add migration module mocks pkg
bryanchriswhite Feb 18, 2025
93004e6
chore: validation, testing, etc.
bryanchriswhite Feb 18, 2025
0848fb1
chore: self-review improvements
bryanchriswhite Feb 18, 2025
30bfca5
refactor: s/QueryGetMorseClaimable(.+)/QueryMorseClaimable$1
bryanchriswhite Feb 18, 2025
10208dc
chore: add app/supplier keepers as migration module deps
bryanchriswhite Feb 18, 2025
49ee23f
chore: add gateway keeper dep
bryanchriswhite Feb 19, 2025
952bf17
refactor: extract keeper methods from msgServer handler
bryanchriswhite Feb 19, 2025
b49e9ad
test: refactor testutil
bryanchriswhite Feb 19, 2025
a87716e
Merge branch 'issues/1034/feat/claim_morse_account' into issues/1034/…
bryanchriswhite Feb 19, 2025
139a9e9
Merge branch 'issues/1034/refactor/query' into issues/1034/migration/…
bryanchriswhite Feb 19, 2025
f08fd00
test: refactor testutil
bryanchriswhite Feb 19, 2025
3b7f77f
scaffold: message claim_morse_application --module migration --signer…
bryanchriswhite Feb 18, 2025
6038939
fix: errors
bryanchriswhite Feb 18, 2025
3411b29
refactor: base integration suite bank client
bryanchriswhite Feb 19, 2025
7128b83
test: refactor integration test to a suite
bryanchriswhite Feb 19, 2025
c4fed01
chore: self-review improvements
bryanchriswhite Feb 19, 2025
3ac4f03
Merge branch 'issues/1034/feat/claim_morse_account' into issues/1034/…
bryanchriswhite Feb 19, 2025
285ef33
fix: post-merge
bryanchriswhite Feb 19, 2025
3236fb4
Merge branch 'issues/1034/refactor/query' into issues/1034/migration/…
bryanchriswhite Feb 19, 2025
20c5230
Merge branch 'issues/1034/refactor/query' into issues/1034/scaffold/m…
bryanchriswhite Feb 19, 2025
81e447f
Merge branch 'main' into issues/1034/scaffold/msg_import_morse
Olshansk Feb 20, 2025
1ffb73b
chore: review feedback improvements
bryanchriswhite Feb 20, 2025
bbfd600
fix: typo
bryanchriswhite Feb 20, 2025
c4b0375
chore: review feedback improvements
bryanchriswhite Feb 20, 2025
5a17194
fix: test
bryanchriswhite Feb 20, 2025
52d865f
chore: chore: review feedback improvements
bryanchriswhite Feb 21, 2025
3c0ba65
Merge remote-tracking branch 'pokt/main' into issues/1034/scaffold/ms…
bryanchriswhite Feb 21, 2025
4a14f00
fix: typo & test
bryanchriswhite Feb 21, 2025
a4ef433
chore: review feedback improvements
bryanchriswhite Feb 24, 2025
fbed024
Merge branch 'main' into issues/1034/scaffold/msg_import_morse
bryanchriswhite Feb 24, 2025
5e13640
chore: review feedback improvements
bryanchriswhite Feb 24, 2025
69f6d9d
Merge branch 'issues/1034/scaffold/msg_import_morse' into issues/1034…
bryanchriswhite Feb 24, 2025
958bdac
fix: imports
bryanchriswhite Feb 24, 2025
2bce02e
Merge branch 'issues/1034/scaffold/msg_claim_morse_account' into issu…
bryanchriswhite Feb 24, 2025
7ca2cfe
fix: typo
bryanchriswhite Feb 24, 2025
c3e4671
fix: linter error
bryanchriswhite Feb 24, 2025
78f495f
Merge branch 'issues/1034/feat/claim_morse_account' into issues/1034/…
bryanchriswhite Feb 24, 2025
9fd7a2f
Merge branch 'issues/1034/refactor/query' into issues/1034/migration/…
bryanchriswhite Feb 24, 2025
d61192b
chore: review feedback improvements
bryanchriswhite Feb 24, 2025
bd68c22
Merge branch 'issues/1034/scaffold/msg_import_morse' into issues/1034…
bryanchriswhite Feb 24, 2025
e11777a
chore: review feedback improvements
bryanchriswhite Feb 24, 2025
61d2414
Merge branch 'issues/1034/scaffold/msg_claim_morse_account' into issu…
bryanchriswhite Feb 24, 2025
5a0c571
Merge branch 'issues/1034/feat/claim_morse_account' into issues/1034/…
bryanchriswhite Feb 24, 2025
ca368b9
Merge branch 'issues/1034/refactor/query' into issues/1034/migration/…
bryanchriswhite Feb 24, 2025
3f425ed
Merge branch 'issues/1034/migration/deps' into issues/1034/scaffold/m…
bryanchriswhite Feb 24, 2025
6fba262
chore: regenerate protobufs
bryanchriswhite Feb 24, 2025
b0744b6
chore: review feedback improvements
bryanchriswhite Feb 24, 2025
0be7bfd
Merge branch 'main' into issues/1034/scaffold/msg_import_morse
Olshansk Feb 24, 2025
c1c25f1
Merge branch 'main' into issues/1034/scaffold/msg_import_morse
Olshansk Feb 24, 2025
502e138
Merge branch 'main' into issues/1034/scaffold/msg_import_morse
bryanchriswhite Feb 25, 2025
c847898
test: stub out E2E migration.feature
bryanchriswhite Feb 25, 2025
8e2ca9b
chore: review feedback improvements
bryanchriswhite Feb 25, 2025
11fcb03
chore: self-review improvements
bryanchriswhite Feb 25, 2025
1d5a496
chore: review feedback improvements
bryanchriswhite Feb 25, 2025
bb8f367
fix: test
bryanchriswhite Feb 25, 2025
6274e5c
Merge branch 'main' into issues/1034/scaffold/msg_import_morse
bryanchriswhite Feb 26, 2025
0d6c6c7
chore: update comments
bryanchriswhite Feb 26, 2025
db9c7d9
Merge branch 'issues/1034/scaffold/msg_import_morse' into issues/1034…
bryanchriswhite Feb 26, 2025
fe47fef
Merge branch 'issues/1034/scaffold/msg_claim_morse_account' into issu…
bryanchriswhite Feb 26, 2025
5dd602a
Merge branch 'issues/1034/feat/claim_morse_account' into issues/1034/…
bryanchriswhite Feb 26, 2025
8f5be38
Merge branch 'issues/1034/refactor/query' into issues/1034/migration/…
bryanchriswhite Feb 26, 2025
3bf673c
Merge branch 'issues/1034/migration/deps' into issues/1034/scaffold/m…
bryanchriswhite Feb 26, 2025
320e6e4
refactor: extract application staking logic to keeper methods
bryanchriswhite Feb 26, 2025
88521b6
Empty commit
bryanchriswhite Feb 26, 2025
6c4d867
chore: remove inaccurate comment
bryanchriswhite Feb 26, 2025
d2a7faa
moveme: feat/morse_claim_account
bryanchriswhite Feb 26, 2025
11b3859
Merge branch 'issues/1034/scaffold/msg_import_morse' into issues/1034…
bryanchriswhite Feb 26, 2025
d047381
Merge branch 'issues/1034/scaffold/msg_claim_morse_account' into issu…
bryanchriswhite Feb 26, 2025
d861f8d
Merge branch 'issues/1034/feat/claim_morse_account' into issues/1034/…
bryanchriswhite Feb 26, 2025
761e6c5
Merge branch 'issues/1034/refactor/query' into issues/1034/migration/…
bryanchriswhite Feb 26, 2025
b0ed098
Merge branch 'issues/1034/migration/deps' into issues/1034/scaffold/m…
bryanchriswhite Feb 26, 2025
b468144
Merge branch 'issues/1034/scaffold/msg_claim_morse_application' into …
bryanchriswhite Feb 26, 2025
8a6c7ff
feat: implement MsgClaimMorseApplication
bryanchriswhite Feb 26, 2025
bd3918d
chore: regenerate protobufs
bryanchriswhite Feb 26, 2025
24d0d93
test: MsgClaimMorseApplication
bryanchriswhite Feb 26, 2025
5d47f38
chore: review feedback improvements
bryanchriswhite Feb 26, 2025
f2e5a19
Merge branch 'issues/1034/scaffold/msg_import_morse' into issues/1034…
bryanchriswhite Feb 26, 2025
bd217c6
Merge remote-tracking branch 'pokt/main' into issues/1034/scaffold/ms…
bryanchriswhite Feb 27, 2025
3cc8442
fix: linter error
bryanchriswhite Feb 27, 2025
9b01383
Empty commit
bryanchriswhite Feb 27, 2025
9c58cdc
Merge branch 'issues/1034/scaffold/msg_claim_morse_account' into issu…
bryanchriswhite Feb 27, 2025
9098a11
chore: review feedback improvements
bryanchriswhite Feb 27, 2025
17cd6d6
Merge remote-tracking branch 'pokt/main' into issues/1034/feat/claim_…
bryanchriswhite Feb 27, 2025
8d05fbd
Merge branch 'issues/1034/feat/claim_morse_account' into issues/1034/…
bryanchriswhite Feb 27, 2025
f0db398
Merge branch 'issues/1034/refactor/query' into issues/1034/migration/…
bryanchriswhite Feb 27, 2025
ca2e6ab
Merge branch 'issues/1034/migration/deps' into issues/1034/scaffold/m…
bryanchriswhite Feb 27, 2025
a36d875
chore: regenerate protobufs
bryanchriswhite Feb 27, 2025
460c632
Merge branch 'issues/1034/scaffold/msg_claim_morse_application' into …
bryanchriswhite Feb 27, 2025
5302d68
chore: self-review improvements
bryanchriswhite Feb 27, 2025
0cfbee9
Merge branch 'issues/1034/refactor/stake_app' into issues/1034/feat/c…
bryanchriswhite Feb 27, 2025
c03f1f0
chore: regenerate protobufs
bryanchriswhite Feb 27, 2025
f3d48c8
refactor: morseSignature as bytes
bryanchriswhite Feb 27, 2025
c39dd0d
refactor: extract supplier staking to keeper methods
bryanchriswhite Feb 27, 2025
ff05279
chore: update comment
bryanchriswhite Feb 27, 2025
39fda92
scaffold: message claim_morse_supplier --module migration --signer sh…
bryanchriswhite Feb 27, 2025
0194935
chore: add TODO comments
bryanchriswhite Feb 27, 2025
29ad95e
fixup! HEAD^
bryanchriswhite Feb 27, 2025
a61d7b7
chore: comment and skip autocli
bryanchriswhite Feb 27, 2025
9714ab2
chore: make go_imports
bryanchriswhite Feb 27, 2025
94cc9fc
refactor: migration suite
bryanchriswhite Feb 28, 2025
0a7985c
Merge branch 'issues/1034/feat/claim_morse_app' into issues/1034/refa…
bryanchriswhite Feb 28, 2025
46a0bab
Merge branch 'issues/1034/refactor/stake_supplier' into issues/1034/s…
bryanchriswhite Feb 28, 2025
d64cbe4
chore: self-review improvements
bryanchriswhite Feb 28, 2025
a8d51a9
chore: self-review improvements
bryanchriswhite Feb 28, 2025
f367fee
chore: self-review improvements
bryanchriswhite Feb 28, 2025
fd64e74
Merge branch 'issues/1034/feat/claim_morse_app' into issues/1034/refa…
bryanchriswhite Feb 28, 2025
05bdaa0
Merge branch 'issues/1034/refactor/stake_supplier' into issues/1034/s…
bryanchriswhite Feb 28, 2025
bcf5e12
chore: self-review improvements
bryanchriswhite Feb 28, 2025
d482fe2
chore: self-review improvements
bryanchriswhite Feb 28, 2025
7c8a2ee
Merge branch 'main' into issues/1034/feat/claim_morse_account
bryanchriswhite Mar 3, 2025
7007e7b
chore: self-review improvements
bryanchriswhite Mar 3, 2025
321c0c3
test: refactor & cleanup testutils
bryanchriswhite Mar 3, 2025
8c48bd4
test: refactor & cleanup testutils
bryanchriswhite Mar 3, 2025
adb8119
Merge branch 'issues/1034/feat/claim_morse_account' into issues/1034/…
bryanchriswhite Mar 3, 2025
0a98b07
Merge branch 'issues/1034/refactor/query' into issues/1034/migration/…
bryanchriswhite Mar 3, 2025
151f592
Merge branch 'issues/1034/migration/deps' into issues/1034/scaffold/m…
bryanchriswhite Mar 3, 2025
7fdb32f
Merge branch 'issues/1034/scaffold/msg_claim_morse_application' into …
bryanchriswhite Mar 3, 2025
85b4c4a
Merge branch 'issues/1034/refactor/stake_app' into issues/1034/feat/c…
bryanchriswhite Mar 3, 2025
75de697
Merge branch 'issues/1034/feat/claim_morse_app' into issues/1034/refa…
bryanchriswhite Mar 3, 2025
cdf5b9c
Merge branch 'issues/1034/refactor/stake_supplier' into issues/1034/s…
bryanchriswhite Mar 3, 2025
2f83dce
chore: self-review improvements
bryanchriswhite Mar 3, 2025
5f86cf1
chore: self-review improvements
bryanchriswhite Mar 3, 2025
1151132
chore: self-review improvements
bryanchriswhite Mar 3, 2025
25bdf58
Merge branch 'issues/1034/feat/claim_morse_app' into issues/1034/refa…
bryanchriswhite Mar 3, 2025
b92bd73
Merge branch 'issues/1034/refactor/stake_supplier' into issues/1034/s…
bryanchriswhite Mar 3, 2025
b7419bf
test: simplify
bryanchriswhite Mar 3, 2025
e4b2a5c
move: app
bryanchriswhite Mar 3, 2025
a44a142
fix: typo
bryanchriswhite Mar 3, 2025
836b4a6
Merge branch 'issues/1034/feat/claim_morse_app' into issues/1034/refa…
bryanchriswhite Mar 3, 2025
97dd651
Merge branch 'issues/1034/refactor/stake_supplier' into issues/1034/s…
bryanchriswhite Mar 3, 2025
9ed6a36
refactor: MorseStateExport & MorseClaimableAccount fixtures
bryanchriswhite Mar 6, 2025
3678306
chore: review feedback improvements
bryanchriswhite Mar 6, 2025
6c29d2a
chore: review feedback improvements
bryanchriswhite Mar 6, 2025
1fa496f
Merge remote-tracking branch 'pokt/main' into issues/1034/feat/claim_…
bryanchriswhite Mar 6, 2025
3f2a510
chore: regenerate protobufs
bryanchriswhite Mar 6, 2025
1e6e39c
chore: review feedback improvements
bryanchriswhite Mar 6, 2025
bddf3e6
chore: regenerate protobufs
bryanchriswhite Mar 6, 2025
7453e3a
chore: self-review improvements
bryanchriswhite Mar 6, 2025
706d90e
chore: review feedback improvements
bryanchriswhite Mar 6, 2025
dd2fcab
fix: typo
bryanchriswhite Mar 6, 2025
5753cfa
chore: review feedback improvements
bryanchriswhite Mar 6, 2025
3c0d469
chore: regenerate protobufs
bryanchriswhite Mar 6, 2025
4918cfa
chore: review feedback improvements
bryanchriswhite Mar 6, 2025
739f2b1
self-review improvements
bryanchriswhite Mar 6, 2025
9a06f0d
Merge branch 'issues/1034/feat/claim_morse_account' into issues/1034/…
bryanchriswhite Mar 6, 2025
b159b59
Merge branch 'issues/1034/refactor/query' into issues/1034/migration/…
bryanchriswhite Mar 7, 2025
b229044
Merge branch 'issues/1034/migration/deps' into issues/1034/scaffold/m…
bryanchriswhite Mar 7, 2025
79af2d1
Merge branch 'issues/1034/scaffold/msg_claim_morse_application' into …
bryanchriswhite Mar 7, 2025
384b021
wip...
bryanchriswhite Mar 6, 2025
14edfd4
Merge remote-tracking branch 'pokt/issues/1034/refactor/stake_app' in…
bryanchriswhite Mar 7, 2025
2dd8780
wip
bryanchriswhite Mar 7, 2025
5895b03
wip: juggling
bryanchriswhite Mar 7, 2025
4a40dff
Merge remote-tracking branch 'pokt/main' into issues/1034/refactor/query
bryanchriswhite Mar 7, 2025
9bad77b
Merge branch 'issues/1034/refactor/query' into issues/1034/migration/…
bryanchriswhite Mar 7, 2025
e91d99a
Merge branch 'issues/1034/migration/deps' into issues/1034/scaffold/m…
bryanchriswhite Mar 7, 2025
14557c1
Merge branch 'issues/1034/scaffold/msg_claim_morse_application' into …
bryanchriswhite Mar 7, 2025
8ab1824
fix: cleanup test cache
bryanchriswhite Mar 7, 2025
ffe6968
chore: cleanup app-integration test
bryanchriswhite Mar 7, 2025
f67f416
Merge remote-tracking branch 'pokt/main' into issues/1034/migration/deps
bryanchriswhite Mar 7, 2025
2a133a4
Merge branch 'issues/1034/migration/deps' into issues/1034/scaffold/m…
bryanchriswhite Mar 7, 2025
2400a76
Merge branch 'issues/1034/scaffold/msg_claim_morse_application' into …
bryanchriswhite Mar 7, 2025
2997d23
Merge remote-tracking branch 'pokt/issues/1034/refactor/stake_app' in…
bryanchriswhite Mar 7, 2025
6307dc8
removeme: after #1108 is merged
bryanchriswhite Mar 7, 2025
3523697
chore: comments
bryanchriswhite Mar 7, 2025
19dca18
test: refactor minStake
bryanchriswhite Mar 7, 2025
da4b78d
Merge branch 'issues/1034/feat/claim_morse_app' into issues/1034/refa…
bryanchriswhite Mar 7, 2025
0cf203f
chore: review chore: review feedback improvements
bryanchriswhite Mar 7, 2025
c1e4376
Merge branch 'issues/1034/refactor/stake_supplier' into issues/1034/s…
bryanchriswhite Mar 7, 2025
e68006c
chore: review feedback improvements
bryanchriswhite Mar 7, 2025
2b17f82
chore: self-review improvements
bryanchriswhite Mar 7, 2025
b79cd02
chore: self-review improvements
bryanchriswhite Mar 7, 2025
6382653
Merge branch 'issues/1034/feat/claim_morse_app' into issues/1034/refa…
bryanchriswhite Mar 7, 2025
1121ed3
Merge branch 'issues/1034/refactor/stake_supplier' into issues/1034/s…
bryanchriswhite Mar 7, 2025
e7351fc
chore: review feedback improvements
bryanchriswhite Mar 7, 2025
b3f4a3e
chore: remove redundant field & update field indices
bryanchriswhite Mar 7, 2025
d91a528
Merge remote-tracking branch 'pokt/main' into issues/1034/scaffold/ms…
bryanchriswhite Mar 7, 2025
06b734f
fix: linter error
bryanchriswhite Mar 7, 2025
6d8a7b9
Merge branch 'issues/1034/scaffold/msg_claim_morse_application' into …
bryanchriswhite Mar 7, 2025
1d98b8a
Merge branch 'issues/1034/refactor/stake_app' into issues/1034/feat/c…
bryanchriswhite Mar 7, 2025
a758afd
Merge branch 'issues/1034/feat/claim_morse_app' into issues/1034/refa…
bryanchriswhite Mar 7, 2025
eaad5e7
Merge remote-tracking branch 'pokt/issues/1034/refactor/stake_supplie…
bryanchriswhite Mar 7, 2025
e96e1e8
Merge branch 'main' into issues/1034/scaffold/msg_claim_morse_applica…
Olshansk Mar 7, 2025
317945d
Merge branch 'main' into issues/1034/scaffold/msg_claim_morse_applica…
Olshansk Mar 10, 2025
4ea63d4
chore: review feedback improvements
bryanchriswhite Mar 11, 2025
4d3772d
Merge branch 'issues/1034/scaffold/msg_claim_morse_application' into …
bryanchriswhite Mar 11, 2025
f738c31
Merge remote-tracking branch 'pokt/main' into issues/1034/refactor/st…
bryanchriswhite Mar 11, 2025
69fe496
Merge branch 'issues/1034/refactor/stake_app' into issues/1034/feat/c…
bryanchriswhite Mar 11, 2025
f4d57c7
chore: review feedback improvements
bryanchriswhite Mar 11, 2025
4be0317
Merge remote-tracking branch 'pokt/main' into issues/1034/feat/claim_…
bryanchriswhite Mar 11, 2025
99d85d7
Merge branch 'issues/1034/feat/claim_morse_app' into issues/1034/refa…
bryanchriswhite Mar 11, 2025
2b088d4
Merge remote-tracking branch 'pokt/main' into issues/1034/refactor/st…
bryanchriswhite Mar 11, 2025
060ad2e
Merge branch 'issues/1034/refactor/stake_supplier' into issues/1034/s…
bryanchriswhite Mar 11, 2025
dd5126d
Merge remote-tracking branch 'pokt/main' into issues/1034/scaffold/ms…
bryanchriswhite Mar 11, 2025
96c6a49
fix: linter error
bryanchriswhite Mar 11, 2025
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,695 changes: 1,617 additions & 78 deletions api/poktroll/migration/tx.pulsar.go

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions api/poktroll/migration/tx_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/upgrades/historical.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"

cosmostypes "github.com/cosmos/cosmos-sdk/types"

"github.com/pokt-network/poktroll/app/keepers"
)

Expand Down
1 change: 1 addition & 0 deletions app/upgrades/v0.0.10.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
cosmosTypes "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/authz"

"github.com/pokt-network/poktroll/app/keepers"
prooftypes "github.com/pokt-network/poktroll/x/proof/types"
)
Expand Down
1 change: 1 addition & 0 deletions app/upgrades/v0.0.11.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
upgradetypes "cosmossdk.io/x/upgrade/types"
cosmosTypes "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"

"github.com/pokt-network/poktroll/app/keepers"
sessiontypes "github.com/pokt-network/poktroll/x/session/types"
tokenomicstypes "github.com/pokt-network/poktroll/x/tokenomics/types"
Expand Down
1 change: 1 addition & 0 deletions app/upgrades/v0.0.12.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
upgradetypes "cosmossdk.io/x/upgrade/types"
cosmosTypes "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"

"github.com/pokt-network/poktroll/app/keepers"
sharedtypes "github.com/pokt-network/poktroll/x/shared/types"
)
Expand Down
75 changes: 69 additions & 6 deletions proto/poktroll/migration/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import "poktroll/shared/service.proto";
import "poktroll/migration/morse_onchain.proto";
import "poktroll/migration/params.proto";
import "poktroll/application/types.proto";
import "poktroll/shared/supplier.proto";
import "cosmos/base/v1beta1/coin.proto";

option go_package = "github.com/pokt-network/poktroll/x/migration/types";
Expand All @@ -21,14 +22,15 @@ service Msg {

// UpdateParams defines a (governance) operation for updating the module
// parameters. The authority defaults to the x/gov module account.
rpc UpdateParams (MsgUpdateParams) returns (MsgUpdateParamsResponse);
rpc UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse );
rpc ImportMorseClaimableAccounts (MsgImportMorseClaimableAccounts) returns (MsgImportMorseClaimableAccountsResponse);
rpc ClaimMorseAccount (MsgClaimMorseAccount) returns (MsgClaimMorseAccountResponse);
rpc ClaimMorseApplication (MsgClaimMorseApplication) returns (MsgClaimMorseApplicationResponse);
rpc ClaimMorseAccount (MsgClaimMorseAccount ) returns (MsgClaimMorseAccountResponse );
rpc ClaimMorseApplication (MsgClaimMorseApplication ) returns (MsgClaimMorseApplicationResponse );
rpc ClaimMorseSupplier (MsgClaimMorseSupplier ) returns (MsgClaimMorseSupplierResponse );
}
// MsgUpdateParams is the Msg/UpdateParams request type.
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";
option (cosmos.msg.v1.signer) = "authority";
option (amino.name) = "poktroll/x/migration/MsgUpdateParams";

// authority is the address that controls the module (defaults to x/gov unless overwritten).
Expand Down Expand Up @@ -57,10 +59,10 @@ message MsgImportMorseClaimableAccounts {
// Validates the morse_account_state sha256 hash:
// - Transaction fails if hash doesn't match on-chain computation
// - Off-chain social consensus should be reached off-chain before verification
//

// Verification can be done by comparing with locally derived Morse state like so:
// $ poktrolld migrate collect-morse-accounts $<(pocket util export-genesis-for-reset)
//

// Additional documentation:
// - pocket util export-genesis-for-migration --help
// - poktrolld migrate collect-morse-accounts --help
Expand All @@ -70,6 +72,7 @@ message MsgImportMorseClaimableAccounts {
// MsgImportMorseClaimableAccountsResponse is returned from MsgImportMorseClaimableAccounts.
// It indicates the canonical hash of the imported MorseAccountState, and the number of claimable accounts which were imported.
message MsgImportMorseClaimableAccountsResponse {

// On-chain computed sha256 hash of the morse_account_state provided in the corresponding MsgCreateMorseAccountState.
bytes state_hash = 1 [(gogoproto.jsontag) = "state_hash"];

Expand Down Expand Up @@ -103,6 +106,7 @@ message MsgClaimMorseAccount {
// It indicates the morse_src_address of the account which was claimed, the total
// balance claimed, and the height at which the claim was committed.
message MsgClaimMorseAccountResponse {

// The hex-encoded address of the Morse account whose balance will be claimed.
// E.g.: 00f9900606fa3d5c9179fc0c8513078a53a2073e
string morse_src_address = 1 [(gogoproto.jsontag) = "morse_src_address"];
Expand Down Expand Up @@ -143,6 +147,7 @@ message MsgClaimMorseApplication {
// It indicates the morse_src_address of the account which was claimed, the unstaked
// balance claimed, the application stake, and the height at which the claim was committed.
message MsgClaimMorseApplicationResponse {

// The hex-encoded address of the Morse account whose balance will be claimed.
string morse_src_address = 1 [(gogoproto.jsontag) = "morse_src_address"];

Expand All @@ -160,3 +165,61 @@ message MsgClaimMorseApplicationResponse {
application.Application application = 5 [(gogoproto.jsontag) = "application"];
}

// TODO_UPNEXT(@bryanchriswhite, #1034): for messages below:
// - Update field types where necessary.
// - Rename fields to conform to best practices.
// - Add applicable field options.

// MsgClaimMorseSupplier is used to:
// - Execute a one-time minting of tokens on Shannon based on tokens owned by the given Morse account
// - Use the on-chain MorseClaimableAccounts for verification
// - Credit the minted tokens to the balance of the given Shannon account
// - Automatically stake that Shannon account as a supplier
//
// NOTE: The supplier module's staking fee parameter (at the time of claiming) is deducted from the
// claimed balance.
message MsgClaimMorseSupplier {
option (cosmos.msg.v1.signer) = "shannonDestAddress";

// The bech32-encoded address of the Shannon account to which the claimed tokens
// will be minted and from which the supplier will be staked.
//
// TODO_MAINNET(@bryanchriswhite, #1095): split into owner and operator addresses...
string shannonDestAddress = 1;

// The hex-encoded address of the Morse account whose balance will be claimed.
// E.g.: 00f9900606fa3d5c9179fc0c8513078a53a2073e
string morseSrcAddress = 2;

// The hex-encoded signature, by the Morse account, of this message (where this field is nil).
// I.e.: morse_signature = private_key.sign(marshal(MsgClaimMorseAccount{morse_signature: nil, ...}))
string morseSignature = 3;

// The services this supplier is staked to provide service for.
// TODO_MAINNET(@bryanchriswhite, #1095): ensure this field is repeated (to match MsgStakeSupplier).
string services = 5;
}

// MsgClaimMorseSupplierResponse is returned from MsgClaimMorseSupplier.
// It indicates:
// - The morse_src_address of the claimed account
// - The unstaked balance claimed
// - The session end height in which the claim was committed
// - The staked supplier
message MsgClaimMorseSupplierResponse {
// The hex-encoded address of the Morse account whose balance was claimed.
// E.g.: 00f9900606fa3d5c9179fc0c8513078a53a2073e
string morseSrcAddress = 1;

// The unstaked balance which was claimed.
cosmos.base.v1beta1.Coin claimedBalance = 2 [(gogoproto.nullable) = false];

cosmos.base.v1beta1.Coin claimedSupplierStake = 4 [(gogoproto.nullable) = false];

// The session end height (on Shannon) in which the claim was committed (i.e. claimed).
int32 sessionEndHeight = 5;

// The supplier which was staked as a result of the claim.
shared.Supplier supplier = 6;
}

3 changes: 3 additions & 0 deletions tests/integration/migration/morse_claim_supplier_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package migration

// TODO_UPNEXT(@bryanchriswhite, #1034): Add app-integration coverage over claiming Morse accounts as suppliers...
3 changes: 2 additions & 1 deletion testutil/events/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
abci "github.com/cometbft/cometbft/abci/types"
cosmostypes "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/gogoproto/proto"
"github.com/stretchr/testify/require"

"github.com/pokt-network/poktroll/pkg/observable"
"github.com/pokt-network/poktroll/pkg/observable/channel"
"github.com/stretchr/testify/require"
)

// FilterEvents filters allEvents, returning list of T type events whose protobuf message type string matches protoType.
Expand Down
18 changes: 18 additions & 0 deletions x/migration/keeper/msg_server_claim_morse_supplier.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package keeper

import (
"context"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/pokt-network/poktroll/x/migration/types"
)

func (k msgServer) ClaimMorseSupplier(goCtx context.Context, msg *types.MsgClaimMorseSupplier) (*types.MsgClaimMorseSupplierResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// TODO_UPNEXT(@bryanchriswhite, #1034): Handling the message
_ = ctx

return &types.MsgClaimMorseSupplierResponse{}, nil
}
3 changes: 3 additions & 0 deletions x/migration/keeper/msg_server_claim_morse_supplier_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package keeper

// TODO_UPNEXT(@bryanchriswhite, #1034): Add msgServer/Keeper unit tests...
8 changes: 8 additions & 0 deletions x/migration/module/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
Skip: true, // skipped because autoCLI cannot handle loading & signing using the Morse key.
// TODO_MAINNET(@bryanchriswhite, #1034): Add morse application claiming CLI, incl. examples (see x/supplier/module/autocli.go).
},
{
RpcMethod: "ClaimMorseSupplier",
Use: "claim-morse-supplier [morse-src-address] [morse-signature] [stake] [service-config]",
Short: "Send a claim_morse_supplier tx",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "morseSrcAddress"}, {ProtoField: "morseSignature"}, {ProtoField: "stake"}, {ProtoField: "serviceConfig"}},
Skip: true, // skipped because autoCLI cannot handle signing
// TODO_UPNEXT(@bryanchriswhite, #1034): Add morse supplier claiming CLI, incl. examples (see x/supplier/module/autocli.go).
},
// this line is used by ignite scaffolding # autocli/tx
},
},
Expand Down
23 changes: 23 additions & 0 deletions x/migration/module/simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ const (
// TODO: Determine the simulation weight value
defaultWeightMsgClaimMorseApplication int = 100

opWeightMsgClaimMorseSupplier = "op_weight_msg_claim_morse_supplier"
// TODO: Determine the simulation weight value
defaultWeightMsgClaimMorseSupplier int = 100

// this line is used by starport scaffolding # simapp/module/const
)

Expand Down Expand Up @@ -91,6 +95,17 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp
migrationsimulation.SimulateMsgClaimMorseApplication(am.accountKeeper, am.bankKeeper, am.keeper),
))

var weightMsgClaimMorseSupplier int
simState.AppParams.GetOrGenerate(opWeightMsgClaimMorseSupplier, &weightMsgClaimMorseSupplier, nil,
func(_ *rand.Rand) {
weightMsgClaimMorseSupplier = defaultWeightMsgClaimMorseSupplier
},
)
operations = append(operations, simulation.NewWeightedOperation(
weightMsgClaimMorseSupplier,
migrationsimulation.SimulateMsgClaimMorseSupplier(am.accountKeeper, am.bankKeeper, am.keeper),
))

// this line is used by starport scaffolding # simapp/module/operation

return operations
Expand Down Expand Up @@ -123,6 +138,14 @@ func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.Wei
return nil
},
),
simulation.NewWeightedProposalMsg(
opWeightMsgClaimMorseSupplier,
defaultWeightMsgClaimMorseSupplier,
func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg {
migrationsimulation.SimulateMsgClaimMorseSupplier(am.accountKeeper, am.bankKeeper, am.keeper)
return nil
},
),
// this line is used by starport scaffolding # simapp/module/OpMsg
}
}
30 changes: 30 additions & 0 deletions x/migration/simulation/claim_morse_supplier.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package simulation

import (
"math/rand"

"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

"github.com/pokt-network/poktroll/x/migration/keeper"
"github.com/pokt-network/poktroll/x/migration/types"
)

func SimulateMsgClaimMorseSupplier(
ak types.AccountKeeper,
bk types.BankKeeper,
k keeper.Keeper,
) simtypes.Operation {
return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
simAccount, _ := simtypes.RandomAcc(r, accs)
msg := &types.MsgClaimMorseSupplier{
ShannonDestAddress: simAccount.Address.String(),
}

// TODO: Handling the ClaimMorseSupplier simulation

return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "ClaimMorseSupplier simulation not implemented"), nil, nil
}
}
3 changes: 3 additions & 0 deletions x/migration/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgClaimMorseApplication{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgClaimMorseSupplier{},
)
// this line is used by starport scaffolding # 3

registry.RegisterImplementations((*sdk.Msg)(nil),
Expand Down
Loading