@agoric/cosmos 0.35.0-u13.0 → 0.35.0-u14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/Makefile +25 -12
- package/ante/ante.go +7 -5
- package/app/app.go +118 -86
- package/app/export.go +13 -6
- package/cmd/agd/main.go +5 -3
- package/cmd/libdaemon/main.go +5 -2
- package/daemon/cmd/genaccounts.go +13 -9
- package/daemon/cmd/root.go +38 -15
- package/daemon/cmd/root_test.go +1 -1
- package/daemon/cmd/testnet.go +17 -6
- package/daemon/main.go +3 -2
- package/git-revision.txt +1 -1
- package/go.mod +95 -64
- package/go.sum +592 -243
- package/package.json +3 -3
- package/proto/agoric/vstorage/query.proto +53 -1
- package/scripts/protocgen.sh +12 -1
- package/third_party/proto/buf.yaml +1 -0
- package/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +4 -1
- package/third_party/proto/cosmos/base/v1beta1/coin.proto +7 -4
- package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +16 -6
- package/third_party/proto/cosmos_proto/cosmos.proto +97 -0
- package/third_party/proto/google/api/annotations.proto +1 -1
- package/third_party/proto/google/api/http.proto +181 -120
- package/third_party/proto/google/api/httpbody.proto +9 -6
- package/third_party/proto/google/protobuf/any.proto +1 -7
- package/third_party/proto/ibc/core/channel/v1/channel.proto +15 -1
- package/third_party/proto/ibc/core/client/v1/client.proto +9 -6
- package/upgradegaia.sh +13 -4
- package/vm/action.go +133 -0
- package/vm/action_test.go +129 -0
- package/vm/controller.go +9 -16
- package/vm/core_proposals.go +31 -0
- package/x/lien/keeper/account.go +3 -3
- package/x/lien/keeper/keeper.go +5 -4
- package/x/lien/keeper/keeper_test.go +9 -9
- package/x/lien/lien.go +6 -4
- package/x/lien/lien_test.go +20 -16
- package/x/swingset/abci.go +25 -33
- package/x/swingset/client/cli/query.go +2 -2
- package/x/swingset/client/cli/tx.go +48 -33
- package/x/swingset/client/proposal_handler.go +2 -17
- package/x/swingset/keeper/keeper.go +30 -15
- package/x/swingset/keeper/keeper_test.go +1 -1
- package/x/swingset/keeper/msg_server.go +21 -51
- package/x/swingset/keeper/proposal.go +14 -8
- package/x/swingset/keeper/querier.go +14 -6
- package/x/swingset/keeper/swing_store_exports_handler.go +5 -1
- package/x/swingset/proposal_handler.go +3 -3
- package/x/swingset/swingset.go +4 -2
- package/x/swingset/types/codec.go +2 -2
- package/x/swingset/types/msgs.pb.go +16 -16
- package/x/swingset/types/proposal.go +5 -5
- package/x/swingset/types/types.go +30 -28
- package/x/vbank/keeper/keeper.go +3 -2
- package/x/vbank/keeper/querier.go +6 -2
- package/x/vbank/keeper/rewards.go +1 -1
- package/x/vbank/vbank.go +19 -17
- package/x/vbank/vbank_test.go +18 -18
- package/x/vibc/handler.go +3 -8
- package/x/vibc/ibc.go +66 -113
- package/x/vibc/keeper/keeper.go +19 -18
- package/x/vibc/types/expected_keepers.go +13 -5
- package/x/vibc/types/msgs.go +1 -1
- package/x/vibc/types/msgs.pb.go +1 -1
- package/x/vstorage/README.md +138 -0
- package/x/vstorage/capdata/capdata.go +298 -0
- package/x/vstorage/capdata/capdata_test.go +352 -0
- package/x/vstorage/client/cli/query.go +51 -4
- package/x/vstorage/keeper/grpc_query.go +221 -0
- package/x/vstorage/keeper/keeper.go +3 -2
- package/x/vstorage/keeper/keeper_grpc_test.go +300 -0
- package/x/vstorage/keeper/keeper_test.go +1 -1
- package/x/vstorage/keeper/querier.go +6 -2
- package/x/vstorage/types/query.pb.go +646 -36
- package/x/vstorage/types/query.pb.gw.go +119 -0
- package/x/vstorage/vstorage.go +16 -15
- package/x/vstorage/vstorage_test.go +5 -5
- /package/{src/index.cjs → index.cjs} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,49 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.35.0-u14.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.35.0-u13.0...@agoric/cosmos@0.35.0-u14.0) (2024-02-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ⚠ BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **cosmos:** make vm comms use `context.Context`
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* repair KREAd contract on zoe upgrade ([6ac7623](https://github.com/Agoric/agoric-sdk/commit/6ac762379e2660353a23202acd2d6fb52ed13682))
|
|
16
|
+
* **cosmos:** Add a "CapData" vstorage RPC endpoint ([d20e708](https://github.com/Agoric/agoric-sdk/commit/d20e708cf68e6b0616218e668f21f66b491032b5)), closes [#7581](https://github.com/Agoric/agoric-sdk/issues/7581)
|
|
17
|
+
* **cosmos:** Add a vstorage package for decoding CapData ([f1b6b74](https://github.com/Agoric/agoric-sdk/commit/f1b6b74d6410412d86f094175fca72e2e17e8a2b))
|
|
18
|
+
* **cosmos:** clean up `OnStartHook` and `OnExitHook` signatures ([e8a3a77](https://github.com/Agoric/agoric-sdk/commit/e8a3a77aacab4affa7e83885ece8789418a31846))
|
|
19
|
+
* **cosmos:** make vm comms use `context.Context` ([0bb03a0](https://github.com/Agoric/agoric-sdk/commit/0bb03a0f222426bf8da6729d968c404dc9e72468))
|
|
20
|
+
* agd vstorage 'path' for data or children ([71a217e](https://github.com/Agoric/agoric-sdk/commit/71a217e5a3576b6e8e89fb27e59eb7f2ebde592b))
|
|
21
|
+
* **cosmos:** Always include alleged name and slot id in vstorage CapData remotable representations ([ee23c4e](https://github.com/Agoric/agoric-sdk/commit/ee23c4e404d90afaa28dbf53dfdb33cb9c3eda1b))
|
|
22
|
+
* expose node service to retrieve operator config ([972d243](https://github.com/Agoric/agoric-sdk/commit/972d243eff2bf1eb0ca10f8a9860109a5a39cf87))
|
|
23
|
+
* replace zoe and zcf ([#8846](https://github.com/Agoric/agoric-sdk/issues/8846)) ([0169c7e](https://github.com/Agoric/agoric-sdk/commit/0169c7e505099fdcfa8e4d1436e5d3b372f1c320))
|
|
24
|
+
* tolerate missing files in gaia 3-way diff ([8633f4d](https://github.com/Agoric/agoric-sdk/commit/8633f4d7917a12035182715d560d50f312ece4ff))
|
|
25
|
+
* upgrade ibc-go to v6.2.1 ([2371b51](https://github.com/Agoric/agoric-sdk/commit/2371b5178eff16baadc5716a3f7e11573d3b8889))
|
|
26
|
+
* **cosmos:** impose defaults when sending VM actions ([d32e71e](https://github.com/Agoric/agoric-sdk/commit/d32e71ec14121c3c69aa3c173f284c706d329c75))
|
|
27
|
+
* **cosmos:** next upgrade is `agoric-upgrade-14` ([0333099](https://github.com/Agoric/agoric-sdk/commit/03330999fa8ea872c57a94db063eadbdadc6f342))
|
|
28
|
+
* **cosmos:** support core proposals set by upgrade handler ([14e47cc](https://github.com/Agoric/agoric-sdk/commit/14e47cc503db18ee74d7d9bd3193797524b7f540))
|
|
29
|
+
* **cosmos:** upgrade wallet factory ([ceffbcd](https://github.com/Agoric/agoric-sdk/commit/ceffbcdd85bd4dfa3a7646b590133f9fd55755c8))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* **cosmos:** add action context to core evals ([ce1197d](https://github.com/Agoric/agoric-sdk/commit/ce1197dca3c6e274f39ab9f125ed0ec8ad9388fd))
|
|
35
|
+
* avoid broken goleveldb ([f4bd519](https://github.com/Agoric/agoric-sdk/commit/f4bd519ff0675fec1ecb81eaf2488b0df72bd286))
|
|
36
|
+
* exempt more 3rd-party protos from link check ([0be9f00](https://github.com/Agoric/agoric-sdk/commit/0be9f0097d7657f33b5ecda467ff33309b228f51))
|
|
37
|
+
* govulncheck updates ([e83fb57](https://github.com/Agoric/agoric-sdk/commit/e83fb57406ff176c11322c5b61e8515d7d8235df))
|
|
38
|
+
* pick up snapshot initiation fix ([2d41178](https://github.com/Agoric/agoric-sdk/commit/2d41178e84d66fb3c4e990406989a4f6e1f4f386))
|
|
39
|
+
* unwrap account keeper for app module ([4807023](https://github.com/Agoric/agoric-sdk/commit/48070238018ce6afc361254e5e847e90752eb9cf))
|
|
40
|
+
* update protobuf download and generation for ibc-go v4 ([63bdd54](https://github.com/Agoric/agoric-sdk/commit/63bdd54f7629adc6dbb38632c0e1b0bc2526f0e2))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Reverts
|
|
44
|
+
|
|
45
|
+
* Revert "fix(cosmos): don't log expected missing tx context of CORE_EVAL" ([eb856af](https://github.com/Agoric/agoric-sdk/commit/eb856afcb32b4376ceb353c6895c65db0c251958))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
6
49
|
## [0.35.0-u13.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.35.0-u12.0...@agoric/cosmos@0.35.0-u13.0) (2023-12-07)
|
|
7
50
|
|
|
8
51
|
|
package/Makefile
CHANGED
|
@@ -98,44 +98,57 @@ proto-lint: proto-tools
|
|
|
98
98
|
proto-check-breaking: proto-tools
|
|
99
99
|
${BIN}/buf breaking --against $(PR_TARGET_REPO)#branch=$(PR_TARGET_BRANCH),subdir=golang/cosmos
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
echo "X$(COSMOSVER)X"
|
|
106
|
-
|
|
107
|
-
TM_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/tendermint/tendermint)/proto/tendermint
|
|
108
|
-
GOGO_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/gogo/protobuf)
|
|
109
|
-
IBC_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v4)/proto/ibc/core
|
|
101
|
+
GOGO_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/gogo/protobuf)
|
|
102
|
+
# GOOGLE_API_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/googleapis/googleapis)/google/api
|
|
103
|
+
IBC_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v6)/proto/ibc/core
|
|
104
|
+
COSMOS_PROTO_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-proto)/proto/cosmos_proto
|
|
110
105
|
COSMOS_SDK_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-sdk)/proto/cosmos
|
|
111
106
|
|
|
107
|
+
COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto
|
|
112
108
|
GOGO_PROTO_TYPES = third_party/proto/gogoproto
|
|
109
|
+
GOOGLE_API_TYPES = third_party/proto/google/api
|
|
110
|
+
GOOGLE_PROTO_TYPES = third_party/proto/google/protobuf
|
|
113
111
|
IBC_CHANNEL_TYPES = third_party/proto/ibc/core/channel/v1
|
|
114
112
|
IBC_CLIENT_TYPES = third_party/proto/ibc/core/client/v1
|
|
115
|
-
|
|
113
|
+
SDK_BASE_TYPES = third_party/proto/cosmos/base/v1beta1
|
|
114
|
+
SDK_QUERY_TYPES = third_party/proto/cosmos/base/query/v1beta1
|
|
116
115
|
SDK_UPGRADE_TYPES = third_party/proto/cosmos/upgrade/v1beta1
|
|
117
116
|
|
|
118
117
|
proto-update-deps:
|
|
118
|
+
mkdir -p $(COSMOS_PROTO_TYPES)
|
|
119
|
+
curl -sSL $(COSMOS_PROTO_PROTO_URL)/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto
|
|
120
|
+
|
|
119
121
|
mkdir -p $(GOGO_PROTO_TYPES)
|
|
120
122
|
curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto
|
|
121
123
|
|
|
124
|
+
# Downloading from a not-a-go-module is problematic. These files are artifacts for now.
|
|
125
|
+
# mkdir -p $(GOOGLE_API_TYPES)
|
|
126
|
+
# curl -sSL $(GOOGLE_API_URL)/annotations.proto > $(GOOGLE_API_TYPES)/annotations.proto
|
|
127
|
+
# curl -sSL $(GOOGLE_API_URL)/http.proto > $(GOOGLE_API_TYPES)/http.proto
|
|
128
|
+
# curl -sSL $(GOOGLE_API_URL)/httpbody.proto > $(GOOGLE_API_TYPES)/httpbody.proto
|
|
129
|
+
|
|
130
|
+
mkdir -p $(GOOGLE_PROTO_TYPES)
|
|
131
|
+
curl -sSL $(GOGO_PROTO_URL)/protobuf/google/protobuf/any.proto > $(GOOGLE_PROTO_TYPES)/any.proto
|
|
132
|
+
|
|
122
133
|
mkdir -p $(IBC_CHANNEL_TYPES)
|
|
123
134
|
curl -sSL $(IBC_PROTO_URL)/channel/v1/channel.proto > $(IBC_CHANNEL_TYPES)/channel.proto
|
|
124
135
|
|
|
125
136
|
mkdir -p $(IBC_CLIENT_TYPES)
|
|
126
137
|
curl -sSL $(IBC_PROTO_URL)/client/v1/client.proto > $(IBC_CLIENT_TYPES)/client.proto
|
|
127
138
|
|
|
139
|
+
mkdir -p $(SDK_BASE_TYPES)
|
|
140
|
+
curl -sSL $(COSMOS_SDK_PROTO_URL)/base/v1beta1/coin.proto > $(SDK_BASE_TYPES)/coin.proto
|
|
141
|
+
|
|
128
142
|
mkdir -p $(SDK_QUERY_TYPES)
|
|
129
143
|
curl -sSL $(COSMOS_SDK_PROTO_URL)/base/query/v1beta1/pagination.proto > $(SDK_QUERY_TYPES)/pagination.proto
|
|
130
144
|
|
|
131
145
|
mkdir -p $(SDK_UPGRADE_TYPES)
|
|
132
146
|
curl -sSL $(COSMOS_SDK_PROTO_URL)/upgrade/v1beta1/upgrade.proto > $(SDK_UPGRADE_TYPES)/upgrade.proto
|
|
133
147
|
|
|
134
|
-
|
|
135
148
|
UNAME_S ?= $(shell uname -s)
|
|
136
149
|
UNAME_M ?= $(shell uname -m)
|
|
137
150
|
|
|
138
|
-
BUF_VERSION ?= 0.
|
|
151
|
+
BUF_VERSION ?= 1.0.0
|
|
139
152
|
|
|
140
153
|
PROTOC_VERSION ?= 3.11.2
|
|
141
154
|
ifeq ($(UNAME_S),Linux)
|
package/ante/ante.go
CHANGED
|
@@ -4,8 +4,8 @@ import (
|
|
|
4
4
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
5
5
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
|
6
6
|
"github.com/cosmos/cosmos-sdk/x/auth/ante"
|
|
7
|
-
ibcante "github.com/cosmos/ibc-go/
|
|
8
|
-
ibckeeper "github.com/cosmos/ibc-go/
|
|
7
|
+
ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante"
|
|
8
|
+
ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
|
|
9
9
|
)
|
|
10
10
|
|
|
11
11
|
// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
|
|
@@ -43,8 +43,10 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
|
|
|
43
43
|
|
|
44
44
|
anteDecorators := []sdk.AnteDecorator{
|
|
45
45
|
ante.NewSetUpContextDecorator(),
|
|
46
|
-
ante.
|
|
47
|
-
ante.NewMempoolFeeDecorator()
|
|
46
|
+
ante.NewExtensionOptionsDecorator(nil), // reject all extensions
|
|
47
|
+
// former ante.NewMempoolFeeDecorator()
|
|
48
|
+
// replaced as in https://github.com/provenance-io/provenance/pull/1016
|
|
49
|
+
ante.NewDeductFeeDecorator(opts.AccountKeeper, opts.BankKeeper, opts.FeegrantKeeper, nil),
|
|
48
50
|
ante.NewValidateBasicDecorator(),
|
|
49
51
|
ante.NewTxTimeoutHeightDecorator(),
|
|
50
52
|
ante.NewValidateMemoDecorator(opts.AccountKeeper),
|
|
@@ -58,7 +60,7 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
|
|
|
58
60
|
ante.NewSigVerificationDecorator(opts.AccountKeeper, opts.SignModeHandler),
|
|
59
61
|
NewAdmissionDecorator(opts.AdmissionData),
|
|
60
62
|
ante.NewIncrementSequenceDecorator(opts.AccountKeeper),
|
|
61
|
-
ibcante.
|
|
63
|
+
ibcante.NewRedundantRelayDecorator(opts.IBCKeeper),
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
return sdk.ChainAnteDecorators(anteDecorators...), nil
|
package/app/app.go
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package gaia
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
+
"context"
|
|
4
5
|
"encoding/json"
|
|
5
6
|
"fmt"
|
|
6
7
|
"io"
|
|
@@ -13,8 +14,8 @@ import (
|
|
|
13
14
|
|
|
14
15
|
"github.com/cosmos/cosmos-sdk/baseapp"
|
|
15
16
|
"github.com/cosmos/cosmos-sdk/client"
|
|
17
|
+
nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node"
|
|
16
18
|
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
|
|
17
|
-
"github.com/cosmos/cosmos-sdk/client/rpc"
|
|
18
19
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
19
20
|
"github.com/cosmos/cosmos-sdk/codec/types"
|
|
20
21
|
"github.com/cosmos/cosmos-sdk/server/api"
|
|
@@ -28,7 +29,6 @@ import (
|
|
|
28
29
|
"github.com/cosmos/cosmos-sdk/version"
|
|
29
30
|
"github.com/cosmos/cosmos-sdk/x/auth"
|
|
30
31
|
"github.com/cosmos/cosmos-sdk/x/auth/ante"
|
|
31
|
-
authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
|
|
32
32
|
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
|
33
33
|
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
|
|
34
34
|
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
|
|
@@ -58,8 +58,11 @@ import (
|
|
|
58
58
|
"github.com/cosmos/cosmos-sdk/x/genutil"
|
|
59
59
|
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
|
|
60
60
|
"github.com/cosmos/cosmos-sdk/x/gov"
|
|
61
|
+
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
|
|
61
62
|
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
|
|
62
63
|
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
|
64
|
+
govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
|
|
65
|
+
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
|
63
66
|
"github.com/cosmos/cosmos-sdk/x/mint"
|
|
64
67
|
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
|
|
65
68
|
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
|
|
@@ -78,22 +81,22 @@ import (
|
|
|
78
81
|
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
|
|
79
82
|
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
|
|
80
83
|
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
|
81
|
-
ica "github.com/cosmos/ibc-go/
|
|
82
|
-
|
|
83
|
-
icahost "github.com/cosmos/ibc-go/
|
|
84
|
-
icahostkeeper "github.com/cosmos/ibc-go/
|
|
85
|
-
icahosttypes "github.com/cosmos/ibc-go/
|
|
86
|
-
icatypes "github.com/cosmos/ibc-go/
|
|
87
|
-
"github.com/cosmos/ibc-go/
|
|
88
|
-
ibctransferkeeper "github.com/cosmos/ibc-go/
|
|
89
|
-
ibctransfertypes "github.com/cosmos/ibc-go/
|
|
90
|
-
ibc "github.com/cosmos/ibc-go/
|
|
91
|
-
ibcclient "github.com/cosmos/ibc-go/
|
|
92
|
-
ibcclientclient "github.com/cosmos/ibc-go/
|
|
93
|
-
ibcclienttypes "github.com/cosmos/ibc-go/
|
|
94
|
-
porttypes "github.com/cosmos/ibc-go/
|
|
95
|
-
ibchost "github.com/cosmos/ibc-go/
|
|
96
|
-
ibckeeper "github.com/cosmos/ibc-go/
|
|
84
|
+
ica "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts"
|
|
85
|
+
|
|
86
|
+
icahost "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host"
|
|
87
|
+
icahostkeeper "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/keeper"
|
|
88
|
+
icahosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types"
|
|
89
|
+
icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"
|
|
90
|
+
"github.com/cosmos/ibc-go/v6/modules/apps/transfer"
|
|
91
|
+
ibctransferkeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper"
|
|
92
|
+
ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"
|
|
93
|
+
ibc "github.com/cosmos/ibc-go/v6/modules/core"
|
|
94
|
+
ibcclient "github.com/cosmos/ibc-go/v6/modules/core/02-client"
|
|
95
|
+
ibcclientclient "github.com/cosmos/ibc-go/v6/modules/core/02-client/client"
|
|
96
|
+
ibcclienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"
|
|
97
|
+
porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types"
|
|
98
|
+
ibchost "github.com/cosmos/ibc-go/v6/modules/core/24-host"
|
|
99
|
+
ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
|
|
97
100
|
"github.com/gorilla/mux"
|
|
98
101
|
"github.com/rakyll/statik/fs"
|
|
99
102
|
"github.com/spf13/cast"
|
|
@@ -148,15 +151,15 @@ var (
|
|
|
148
151
|
staking.AppModuleBasic{},
|
|
149
152
|
mint.AppModuleBasic{},
|
|
150
153
|
distr.AppModuleBasic{},
|
|
151
|
-
gov.NewAppModuleBasic(
|
|
154
|
+
gov.NewAppModuleBasic([]govclient.ProposalHandler{
|
|
152
155
|
paramsclient.ProposalHandler,
|
|
153
156
|
distrclient.ProposalHandler,
|
|
154
|
-
upgradeclient.
|
|
155
|
-
upgradeclient.
|
|
157
|
+
upgradeclient.LegacyProposalHandler,
|
|
158
|
+
upgradeclient.LegacyCancelProposalHandler,
|
|
156
159
|
ibcclientclient.UpdateClientProposalHandler,
|
|
157
160
|
ibcclientclient.UpgradeProposalHandler,
|
|
158
161
|
swingsetclient.CoreEvalProposalHandler,
|
|
159
|
-
),
|
|
162
|
+
}),
|
|
160
163
|
params.AppModuleBasic{},
|
|
161
164
|
slashing.AppModuleBasic{},
|
|
162
165
|
feegrantmodule.AppModuleBasic{},
|
|
@@ -213,14 +216,14 @@ type GaiaApp struct { // nolint: golint
|
|
|
213
216
|
vibcPort int
|
|
214
217
|
vstoragePort int
|
|
215
218
|
|
|
216
|
-
|
|
219
|
+
upgradeDetails *upgradeDetails
|
|
217
220
|
|
|
218
221
|
invCheckPeriod uint
|
|
219
222
|
|
|
220
223
|
// keys to access the substores
|
|
221
|
-
keys map[string]*
|
|
222
|
-
tkeys map[string]*
|
|
223
|
-
memKeys map[string]*
|
|
224
|
+
keys map[string]*storetypes.KVStoreKey
|
|
225
|
+
tkeys map[string]*storetypes.TransientStoreKey
|
|
226
|
+
memKeys map[string]*storetypes.MemoryStoreKey
|
|
224
227
|
|
|
225
228
|
// keepers
|
|
226
229
|
AccountKeeper authkeeper.AccountKeeper
|
|
@@ -284,7 +287,7 @@ func NewGaiaApp(
|
|
|
284
287
|
appOpts servertypes.AppOptions,
|
|
285
288
|
baseAppOptions ...func(*baseapp.BaseApp),
|
|
286
289
|
) *GaiaApp {
|
|
287
|
-
defaultController := func(needReply bool, str string) (string, error) {
|
|
290
|
+
defaultController := func(ctx context.Context, needReply bool, str string) (string, error) {
|
|
288
291
|
fmt.Fprintln(os.Stderr, "FIXME: Would upcall to controller with", str)
|
|
289
292
|
return "", nil
|
|
290
293
|
}
|
|
@@ -296,7 +299,7 @@ func NewGaiaApp(
|
|
|
296
299
|
}
|
|
297
300
|
|
|
298
301
|
func NewAgoricApp(
|
|
299
|
-
sendToController func(bool, string) (string, error),
|
|
302
|
+
sendToController func(context.Context, bool, string) (string, error),
|
|
300
303
|
logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool,
|
|
301
304
|
homePath string, invCheckPeriod uint, encodingConfig gaiaappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp),
|
|
302
305
|
) *GaiaApp {
|
|
@@ -340,7 +343,7 @@ func NewAgoricApp(
|
|
|
340
343
|
|
|
341
344
|
// set the BaseApp's parameter store
|
|
342
345
|
bApp.SetParamStore(
|
|
343
|
-
app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(
|
|
346
|
+
app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()),
|
|
344
347
|
)
|
|
345
348
|
|
|
346
349
|
// add capability keeper and ScopeToModule for ibc module
|
|
@@ -358,6 +361,7 @@ func NewAgoricApp(
|
|
|
358
361
|
app.GetSubspace(authtypes.ModuleName),
|
|
359
362
|
authtypes.ProtoBaseAccount,
|
|
360
363
|
maccPerms,
|
|
364
|
+
appName,
|
|
361
365
|
)
|
|
362
366
|
wrappedAccountKeeper := lien.NewWrappedAccountKeeper(innerAk)
|
|
363
367
|
app.AccountKeeper = wrappedAccountKeeper
|
|
@@ -372,6 +376,7 @@ func NewAgoricApp(
|
|
|
372
376
|
keys[authzkeeper.StoreKey],
|
|
373
377
|
appCodec,
|
|
374
378
|
app.BaseApp.MsgServiceRouter(),
|
|
379
|
+
app.AccountKeeper,
|
|
375
380
|
)
|
|
376
381
|
app.FeeGrantKeeper = feegrantkeeper.NewKeeper(
|
|
377
382
|
appCodec,
|
|
@@ -403,7 +408,6 @@ func NewAgoricApp(
|
|
|
403
408
|
&stakingKeeper,
|
|
404
409
|
// This is the pool to distribute from immediately. DO NOT ALTER.
|
|
405
410
|
vbanktypes.GiveawayPoolName,
|
|
406
|
-
app.ModuleAccountAddrs(),
|
|
407
411
|
)
|
|
408
412
|
app.SlashingKeeper = slashingkeeper.NewKeeper(
|
|
409
413
|
appCodec,
|
|
@@ -417,6 +421,7 @@ func NewAgoricApp(
|
|
|
417
421
|
appCodec,
|
|
418
422
|
homePath,
|
|
419
423
|
app.BaseApp,
|
|
424
|
+
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
|
420
425
|
)
|
|
421
426
|
|
|
422
427
|
// register the staking hooks
|
|
@@ -440,7 +445,7 @@ func NewAgoricApp(
|
|
|
440
445
|
app.CheckControllerInited(true)
|
|
441
446
|
// We use SwingSet-level metering to charge the user for the call.
|
|
442
447
|
defer vm.SetControllerContext(ctx)()
|
|
443
|
-
return sendToController(true, str)
|
|
448
|
+
return sendToController(sdk.WrapSDKContext(ctx), true, str)
|
|
444
449
|
}
|
|
445
450
|
|
|
446
451
|
setBootstrapNeeded := func() {
|
|
@@ -472,7 +477,7 @@ func NewAgoricApp(
|
|
|
472
477
|
if err != nil {
|
|
473
478
|
return "", err
|
|
474
479
|
}
|
|
475
|
-
return sendToController(true, string(bz))
|
|
480
|
+
return sendToController(context.Background(), true, string(bz))
|
|
476
481
|
},
|
|
477
482
|
)
|
|
478
483
|
|
|
@@ -522,14 +527,15 @@ func NewAgoricApp(
|
|
|
522
527
|
app.lienPort = vm.RegisterPortHandler("lien", lien.NewPortHandler(app.LienKeeper))
|
|
523
528
|
|
|
524
529
|
// register the proposal types
|
|
525
|
-
govRouter :=
|
|
530
|
+
govRouter := govv1beta1.NewRouter()
|
|
526
531
|
govRouter.
|
|
527
|
-
AddRoute(govtypes.RouterKey,
|
|
532
|
+
AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
|
|
528
533
|
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
|
|
529
534
|
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)).
|
|
530
535
|
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)).
|
|
531
536
|
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
|
|
532
537
|
AddRoute(swingsettypes.RouterKey, swingset.NewSwingSetProposalHandler(app.SwingSetKeeper))
|
|
538
|
+
govConfig := govtypes.DefaultConfig()
|
|
533
539
|
|
|
534
540
|
app.GovKeeper = govkeeper.NewKeeper(
|
|
535
541
|
appCodec,
|
|
@@ -539,6 +545,8 @@ func NewAgoricApp(
|
|
|
539
545
|
app.BankKeeper,
|
|
540
546
|
&stakingKeeper,
|
|
541
547
|
govRouter,
|
|
548
|
+
app.BaseApp.MsgServiceRouter(),
|
|
549
|
+
govConfig,
|
|
542
550
|
)
|
|
543
551
|
|
|
544
552
|
app.TransferKeeper = ibctransferkeeper.NewKeeper(
|
|
@@ -559,6 +567,7 @@ func NewAgoricApp(
|
|
|
559
567
|
appCodec, keys[icahosttypes.StoreKey],
|
|
560
568
|
app.GetSubspace(icahosttypes.SubModuleName),
|
|
561
569
|
app.IBCKeeper.ChannelKeeper,
|
|
570
|
+
app.IBCKeeper.ChannelKeeper,
|
|
562
571
|
&app.IBCKeeper.PortKeeper,
|
|
563
572
|
app.AccountKeeper,
|
|
564
573
|
scopedICAHostKeeper,
|
|
@@ -597,12 +606,16 @@ func NewAgoricApp(
|
|
|
597
606
|
app.BaseApp.DeliverTx,
|
|
598
607
|
encodingConfig.TxConfig,
|
|
599
608
|
),
|
|
600
|
-
|
|
609
|
+
// NOTE: using innerAk here instead of app.AccountKeeper
|
|
610
|
+
// since migration method doesn't know how to unwrap the account keeper.
|
|
611
|
+
// Needs access to some struct fields.
|
|
612
|
+
// (Alternative is to add accessor methods to the AccountKeeper interface.)
|
|
613
|
+
auth.NewAppModule(appCodec, innerAk, nil),
|
|
601
614
|
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
|
|
602
615
|
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper),
|
|
603
616
|
capability.NewAppModule(appCodec, *app.CapabilityKeeper),
|
|
604
617
|
gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper),
|
|
605
|
-
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper),
|
|
618
|
+
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil),
|
|
606
619
|
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
|
|
607
620
|
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
|
|
608
621
|
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
|
|
@@ -734,7 +747,7 @@ func NewAgoricApp(
|
|
|
734
747
|
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
|
|
735
748
|
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
|
|
736
749
|
gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper),
|
|
737
|
-
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper),
|
|
750
|
+
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil),
|
|
738
751
|
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
|
|
739
752
|
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
|
|
740
753
|
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
|
|
@@ -776,17 +789,17 @@ func NewAgoricApp(
|
|
|
776
789
|
app.SetEndBlocker(app.EndBlocker)
|
|
777
790
|
|
|
778
791
|
const (
|
|
779
|
-
upgradeName = "agoric-upgrade-
|
|
780
|
-
upgradeNameTest = "agorictest-upgrade-
|
|
792
|
+
upgradeName = "agoric-upgrade-14"
|
|
793
|
+
upgradeNameTest = "agorictest-upgrade-14"
|
|
781
794
|
)
|
|
782
795
|
|
|
783
796
|
app.UpgradeKeeper.SetUpgradeHandler(
|
|
784
797
|
upgradeName,
|
|
785
|
-
|
|
798
|
+
upgrade14Handler(app, upgradeName),
|
|
786
799
|
)
|
|
787
800
|
app.UpgradeKeeper.SetUpgradeHandler(
|
|
788
801
|
upgradeNameTest,
|
|
789
|
-
|
|
802
|
+
upgrade14Handler(app, upgradeNameTest),
|
|
790
803
|
)
|
|
791
804
|
|
|
792
805
|
upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
|
|
@@ -824,12 +837,30 @@ func NewAgoricApp(
|
|
|
824
837
|
return app
|
|
825
838
|
}
|
|
826
839
|
|
|
827
|
-
//
|
|
828
|
-
func
|
|
840
|
+
// upgrade14Handler performs standard upgrade actions plus custom actions for upgrade-14.
|
|
841
|
+
func upgrade14Handler(app *GaiaApp, targetUpgrade string) func(sdk.Context, upgradetypes.Plan, module.VersionMap) (module.VersionMap, error) {
|
|
829
842
|
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVm module.VersionMap) (module.VersionMap, error) {
|
|
830
843
|
app.CheckControllerInited(false)
|
|
831
|
-
|
|
832
|
-
|
|
844
|
+
|
|
845
|
+
// Each CoreProposalStep runs sequentially, and can be constructed from
|
|
846
|
+
// one or more modules executing in parallel within the step.
|
|
847
|
+
CoreProposalSteps := []vm.CoreProposalStep{
|
|
848
|
+
// First, upgrade wallet factory
|
|
849
|
+
vm.CoreProposalStepForModules("@agoric/vats/scripts/build-wallet-factory2-upgrade.js"),
|
|
850
|
+
// Then, upgrade Zoe and ZCF
|
|
851
|
+
vm.CoreProposalStepForModules("@agoric/vats/scripts/replace-zoe.js"),
|
|
852
|
+
// Next revive KREAd characters
|
|
853
|
+
vm.CoreProposalStepForModules("@agoric/vats/scripts/revive-kread.js"),
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
app.upgradeDetails = &upgradeDetails{
|
|
857
|
+
// Record the plan to send to SwingSet
|
|
858
|
+
Plan: plan,
|
|
859
|
+
// Core proposals that should run during the upgrade block
|
|
860
|
+
// These will be merged with any coreProposals specified in the
|
|
861
|
+
// upgradeInfo field of the upgrade plan ran as subsequent steps
|
|
862
|
+
CoreProposals: vm.CoreProposalsFromSteps(CoreProposalSteps...),
|
|
863
|
+
}
|
|
833
864
|
|
|
834
865
|
// Always run module migrations
|
|
835
866
|
mvm, err := app.mm.RunMigrations(ctx, app.configurator, fromVm)
|
|
@@ -864,19 +895,23 @@ func normalizeModuleAccount(ctx sdk.Context, ak authkeeper.AccountKeeper, name s
|
|
|
864
895
|
ak.SetModuleAccount(ctx, newAcct)
|
|
865
896
|
}
|
|
866
897
|
|
|
898
|
+
type upgradeDetails struct {
|
|
899
|
+
Plan upgradetypes.Plan `json:"plan"`
|
|
900
|
+
CoreProposals *vm.CoreProposals `json:"coreProposals,omitempty"`
|
|
901
|
+
}
|
|
902
|
+
|
|
867
903
|
type cosmosInitAction struct {
|
|
868
|
-
|
|
869
|
-
ChainID
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
Params
|
|
873
|
-
SupplyCoins
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
VibcPort int `json:"vibcPort"`
|
|
904
|
+
vm.ActionHeader `actionType:"AG_COSMOS_INIT"`
|
|
905
|
+
ChainID string `json:"chainID"`
|
|
906
|
+
IsBootstrap bool `json:"isBootstrap"`
|
|
907
|
+
UpgradeDetails *upgradeDetails `json:"upgradeDetails,omitempty"`
|
|
908
|
+
Params swingset.Params `json:"params"`
|
|
909
|
+
SupplyCoins sdk.Coins `json:"supplyCoins"`
|
|
910
|
+
LienPort int `json:"lienPort"`
|
|
911
|
+
StoragePort int `json:"storagePort"`
|
|
912
|
+
SwingsetPort int `json:"swingsetPort"`
|
|
913
|
+
VbankPort int `json:"vbankPort"`
|
|
914
|
+
VibcPort int `json:"vibcPort"`
|
|
880
915
|
}
|
|
881
916
|
|
|
882
917
|
// Name returns the name of the App
|
|
@@ -899,27 +934,24 @@ func (app *GaiaApp) initController(ctx sdk.Context, bootstrap bool) {
|
|
|
899
934
|
app.CheckControllerInited(false)
|
|
900
935
|
app.controllerInited = true
|
|
901
936
|
|
|
902
|
-
var blockTime int64 = 0
|
|
903
|
-
if bootstrap || app.upgradePlan != nil {
|
|
904
|
-
blockTime = ctx.BlockTime().Unix()
|
|
905
|
-
}
|
|
906
|
-
|
|
907
937
|
// Begin initializing the controller here.
|
|
908
938
|
action := &cosmosInitAction{
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
VbankPort: app.vbankPort,
|
|
920
|
-
VibcPort: app.vibcPort,
|
|
939
|
+
ChainID: ctx.ChainID(),
|
|
940
|
+
IsBootstrap: bootstrap,
|
|
941
|
+
Params: app.SwingSetKeeper.GetParams(ctx),
|
|
942
|
+
SupplyCoins: sdk.NewCoins(app.BankKeeper.GetSupply(ctx, "uist")),
|
|
943
|
+
UpgradeDetails: app.upgradeDetails,
|
|
944
|
+
LienPort: app.lienPort,
|
|
945
|
+
StoragePort: app.vstoragePort,
|
|
946
|
+
SwingsetPort: app.swingsetPort,
|
|
947
|
+
VbankPort: app.vbankPort,
|
|
948
|
+
VibcPort: app.vibcPort,
|
|
921
949
|
}
|
|
922
|
-
// This
|
|
950
|
+
// This uses `BlockingSend` as a friendly wrapper for `sendToController`
|
|
951
|
+
//
|
|
952
|
+
// CAVEAT: we are restarting after an in-consensus halt or just because this
|
|
953
|
+
// node felt like it. The controller must be able to handle either case
|
|
954
|
+
// (inConsensus := action.IsBootstrap || action.UpgradeDetails != nil).
|
|
923
955
|
out, err := app.SwingSetKeeper.BlockingSend(ctx, action)
|
|
924
956
|
|
|
925
957
|
// fmt.Fprintf(os.Stderr, "AG_COSMOS_INIT Returned from SwingSet: %s, %v\n", out, err)
|
|
@@ -1083,21 +1115,21 @@ func (app *GaiaApp) InterfaceRegistry() types.InterfaceRegistry {
|
|
|
1083
1115
|
// GetKey returns the KVStoreKey for the provided store key.
|
|
1084
1116
|
//
|
|
1085
1117
|
// NOTE: This is solely to be used for testing purposes.
|
|
1086
|
-
func (app *GaiaApp) GetKey(storeKey string) *
|
|
1118
|
+
func (app *GaiaApp) GetKey(storeKey string) *storetypes.KVStoreKey {
|
|
1087
1119
|
return app.keys[storeKey]
|
|
1088
1120
|
}
|
|
1089
1121
|
|
|
1090
1122
|
// GetTKey returns the TransientStoreKey for the provided store key.
|
|
1091
1123
|
//
|
|
1092
1124
|
// NOTE: This is solely to be used for testing purposes.
|
|
1093
|
-
func (app *GaiaApp) GetTKey(storeKey string) *
|
|
1125
|
+
func (app *GaiaApp) GetTKey(storeKey string) *storetypes.TransientStoreKey {
|
|
1094
1126
|
return app.tkeys[storeKey]
|
|
1095
1127
|
}
|
|
1096
1128
|
|
|
1097
1129
|
// GetMemKey returns the MemStoreKey for the provided mem key.
|
|
1098
1130
|
//
|
|
1099
1131
|
// NOTE: This is solely used for testing purposes.
|
|
1100
|
-
func (app *GaiaApp) GetMemKey(storeKey string) *
|
|
1132
|
+
func (app *GaiaApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey {
|
|
1101
1133
|
return app.memKeys[storeKey]
|
|
1102
1134
|
}
|
|
1103
1135
|
|
|
@@ -1118,16 +1150,16 @@ func (app *GaiaApp) SimulationManager() *module.SimulationManager {
|
|
|
1118
1150
|
// API server.
|
|
1119
1151
|
func (app *GaiaApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
|
|
1120
1152
|
clientCtx := apiSvr.ClientCtx
|
|
1121
|
-
rpc.RegisterRoutes(clientCtx, apiSvr.Router)
|
|
1122
|
-
// Register legacy tx routes.
|
|
1123
|
-
authrest.RegisterTxRoutes(clientCtx, apiSvr.Router)
|
|
1124
1153
|
// Register new tx routes from grpc-gateway.
|
|
1125
1154
|
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
|
|
1155
|
+
|
|
1126
1156
|
// Register new tendermint queries routes from grpc-gateway.
|
|
1127
1157
|
tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
|
|
1128
1158
|
|
|
1129
|
-
// Register
|
|
1130
|
-
|
|
1159
|
+
// Register node gRPC service for grpc-gateway.
|
|
1160
|
+
nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
|
|
1161
|
+
|
|
1162
|
+
// Register grpc-gateway routes for all modules.
|
|
1131
1163
|
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
|
|
1132
1164
|
|
|
1133
1165
|
// register swagger API from root so that other applications can override easily
|
|
@@ -1143,7 +1175,7 @@ func (app *GaiaApp) RegisterTxService(clientCtx client.Context) {
|
|
|
1143
1175
|
|
|
1144
1176
|
// RegisterTendermintService implements the Application.RegisterTendermintService method.
|
|
1145
1177
|
func (app *GaiaApp) RegisterTendermintService(clientCtx client.Context) {
|
|
1146
|
-
tmservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(),
|
|
1178
|
+
tmservice.RegisterTendermintService(clientCtx, app.BaseApp.GRPCQueryRouter(), app.interfaceRegistry, app.Query)
|
|
1147
1179
|
}
|
|
1148
1180
|
|
|
1149
1181
|
// RegisterSwaggerAPI registers swagger route with API Server
|
|
@@ -1167,7 +1199,7 @@ func GetMaccPerms() map[string][]string {
|
|
|
1167
1199
|
}
|
|
1168
1200
|
|
|
1169
1201
|
// initParamsKeeper init params keeper and its subspaces
|
|
1170
|
-
func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey
|
|
1202
|
+
func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper {
|
|
1171
1203
|
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey)
|
|
1172
1204
|
|
|
1173
1205
|
paramsKeeper.Subspace(authtypes.ModuleName)
|
|
@@ -1176,7 +1208,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
|
|
|
1176
1208
|
paramsKeeper.Subspace(minttypes.ModuleName)
|
|
1177
1209
|
paramsKeeper.Subspace(distrtypes.ModuleName)
|
|
1178
1210
|
paramsKeeper.Subspace(slashingtypes.ModuleName)
|
|
1179
|
-
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(
|
|
1211
|
+
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypesv1.ParamKeyTable())
|
|
1180
1212
|
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
|
|
1181
1213
|
paramsKeeper.Subspace(ibchost.ModuleName)
|
|
1182
1214
|
paramsKeeper.Subspace(icahosttypes.SubModuleName)
|
package/app/export.go
CHANGED
|
@@ -44,9 +44,10 @@ func (app *GaiaApp) ExportAppStateAndValidators(
|
|
|
44
44
|
}, err
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
47
|
+
// prepForZeroHeightGenesis prepares for a fresh start at zero height.
|
|
48
|
+
//
|
|
49
|
+
// NOTE: Zero height genesis is a temporary feature which will be deprecated
|
|
50
|
+
// in favour of export at a block height.
|
|
50
51
|
func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) {
|
|
51
52
|
applyAllowedAddrs := false
|
|
52
53
|
|
|
@@ -106,7 +107,9 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [
|
|
|
106
107
|
feePool.CommunityPool = feePool.CommunityPool.Add(scraps...)
|
|
107
108
|
app.DistrKeeper.SetFeePool(ctx, feePool)
|
|
108
109
|
|
|
109
|
-
app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator())
|
|
110
|
+
if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()); err != nil {
|
|
111
|
+
panic(err)
|
|
112
|
+
}
|
|
110
113
|
return false
|
|
111
114
|
})
|
|
112
115
|
|
|
@@ -120,8 +123,12 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [
|
|
|
120
123
|
if err != nil {
|
|
121
124
|
panic(err)
|
|
122
125
|
}
|
|
123
|
-
app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr)
|
|
124
|
-
|
|
126
|
+
if err := app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr); err != nil {
|
|
127
|
+
panic(err)
|
|
128
|
+
}
|
|
129
|
+
if err := app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr); err != nil {
|
|
130
|
+
panic(err)
|
|
131
|
+
}
|
|
125
132
|
}
|
|
126
133
|
|
|
127
134
|
// reset context height
|