@agoric/cosmos 0.34.2-orchestration-dev-096c4e8.0 → 0.34.2-other-dev-3eb1a1d.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/MAINTAINERS.md +3 -0
- package/Makefile +38 -34
- package/ante/ante.go +1 -4
- package/ante/inbound_test.go +2 -2
- package/app/app.go +198 -137
- package/app/upgrade.go +248 -0
- package/cmd/agd/agvm.go +3 -3
- package/cmd/agd/find_binary.go +2 -2
- package/cmd/agd/main.go +9 -10
- package/cmd/libdaemon/main.go +13 -13
- package/daemon/cmd/root.go +235 -92
- package/daemon/cmd/root_test.go +189 -1
- package/daemon/main.go +3 -2
- package/git-revision.txt +1 -1
- package/go.mod +14 -11
- package/go.sum +20 -19
- package/index.cjs +1 -1
- package/package.json +4 -3
- package/proto/agoric/swingset/genesis.proto +4 -0
- package/proto/agoric/swingset/swingset.proto +26 -1
- package/proto/agoric/vbank/vbank.proto +7 -0
- package/proto/agoric/vtransfer/genesis.proto +18 -0
- package/scripts/protocgen.sh +7 -8
- package/types/kv_entry_helpers.go +42 -0
- package/upgradegaia.sh +8 -8
- package/util/util.go +21 -0
- package/vm/action.go +1 -1
- package/vm/client.go +15 -13
- package/vm/client_test.go +34 -36
- package/vm/controller.go +3 -38
- package/vm/core_proposals.go +22 -2
- package/vm/proto_json.go +38 -0
- package/vm/proto_json_test.go +103 -0
- package/vm/server.go +106 -5
- package/x/swingset/alias.go +2 -0
- package/x/swingset/config.go +234 -0
- package/x/swingset/genesis.go +178 -40
- package/x/swingset/keeper/extension_snapshotter.go +2 -2
- package/x/swingset/keeper/keeper.go +24 -27
- package/x/swingset/keeper/swing_store_exports_handler.go +14 -3
- package/x/swingset/keeper/test_utils.go +16 -0
- package/x/swingset/module.go +24 -9
- package/x/swingset/testing/queue.go +17 -0
- package/x/swingset/types/default-params.go +31 -5
- package/x/swingset/types/expected_keepers.go +2 -2
- package/x/swingset/types/genesis.pb.go +78 -25
- package/x/swingset/types/msgs.go +53 -12
- package/x/swingset/types/params.go +53 -43
- package/x/swingset/types/params_test.go +75 -9
- package/x/swingset/types/swingset.pb.go +387 -57
- package/x/vbank/README.md +6 -1
- package/x/vbank/genesis.go +0 -2
- package/x/vbank/keeper/keeper.go +4 -9
- package/x/vbank/keeper/migrations.go +30 -0
- package/x/vbank/module.go +8 -7
- package/x/vbank/types/key.go +3 -3
- package/x/vbank/types/msgs.go +0 -12
- package/x/vbank/types/params.go +43 -2
- package/x/vbank/types/vbank.pb.go +105 -36
- package/x/vbank/vbank.go +8 -13
- package/x/vbank/vbank_test.go +14 -9
- package/x/vibc/alias.go +1 -1
- package/x/vibc/module.go +2 -7
- package/x/vibc/types/ibc_module.go +9 -3
- package/x/vibc/types/receiver.go +17 -7
- package/x/vlocalchain/handler.go +2 -1
- package/x/vlocalchain/keeper/keeper.go +24 -8
- package/x/vlocalchain/keeper/keeper_test.go +65 -1
- package/x/vlocalchain/types/expected_keepers.go +12 -0
- package/x/vlocalchain/vlocalchain.go +27 -22
- package/x/vlocalchain/vlocalchain_test.go +163 -8
- package/x/vstorage/keeper/grpc_query.go +0 -1
- package/x/vstorage/keeper/keeper.go +9 -17
- package/x/vstorage/module.go +0 -5
- package/x/vstorage/testing/queue.go +28 -0
- package/x/vtransfer/alias.go +13 -0
- package/x/vtransfer/genesis.go +39 -0
- package/x/vtransfer/genesis_test.go +12 -0
- package/x/vtransfer/handler.go +20 -0
- package/x/vtransfer/ibc_middleware.go +186 -0
- package/x/vtransfer/ibc_middleware_test.go +449 -0
- package/x/vtransfer/keeper/keeper.go +282 -0
- package/x/vtransfer/module.go +124 -0
- package/x/vtransfer/types/baseaddr.go +156 -0
- package/x/vtransfer/types/baseaddr_test.go +167 -0
- package/x/vtransfer/types/expected_keepers.go +38 -0
- package/x/vtransfer/types/genesis.pb.go +328 -0
- package/x/vtransfer/types/key.go +9 -0
- package/x/vtransfer/types/msgs.go +9 -0
- package/ante/fee.go +0 -97
package/MAINTAINERS.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
When updating the protos here, be mindful that `@agoric/cosmic-proto` will need refreshing to get them.
|
|
2
|
+
|
|
3
|
+
https://github.com/Agoric/agoric-sdk/issues/8131 will help automate updating protos, but not the publishing to NPM of the codegen-ed JS utilities for working with the APIs they define.
|
package/Makefile
CHANGED
|
@@ -61,10 +61,10 @@ node-compile-gyp:
|
|
|
61
61
|
npm run build:gyp; \
|
|
62
62
|
fi
|
|
63
63
|
|
|
64
|
-
compile-agd: go
|
|
64
|
+
compile-agd: go.sum
|
|
65
65
|
go build -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=exe -o build/agd ./cmd/agd
|
|
66
66
|
|
|
67
|
-
install-agd: go
|
|
67
|
+
install-agd: go.sum
|
|
68
68
|
go install -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=exe ./cmd/agd
|
|
69
69
|
|
|
70
70
|
# Only run from the package.json build:gyp script.
|
|
@@ -73,17 +73,18 @@ compile-gyp:
|
|
|
73
73
|
node-gyp configure build $(GYP_DEBUG) || { status=$$?; rm -f binding.gyp; exit $$status; }
|
|
74
74
|
rm -f binding.gyp
|
|
75
75
|
|
|
76
|
-
compile-libdaemon: go
|
|
76
|
+
compile-libdaemon: go.sum
|
|
77
77
|
go build -v $(MOD_READONLY) $(SHARED_BUILD_FLAGS) -buildmode=c-shared \
|
|
78
78
|
-o build/libagcosmosdaemon.so ./cmd/libdaemon/main.go
|
|
79
79
|
|
|
80
|
-
go-mod-cache: go.sum
|
|
81
|
-
@echo "--> Download go modules to local cache"
|
|
82
|
-
@go mod download
|
|
83
|
-
|
|
84
80
|
go.sum: go.mod
|
|
85
|
-
@echo "--> Ensure dependencies have not been modified"
|
|
81
|
+
@echo "--> Ensure dependencies have not been modified unless suppressed by SKIP_MOD_VERIFY ..."
|
|
82
|
+
ifndef SKIP_MOD_VERIFY
|
|
86
83
|
GO111MODULE=on go mod verify
|
|
84
|
+
endif
|
|
85
|
+
GO111MODULE=on go mod tidy
|
|
86
|
+
@echo "--> Download go modules to local cache"
|
|
87
|
+
go mod download
|
|
87
88
|
|
|
88
89
|
###############################################################################
|
|
89
90
|
### Protobuf ###
|
|
@@ -98,11 +99,11 @@ proto-lint: proto-tools
|
|
|
98
99
|
proto-check-breaking: proto-tools
|
|
99
100
|
${BIN}/buf breaking --against $(PR_TARGET_REPO)#branch=$(PR_TARGET_BRANCH),subdir=golang/cosmos
|
|
100
101
|
|
|
101
|
-
GOGO_PROTO_URL
|
|
102
|
-
# GOOGLE_API_URL
|
|
103
|
-
IBC_PROTO_URL
|
|
104
|
-
COSMOS_PROTO_PROTO_URL
|
|
105
|
-
COSMOS_SDK_PROTO_URL
|
|
102
|
+
GOGO_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/gogo/protobuf)
|
|
103
|
+
# GOOGLE_API_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/googleapis/googleapis)/google/api
|
|
104
|
+
IBC_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v6)/proto/ibc/core
|
|
105
|
+
COSMOS_PROTO_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-proto)/proto/cosmos_proto
|
|
106
|
+
COSMOS_SDK_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-sdk)/proto/cosmos
|
|
106
107
|
|
|
107
108
|
COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto
|
|
108
109
|
GOGO_PROTO_TYPES = third_party/proto/gogoproto
|
|
@@ -116,34 +117,37 @@ SDK_UPGRADE_TYPES = third_party/proto/cosmos/upgrade/v1beta1
|
|
|
116
117
|
|
|
117
118
|
proto-update-deps:
|
|
118
119
|
mkdir -p $(COSMOS_PROTO_TYPES)
|
|
119
|
-
|
|
120
|
+
url="$(COSMOS_PROTO_PROTO_URL)"; \
|
|
121
|
+
curl -sSL $$url/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto
|
|
120
122
|
|
|
121
123
|
mkdir -p $(GOGO_PROTO_TYPES)
|
|
122
|
-
|
|
124
|
+
url="$(GOGO_PROTO_URL)"; \
|
|
125
|
+
curl -sSL $$url/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto
|
|
123
126
|
|
|
124
127
|
# Downloading from a not-a-go-module is problematic. These files are artifacts for now.
|
|
125
128
|
# mkdir -p $(GOOGLE_API_TYPES)
|
|
126
|
-
#
|
|
127
|
-
# curl -sSL
|
|
128
|
-
# curl -sSL
|
|
129
|
+
# url="$(GOOGLE_API_URL)"; \
|
|
130
|
+
# curl -sSL $$url/annotations.proto > $(GOOGLE_API_TYPES)/annotations.proto && \
|
|
131
|
+
# curl -sSL $$url/http.proto > $(GOOGLE_API_TYPES)/http.proto && \
|
|
132
|
+
# curl -sSL $$url/httpbody.proto > $(GOOGLE_API_TYPES)/httpbody.proto &&
|
|
129
133
|
|
|
130
134
|
mkdir -p $(GOOGLE_PROTO_TYPES)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
mkdir -p $(SDK_UPGRADE_TYPES)
|
|
146
|
-
curl -sSL
|
|
135
|
+
url="$(GOGO_PROTO_URL)"; \
|
|
136
|
+
curl -sSL $$url/protobuf/google/protobuf/any.proto > $(GOOGLE_PROTO_TYPES)/any.proto
|
|
137
|
+
|
|
138
|
+
url="$(IBC_PROTO_URL)"; \
|
|
139
|
+
mkdir -p $(IBC_CHANNEL_TYPES) && \
|
|
140
|
+
curl -sSL $$url/channel/v1/channel.proto > $(IBC_CHANNEL_TYPES)/channel.proto && \
|
|
141
|
+
mkdir -p $(IBC_CLIENT_TYPES) && \
|
|
142
|
+
curl -sSL $$url/client/v1/client.proto > $(IBC_CLIENT_TYPES)/client.proto
|
|
143
|
+
|
|
144
|
+
url="$(COSMOS_SDK_PROTO_URL)"; \
|
|
145
|
+
mkdir -p $(SDK_BASE_TYPES) && \
|
|
146
|
+
curl -sSL $$url/base/v1beta1/coin.proto > $(SDK_BASE_TYPES)/coin.proto && \
|
|
147
|
+
mkdir -p $(SDK_QUERY_TYPES) && \
|
|
148
|
+
curl -sSL $$url/base/query/v1beta1/pagination.proto > $(SDK_QUERY_TYPES)/pagination.proto && \
|
|
149
|
+
mkdir -p $(SDK_UPGRADE_TYPES) && \
|
|
150
|
+
curl -sSL $$url/upgrade/v1beta1/upgrade.proto > $(SDK_UPGRADE_TYPES)/upgrade.proto
|
|
147
151
|
|
|
148
152
|
UNAME_S ?= $(shell uname -s)
|
|
149
153
|
UNAME_M ?= $(shell uname -m)
|
package/ante/ante.go
CHANGED
|
@@ -45,15 +45,12 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
|
|
|
45
45
|
anteDecorators := []sdk.AnteDecorator{
|
|
46
46
|
ante.NewSetUpContextDecorator(),
|
|
47
47
|
ante.NewExtensionOptionsDecorator(nil), // reject all extensions
|
|
48
|
-
// former ante.NewMempoolFeeDecorator()
|
|
49
|
-
// replaced as in https://github.com/provenance-io/provenance/pull/1016
|
|
50
|
-
ante.NewDeductFeeDecorator(opts.AccountKeeper, opts.BankKeeper, opts.FeegrantKeeper, nil),
|
|
51
48
|
ante.NewValidateBasicDecorator(),
|
|
52
49
|
ante.NewTxTimeoutHeightDecorator(),
|
|
53
50
|
ante.NewValidateMemoDecorator(opts.AccountKeeper),
|
|
54
51
|
ante.NewConsumeGasForTxSizeDecorator(opts.AccountKeeper),
|
|
55
52
|
NewInboundDecorator(opts.SwingsetKeeper),
|
|
56
|
-
|
|
53
|
+
ante.NewDeductFeeDecoratorWithName(opts.AccountKeeper, opts.BankKeeper, opts.FeegrantKeeper, nil, opts.FeeCollectorName),
|
|
57
54
|
// SetPubKeyDecorator must be called before all signature verification decorators
|
|
58
55
|
ante.NewSetPubKeyDecorator(opts.AccountKeeper),
|
|
59
56
|
ante.NewValidateSigCountDecorator(opts.AccountKeeper),
|
package/ante/inbound_test.go
CHANGED
|
@@ -215,7 +215,7 @@ func (msk mockSwingsetKeeper) GetBeansPerUnit(ctx sdk.Context) map[string]sdkmat
|
|
|
215
215
|
return nil
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
func (msk mockSwingsetKeeper) ChargeBeans(ctx sdk.Context, addr sdk.AccAddress, beans sdkmath.Uint) error {
|
|
218
|
+
func (msk mockSwingsetKeeper) ChargeBeans(ctx sdk.Context, beansPerUnit map[string]sdkmath.Uint, addr sdk.AccAddress, beans sdkmath.Uint) error {
|
|
219
219
|
return fmt.Errorf("not implemented")
|
|
220
220
|
}
|
|
221
221
|
|
|
@@ -223,6 +223,6 @@ func (msk mockSwingsetKeeper) GetSmartWalletState(ctx sdk.Context, addr sdk.AccA
|
|
|
223
223
|
panic(fmt.Errorf("not implemented"))
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
func (msk mockSwingsetKeeper) ChargeForSmartWallet(ctx sdk.Context, addr sdk.AccAddress) error {
|
|
226
|
+
func (msk mockSwingsetKeeper) ChargeForSmartWallet(ctx sdk.Context, beansPerUnit map[string]sdkmath.Uint, addr sdk.AccAddress) error {
|
|
227
227
|
return fmt.Errorf("not implemented")
|
|
228
228
|
}
|