@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
|
@@ -80,7 +80,7 @@ func TestAddStorageBeanCost(t *testing.T) {
|
|
|
80
80
|
},
|
|
81
81
|
} {
|
|
82
82
|
t.Run(tt.name, func(t *testing.T) {
|
|
83
|
-
got, err :=
|
|
83
|
+
got, err := appendMissingDefaults(tt.in, []StringBeans{defaultStorageCost})
|
|
84
84
|
if err != nil {
|
|
85
85
|
t.Errorf("got error %v", err)
|
|
86
86
|
} else if !reflect.DeepEqual(got, tt.want) {
|
|
@@ -90,27 +90,93 @@ func TestAddStorageBeanCost(t *testing.T) {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
func
|
|
94
|
-
|
|
93
|
+
func TestUpdateParamsFromEmpty(t *testing.T) {
|
|
95
94
|
in := Params{
|
|
96
|
-
BeansPerUnit:
|
|
97
|
-
BootstrapVatConfig: "
|
|
95
|
+
BeansPerUnit: nil,
|
|
96
|
+
BootstrapVatConfig: "",
|
|
98
97
|
FeeUnitPrice: sdk.NewCoins(sdk.NewInt64Coin("denom", 789)),
|
|
99
|
-
PowerFlagFees:
|
|
100
|
-
QueueMax:
|
|
98
|
+
PowerFlagFees: nil,
|
|
99
|
+
QueueMax: nil,
|
|
100
|
+
VatCleanupBudget: nil,
|
|
101
101
|
}
|
|
102
102
|
want := Params{
|
|
103
103
|
BeansPerUnit: DefaultBeansPerUnit(),
|
|
104
|
-
BootstrapVatConfig: "
|
|
104
|
+
BootstrapVatConfig: "",
|
|
105
105
|
FeeUnitPrice: sdk.NewCoins(sdk.NewInt64Coin("denom", 789)),
|
|
106
106
|
PowerFlagFees: DefaultPowerFlagFees,
|
|
107
107
|
QueueMax: DefaultQueueMax,
|
|
108
|
+
VatCleanupBudget: DefaultVatCleanupBudget,
|
|
109
|
+
}
|
|
110
|
+
got, err := UpdateParams(in)
|
|
111
|
+
if err != nil {
|
|
112
|
+
t.Fatalf("UpdateParam error %v", err)
|
|
113
|
+
}
|
|
114
|
+
if !reflect.DeepEqual(got, want) {
|
|
115
|
+
t.Errorf("GOT\n%v\nWANTED\n%v", got, want)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
func TestUpdateParamsFromExisting(t *testing.T) {
|
|
120
|
+
defaultBeansPerUnit := DefaultBeansPerUnit()
|
|
121
|
+
customBeansPerUnit := NewStringBeans("foo", sdk.NewUint(1))
|
|
122
|
+
customPowerFlagFee := NewPowerFlagFee("bar", sdk.NewCoins(sdk.NewInt64Coin("baz", 2)))
|
|
123
|
+
customQueueSize := NewQueueSize("qux", int32(3))
|
|
124
|
+
customVatCleanup := UintMapEntry{"corge", sdk.NewUint(4)}
|
|
125
|
+
in := Params{
|
|
126
|
+
BeansPerUnit: append([]StringBeans{customBeansPerUnit}, defaultBeansPerUnit[2:4]...),
|
|
127
|
+
BootstrapVatConfig: "",
|
|
128
|
+
FeeUnitPrice: sdk.NewCoins(sdk.NewInt64Coin("denom", 789)),
|
|
129
|
+
PowerFlagFees: []PowerFlagFee{customPowerFlagFee},
|
|
130
|
+
QueueMax: []QueueSize{NewQueueSize(QueueInbound, int32(10)), customQueueSize},
|
|
131
|
+
VatCleanupBudget: []UintMapEntry{customVatCleanup, UintMapEntry{VatCleanupDefault, sdk.NewUint(10)}},
|
|
132
|
+
}
|
|
133
|
+
want := Params{
|
|
134
|
+
BeansPerUnit: append(append(in.BeansPerUnit, defaultBeansPerUnit[0:2]...), defaultBeansPerUnit[4:]...),
|
|
135
|
+
BootstrapVatConfig: in.BootstrapVatConfig,
|
|
136
|
+
FeeUnitPrice: in.FeeUnitPrice,
|
|
137
|
+
PowerFlagFees: append(in.PowerFlagFees, DefaultPowerFlagFees...),
|
|
138
|
+
QueueMax: in.QueueMax,
|
|
139
|
+
VatCleanupBudget: append(in.VatCleanupBudget, DefaultVatCleanupBudget[1:]...),
|
|
108
140
|
}
|
|
109
141
|
got, err := UpdateParams(in)
|
|
110
142
|
if err != nil {
|
|
111
143
|
t.Fatalf("UpdateParam error %v", err)
|
|
112
144
|
}
|
|
113
145
|
if !reflect.DeepEqual(got, want) {
|
|
114
|
-
t.Errorf("
|
|
146
|
+
t.Errorf("GOT\n%v\nWANTED\n%v", got, want)
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
func TestValidateParams(t *testing.T) {
|
|
151
|
+
params := Params{
|
|
152
|
+
BeansPerUnit: DefaultBeansPerUnit(),
|
|
153
|
+
BootstrapVatConfig: "foo",
|
|
154
|
+
FeeUnitPrice: sdk.NewCoins(sdk.NewInt64Coin("denom", 789)),
|
|
155
|
+
PowerFlagFees: DefaultPowerFlagFees,
|
|
156
|
+
QueueMax: DefaultQueueMax,
|
|
157
|
+
VatCleanupBudget: DefaultVatCleanupBudget,
|
|
158
|
+
}
|
|
159
|
+
err := params.ValidateBasic()
|
|
160
|
+
if err != nil {
|
|
161
|
+
t.Errorf("unexpected ValidateBasic() error with default params: %v", err)
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
customVatCleanup := UintMapEntry{"corge", sdk.NewUint(4)}
|
|
165
|
+
params.VatCleanupBudget = append(params.VatCleanupBudget, customVatCleanup)
|
|
166
|
+
err = params.ValidateBasic()
|
|
167
|
+
if err != nil {
|
|
168
|
+
t.Errorf("unexpected ValidateBasic() error with extended params: %v", err)
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
params.VatCleanupBudget = params.VatCleanupBudget[1:]
|
|
172
|
+
err = params.ValidateBasic()
|
|
173
|
+
if err == nil {
|
|
174
|
+
t.Errorf("ValidateBasic() failed to reject VatCleanupBudget with missing `default` %v", params.VatCleanupBudget)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
params.VatCleanupBudget = []UintMapEntry{}
|
|
178
|
+
err = params.ValidateBasic()
|
|
179
|
+
if err != nil {
|
|
180
|
+
t.Errorf("unexpected ValidateBasic() error with empty VatCleanupBudget: %v", params.VatCleanupBudget)
|
|
115
181
|
}
|
|
116
182
|
}
|