@agoric/cosmos 0.35.0-u12.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 +67 -0
- package/Makefile +25 -12
- package/ante/ante.go +7 -5
- package/ante/inbound_test.go +8 -0
- package/app/app.go +139 -108
- package/app/export.go +13 -9
- package/app/sim_test.go +4 -4
- 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 -17
- 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 +117 -76
- package/go.sum +858 -210
- 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 +16 -11
- 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 +69 -15
- package/x/swingset/keeper/keeper_test.go +1 -1
- package/x/swingset/keeper/migrations.go +7 -2
- package/x/swingset/keeper/msg_server.go +66 -49
- 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/default-params.go +22 -16
- package/x/swingset/types/expected_keepers.go +11 -0
- package/x/swingset/types/msgs.go +43 -2
- package/x/swingset/types/msgs.pb.go +16 -16
- package/x/swingset/types/params.go +74 -0
- package/x/swingset/types/params_test.go +116 -0
- 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 +79 -126
- 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/keeper/querier_test.go +112 -0
- 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/x/swingset/legacy/v32/params.go +0 -37
- package/x/swingset/legacy/v32/params_test.go +0 -133
- /package/{src/index.cjs → index.cjs} +0 -0
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,21 +14,21 @@ 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"
|
|
21
22
|
"github.com/cosmos/cosmos-sdk/server/config"
|
|
22
23
|
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
|
23
24
|
"github.com/cosmos/cosmos-sdk/simapp"
|
|
25
|
+
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
|
24
26
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
25
27
|
"github.com/cosmos/cosmos-sdk/types/errors"
|
|
26
28
|
"github.com/cosmos/cosmos-sdk/types/module"
|
|
27
29
|
"github.com/cosmos/cosmos-sdk/version"
|
|
28
30
|
"github.com/cosmos/cosmos-sdk/x/auth"
|
|
29
31
|
"github.com/cosmos/cosmos-sdk/x/auth/ante"
|
|
30
|
-
authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
|
|
31
32
|
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
|
32
33
|
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
|
|
33
34
|
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
|
|
@@ -43,8 +44,6 @@ import (
|
|
|
43
44
|
"github.com/cosmos/cosmos-sdk/x/capability"
|
|
44
45
|
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
|
|
45
46
|
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
|
|
46
|
-
"github.com/cosmos/cosmos-sdk/x/crisis"
|
|
47
|
-
crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper"
|
|
48
47
|
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
|
|
49
48
|
distr "github.com/cosmos/cosmos-sdk/x/distribution"
|
|
50
49
|
distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client"
|
|
@@ -59,8 +58,11 @@ import (
|
|
|
59
58
|
"github.com/cosmos/cosmos-sdk/x/genutil"
|
|
60
59
|
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
|
|
61
60
|
"github.com/cosmos/cosmos-sdk/x/gov"
|
|
61
|
+
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
|
|
62
62
|
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
|
|
63
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"
|
|
64
66
|
"github.com/cosmos/cosmos-sdk/x/mint"
|
|
65
67
|
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
|
|
66
68
|
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
|
|
@@ -79,22 +81,22 @@ import (
|
|
|
79
81
|
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
|
|
80
82
|
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
|
|
81
83
|
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
|
82
|
-
ica "github.com/cosmos/ibc-go/
|
|
83
|
-
|
|
84
|
-
icahost "github.com/cosmos/ibc-go/
|
|
85
|
-
icahostkeeper "github.com/cosmos/ibc-go/
|
|
86
|
-
icahosttypes "github.com/cosmos/ibc-go/
|
|
87
|
-
icatypes "github.com/cosmos/ibc-go/
|
|
88
|
-
"github.com/cosmos/ibc-go/
|
|
89
|
-
ibctransferkeeper "github.com/cosmos/ibc-go/
|
|
90
|
-
ibctransfertypes "github.com/cosmos/ibc-go/
|
|
91
|
-
ibc "github.com/cosmos/ibc-go/
|
|
92
|
-
ibcclient "github.com/cosmos/ibc-go/
|
|
93
|
-
ibcclientclient "github.com/cosmos/ibc-go/
|
|
94
|
-
ibcclienttypes "github.com/cosmos/ibc-go/
|
|
95
|
-
porttypes "github.com/cosmos/ibc-go/
|
|
96
|
-
ibchost "github.com/cosmos/ibc-go/
|
|
97
|
-
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"
|
|
98
100
|
"github.com/gorilla/mux"
|
|
99
101
|
"github.com/rakyll/statik/fs"
|
|
100
102
|
"github.com/spf13/cast"
|
|
@@ -103,7 +105,6 @@ import (
|
|
|
103
105
|
"github.com/tendermint/tendermint/libs/log"
|
|
104
106
|
tmos "github.com/tendermint/tendermint/libs/os"
|
|
105
107
|
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
|
106
|
-
tmtypes "github.com/tendermint/tendermint/types"
|
|
107
108
|
dbm "github.com/tendermint/tm-db"
|
|
108
109
|
|
|
109
110
|
gaiaappparams "github.com/Agoric/agoric-sdk/golang/cosmos/app/params"
|
|
@@ -150,17 +151,16 @@ var (
|
|
|
150
151
|
staking.AppModuleBasic{},
|
|
151
152
|
mint.AppModuleBasic{},
|
|
152
153
|
distr.AppModuleBasic{},
|
|
153
|
-
gov.NewAppModuleBasic(
|
|
154
|
+
gov.NewAppModuleBasic([]govclient.ProposalHandler{
|
|
154
155
|
paramsclient.ProposalHandler,
|
|
155
156
|
distrclient.ProposalHandler,
|
|
156
|
-
upgradeclient.
|
|
157
|
-
upgradeclient.
|
|
157
|
+
upgradeclient.LegacyProposalHandler,
|
|
158
|
+
upgradeclient.LegacyCancelProposalHandler,
|
|
158
159
|
ibcclientclient.UpdateClientProposalHandler,
|
|
159
160
|
ibcclientclient.UpgradeProposalHandler,
|
|
160
161
|
swingsetclient.CoreEvalProposalHandler,
|
|
161
|
-
),
|
|
162
|
+
}),
|
|
162
163
|
params.AppModuleBasic{},
|
|
163
|
-
crisis.AppModuleBasic{},
|
|
164
164
|
slashing.AppModuleBasic{},
|
|
165
165
|
feegrantmodule.AppModuleBasic{},
|
|
166
166
|
authzmodule.AppModuleBasic{},
|
|
@@ -216,14 +216,14 @@ type GaiaApp struct { // nolint: golint
|
|
|
216
216
|
vibcPort int
|
|
217
217
|
vstoragePort int
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
upgradeDetails *upgradeDetails
|
|
220
220
|
|
|
221
221
|
invCheckPeriod uint
|
|
222
222
|
|
|
223
223
|
// keys to access the substores
|
|
224
|
-
keys map[string]*
|
|
225
|
-
tkeys map[string]*
|
|
226
|
-
memKeys map[string]*
|
|
224
|
+
keys map[string]*storetypes.KVStoreKey
|
|
225
|
+
tkeys map[string]*storetypes.TransientStoreKey
|
|
226
|
+
memKeys map[string]*storetypes.MemoryStoreKey
|
|
227
227
|
|
|
228
228
|
// keepers
|
|
229
229
|
AccountKeeper authkeeper.AccountKeeper
|
|
@@ -234,7 +234,6 @@ type GaiaApp struct { // nolint: golint
|
|
|
234
234
|
MintKeeper mintkeeper.Keeper
|
|
235
235
|
DistrKeeper distrkeeper.Keeper
|
|
236
236
|
GovKeeper govkeeper.Keeper
|
|
237
|
-
CrisisKeeper crisiskeeper.Keeper
|
|
238
237
|
UpgradeKeeper upgradekeeper.Keeper
|
|
239
238
|
ParamsKeeper paramskeeper.Keeper
|
|
240
239
|
// IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
|
|
@@ -288,7 +287,7 @@ func NewGaiaApp(
|
|
|
288
287
|
appOpts servertypes.AppOptions,
|
|
289
288
|
baseAppOptions ...func(*baseapp.BaseApp),
|
|
290
289
|
) *GaiaApp {
|
|
291
|
-
defaultController := func(needReply bool, str string) (string, error) {
|
|
290
|
+
defaultController := func(ctx context.Context, needReply bool, str string) (string, error) {
|
|
292
291
|
fmt.Fprintln(os.Stderr, "FIXME: Would upcall to controller with", str)
|
|
293
292
|
return "", nil
|
|
294
293
|
}
|
|
@@ -300,7 +299,7 @@ func NewGaiaApp(
|
|
|
300
299
|
}
|
|
301
300
|
|
|
302
301
|
func NewAgoricApp(
|
|
303
|
-
sendToController func(bool, string) (string, error),
|
|
302
|
+
sendToController func(context.Context, bool, string) (string, error),
|
|
304
303
|
logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool,
|
|
305
304
|
homePath string, invCheckPeriod uint, encodingConfig gaiaappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp),
|
|
306
305
|
) *GaiaApp {
|
|
@@ -344,7 +343,7 @@ func NewAgoricApp(
|
|
|
344
343
|
|
|
345
344
|
// set the BaseApp's parameter store
|
|
346
345
|
bApp.SetParamStore(
|
|
347
|
-
app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(
|
|
346
|
+
app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()),
|
|
348
347
|
)
|
|
349
348
|
|
|
350
349
|
// add capability keeper and ScopeToModule for ibc module
|
|
@@ -362,6 +361,7 @@ func NewAgoricApp(
|
|
|
362
361
|
app.GetSubspace(authtypes.ModuleName),
|
|
363
362
|
authtypes.ProtoBaseAccount,
|
|
364
363
|
maccPerms,
|
|
364
|
+
appName,
|
|
365
365
|
)
|
|
366
366
|
wrappedAccountKeeper := lien.NewWrappedAccountKeeper(innerAk)
|
|
367
367
|
app.AccountKeeper = wrappedAccountKeeper
|
|
@@ -376,6 +376,7 @@ func NewAgoricApp(
|
|
|
376
376
|
keys[authzkeeper.StoreKey],
|
|
377
377
|
appCodec,
|
|
378
378
|
app.BaseApp.MsgServiceRouter(),
|
|
379
|
+
app.AccountKeeper,
|
|
379
380
|
)
|
|
380
381
|
app.FeeGrantKeeper = feegrantkeeper.NewKeeper(
|
|
381
382
|
appCodec,
|
|
@@ -407,7 +408,6 @@ func NewAgoricApp(
|
|
|
407
408
|
&stakingKeeper,
|
|
408
409
|
// This is the pool to distribute from immediately. DO NOT ALTER.
|
|
409
410
|
vbanktypes.GiveawayPoolName,
|
|
410
|
-
app.ModuleAccountAddrs(),
|
|
411
411
|
)
|
|
412
412
|
app.SlashingKeeper = slashingkeeper.NewKeeper(
|
|
413
413
|
appCodec,
|
|
@@ -415,18 +415,13 @@ func NewAgoricApp(
|
|
|
415
415
|
&stakingKeeper,
|
|
416
416
|
app.GetSubspace(slashingtypes.ModuleName),
|
|
417
417
|
)
|
|
418
|
-
app.CrisisKeeper = crisiskeeper.NewKeeper(
|
|
419
|
-
app.GetSubspace(crisistypes.ModuleName),
|
|
420
|
-
invCheckPeriod,
|
|
421
|
-
app.BankKeeper,
|
|
422
|
-
vbanktypes.ReservePoolName,
|
|
423
|
-
)
|
|
424
418
|
app.UpgradeKeeper = upgradekeeper.NewKeeper(
|
|
425
419
|
skipUpgradeHeights,
|
|
426
420
|
keys[upgradetypes.StoreKey],
|
|
427
421
|
appCodec,
|
|
428
422
|
homePath,
|
|
429
423
|
app.BaseApp,
|
|
424
|
+
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
|
430
425
|
)
|
|
431
426
|
|
|
432
427
|
// register the staking hooks
|
|
@@ -450,7 +445,7 @@ func NewAgoricApp(
|
|
|
450
445
|
app.CheckControllerInited(true)
|
|
451
446
|
// We use SwingSet-level metering to charge the user for the call.
|
|
452
447
|
defer vm.SetControllerContext(ctx)()
|
|
453
|
-
return sendToController(true, str)
|
|
448
|
+
return sendToController(sdk.WrapSDKContext(ctx), true, str)
|
|
454
449
|
}
|
|
455
450
|
|
|
456
451
|
setBootstrapNeeded := func() {
|
|
@@ -482,7 +477,7 @@ func NewAgoricApp(
|
|
|
482
477
|
if err != nil {
|
|
483
478
|
return "", err
|
|
484
479
|
}
|
|
485
|
-
return sendToController(true, string(bz))
|
|
480
|
+
return sendToController(context.Background(), true, string(bz))
|
|
486
481
|
},
|
|
487
482
|
)
|
|
488
483
|
|
|
@@ -532,14 +527,15 @@ func NewAgoricApp(
|
|
|
532
527
|
app.lienPort = vm.RegisterPortHandler("lien", lien.NewPortHandler(app.LienKeeper))
|
|
533
528
|
|
|
534
529
|
// register the proposal types
|
|
535
|
-
govRouter :=
|
|
530
|
+
govRouter := govv1beta1.NewRouter()
|
|
536
531
|
govRouter.
|
|
537
|
-
AddRoute(govtypes.RouterKey,
|
|
532
|
+
AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
|
|
538
533
|
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
|
|
539
534
|
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)).
|
|
540
535
|
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)).
|
|
541
536
|
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
|
|
542
537
|
AddRoute(swingsettypes.RouterKey, swingset.NewSwingSetProposalHandler(app.SwingSetKeeper))
|
|
538
|
+
govConfig := govtypes.DefaultConfig()
|
|
543
539
|
|
|
544
540
|
app.GovKeeper = govkeeper.NewKeeper(
|
|
545
541
|
appCodec,
|
|
@@ -549,6 +545,8 @@ func NewAgoricApp(
|
|
|
549
545
|
app.BankKeeper,
|
|
550
546
|
&stakingKeeper,
|
|
551
547
|
govRouter,
|
|
548
|
+
app.BaseApp.MsgServiceRouter(),
|
|
549
|
+
govConfig,
|
|
552
550
|
)
|
|
553
551
|
|
|
554
552
|
app.TransferKeeper = ibctransferkeeper.NewKeeper(
|
|
@@ -569,6 +567,7 @@ func NewAgoricApp(
|
|
|
569
567
|
appCodec, keys[icahosttypes.StoreKey],
|
|
570
568
|
app.GetSubspace(icahosttypes.SubModuleName),
|
|
571
569
|
app.IBCKeeper.ChannelKeeper,
|
|
570
|
+
app.IBCKeeper.ChannelKeeper,
|
|
572
571
|
&app.IBCKeeper.PortKeeper,
|
|
573
572
|
app.AccountKeeper,
|
|
574
573
|
scopedICAHostKeeper,
|
|
@@ -596,7 +595,6 @@ func NewAgoricApp(
|
|
|
596
595
|
|
|
597
596
|
app.EvidenceKeeper = *evidenceKeeper
|
|
598
597
|
|
|
599
|
-
skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants))
|
|
600
598
|
swingStoreExportDir := cast.ToString(appOpts.Get(FlagSwingStoreExportDir))
|
|
601
599
|
|
|
602
600
|
// NOTE: Any module instantiated in the module manager that is later modified
|
|
@@ -608,13 +606,16 @@ func NewAgoricApp(
|
|
|
608
606
|
app.BaseApp.DeliverTx,
|
|
609
607
|
encodingConfig.TxConfig,
|
|
610
608
|
),
|
|
611
|
-
|
|
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),
|
|
612
614
|
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
|
|
613
615
|
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper),
|
|
614
616
|
capability.NewAppModule(appCodec, *app.CapabilityKeeper),
|
|
615
|
-
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants),
|
|
616
617
|
gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper),
|
|
617
|
-
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper),
|
|
618
|
+
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil),
|
|
618
619
|
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
|
|
619
620
|
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
|
|
620
621
|
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
|
|
@@ -642,7 +643,6 @@ func NewAgoricApp(
|
|
|
642
643
|
// upgrades should be run first
|
|
643
644
|
upgradetypes.ModuleName,
|
|
644
645
|
capabilitytypes.ModuleName,
|
|
645
|
-
crisistypes.ModuleName,
|
|
646
646
|
govtypes.ModuleName,
|
|
647
647
|
stakingtypes.ModuleName,
|
|
648
648
|
ibctransfertypes.ModuleName,
|
|
@@ -671,7 +671,6 @@ func NewAgoricApp(
|
|
|
671
671
|
vibc.ModuleName,
|
|
672
672
|
vbank.ModuleName,
|
|
673
673
|
lien.ModuleName,
|
|
674
|
-
crisistypes.ModuleName,
|
|
675
674
|
govtypes.ModuleName,
|
|
676
675
|
stakingtypes.ModuleName,
|
|
677
676
|
ibctransfertypes.ModuleName,
|
|
@@ -712,7 +711,6 @@ func NewAgoricApp(
|
|
|
712
711
|
slashingtypes.ModuleName,
|
|
713
712
|
govtypes.ModuleName,
|
|
714
713
|
minttypes.ModuleName,
|
|
715
|
-
crisistypes.ModuleName,
|
|
716
714
|
ibctransfertypes.ModuleName,
|
|
717
715
|
ibchost.ModuleName,
|
|
718
716
|
icatypes.ModuleName,
|
|
@@ -733,7 +731,6 @@ func NewAgoricApp(
|
|
|
733
731
|
app.mm.SetOrderInitGenesis(moduleOrderForGenesisAndUpgrade...)
|
|
734
732
|
app.mm.SetOrderMigrations(moduleOrderForGenesisAndUpgrade...)
|
|
735
733
|
|
|
736
|
-
app.mm.RegisterInvariants(&app.CrisisKeeper)
|
|
737
734
|
app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino)
|
|
738
735
|
|
|
739
736
|
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
|
|
@@ -750,7 +747,7 @@ func NewAgoricApp(
|
|
|
750
747
|
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
|
|
751
748
|
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
|
|
752
749
|
gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper),
|
|
753
|
-
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper),
|
|
750
|
+
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil),
|
|
754
751
|
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
|
|
755
752
|
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
|
|
756
753
|
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
|
|
@@ -792,19 +789,34 @@ func NewAgoricApp(
|
|
|
792
789
|
app.SetEndBlocker(app.EndBlocker)
|
|
793
790
|
|
|
794
791
|
const (
|
|
795
|
-
upgradeName = "agoric-upgrade-
|
|
796
|
-
upgradeNameTest = "agorictest-upgrade-
|
|
792
|
+
upgradeName = "agoric-upgrade-14"
|
|
793
|
+
upgradeNameTest = "agorictest-upgrade-14"
|
|
797
794
|
)
|
|
798
795
|
|
|
799
796
|
app.UpgradeKeeper.SetUpgradeHandler(
|
|
800
797
|
upgradeName,
|
|
801
|
-
|
|
798
|
+
upgrade14Handler(app, upgradeName),
|
|
802
799
|
)
|
|
803
800
|
app.UpgradeKeeper.SetUpgradeHandler(
|
|
804
801
|
upgradeNameTest,
|
|
805
|
-
|
|
802
|
+
upgrade14Handler(app, upgradeNameTest),
|
|
806
803
|
)
|
|
807
804
|
|
|
805
|
+
upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
|
|
806
|
+
if err != nil {
|
|
807
|
+
panic(err)
|
|
808
|
+
}
|
|
809
|
+
if (upgradeInfo.Name == upgradeName || upgradeInfo.Name == upgradeNameTest) && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
|
|
810
|
+
storeUpgrades := storetypes.StoreUpgrades{
|
|
811
|
+
Deleted: []string{
|
|
812
|
+
crisistypes.ModuleName, // The SDK discontinued the crisis module in v0.51.0
|
|
813
|
+
},
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
// configure store loader that checks if version == upgradeHeight and applies store upgrades
|
|
817
|
+
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
|
|
818
|
+
}
|
|
819
|
+
|
|
808
820
|
if loadLatest {
|
|
809
821
|
if err := app.LoadLatestVersion(); err != nil {
|
|
810
822
|
tmos.Exit(fmt.Sprintf("failed to load latest version: %s", err))
|
|
@@ -825,17 +837,30 @@ func NewAgoricApp(
|
|
|
825
837
|
return app
|
|
826
838
|
}
|
|
827
839
|
|
|
828
|
-
//
|
|
829
|
-
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) {
|
|
830
842
|
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVm module.VersionMap) (module.VersionMap, error) {
|
|
831
843
|
app.CheckControllerInited(false)
|
|
832
|
-
// Record the plan to send to SwingSet
|
|
833
|
-
app.upgradePlan = &plan
|
|
834
844
|
|
|
835
|
-
//
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
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
|
+
}
|
|
839
864
|
|
|
840
865
|
// Always run module migrations
|
|
841
866
|
mvm, err := app.mm.RunMigrations(ctx, app.configurator, fromVm)
|
|
@@ -843,6 +868,12 @@ func upgrade12Handler(app *GaiaApp, targetUpgrade string) func(sdk.Context, upgr
|
|
|
843
868
|
return mvm, err
|
|
844
869
|
}
|
|
845
870
|
|
|
871
|
+
m := swingsetkeeper.NewMigrator(app.SwingSetKeeper)
|
|
872
|
+
err = m.MigrateParams(ctx)
|
|
873
|
+
if err != nil {
|
|
874
|
+
return mvm, err
|
|
875
|
+
}
|
|
876
|
+
|
|
846
877
|
return mvm, nil
|
|
847
878
|
}
|
|
848
879
|
}
|
|
@@ -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,8 +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(
|
|
1180
|
-
paramsKeeper.Subspace(crisistypes.ModuleName)
|
|
1211
|
+
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypesv1.ParamKeyTable())
|
|
1181
1212
|
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
|
|
1182
1213
|
paramsKeeper.Subspace(ibchost.ModuleName)
|
|
1183
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
|
|
|
@@ -65,9 +66,6 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [
|
|
|
65
66
|
allowedAddrsMap[addr] = true
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
/* Just to be safe, assert the invariants on current state. */
|
|
69
|
-
app.CrisisKeeper.AssertInvariants(ctx)
|
|
70
|
-
|
|
71
69
|
/* Handle fee distribution state. */
|
|
72
70
|
|
|
73
71
|
// withdraw all validator commission
|
|
@@ -109,7 +107,9 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [
|
|
|
109
107
|
feePool.CommunityPool = feePool.CommunityPool.Add(scraps...)
|
|
110
108
|
app.DistrKeeper.SetFeePool(ctx, feePool)
|
|
111
109
|
|
|
112
|
-
app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator())
|
|
110
|
+
if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()); err != nil {
|
|
111
|
+
panic(err)
|
|
112
|
+
}
|
|
113
113
|
return false
|
|
114
114
|
})
|
|
115
115
|
|
|
@@ -123,8 +123,12 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [
|
|
|
123
123
|
if err != nil {
|
|
124
124
|
panic(err)
|
|
125
125
|
}
|
|
126
|
-
app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr)
|
|
127
|
-
|
|
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
|
+
}
|
|
128
132
|
}
|
|
129
133
|
|
|
130
134
|
// reset context height
|
package/app/sim_test.go
CHANGED
|
@@ -6,9 +6,9 @@ import (
|
|
|
6
6
|
"os"
|
|
7
7
|
"testing"
|
|
8
8
|
|
|
9
|
-
gaia "github.com/
|
|
9
|
+
gaia "github.com/Agoric/agoric-sdk/golang/cosmos/app"
|
|
10
10
|
|
|
11
|
-
"github.com/
|
|
11
|
+
"github.com/Agoric/agoric-sdk/golang/cosmos/app/helpers"
|
|
12
12
|
"github.com/stretchr/testify/require"
|
|
13
13
|
"github.com/tendermint/tendermint/libs/log"
|
|
14
14
|
"github.com/tendermint/tendermint/libs/rand"
|
|
@@ -76,8 +76,8 @@ func interBlockCacheOpt() func(*baseapp.BaseApp) {
|
|
|
76
76
|
return baseapp.SetInterBlockCache(store.NewCommitKVStoreCacheManager())
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
// // TODO: Make another test for the fuzzer itself, which just has noOp txs
|
|
80
|
+
// // and doesn't depend on the application.
|
|
81
81
|
func TestAppStateDeterminism(t *testing.T) {
|
|
82
82
|
if !simapp.FlagEnabledValue {
|
|
83
83
|
t.Skip("skipping application simulation")
|