@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/daemon/main.go
CHANGED
|
@@ -13,12 +13,13 @@ import (
|
|
|
13
13
|
"github.com/Agoric/agoric-sdk/golang/cosmos/agoric"
|
|
14
14
|
app "github.com/Agoric/agoric-sdk/golang/cosmos/app"
|
|
15
15
|
"github.com/Agoric/agoric-sdk/golang/cosmos/daemon/cmd"
|
|
16
|
+
"github.com/Agoric/agoric-sdk/golang/cosmos/vm"
|
|
16
17
|
|
|
17
18
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
18
19
|
)
|
|
19
20
|
|
|
20
21
|
// DefaultController is a stub controller.
|
|
21
|
-
var DefaultController = func(ctx context.Context, needReply bool,
|
|
22
|
+
var DefaultController vm.Sender = func(ctx context.Context, needReply bool, jsonRequest string) (jsonReply string, err error) {
|
|
22
23
|
return "", fmt.Errorf("Controller not configured; did you mean to use `ag-chain-cosmos` instead?")
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -28,7 +29,7 @@ func Run() {
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
// RunWithController starts the app with a custom upcall handler.
|
|
31
|
-
func RunWithController(sendToController
|
|
32
|
+
func RunWithController(sendToController vm.Sender) {
|
|
32
33
|
// Exit on Control-C and kill.
|
|
33
34
|
// Without this explicitly, ag-chain-cosmos ignores them.
|
|
34
35
|
sigs := make(chan os.Signal, 1)
|
package/git-revision.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3eb1a1d
|
package/go.mod
CHANGED
|
@@ -4,11 +4,11 @@ go 1.20
|
|
|
4
4
|
|
|
5
5
|
require (
|
|
6
6
|
cosmossdk.io/errors v1.0.0-beta.7
|
|
7
|
-
cosmossdk.io/math v1.
|
|
7
|
+
cosmossdk.io/math v1.4.0
|
|
8
8
|
github.com/armon/go-metrics v0.4.1
|
|
9
9
|
github.com/cosmos/cosmos-sdk v0.46.16
|
|
10
|
-
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6 v6.1.
|
|
11
|
-
github.com/cosmos/ibc-go/v6 v6.
|
|
10
|
+
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6 v6.1.2
|
|
11
|
+
github.com/cosmos/ibc-go/v6 v6.3.1
|
|
12
12
|
github.com/gogo/protobuf v1.3.3
|
|
13
13
|
github.com/golang/protobuf v1.5.3
|
|
14
14
|
github.com/gorilla/mux v1.8.0
|
|
@@ -16,9 +16,10 @@ require (
|
|
|
16
16
|
github.com/pkg/errors v0.9.1
|
|
17
17
|
github.com/rakyll/statik v0.1.7
|
|
18
18
|
github.com/spf13/cast v1.5.0
|
|
19
|
-
github.com/spf13/cobra v1.
|
|
19
|
+
github.com/spf13/cobra v1.7.0
|
|
20
|
+
github.com/spf13/pflag v1.0.5
|
|
20
21
|
github.com/spf13/viper v1.14.0
|
|
21
|
-
github.com/stretchr/testify v1.
|
|
22
|
+
github.com/stretchr/testify v1.9.0
|
|
22
23
|
github.com/tendermint/tendermint v0.34.29
|
|
23
24
|
github.com/tendermint/tm-db v0.6.7
|
|
24
25
|
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98
|
|
@@ -101,7 +102,7 @@ require (
|
|
|
101
102
|
github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect
|
|
102
103
|
github.com/iancoleman/orderedmap v0.2.0 // indirect
|
|
103
104
|
github.com/improbable-eng/grpc-web v0.15.0 // indirect
|
|
104
|
-
github.com/inconshreveable/mousetrap v1.0
|
|
105
|
+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
|
105
106
|
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
|
106
107
|
github.com/jmhodges/levigo v1.0.0 // indirect
|
|
107
108
|
github.com/klauspost/compress v1.16.0 // indirect
|
|
@@ -133,7 +134,6 @@ require (
|
|
|
133
134
|
github.com/sasha-s/go-deadlock v0.3.1 // indirect
|
|
134
135
|
github.com/spf13/afero v1.9.2 // indirect
|
|
135
136
|
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
|
136
|
-
github.com/spf13/pflag v1.0.5 // indirect
|
|
137
137
|
github.com/subosito/gotenv v1.4.1 // indirect
|
|
138
138
|
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
|
|
139
139
|
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
|
|
@@ -161,7 +161,7 @@ require (
|
|
|
161
161
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
|
162
162
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
163
163
|
nhooyr.io/websocket v1.8.6 // indirect
|
|
164
|
-
sigs.k8s.io/yaml v1.
|
|
164
|
+
sigs.k8s.io/yaml v1.4.0 // indirect
|
|
165
165
|
)
|
|
166
166
|
|
|
167
167
|
replace (
|
|
@@ -187,10 +187,13 @@ replace (
|
|
|
187
187
|
// Agoric-specific replacements:
|
|
188
188
|
replace (
|
|
189
189
|
// We need a fork of cosmos-sdk until all of the differences are merged.
|
|
190
|
-
github.com/cosmos/cosmos-sdk => github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2
|
|
190
|
+
github.com/cosmos/cosmos-sdk => github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.4
|
|
191
191
|
|
|
192
|
-
//
|
|
193
|
-
github.com/cosmos/
|
|
192
|
+
// Pick up an IAVL race fix.
|
|
193
|
+
github.com/cosmos/iavl => github.com/cosmos/iavl v0.19.7
|
|
194
|
+
|
|
195
|
+
// Use a version of ibc-go that is compatible with the above forks.
|
|
196
|
+
github.com/cosmos/ibc-go/v6 => github.com/agoric-labs/ibc-go/v6 v6.3.1-alpha.agoric.2
|
|
194
197
|
|
|
195
198
|
// use cometbft
|
|
196
199
|
// Use our fork at least until post-v0.34.14 is released with
|
package/go.sum
CHANGED
|
@@ -193,8 +193,8 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS
|
|
|
193
193
|
collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE=
|
|
194
194
|
cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w=
|
|
195
195
|
cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE=
|
|
196
|
-
cosmossdk.io/math v1.
|
|
197
|
-
cosmossdk.io/math v1.
|
|
196
|
+
cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ=
|
|
197
|
+
cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk=
|
|
198
198
|
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
|
199
199
|
filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU=
|
|
200
200
|
filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
|
|
@@ -232,12 +232,12 @@ github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBA
|
|
|
232
232
|
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
|
|
233
233
|
github.com/agoric-labs/cometbft v0.34.30-alpha.agoric.1 h1:tqCNL72pQXdUmBzgv1md5SN2U3K/PaYQ4qZ5pFv8v6w=
|
|
234
234
|
github.com/agoric-labs/cometbft v0.34.30-alpha.agoric.1/go.mod h1:myvkihZD8eg9jKE3WFaugkNoL5nvEqlP7Jbjg98pCek=
|
|
235
|
-
github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2 h1:
|
|
236
|
-
github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2/go.mod h1:
|
|
235
|
+
github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.4 h1:i5IgChQjTyWulV/y5NpVBB5qBJETQ59hYglod6vhok0=
|
|
236
|
+
github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.4/go.mod h1:d7e4h+w7FNBNmE6ysp6duBVuQg67pqMtvsLwpT9ca3E=
|
|
237
237
|
github.com/agoric-labs/cosmos-sdk/ics23/go v0.8.0-alpha.agoric.1 h1:2jvHI/2d+psWAZy6FQ0vXJCHUtfU3ZbbW+pQFL04arQ=
|
|
238
238
|
github.com/agoric-labs/cosmos-sdk/ics23/go v0.8.0-alpha.agoric.1/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg=
|
|
239
|
-
github.com/agoric-labs/ibc-go/v6 v6.
|
|
240
|
-
github.com/agoric-labs/ibc-go/v6 v6.
|
|
239
|
+
github.com/agoric-labs/ibc-go/v6 v6.3.1-alpha.agoric.2 h1:vEzy4JaExzlWNHV3ZSVXEVZcRE9loEFUjieE2TXwDdI=
|
|
240
|
+
github.com/agoric-labs/ibc-go/v6 v6.3.1-alpha.agoric.2/go.mod h1:L1xcBjCLIHN7Wd9j6cAQvZertn56pq+eRGFZjRO5bsY=
|
|
241
241
|
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
|
|
242
242
|
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
|
243
243
|
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
|
@@ -378,10 +378,10 @@ github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY
|
|
|
378
378
|
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
|
|
379
379
|
github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y=
|
|
380
380
|
github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw=
|
|
381
|
-
github.com/cosmos/iavl v0.19.
|
|
382
|
-
github.com/cosmos/iavl v0.19.
|
|
383
|
-
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6 v6.1.
|
|
384
|
-
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6 v6.1.
|
|
381
|
+
github.com/cosmos/iavl v0.19.7 h1:ij32FaEnwxfEurtK0QKDNhTWFnz6NUmrI5gky/WnoY0=
|
|
382
|
+
github.com/cosmos/iavl v0.19.7/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw=
|
|
383
|
+
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6 v6.1.2 h1:Hz4nkpStoXIHrC77CIEyu2mRiN2qysGEZPFRf0fpv7w=
|
|
384
|
+
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6 v6.1.2/go.mod h1:Jo934o/sW7fNxuOa/TjCalSalz+1Fd649eLyANaJx8g=
|
|
385
385
|
github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo=
|
|
386
386
|
github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA=
|
|
387
387
|
github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw=
|
|
@@ -733,8 +733,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:
|
|
|
733
733
|
github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ=
|
|
734
734
|
github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8=
|
|
735
735
|
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
|
736
|
-
github.com/inconshreveable/mousetrap v1.0
|
|
737
|
-
github.com/inconshreveable/mousetrap v1.0
|
|
736
|
+
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
|
737
|
+
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
|
738
738
|
github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY=
|
|
739
739
|
github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI=
|
|
740
740
|
github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8=
|
|
@@ -1060,8 +1060,8 @@ github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
|
|
|
1060
1060
|
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
|
|
1061
1061
|
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
|
1062
1062
|
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
|
|
1063
|
-
github.com/spf13/cobra v1.
|
|
1064
|
-
github.com/spf13/cobra v1.
|
|
1063
|
+
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
|
|
1064
|
+
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
|
|
1065
1065
|
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
|
1066
1066
|
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
|
1067
1067
|
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
|
@@ -1079,8 +1079,8 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J
|
|
|
1079
1079
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
1080
1080
|
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
1081
1081
|
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
|
1082
|
-
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
|
|
1083
1082
|
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
|
1083
|
+
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
|
1084
1084
|
github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
1085
1085
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
1086
1086
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
|
@@ -1091,8 +1091,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
|
|
1091
1091
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
|
1092
1092
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
|
1093
1093
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
|
1094
|
-
github.com/stretchr/testify v1.
|
|
1095
|
-
github.com/stretchr/testify v1.
|
|
1094
|
+
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
|
1095
|
+
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
|
1096
1096
|
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
|
|
1097
1097
|
github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
|
|
1098
1098
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
|
@@ -1168,6 +1168,7 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe
|
|
|
1168
1168
|
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
|
1169
1169
|
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
|
1170
1170
|
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
|
1171
|
+
go.uber.org/mock v0.2.0 h1:TaP3xedm7JaAgScZO7tlvlKrqT0p7I6OsdGB5YNSMDU=
|
|
1171
1172
|
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
|
1172
1173
|
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
|
|
1173
1174
|
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
|
@@ -1871,6 +1872,6 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
|
|
1871
1872
|
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
|
1872
1873
|
rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA=
|
|
1873
1874
|
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
|
1874
|
-
sigs.k8s.io/yaml v1.
|
|
1875
|
-
sigs.k8s.io/yaml v1.
|
|
1875
|
+
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
|
|
1876
|
+
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
|
|
1876
1877
|
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
|
package/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* eslint-env node */
|
|
2
2
|
module.exports = require('bindings')('agcosmosdaemon.node');
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/cosmos",
|
|
3
|
-
"version": "0.34.2-
|
|
3
|
+
"version": "0.34.2-other-dev-3eb1a1d.0+3eb1a1d",
|
|
4
4
|
"description": "Connect JS to the Cosmos blockchain SDK",
|
|
5
5
|
"parsers": {
|
|
6
6
|
"js": "mjs"
|
|
7
7
|
},
|
|
8
8
|
"main": "index.cjs",
|
|
9
9
|
"engines": {
|
|
10
|
-
"node": "
|
|
10
|
+
"node": "^18.12 || ^20.9"
|
|
11
11
|
},
|
|
12
|
+
"packageManager": "yarn@1.22.22",
|
|
12
13
|
"scripts": {
|
|
13
14
|
"test": "exit 0",
|
|
14
15
|
"build:all": "make",
|
|
@@ -38,5 +39,5 @@
|
|
|
38
39
|
"typeCoverage": {
|
|
39
40
|
"atLeast": 0
|
|
40
41
|
},
|
|
41
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "3eb1a1d2d75b2b4a94807cd3bf759bc9fc531f05"
|
|
42
43
|
}
|
|
@@ -17,6 +17,10 @@ message GenesisState {
|
|
|
17
17
|
repeated SwingStoreExportDataEntry swing_store_export_data = 4 [
|
|
18
18
|
(gogoproto.jsontag) = "swingStoreExportData"
|
|
19
19
|
];
|
|
20
|
+
|
|
21
|
+
string swing_store_export_data_hash = 5 [
|
|
22
|
+
(gogoproto.jsontag) = "swingStoreExportDataHash"
|
|
23
|
+
];
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
// A SwingStore "export data" entry.
|
|
@@ -8,7 +8,7 @@ option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types
|
|
|
8
8
|
|
|
9
9
|
// CoreEvalProposal is a gov Content type for evaluating code in the SwingSet
|
|
10
10
|
// core.
|
|
11
|
-
// See `agoric-sdk
|
|
11
|
+
// See `bridgeCoreEval` in agoric-sdk packages/vats/src/core/chain-behaviors.js.
|
|
12
12
|
message CoreEvalProposal {
|
|
13
13
|
option (gogoproto.goproto_getters) = false;
|
|
14
14
|
|
|
@@ -82,6 +82,18 @@ message Params {
|
|
|
82
82
|
repeated QueueSize queue_max = 5 [
|
|
83
83
|
(gogoproto.nullable) = false
|
|
84
84
|
];
|
|
85
|
+
|
|
86
|
+
// Vat cleanup budget values.
|
|
87
|
+
// These values are used by SwingSet to control the pace of removing data
|
|
88
|
+
// associated with a terminated vat as described at
|
|
89
|
+
// https://github.com/Agoric/agoric-sdk/blob/master/packages/SwingSet/docs/run-policy.md#terminated-vat-cleanup
|
|
90
|
+
//
|
|
91
|
+
// There is no required order to this list of entries, but all the chain
|
|
92
|
+
// nodes must all serialize and deserialize the existing order without
|
|
93
|
+
// permuting it.
|
|
94
|
+
repeated UintMapEntry vat_cleanup_budget = 6 [
|
|
95
|
+
(gogoproto.nullable) = false
|
|
96
|
+
];
|
|
85
97
|
}
|
|
86
98
|
|
|
87
99
|
// The current state of the module.
|
|
@@ -119,6 +131,7 @@ message PowerFlagFee {
|
|
|
119
131
|
}
|
|
120
132
|
|
|
121
133
|
// Map element of a string key to a size.
|
|
134
|
+
// TODO: Replace with UintMapEntry?
|
|
122
135
|
message QueueSize {
|
|
123
136
|
option (gogoproto.equal) = true;
|
|
124
137
|
|
|
@@ -129,6 +142,18 @@ message QueueSize {
|
|
|
129
142
|
int32 size = 2;
|
|
130
143
|
}
|
|
131
144
|
|
|
145
|
+
// Map element of a string key to an unsigned integer.
|
|
146
|
+
// The value uses cosmos-sdk Uint rather than a native Go type to ensure that
|
|
147
|
+
// zeroes survive "omitempty" JSON serialization.
|
|
148
|
+
message UintMapEntry {
|
|
149
|
+
option (gogoproto.equal) = true;
|
|
150
|
+
string key = 1;
|
|
151
|
+
string value = 2 [
|
|
152
|
+
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint",
|
|
153
|
+
(gogoproto.nullable) = false
|
|
154
|
+
];
|
|
155
|
+
}
|
|
156
|
+
|
|
132
157
|
// Egress is the format for a swingset egress.
|
|
133
158
|
message Egress {
|
|
134
159
|
option (gogoproto.equal) = false;
|
|
@@ -33,6 +33,13 @@ message Params {
|
|
|
33
33
|
int64 reward_smoothing_blocks = 3 [
|
|
34
34
|
(gogoproto.moretags) = "yaml:\"reward_smoothing_blocks\""
|
|
35
35
|
];
|
|
36
|
+
|
|
37
|
+
// allowed_monitoring_accounts is an array of account addresses that can be
|
|
38
|
+
// monitored for sends and receives. An element of `"*"` will permit any
|
|
39
|
+
// address.
|
|
40
|
+
repeated string allowed_monitoring_accounts = 4 [
|
|
41
|
+
(gogoproto.moretags) = "yaml:\"allowed_monitoring_accounts\""
|
|
42
|
+
];
|
|
36
43
|
}
|
|
37
44
|
|
|
38
45
|
// The current state of the module.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package agoric.vtransfer;
|
|
3
|
+
|
|
4
|
+
import "gogoproto/gogo.proto";
|
|
5
|
+
|
|
6
|
+
option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vtransfer/types";
|
|
7
|
+
|
|
8
|
+
// The initial and exported module state.
|
|
9
|
+
message GenesisState {
|
|
10
|
+
option (gogoproto.equal) = false;
|
|
11
|
+
|
|
12
|
+
// The list of account addresses that are being watched by the VM.
|
|
13
|
+
repeated bytes watched_addresses = 1 [
|
|
14
|
+
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
|
|
15
|
+
(gogoproto.jsontag) = "watched_addresses",
|
|
16
|
+
(gogoproto.moretags) = "yaml:\"watched_addresses\""
|
|
17
|
+
];
|
|
18
|
+
}
|
package/scripts/protocgen.sh
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
set -eo pipefail
|
|
4
4
|
|
|
5
5
|
protoc_gen_gocosmos() {
|
|
6
|
-
if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod
|
|
6
|
+
if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &> /dev/null; then
|
|
7
7
|
echo -e "\tPlease run this command from somewhere inside the ibc-go folder."
|
|
8
8
|
return 1
|
|
9
9
|
fi
|
|
10
10
|
|
|
11
|
-
go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest 2
|
|
11
|
+
go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest 2> /dev/null
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
protoc_gen_gocosmos
|
|
@@ -19,12 +19,11 @@ for dir in $proto_dirs; do
|
|
|
19
19
|
# allow_colon_final_segments=true
|
|
20
20
|
# as per https://grpc-ecosystem.github.io/grpc-gateway/docs/development/grpc-gateway_v2_migration_guide/#withlastmatchwins-and-allow_colon_final_segmentstrue-is-now-default-behaviour
|
|
21
21
|
protoc \
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
$(find "${dir}" -maxdepth 1 -name '*.proto')
|
|
22
|
+
-I proto \
|
|
23
|
+
-I third_party/proto \
|
|
24
|
+
--gocosmos_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
|
|
25
|
+
--grpc-gateway_out=logtostderr=true,allow_colon_final_segments=true:. \
|
|
26
|
+
$(find "${dir}" -maxdepth 1 -name '*.proto')
|
|
28
27
|
done
|
|
29
28
|
|
|
30
29
|
# move proto files to the right places
|
|
@@ -232,3 +232,45 @@ func EncodeKVEntryReaderToJsonl(reader KVEntryReader, bytesWriter io.Writer) (er
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
+
|
|
236
|
+
var _ KVEntryReader = &kvHookingReader{}
|
|
237
|
+
|
|
238
|
+
// kvHookingReader is a KVEntryReader backed by another KVEntryReader which
|
|
239
|
+
// provides callbacks for read and close
|
|
240
|
+
type kvHookingReader struct {
|
|
241
|
+
reader KVEntryReader
|
|
242
|
+
onRead func(entry KVEntry) error
|
|
243
|
+
onClose func() error
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// NewKVHookingReader returns a KVEntryReader backed by another KVEntryReader
|
|
247
|
+
func NewKVHookingReader(reader KVEntryReader, onRead func(entry KVEntry) error, onClose func() error) KVEntryReader {
|
|
248
|
+
return &kvHookingReader{
|
|
249
|
+
reader,
|
|
250
|
+
onRead,
|
|
251
|
+
onClose,
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Read yields the next KVEntry from the source reader
|
|
256
|
+
// Implements KVEntryReader
|
|
257
|
+
func (hr kvHookingReader) Read() (next KVEntry, err error) {
|
|
258
|
+
next, err = hr.reader.Read()
|
|
259
|
+
|
|
260
|
+
if err == nil {
|
|
261
|
+
err = hr.onRead(next)
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return next, err
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Close releases the underlying source reader
|
|
268
|
+
// Implements KVEntryReader
|
|
269
|
+
func (hr kvHookingReader) Close() error {
|
|
270
|
+
err := hr.reader.Close()
|
|
271
|
+
if err == nil {
|
|
272
|
+
err = hr.onClose()
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return err
|
|
276
|
+
}
|
package/upgradegaia.sh
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
set -ueo pipefail
|
|
9
9
|
|
|
10
10
|
test $# -eq 2 || {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
echo "Usage: $0 <FROM_BRANCH> <TO_BRANCH>" 1>&2
|
|
12
|
+
exit 1
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
FROM_BRANCH="$1"
|
|
@@ -23,8 +23,8 @@ for tag in "$FROM_BRANCH" "$TO_BRANCH"; do
|
|
|
23
23
|
qtag=${tag//\//_}
|
|
24
24
|
for root in Makefile app cmd/gaiad; do
|
|
25
25
|
case "$root" in
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
Makefile) echo "$root" ;;
|
|
27
|
+
*) git ls-tree --name-only --full-tree -r "$tag:$root" | sed -e "s!^!$root/!" ;;
|
|
28
28
|
esac
|
|
29
29
|
done | while read -r src; do
|
|
30
30
|
# echo "$src"
|
|
@@ -36,12 +36,12 @@ for tag in "$FROM_BRANCH" "$TO_BRANCH"; do
|
|
|
36
36
|
done
|
|
37
37
|
|
|
38
38
|
echo "Compute 3-way diffs between Gaia and us"
|
|
39
|
-
(cd "$tmp/${FROM_BRANCH//\//_}" && find . -type f -print)
|
|
40
|
-
while read -r src; do
|
|
39
|
+
(cd "$tmp/${FROM_BRANCH//\//_}" && find . -type f -print) \
|
|
40
|
+
| while read -r src; do
|
|
41
41
|
# echo "$src"
|
|
42
42
|
case "$src" in
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
./cmd/gaiad/*) our=${src//cmd\/gaiad/daemon} ;;
|
|
44
|
+
*) our=$src ;;
|
|
45
45
|
esac
|
|
46
46
|
|
|
47
47
|
new="$tmp/diff3/$our"
|
package/util/util.go
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
package util
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"github.com/spf13/viper"
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
func IndexOf[T comparable](a []T, x T) int {
|
|
8
|
+
for i, s := range a {
|
|
9
|
+
if s == x {
|
|
10
|
+
return i
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return -1
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
func NewFileOnlyViper(v1 *viper.Viper) (*viper.Viper, error) {
|
|
17
|
+
v2 := viper.New()
|
|
18
|
+
v2.SetConfigFile(v1.ConfigFileUsed())
|
|
19
|
+
err := v2.ReadInConfig()
|
|
20
|
+
return v2, err
|
|
21
|
+
}
|
package/vm/action.go
CHANGED
|
@@ -86,7 +86,7 @@ func PopulateAction(ctx sdk.Context, action Action) Action {
|
|
|
86
86
|
var headerPtr *ActionHeader
|
|
87
87
|
if fieldType.Type == actionHeaderType {
|
|
88
88
|
headerPtr = field.Addr().Interface().(*ActionHeader)
|
|
89
|
-
} else if fieldType.Type == reflect.
|
|
89
|
+
} else if fieldType.Type == reflect.PointerTo(actionHeaderType) {
|
|
90
90
|
if field.IsNil() {
|
|
91
91
|
headerPtr = &ActionHeader{}
|
|
92
92
|
} else {
|
package/vm/client.go
CHANGED
|
@@ -12,8 +12,8 @@ const ReceiveMessageMethod = "agvm.ReceiveMessage"
|
|
|
12
12
|
|
|
13
13
|
// Message is what we send to the VM.
|
|
14
14
|
type Message struct {
|
|
15
|
-
Port
|
|
16
|
-
Data
|
|
15
|
+
Port int
|
|
16
|
+
Data string
|
|
17
17
|
NeedsReply bool
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -24,7 +24,9 @@ var _ rpc.ClientCodec = (*ClientCodec)(nil)
|
|
|
24
24
|
// runtime and the VM in the single-process dual-runtime configuration.
|
|
25
25
|
//
|
|
26
26
|
// We expect to call it via the legacy API with signature:
|
|
27
|
-
//
|
|
27
|
+
//
|
|
28
|
+
// sendToController func(needsReply bool, msg string) (string, error)
|
|
29
|
+
//
|
|
28
30
|
// where msg and the returned string are JSON-encoded values.
|
|
29
31
|
//
|
|
30
32
|
// Note that the net/rpc framework cannot express a call that does not expect a
|
|
@@ -32,22 +34,22 @@ var _ rpc.ClientCodec = (*ClientCodec)(nil)
|
|
|
32
34
|
// having the WriteRequest() method fabricate a Receive() call to clear the rpc
|
|
33
35
|
// state.
|
|
34
36
|
type ClientCodec struct {
|
|
35
|
-
ctx
|
|
36
|
-
send
|
|
37
|
-
outbound
|
|
38
|
-
inbound
|
|
39
|
-
replies
|
|
37
|
+
ctx context.Context
|
|
38
|
+
send func(port, rPort int, msg string)
|
|
39
|
+
outbound map[int]rpc.Request
|
|
40
|
+
inbound chan *rpc.Response
|
|
41
|
+
replies map[uint64]string
|
|
40
42
|
replyToRead uint64
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
// NewClientCodec creates a new ClientCodec.
|
|
44
46
|
func NewClientCodec(ctx context.Context, send func(int, int, string)) *ClientCodec {
|
|
45
47
|
return &ClientCodec{
|
|
46
|
-
ctx:
|
|
47
|
-
send:
|
|
48
|
+
ctx: ctx,
|
|
49
|
+
send: send,
|
|
48
50
|
outbound: make(map[int]rpc.Request),
|
|
49
|
-
inbound:
|
|
50
|
-
replies:
|
|
51
|
+
inbound: make(chan *rpc.Response),
|
|
52
|
+
replies: make(map[uint64]string),
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
|
|
@@ -97,7 +99,7 @@ func (cc *ClientCodec) Receive(rPort int, isError bool, data string) error {
|
|
|
97
99
|
delete(cc.outbound, rPort)
|
|
98
100
|
resp := &rpc.Response{
|
|
99
101
|
ServiceMethod: outb.ServiceMethod,
|
|
100
|
-
Seq:
|
|
102
|
+
Seq: outb.Seq,
|
|
101
103
|
}
|
|
102
104
|
if isError {
|
|
103
105
|
resp.Error = data
|