@agoric/cosmos 0.35.0-u20.0 → 0.35.0-u21.0.1
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/.clang-format +116 -0
- package/CHANGELOG.md +14 -2
- package/Makefile +38 -67
- package/ante/ante.go +2 -2
- package/ante/inbound_test.go +1 -1
- package/app/app.go +173 -142
- package/app/export.go +6 -6
- package/app/genesis.go +4 -0
- package/app/sim_test.go +299 -50
- package/app/upgrade.go +125 -24
- package/app/upgrade_test.go +1 -1
- package/cmd/agd/agvm.go +1 -1
- package/cmd/agd/main.go +1 -1
- package/cmd/libdaemon/main.go +34 -1
- package/coverage.txt +8531 -0
- package/daemon/cmd/root.go +26 -35
- package/daemon/cmd/root_test.go +5 -4
- package/daemon/cmd/testnet.go +221 -95
- package/daemon/main.go +1 -0
- package/git-revision.txt +1 -1
- package/go.mod +93 -58
- package/go.sum +148 -95
- package/package.json +6 -3
- package/proto/agoric/swingset/genesis.proto +7 -11
- package/proto/agoric/swingset/msgs.proto +56 -75
- package/proto/agoric/swingset/query.proto +7 -10
- package/proto/agoric/swingset/swingset.proto +79 -108
- package/proto/agoric/vbank/genesis.proto +5 -5
- package/proto/agoric/vbank/msgs.proto +1 -2
- package/proto/agoric/vbank/vbank.proto +42 -52
- package/proto/agoric/vibc/msgs.proto +8 -11
- package/proto/agoric/vstorage/genesis.proto +6 -9
- package/proto/agoric/vstorage/query.proto +19 -48
- package/proto/agoric/vstorage/vstorage.proto +4 -10
- package/proto/agoric/vtransfer/genesis.proto +7 -7
- package/proto/buf.gen.gogo.yaml +8 -0
- package/proto/buf.gen.pulsar.yaml +17 -0
- package/proto/buf.gen.swagger.yaml +5 -0
- package/proto/buf.yaml +10 -0
- package/scripts/protocgen.sh +14 -21
- package/third_party/proto/amino/amino.proto +79 -0
- package/third_party/proto/cosmos/base/v1beta1/coin.proto +7 -2
- package/third_party/proto/cosmos/ics23/v1/proofs.proto +243 -0
- package/third_party/proto/cosmos/msg/v1/msg.proto +30 -0
- package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +17 -5
- package/third_party/proto/cosmos_proto/cosmos.proto +16 -1
- package/third_party/proto/gogoproto/gogo.proto +2 -2
- package/third_party/proto/google/protobuf/any.proto +6 -3
- package/third_party/proto/ibc/core/channel/v1/channel.proto +1 -1
- package/third_party/proto/ibc/core/client/v1/client.proto +4 -2
- package/types/address_hooks.go +2 -2
- package/types/address_hooks_test.go +3 -3
- package/types/ibc_packet.go +3 -3
- package/types/ibc_packet_test.go +3 -3
- package/vm/client.go +32 -7
- package/vm/proto_json.go +2 -2
- package/x/swingset/abci.go +1 -1
- package/x/swingset/alias.go +0 -1
- package/x/swingset/config.go +1 -1
- package/x/swingset/keeper/extension_snapshotter.go +1 -1
- package/x/swingset/keeper/extension_snapshotter_test.go +1 -1
- package/x/swingset/keeper/keeper.go +1 -1
- package/x/swingset/keeper/keeper_test.go +1 -1
- package/x/swingset/keeper/querier.go +1 -30
- package/x/swingset/keeper/swing_store_exports_handler.go +1 -1
- package/x/swingset/keeper/swing_store_exports_handler_test.go +1 -1
- package/x/swingset/module.go +1 -14
- package/x/swingset/types/default-params.go +24 -16
- package/x/swingset/types/genesis.pb.go +2 -2
- package/x/swingset/types/msgs.pb.go +4 -3
- package/x/swingset/types/msgs_test.go +1 -1
- package/x/swingset/types/query.pb.go +4 -3
- package/x/swingset/types/swingset.pb.go +2 -2
- package/x/vbank/genesis.go +1 -1
- package/x/vbank/keeper/querier.go +1 -21
- package/x/vbank/module.go +1 -16
- package/x/vbank/types/genesis.pb.go +2 -2
- package/x/vbank/types/msgs.pb.go +3 -2
- package/x/vbank/types/query.pb.go +4 -3
- package/x/vbank/types/vbank.pb.go +2 -2
- package/x/vbank/vbank_test.go +95 -16
- package/x/vibc/keeper/keeper.go +8 -5
- package/x/vibc/keeper/migrations.go +36 -0
- package/x/vibc/keeper/triggers.go +1 -1
- package/x/vibc/module.go +9 -17
- package/x/vibc/types/expected_keepers.go +5 -10
- package/x/vibc/types/ibc_module.go +4 -4
- package/x/vibc/types/msgs.go +1 -1
- package/x/vibc/types/msgs.pb.go +5 -4
- package/x/vibc/types/receiver.go +2 -2
- package/x/vlocalchain/keeper/keeper.go +3 -3
- package/x/vlocalchain/types/vlocalchain.pb.go +1 -1
- package/x/vlocalchain/vlocalchain_test.go +6 -6
- package/x/vstorage/alias.go +0 -1
- package/x/vstorage/client/cli/query.go +1 -1
- package/x/vstorage/genesis.go +1 -1
- package/x/vstorage/keeper/keeper.go +6 -5
- package/x/vstorage/keeper/keeper_test.go +24 -24
- package/x/vstorage/keeper/querier.go +1 -32
- package/x/vstorage/keeper/querier_test.go +41 -6
- package/x/vstorage/module.go +1 -14
- package/x/vstorage/types/genesis.pb.go +2 -2
- package/x/vstorage/types/query.pb.go +8 -5
- package/x/vstorage/types/vstorage.pb.go +2 -2
- package/x/vstorage/vstorage_test.go +3 -3
- package/x/vtransfer/genesis.go +1 -1
- package/x/vtransfer/ibc_middleware.go +4 -4
- package/x/vtransfer/ibc_middleware_test.go +10 -11
- package/x/vtransfer/keeper/keeper.go +5 -5
- package/x/vtransfer/module.go +1 -14
- package/x/vtransfer/types/expected_keepers.go +2 -18
- package/x/vtransfer/types/genesis.pb.go +2 -2
- package/x/vtransfer/utils_test.go +15 -15
- package/daemon/cmd/genaccounts.go +0 -195
package/daemon/cmd/root.go
CHANGED
|
@@ -10,6 +10,12 @@ import (
|
|
|
10
10
|
|
|
11
11
|
serverconfig "github.com/cosmos/cosmos-sdk/server/config"
|
|
12
12
|
|
|
13
|
+
rosettaCmd "cosmossdk.io/tools/rosetta/cmd"
|
|
14
|
+
|
|
15
|
+
dbm "github.com/cometbft/cometbft-db"
|
|
16
|
+
tmcfg "github.com/cometbft/cometbft/config"
|
|
17
|
+
tmcli "github.com/cometbft/cometbft/libs/cli"
|
|
18
|
+
"github.com/cometbft/cometbft/libs/log"
|
|
13
19
|
"github.com/cosmos/cosmos-sdk/client"
|
|
14
20
|
"github.com/cosmos/cosmos-sdk/client/config"
|
|
15
21
|
"github.com/cosmos/cosmos-sdk/client/debug"
|
|
@@ -29,10 +35,6 @@ import (
|
|
|
29
35
|
"github.com/spf13/cast"
|
|
30
36
|
"github.com/spf13/cobra"
|
|
31
37
|
"github.com/spf13/viper"
|
|
32
|
-
tmcfg "github.com/tendermint/tendermint/config"
|
|
33
|
-
tmcli "github.com/tendermint/tendermint/libs/cli"
|
|
34
|
-
"github.com/tendermint/tendermint/libs/log"
|
|
35
|
-
dbm "github.com/tendermint/tm-db"
|
|
36
38
|
|
|
37
39
|
gaia "github.com/Agoric/agoric-sdk/golang/cosmos/app"
|
|
38
40
|
"github.com/Agoric/agoric-sdk/golang/cosmos/app/params"
|
|
@@ -131,7 +133,7 @@ func initAppConfig() (string, interface{}) {
|
|
|
131
133
|
// FIXME: We may want a non-zero min gas price.
|
|
132
134
|
// For now, we set it to zero to reduce friction (the default "" fails
|
|
133
135
|
// startup, forcing each validator to set their own value).
|
|
134
|
-
srvCfg.MinGasPrices = "
|
|
136
|
+
srvCfg.MinGasPrices = "0ubld"
|
|
135
137
|
|
|
136
138
|
customAppConfig := CustomAppConfig{
|
|
137
139
|
Config: *srvCfg,
|
|
@@ -152,20 +154,27 @@ func initRootCmd(sender vm.Sender, rootCmd *cobra.Command, encodingConfig params
|
|
|
152
154
|
cfg.Seal()
|
|
153
155
|
|
|
154
156
|
ac := appCreator{
|
|
155
|
-
encCfg: encodingConfig,
|
|
156
157
|
sender: sender,
|
|
157
158
|
agdServer: vm.NewAgdServer(),
|
|
158
159
|
}
|
|
159
160
|
|
|
161
|
+
genesisCmd := genutilcli.GenesisCoreCommand(
|
|
162
|
+
encodingConfig.TxConfig,
|
|
163
|
+
gaia.ModuleBasics,
|
|
164
|
+
gaia.DefaultNodeHome,
|
|
165
|
+
)
|
|
166
|
+
|
|
160
167
|
rootCmd.AddCommand(
|
|
161
168
|
genutilcli.InitCmd(gaia.ModuleBasics, gaia.DefaultNodeHome),
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
169
|
+
genesisCmd,
|
|
170
|
+
)
|
|
171
|
+
// Alias all the genesis commands to the top level as well.
|
|
172
|
+
rootCmd.AddCommand(
|
|
173
|
+
genesisCmd.Commands()...,
|
|
174
|
+
)
|
|
175
|
+
rootCmd.AddCommand(
|
|
167
176
|
tmcli.NewCompletionCmd(rootCmd, true),
|
|
168
|
-
|
|
177
|
+
NewTestnetCmd(gaia.ModuleBasics, banktypes.GenesisBalancesIterator{}, AppName),
|
|
169
178
|
debug.Cmd(),
|
|
170
179
|
config.Cmd(),
|
|
171
180
|
pruning.Cmd(ac.newSnapshotsApp, gaia.DefaultNodeHome),
|
|
@@ -217,7 +226,7 @@ func initRootCmd(sender vm.Sender, rootCmd *cobra.Command, encodingConfig params
|
|
|
217
226
|
keys.Commands(gaia.DefaultNodeHome),
|
|
218
227
|
)
|
|
219
228
|
// add rosetta
|
|
220
|
-
rootCmd.AddCommand(
|
|
229
|
+
rootCmd.AddCommand(rosettaCmd.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Marshaler))
|
|
221
230
|
}
|
|
222
231
|
|
|
223
232
|
const (
|
|
@@ -301,7 +310,6 @@ func txCommand() *cobra.Command {
|
|
|
301
310
|
}
|
|
302
311
|
|
|
303
312
|
type appCreator struct {
|
|
304
|
-
encCfg params.EncodingConfig
|
|
305
313
|
sender vm.Sender
|
|
306
314
|
agdServer *vm.AgdServer
|
|
307
315
|
}
|
|
@@ -319,12 +327,6 @@ func (ac appCreator) newApp(
|
|
|
319
327
|
}
|
|
320
328
|
|
|
321
329
|
baseappOptions := server.DefaultBaseappOptions(appOpts)
|
|
322
|
-
|
|
323
|
-
skipUpgradeHeights := make(map[int64]bool)
|
|
324
|
-
for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) {
|
|
325
|
-
skipUpgradeHeights[int64(h)] = true
|
|
326
|
-
}
|
|
327
|
-
|
|
328
330
|
homePath := cast.ToString(appOpts.Get(flags.FlagHome))
|
|
329
331
|
|
|
330
332
|
// Set a default value for FlagSwingStoreExportDir based on homePath
|
|
@@ -337,10 +339,7 @@ func (ac appCreator) newApp(
|
|
|
337
339
|
|
|
338
340
|
return gaia.NewAgoricApp(
|
|
339
341
|
ac.sender, ac.agdServer,
|
|
340
|
-
logger, db, traceStore, true,
|
|
341
|
-
homePath,
|
|
342
|
-
cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)),
|
|
343
|
-
ac.encCfg,
|
|
342
|
+
logger, db, traceStore, true,
|
|
344
343
|
appOpts,
|
|
345
344
|
baseappOptions...,
|
|
346
345
|
)
|
|
@@ -360,14 +359,9 @@ func (ac appCreator) newSnapshotsApp(
|
|
|
360
359
|
|
|
361
360
|
baseappOptions := server.DefaultBaseappOptions(appOpts)
|
|
362
361
|
|
|
363
|
-
homePath := cast.ToString(appOpts.Get(flags.FlagHome))
|
|
364
|
-
|
|
365
362
|
return gaia.NewAgoricApp(
|
|
366
363
|
ac.sender, ac.agdServer,
|
|
367
|
-
logger, db, traceStore, true,
|
|
368
|
-
homePath,
|
|
369
|
-
cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)),
|
|
370
|
-
ac.encCfg,
|
|
364
|
+
logger, db, traceStore, true,
|
|
371
365
|
appOpts,
|
|
372
366
|
baseappOptions...,
|
|
373
367
|
)
|
|
@@ -479,6 +473,7 @@ func (ac appCreator) appExport(
|
|
|
479
473
|
forZeroHeight bool,
|
|
480
474
|
jailAllowedAddrs []string,
|
|
481
475
|
appOpts servertypes.AppOptions,
|
|
476
|
+
modulesToExport []string,
|
|
482
477
|
) (servertypes.ExportedApp, error) {
|
|
483
478
|
swingStoreExportMode, ok := appOpts.Get(gaia.FlagSwingStoreExportMode).(string)
|
|
484
479
|
if !(ok && allowedSwingSetExportModes[swingStoreExportMode]) {
|
|
@@ -508,10 +503,6 @@ func (ac appCreator) appExport(
|
|
|
508
503
|
db,
|
|
509
504
|
traceStore,
|
|
510
505
|
loadLatest,
|
|
511
|
-
map[int64]bool{},
|
|
512
|
-
homePath,
|
|
513
|
-
cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)),
|
|
514
|
-
ac.encCfg,
|
|
515
506
|
appOpts,
|
|
516
507
|
)
|
|
517
508
|
|
|
@@ -521,7 +512,7 @@ func (ac appCreator) appExport(
|
|
|
521
512
|
}
|
|
522
513
|
}
|
|
523
514
|
|
|
524
|
-
return gaiaApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs)
|
|
515
|
+
return gaiaApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport)
|
|
525
516
|
}
|
|
526
517
|
|
|
527
518
|
// replaceCosmosSnapshotExportCommand monkey-patches the "snapshots export" command
|
package/daemon/cmd/root_test.go
CHANGED
|
@@ -10,12 +10,12 @@ import (
|
|
|
10
10
|
"github.com/spf13/pflag"
|
|
11
11
|
"github.com/stretchr/testify/require"
|
|
12
12
|
|
|
13
|
+
dbm "github.com/cometbft/cometbft-db"
|
|
14
|
+
"github.com/cometbft/cometbft/libs/log"
|
|
13
15
|
"github.com/cosmos/cosmos-sdk/server"
|
|
14
16
|
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
|
|
15
17
|
serverconfig "github.com/cosmos/cosmos-sdk/server/config"
|
|
16
18
|
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
|
17
|
-
"github.com/tendermint/tendermint/libs/log"
|
|
18
|
-
dbm "github.com/tendermint/tm-db"
|
|
19
19
|
|
|
20
20
|
app "github.com/Agoric/agoric-sdk/golang/cosmos/app"
|
|
21
21
|
"github.com/Agoric/agoric-sdk/golang/cosmos/daemon/cmd"
|
|
@@ -42,10 +42,10 @@ func TestCLIFlags(t *testing.T) {
|
|
|
42
42
|
"abci-client-type": "",
|
|
43
43
|
"address": "",
|
|
44
44
|
"app-db-backend": "",
|
|
45
|
+
"block_sync": "",
|
|
45
46
|
"cpu-profile": "",
|
|
46
47
|
"db_backend": "",
|
|
47
48
|
"db_dir": "",
|
|
48
|
-
"fast_sync": "",
|
|
49
49
|
"genesis_hash": "",
|
|
50
50
|
"grpc-only": "",
|
|
51
51
|
"halt-height": "",
|
|
@@ -93,6 +93,8 @@ func TestCLIFlags(t *testing.T) {
|
|
|
93
93
|
"grpc.max-recv-msg-size": "",
|
|
94
94
|
"grpc.max-send-msg-size": "",
|
|
95
95
|
|
|
96
|
+
"mempool.max-txs": "",
|
|
97
|
+
|
|
96
98
|
"p2p.external-address": "",
|
|
97
99
|
"p2p.laddr": "",
|
|
98
100
|
"p2p.persistent_peers": "",
|
|
@@ -101,7 +103,6 @@ func TestCLIFlags(t *testing.T) {
|
|
|
101
103
|
"p2p.seed_mode": "",
|
|
102
104
|
"p2p.seeds": "",
|
|
103
105
|
"p2p.unconditional_peer_ids": "",
|
|
104
|
-
"p2p.upnp": "",
|
|
105
106
|
|
|
106
107
|
"rpc.grpc_laddr": "",
|
|
107
108
|
"rpc.laddr": "",
|