From 5121c35e1cd67938476d3ea3c76ff338647dbb9c Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Thu, 3 Dec 2020 14:34:38 -0600 Subject: [PATCH 1/5] chore: rename many Golang files to /golang --- packages/cosmic-swingset/go.mod => go.mod | 0 packages/cosmic-swingset/go.sum => go.sum | 0 {packages/cosmic-swingset => golang/cosmos}/Makefile.ledger | 0 {packages/cosmic-swingset => golang/cosmos}/app/app.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/config.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/encoding.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/export.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/genesis.go | 0 .../cosmic-swingset => golang/cosmos}/app/genesis_account.go | 0 .../cosmic-swingset => golang/cosmos}/app/helpers/test_helpers.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/params/amino.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/params/doc.go | 0 .../cosmic-swingset => golang/cosmos}/app/params/encoding.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/params/params.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/params/proto.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/params/weights.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/state.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/types.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/utils.go | 0 {packages/cosmic-swingset => golang/cosmos}/app/version_check.go | 0 .../cmd/ag-cosmos-helper => golang/cosmos/cmd/helper}/main.go | 0 .../lib/agcosmosdaemon.go => golang/cosmos/cmd/libdaemon/main.go | 0 .../lib => golang/cosmos}/daemon/cmd/genaccounts.go | 0 .../cosmic-swingset/lib => golang/cosmos}/daemon/cmd/root.go | 0 .../cosmic-swingset/lib => golang/cosmos}/daemon/cmd/testnet.go | 0 {packages/cosmic-swingset/lib => golang/cosmos}/daemon/main.go | 0 .../cosmos}/proto/agoric/dibc/msgs.proto | 0 .../cosmos}/proto/agoric/swingset/genesis.proto | 0 .../cosmos}/proto/agoric/swingset/msgs.proto | 0 .../cosmos}/proto/agoric/swingset/query.proto | 0 .../cosmos}/proto/agoric/swingset/storage.proto | 0 .../third_party/proto/cosmos/base/query/v1beta1/pagination.proto | 0 .../cosmos}/third_party/proto/gogoproto/gogo.proto | 0 .../cosmos}/third_party/proto/google/api/annotations.proto | 0 .../cosmos}/third_party/proto/google/api/http.proto | 0 .../cosmos}/third_party/proto/google/api/httpbody.proto | 0 .../cosmos}/third_party/proto/google/protobuf/any.proto | 0 .../cosmos}/third_party/proto/ibc/core/channel/v1/channel.proto | 0 .../cosmos}/third_party/proto/ibc/core/client/v1/client.proto | 0 {packages/cosmic-swingset => golang/cosmos}/x/dibc/alias.go | 0 {packages/cosmic-swingset => golang/cosmos}/x/dibc/handler.go | 0 {packages/cosmic-swingset => golang/cosmos}/x/dibc/ibc.go | 0 .../cosmic-swingset => golang/cosmos}/x/dibc/keeper/keeper.go | 0 {packages/cosmic-swingset => golang/cosmos}/x/dibc/module.go | 0 {packages/cosmic-swingset => golang/cosmos}/x/dibc/types/codec.go | 0 .../cosmos}/x/dibc/types/expected_keepers.go | 0 {packages/cosmic-swingset => golang/cosmos}/x/dibc/types/key.go | 0 {packages/cosmic-swingset => golang/cosmos}/x/dibc/types/msgs.go | 0 .../cosmic-swingset => golang/cosmos}/x/dibc/types/msgs.pb.go | 0 {packages/cosmic-swingset => golang/cosmos}/x/swingset/alias.go | 0 .../cosmic-swingset => golang/cosmos}/x/swingset/blockers.go | 0 .../cosmos}/x/swingset/client/cli/query.go | 0 .../cosmic-swingset => golang/cosmos}/x/swingset/client/cli/tx.go | 0 .../cosmos}/x/swingset/client/rest/query.go | 0 .../cosmos}/x/swingset/client/rest/rest.go | 0 .../cosmic-swingset => golang/cosmos}/x/swingset/controller.go | 0 {packages/cosmic-swingset => golang/cosmos}/x/swingset/genesis.go | 0 {packages/cosmic-swingset => golang/cosmos}/x/swingset/handler.go | 0 .../cosmos}/x/swingset/keeper/grpc_query.go | 0 .../cosmic-swingset => golang/cosmos}/x/swingset/keeper/keeper.go | 0 .../cosmos}/x/swingset/keeper/querier.go | 0 {packages/cosmic-swingset => golang/cosmos}/x/swingset/module.go | 0 {packages/cosmic-swingset => golang/cosmos}/x/swingset/storage.go | 0 .../cosmic-swingset => golang/cosmos}/x/swingset/types/codec.go | 0 .../cosmos}/x/swingset/types/genesis.pb.go | 0 .../cosmic-swingset => golang/cosmos}/x/swingset/types/key.go | 0 .../cosmic-swingset => golang/cosmos}/x/swingset/types/msgs.go | 0 .../cosmic-swingset => golang/cosmos}/x/swingset/types/msgs.pb.go | 0 .../cosmos}/x/swingset/types/query.pb.go | 0 .../cosmos}/x/swingset/types/storage.pb.go | 0 .../cosmic-swingset => golang/cosmos}/x/swingset/types/types.go | 0 71 files changed, 0 insertions(+), 0 deletions(-) rename packages/cosmic-swingset/go.mod => go.mod (100%) rename packages/cosmic-swingset/go.sum => go.sum (100%) rename {packages/cosmic-swingset => golang/cosmos}/Makefile.ledger (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/app.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/config.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/encoding.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/export.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/genesis.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/genesis_account.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/helpers/test_helpers.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/params/amino.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/params/doc.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/params/encoding.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/params/params.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/params/proto.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/params/weights.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/state.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/types.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/utils.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/app/version_check.go (100%) rename {packages/cosmic-swingset/cmd/ag-cosmos-helper => golang/cosmos/cmd/helper}/main.go (100%) rename packages/cosmic-swingset/lib/agcosmosdaemon.go => golang/cosmos/cmd/libdaemon/main.go (100%) rename {packages/cosmic-swingset/lib => golang/cosmos}/daemon/cmd/genaccounts.go (100%) rename {packages/cosmic-swingset/lib => golang/cosmos}/daemon/cmd/root.go (100%) rename {packages/cosmic-swingset/lib => golang/cosmos}/daemon/cmd/testnet.go (100%) rename {packages/cosmic-swingset/lib => golang/cosmos}/daemon/main.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/proto/agoric/dibc/msgs.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/proto/agoric/swingset/genesis.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/proto/agoric/swingset/msgs.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/proto/agoric/swingset/query.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/proto/agoric/swingset/storage.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/third_party/proto/cosmos/base/query/v1beta1/pagination.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/third_party/proto/gogoproto/gogo.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/third_party/proto/google/api/annotations.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/third_party/proto/google/api/http.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/third_party/proto/google/api/httpbody.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/third_party/proto/google/protobuf/any.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/third_party/proto/ibc/core/channel/v1/channel.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/third_party/proto/ibc/core/client/v1/client.proto (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/dibc/alias.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/dibc/handler.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/dibc/ibc.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/dibc/keeper/keeper.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/dibc/module.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/dibc/types/codec.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/dibc/types/expected_keepers.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/dibc/types/key.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/dibc/types/msgs.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/dibc/types/msgs.pb.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/alias.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/blockers.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/client/cli/query.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/client/cli/tx.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/client/rest/query.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/client/rest/rest.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/controller.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/genesis.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/handler.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/keeper/grpc_query.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/keeper/keeper.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/keeper/querier.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/module.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/storage.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/types/codec.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/types/genesis.pb.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/types/key.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/types/msgs.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/types/msgs.pb.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/types/query.pb.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/types/storage.pb.go (100%) rename {packages/cosmic-swingset => golang/cosmos}/x/swingset/types/types.go (100%) diff --git a/packages/cosmic-swingset/go.mod b/go.mod similarity index 100% rename from packages/cosmic-swingset/go.mod rename to go.mod diff --git a/packages/cosmic-swingset/go.sum b/go.sum similarity index 100% rename from packages/cosmic-swingset/go.sum rename to go.sum diff --git a/packages/cosmic-swingset/Makefile.ledger b/golang/cosmos/Makefile.ledger similarity index 100% rename from packages/cosmic-swingset/Makefile.ledger rename to golang/cosmos/Makefile.ledger diff --git a/packages/cosmic-swingset/app/app.go b/golang/cosmos/app/app.go similarity index 100% rename from packages/cosmic-swingset/app/app.go rename to golang/cosmos/app/app.go diff --git a/packages/cosmic-swingset/app/config.go b/golang/cosmos/app/config.go similarity index 100% rename from packages/cosmic-swingset/app/config.go rename to golang/cosmos/app/config.go diff --git a/packages/cosmic-swingset/app/encoding.go b/golang/cosmos/app/encoding.go similarity index 100% rename from packages/cosmic-swingset/app/encoding.go rename to golang/cosmos/app/encoding.go diff --git a/packages/cosmic-swingset/app/export.go b/golang/cosmos/app/export.go similarity index 100% rename from packages/cosmic-swingset/app/export.go rename to golang/cosmos/app/export.go diff --git a/packages/cosmic-swingset/app/genesis.go b/golang/cosmos/app/genesis.go similarity index 100% rename from packages/cosmic-swingset/app/genesis.go rename to golang/cosmos/app/genesis.go diff --git a/packages/cosmic-swingset/app/genesis_account.go b/golang/cosmos/app/genesis_account.go similarity index 100% rename from packages/cosmic-swingset/app/genesis_account.go rename to golang/cosmos/app/genesis_account.go diff --git a/packages/cosmic-swingset/app/helpers/test_helpers.go b/golang/cosmos/app/helpers/test_helpers.go similarity index 100% rename from packages/cosmic-swingset/app/helpers/test_helpers.go rename to golang/cosmos/app/helpers/test_helpers.go diff --git a/packages/cosmic-swingset/app/params/amino.go b/golang/cosmos/app/params/amino.go similarity index 100% rename from packages/cosmic-swingset/app/params/amino.go rename to golang/cosmos/app/params/amino.go diff --git a/packages/cosmic-swingset/app/params/doc.go b/golang/cosmos/app/params/doc.go similarity index 100% rename from packages/cosmic-swingset/app/params/doc.go rename to golang/cosmos/app/params/doc.go diff --git a/packages/cosmic-swingset/app/params/encoding.go b/golang/cosmos/app/params/encoding.go similarity index 100% rename from packages/cosmic-swingset/app/params/encoding.go rename to golang/cosmos/app/params/encoding.go diff --git a/packages/cosmic-swingset/app/params/params.go b/golang/cosmos/app/params/params.go similarity index 100% rename from packages/cosmic-swingset/app/params/params.go rename to golang/cosmos/app/params/params.go diff --git a/packages/cosmic-swingset/app/params/proto.go b/golang/cosmos/app/params/proto.go similarity index 100% rename from packages/cosmic-swingset/app/params/proto.go rename to golang/cosmos/app/params/proto.go diff --git a/packages/cosmic-swingset/app/params/weights.go b/golang/cosmos/app/params/weights.go similarity index 100% rename from packages/cosmic-swingset/app/params/weights.go rename to golang/cosmos/app/params/weights.go diff --git a/packages/cosmic-swingset/app/state.go b/golang/cosmos/app/state.go similarity index 100% rename from packages/cosmic-swingset/app/state.go rename to golang/cosmos/app/state.go diff --git a/packages/cosmic-swingset/app/types.go b/golang/cosmos/app/types.go similarity index 100% rename from packages/cosmic-swingset/app/types.go rename to golang/cosmos/app/types.go diff --git a/packages/cosmic-swingset/app/utils.go b/golang/cosmos/app/utils.go similarity index 100% rename from packages/cosmic-swingset/app/utils.go rename to golang/cosmos/app/utils.go diff --git a/packages/cosmic-swingset/app/version_check.go b/golang/cosmos/app/version_check.go similarity index 100% rename from packages/cosmic-swingset/app/version_check.go rename to golang/cosmos/app/version_check.go diff --git a/packages/cosmic-swingset/cmd/ag-cosmos-helper/main.go b/golang/cosmos/cmd/helper/main.go similarity index 100% rename from packages/cosmic-swingset/cmd/ag-cosmos-helper/main.go rename to golang/cosmos/cmd/helper/main.go diff --git a/packages/cosmic-swingset/lib/agcosmosdaemon.go b/golang/cosmos/cmd/libdaemon/main.go similarity index 100% rename from packages/cosmic-swingset/lib/agcosmosdaemon.go rename to golang/cosmos/cmd/libdaemon/main.go diff --git a/packages/cosmic-swingset/lib/daemon/cmd/genaccounts.go b/golang/cosmos/daemon/cmd/genaccounts.go similarity index 100% rename from packages/cosmic-swingset/lib/daemon/cmd/genaccounts.go rename to golang/cosmos/daemon/cmd/genaccounts.go diff --git a/packages/cosmic-swingset/lib/daemon/cmd/root.go b/golang/cosmos/daemon/cmd/root.go similarity index 100% rename from packages/cosmic-swingset/lib/daemon/cmd/root.go rename to golang/cosmos/daemon/cmd/root.go diff --git a/packages/cosmic-swingset/lib/daemon/cmd/testnet.go b/golang/cosmos/daemon/cmd/testnet.go similarity index 100% rename from packages/cosmic-swingset/lib/daemon/cmd/testnet.go rename to golang/cosmos/daemon/cmd/testnet.go diff --git a/packages/cosmic-swingset/lib/daemon/main.go b/golang/cosmos/daemon/main.go similarity index 100% rename from packages/cosmic-swingset/lib/daemon/main.go rename to golang/cosmos/daemon/main.go diff --git a/packages/cosmic-swingset/proto/agoric/dibc/msgs.proto b/golang/cosmos/proto/agoric/dibc/msgs.proto similarity index 100% rename from packages/cosmic-swingset/proto/agoric/dibc/msgs.proto rename to golang/cosmos/proto/agoric/dibc/msgs.proto diff --git a/packages/cosmic-swingset/proto/agoric/swingset/genesis.proto b/golang/cosmos/proto/agoric/swingset/genesis.proto similarity index 100% rename from packages/cosmic-swingset/proto/agoric/swingset/genesis.proto rename to golang/cosmos/proto/agoric/swingset/genesis.proto diff --git a/packages/cosmic-swingset/proto/agoric/swingset/msgs.proto b/golang/cosmos/proto/agoric/swingset/msgs.proto similarity index 100% rename from packages/cosmic-swingset/proto/agoric/swingset/msgs.proto rename to golang/cosmos/proto/agoric/swingset/msgs.proto diff --git a/packages/cosmic-swingset/proto/agoric/swingset/query.proto b/golang/cosmos/proto/agoric/swingset/query.proto similarity index 100% rename from packages/cosmic-swingset/proto/agoric/swingset/query.proto rename to golang/cosmos/proto/agoric/swingset/query.proto diff --git a/packages/cosmic-swingset/proto/agoric/swingset/storage.proto b/golang/cosmos/proto/agoric/swingset/storage.proto similarity index 100% rename from packages/cosmic-swingset/proto/agoric/swingset/storage.proto rename to golang/cosmos/proto/agoric/swingset/storage.proto diff --git a/packages/cosmic-swingset/third_party/proto/cosmos/base/query/v1beta1/pagination.proto b/golang/cosmos/third_party/proto/cosmos/base/query/v1beta1/pagination.proto similarity index 100% rename from packages/cosmic-swingset/third_party/proto/cosmos/base/query/v1beta1/pagination.proto rename to golang/cosmos/third_party/proto/cosmos/base/query/v1beta1/pagination.proto diff --git a/packages/cosmic-swingset/third_party/proto/gogoproto/gogo.proto b/golang/cosmos/third_party/proto/gogoproto/gogo.proto similarity index 100% rename from packages/cosmic-swingset/third_party/proto/gogoproto/gogo.proto rename to golang/cosmos/third_party/proto/gogoproto/gogo.proto diff --git a/packages/cosmic-swingset/third_party/proto/google/api/annotations.proto b/golang/cosmos/third_party/proto/google/api/annotations.proto similarity index 100% rename from packages/cosmic-swingset/third_party/proto/google/api/annotations.proto rename to golang/cosmos/third_party/proto/google/api/annotations.proto diff --git a/packages/cosmic-swingset/third_party/proto/google/api/http.proto b/golang/cosmos/third_party/proto/google/api/http.proto similarity index 100% rename from packages/cosmic-swingset/third_party/proto/google/api/http.proto rename to golang/cosmos/third_party/proto/google/api/http.proto diff --git a/packages/cosmic-swingset/third_party/proto/google/api/httpbody.proto b/golang/cosmos/third_party/proto/google/api/httpbody.proto similarity index 100% rename from packages/cosmic-swingset/third_party/proto/google/api/httpbody.proto rename to golang/cosmos/third_party/proto/google/api/httpbody.proto diff --git a/packages/cosmic-swingset/third_party/proto/google/protobuf/any.proto b/golang/cosmos/third_party/proto/google/protobuf/any.proto similarity index 100% rename from packages/cosmic-swingset/third_party/proto/google/protobuf/any.proto rename to golang/cosmos/third_party/proto/google/protobuf/any.proto diff --git a/packages/cosmic-swingset/third_party/proto/ibc/core/channel/v1/channel.proto b/golang/cosmos/third_party/proto/ibc/core/channel/v1/channel.proto similarity index 100% rename from packages/cosmic-swingset/third_party/proto/ibc/core/channel/v1/channel.proto rename to golang/cosmos/third_party/proto/ibc/core/channel/v1/channel.proto diff --git a/packages/cosmic-swingset/third_party/proto/ibc/core/client/v1/client.proto b/golang/cosmos/third_party/proto/ibc/core/client/v1/client.proto similarity index 100% rename from packages/cosmic-swingset/third_party/proto/ibc/core/client/v1/client.proto rename to golang/cosmos/third_party/proto/ibc/core/client/v1/client.proto diff --git a/packages/cosmic-swingset/x/dibc/alias.go b/golang/cosmos/x/dibc/alias.go similarity index 100% rename from packages/cosmic-swingset/x/dibc/alias.go rename to golang/cosmos/x/dibc/alias.go diff --git a/packages/cosmic-swingset/x/dibc/handler.go b/golang/cosmos/x/dibc/handler.go similarity index 100% rename from packages/cosmic-swingset/x/dibc/handler.go rename to golang/cosmos/x/dibc/handler.go diff --git a/packages/cosmic-swingset/x/dibc/ibc.go b/golang/cosmos/x/dibc/ibc.go similarity index 100% rename from packages/cosmic-swingset/x/dibc/ibc.go rename to golang/cosmos/x/dibc/ibc.go diff --git a/packages/cosmic-swingset/x/dibc/keeper/keeper.go b/golang/cosmos/x/dibc/keeper/keeper.go similarity index 100% rename from packages/cosmic-swingset/x/dibc/keeper/keeper.go rename to golang/cosmos/x/dibc/keeper/keeper.go diff --git a/packages/cosmic-swingset/x/dibc/module.go b/golang/cosmos/x/dibc/module.go similarity index 100% rename from packages/cosmic-swingset/x/dibc/module.go rename to golang/cosmos/x/dibc/module.go diff --git a/packages/cosmic-swingset/x/dibc/types/codec.go b/golang/cosmos/x/dibc/types/codec.go similarity index 100% rename from packages/cosmic-swingset/x/dibc/types/codec.go rename to golang/cosmos/x/dibc/types/codec.go diff --git a/packages/cosmic-swingset/x/dibc/types/expected_keepers.go b/golang/cosmos/x/dibc/types/expected_keepers.go similarity index 100% rename from packages/cosmic-swingset/x/dibc/types/expected_keepers.go rename to golang/cosmos/x/dibc/types/expected_keepers.go diff --git a/packages/cosmic-swingset/x/dibc/types/key.go b/golang/cosmos/x/dibc/types/key.go similarity index 100% rename from packages/cosmic-swingset/x/dibc/types/key.go rename to golang/cosmos/x/dibc/types/key.go diff --git a/packages/cosmic-swingset/x/dibc/types/msgs.go b/golang/cosmos/x/dibc/types/msgs.go similarity index 100% rename from packages/cosmic-swingset/x/dibc/types/msgs.go rename to golang/cosmos/x/dibc/types/msgs.go diff --git a/packages/cosmic-swingset/x/dibc/types/msgs.pb.go b/golang/cosmos/x/dibc/types/msgs.pb.go similarity index 100% rename from packages/cosmic-swingset/x/dibc/types/msgs.pb.go rename to golang/cosmos/x/dibc/types/msgs.pb.go diff --git a/packages/cosmic-swingset/x/swingset/alias.go b/golang/cosmos/x/swingset/alias.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/alias.go rename to golang/cosmos/x/swingset/alias.go diff --git a/packages/cosmic-swingset/x/swingset/blockers.go b/golang/cosmos/x/swingset/blockers.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/blockers.go rename to golang/cosmos/x/swingset/blockers.go diff --git a/packages/cosmic-swingset/x/swingset/client/cli/query.go b/golang/cosmos/x/swingset/client/cli/query.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/client/cli/query.go rename to golang/cosmos/x/swingset/client/cli/query.go diff --git a/packages/cosmic-swingset/x/swingset/client/cli/tx.go b/golang/cosmos/x/swingset/client/cli/tx.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/client/cli/tx.go rename to golang/cosmos/x/swingset/client/cli/tx.go diff --git a/packages/cosmic-swingset/x/swingset/client/rest/query.go b/golang/cosmos/x/swingset/client/rest/query.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/client/rest/query.go rename to golang/cosmos/x/swingset/client/rest/query.go diff --git a/packages/cosmic-swingset/x/swingset/client/rest/rest.go b/golang/cosmos/x/swingset/client/rest/rest.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/client/rest/rest.go rename to golang/cosmos/x/swingset/client/rest/rest.go diff --git a/packages/cosmic-swingset/x/swingset/controller.go b/golang/cosmos/x/swingset/controller.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/controller.go rename to golang/cosmos/x/swingset/controller.go diff --git a/packages/cosmic-swingset/x/swingset/genesis.go b/golang/cosmos/x/swingset/genesis.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/genesis.go rename to golang/cosmos/x/swingset/genesis.go diff --git a/packages/cosmic-swingset/x/swingset/handler.go b/golang/cosmos/x/swingset/handler.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/handler.go rename to golang/cosmos/x/swingset/handler.go diff --git a/packages/cosmic-swingset/x/swingset/keeper/grpc_query.go b/golang/cosmos/x/swingset/keeper/grpc_query.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/keeper/grpc_query.go rename to golang/cosmos/x/swingset/keeper/grpc_query.go diff --git a/packages/cosmic-swingset/x/swingset/keeper/keeper.go b/golang/cosmos/x/swingset/keeper/keeper.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/keeper/keeper.go rename to golang/cosmos/x/swingset/keeper/keeper.go diff --git a/packages/cosmic-swingset/x/swingset/keeper/querier.go b/golang/cosmos/x/swingset/keeper/querier.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/keeper/querier.go rename to golang/cosmos/x/swingset/keeper/querier.go diff --git a/packages/cosmic-swingset/x/swingset/module.go b/golang/cosmos/x/swingset/module.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/module.go rename to golang/cosmos/x/swingset/module.go diff --git a/packages/cosmic-swingset/x/swingset/storage.go b/golang/cosmos/x/swingset/storage.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/storage.go rename to golang/cosmos/x/swingset/storage.go diff --git a/packages/cosmic-swingset/x/swingset/types/codec.go b/golang/cosmos/x/swingset/types/codec.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/types/codec.go rename to golang/cosmos/x/swingset/types/codec.go diff --git a/packages/cosmic-swingset/x/swingset/types/genesis.pb.go b/golang/cosmos/x/swingset/types/genesis.pb.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/types/genesis.pb.go rename to golang/cosmos/x/swingset/types/genesis.pb.go diff --git a/packages/cosmic-swingset/x/swingset/types/key.go b/golang/cosmos/x/swingset/types/key.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/types/key.go rename to golang/cosmos/x/swingset/types/key.go diff --git a/packages/cosmic-swingset/x/swingset/types/msgs.go b/golang/cosmos/x/swingset/types/msgs.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/types/msgs.go rename to golang/cosmos/x/swingset/types/msgs.go diff --git a/packages/cosmic-swingset/x/swingset/types/msgs.pb.go b/golang/cosmos/x/swingset/types/msgs.pb.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/types/msgs.pb.go rename to golang/cosmos/x/swingset/types/msgs.pb.go diff --git a/packages/cosmic-swingset/x/swingset/types/query.pb.go b/golang/cosmos/x/swingset/types/query.pb.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/types/query.pb.go rename to golang/cosmos/x/swingset/types/query.pb.go diff --git a/packages/cosmic-swingset/x/swingset/types/storage.pb.go b/golang/cosmos/x/swingset/types/storage.pb.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/types/storage.pb.go rename to golang/cosmos/x/swingset/types/storage.pb.go diff --git a/packages/cosmic-swingset/x/swingset/types/types.go b/golang/cosmos/x/swingset/types/types.go similarity index 100% rename from packages/cosmic-swingset/x/swingset/types/types.go rename to golang/cosmos/x/swingset/types/types.go From f9982a39deb4ba1b94b83dc0decf0ce8d9a575e9 Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Thu, 3 Dec 2020 14:34:59 -0600 Subject: [PATCH 2/5] fix: update paths and make rules --- go.mod | 6 +- golang/cosmos/.gitignore | 90 ++++++++++++ golang/cosmos/Makefile | 129 +++++++++++++++++ golang/cosmos/app/app.go | 6 +- golang/cosmos/app/encoding.go | 2 +- golang/cosmos/cmd/helper/main.go | 4 +- golang/cosmos/cmd/libdaemon/main.go | 4 +- golang/cosmos/daemon/cmd/root.go | 4 +- golang/cosmos/daemon/main.go | 2 +- golang/cosmos/proto/agoric/dibc/msgs.proto | 2 +- .../proto/agoric/swingset/genesis.proto | 2 +- .../cosmos/proto/agoric/swingset/msgs.proto | 2 +- .../cosmos/proto/agoric/swingset/query.proto | 2 +- .../proto/agoric/swingset/storage.proto | 2 +- golang/cosmos/x/dibc/alias.go | 4 +- golang/cosmos/x/dibc/handler.go | 2 +- golang/cosmos/x/dibc/ibc.go | 2 +- golang/cosmos/x/dibc/keeper/keeper.go | 2 +- golang/cosmos/x/dibc/module.go | 2 +- golang/cosmos/x/swingset/alias.go | 4 +- golang/cosmos/x/swingset/client/cli/query.go | 2 +- golang/cosmos/x/swingset/client/cli/tx.go | 2 +- golang/cosmos/x/swingset/genesis.go | 2 +- golang/cosmos/x/swingset/handler.go | 4 +- golang/cosmos/x/swingset/keeper/grpc_query.go | 2 +- golang/cosmos/x/swingset/keeper/keeper.go | 2 +- golang/cosmos/x/swingset/keeper/querier.go | 2 +- golang/cosmos/x/swingset/module.go | 8 +- packages/cosmic-swingset/Makefile | 134 +----------------- 29 files changed, 265 insertions(+), 166 deletions(-) create mode 100644 golang/cosmos/.gitignore create mode 100644 golang/cosmos/Makefile diff --git a/go.mod b/go.mod index c73a7637b70..db2dc2b7066 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/Agoric/cosmic-swingset +module github.com/Agoric/agoric-sdk go 1.14 @@ -29,6 +29,6 @@ replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alp // replace github.com/cosmos/cosmos-sdk => github.com/agoric-labs/cosmos-sdk v0.34.4-0.20201011165527-9684bf64c2db // For testing against a local cosmos-sdk or tendermint -// replace github.com/cosmos/cosmos-sdk => ../../../forks/cosmos-sdk +// replace github.com/cosmos/cosmos-sdk => ../forks/cosmos-sdk -// replace github.com/tendermint/tendermint => ../../../forks/tendermint +// replace github.com/tendermint/tendermint => ../forks/tendermint diff --git a/golang/cosmos/.gitignore b/golang/cosmos/.gitignore new file mode 100644 index 00000000000..dd2758ab36e --- /dev/null +++ b/golang/cosmos/.gitignore @@ -0,0 +1,90 @@ +# OS +.DS_Store +*.swp +*.swo +.vscode +.idea + +# Build +vendor +.vendor-new +build + +# IDE +.idea/ +*.iml +node_modules +t[0-9]/ + +ve[0-9]/ +ve[0-9]-client/ +*.egg-info/ +__pycache__/ +chains +solo +solo/ + +# emacs +*~ + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next +lib/git-revision.txt +/binding.gyp +*-stamp diff --git a/golang/cosmos/Makefile b/golang/cosmos/Makefile new file mode 100644 index 00000000000..4c55659ba81 --- /dev/null +++ b/golang/cosmos/Makefile @@ -0,0 +1,129 @@ +NAME := unknown +VERSION := unknown +COMMIT = $(shell git log -1 --format='%H' 2>/dev/null) + +MOD_READONLY = # -mod=readonly + +BIN := $(shell echo $${GOBIN-$${GOPATH-$$HOME/go}/bin}) +LIBDAEMON := $(shell echo $${GOBIN-$${GOPATH-$$HOME/go}/lib})/libdaemon.so + +whitespace := +whitespace += $(whitespace) +comma := , +build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags)) + +# process linker flags +ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=$(NAME) \ + -X github.com/cosmos/cosmos-sdk/version.AppName=ag-cosmos-server \ + -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ + -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ + -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" + +gcflags = + +ifneq ($(GO_DEBUG),) +ldflags += -compressdwarf=false +gcflags += -N -l +endif + + +ldflags_helper = $(ldflags) \ + -X github.com/cosmos/cosmos-sdk/version.AppName=ag-cosmos-helper +BUILD_FLAGS := -tags "$(build_tags)" -gcflags '$(gcflags)' -ldflags '$(ldflags)' +BUILD_FLAGS_HELPER := -tags "$(build_tags)" -gcflags '$(gcflags)' -ldflags '$(ldflags_helper)' + +include Makefile.ledger + +all: ../../go.sum + go install -v $(MOD_READONLY) $(BUILD_FLAGS_HELPER) ./cmd/helper + go build -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=c-shared -o $(LIBDAEMON) ./cmd/libdaemon/main.go + test "`uname -s 2>/dev/null`" != Darwin || install_name_tool -id $(LIBDAEMON) $(LIBDAEMON) + +go-mod-cache: ../../go.sum + @echo "--> Download go modules to local cache" + @go mod download + +../../go.sum: ../../go.mod + @echo "--> Ensure dependencies have not been modified" + GO111MODULE=on go mod verify + +############################################################################### +### Protobuf ### +############################################################################### + +proto-gen: proto-tools + ./scripts/protocgen.sh + +proto-lint: proto-tools + buf check lint --error-format=json + +proto-check-breaking: proto-tools + buf check breaking --against-input '.git#branch=master' + +TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc3/proto/tendermint +GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos +IBC_PROTO_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/master/proto/ibc/core +COSMOS_SDK_PROTO_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/master/proto/cosmos/base + +GOGO_PROTO_TYPES = third_party/proto/gogoproto +IBC_CHANNEL_TYPES = third_party/proto/ibc/core/channel/v1 +IBC_CLIENT_TYPES = third_party/proto/ibc/core/client/v1 +SDK_QUERY_TYPES = third_party/proto/cosmos/base/query/v1beta1 + +proto-update-deps: + mkdir -p $(GOGO_PROTO_TYPES) + curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto + + mkdir -p $(IBC_CHANNEL_TYPES) + curl -sSL $(IBC_PROTO_URL)/channel/v1/channel.proto > $(IBC_CHANNEL_TYPES)/channel.proto + + mkdir -p $(IBC_CLIENT_TYPES) + curl -sSL $(IBC_PROTO_URL)/client/v1/client.proto > $(IBC_CLIENT_TYPES)/client.proto + + mkdir -p $(SDK_QUERY_TYPES) + curl -sSL $(COSMOS_SDK_PROTO_URL)/query/v1beta1/pagination.proto > $(SDK_QUERY_TYPES)/pagination.proto + + +UNAME_S ?= $(shell uname -s) +UNAME_M ?= $(shell uname -m) + +BUF_VERSION ?= 0.11.0 + +PROTOC_VERSION ?= 3.11.2 +ifeq ($(UNAME_S),Linux) + PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-linux-x86_64.zip +endif +ifeq ($(UNAME_S),Darwin) + PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-osx-x86_64.zip +endif + +proto-tools: proto-tools-stamp buf + +proto-tools-stamp: + echo "Installing protoc compiler..." + (cd /tmp; \ + curl -OL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"; \ + unzip -o ${PROTOC_ZIP} -d ${BIN}/.. bin/protoc 'include/*'; \ + rm -f ${PROTOC_ZIP}) + + echo "Installing protoc-gen-gocosmos..." + go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos + + # Create dummy file to satisfy dependency and avoid + # rebuilding when this Makefile target is hit twice + # in a row + touch $@ + +buf: buf-stamp + +buf-stamp: + echo "Installing buf..." + curl -sSL \ + "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-${UNAME_S}-${UNAME_M}" \ + -o "${BIN}/buf" && \ + chmod +x "${BIN}/buf" + + touch $@ + +tools-clean: + rm -f proto-tools-stamp buf-stamp diff --git a/golang/cosmos/app/app.go b/golang/cosmos/app/app.go index 6d3958c4361..248dddf2452 100644 --- a/golang/cosmos/app/app.go +++ b/golang/cosmos/app/app.go @@ -85,9 +85,9 @@ import ( upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - gaiaappparams "github.com/Agoric/cosmic-swingset/app/params" - "github.com/Agoric/cosmic-swingset/x/dibc" - "github.com/Agoric/cosmic-swingset/x/swingset" + gaiaappparams "github.com/Agoric/agoric-sdk/golang/cosmos/app/params" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/dibc" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset" // unnamed import of statik for swagger UI support _ "github.com/cosmos/cosmos-sdk/client/docs/statik" diff --git a/golang/cosmos/app/encoding.go b/golang/cosmos/app/encoding.go index 4afd19d5a8b..254c3d23257 100644 --- a/golang/cosmos/app/encoding.go +++ b/golang/cosmos/app/encoding.go @@ -1,7 +1,7 @@ package app import ( - "github.com/Agoric/cosmic-swingset/app/params" + "github.com/Agoric/agoric-sdk/golang/cosmos/app/params" "github.com/cosmos/cosmos-sdk/std" ) diff --git a/golang/cosmos/cmd/helper/main.go b/golang/cosmos/cmd/helper/main.go index d1f23e37603..2bbb13590fb 100644 --- a/golang/cosmos/cmd/helper/main.go +++ b/golang/cosmos/cmd/helper/main.go @@ -8,8 +8,8 @@ import ( "os" "path/filepath" - "github.com/Agoric/cosmic-swingset/app" - "github.com/Agoric/cosmic-swingset/lib/daemon" + "github.com/Agoric/agoric-sdk/golang/cosmos/app" + "github.com/Agoric/agoric-sdk/golang/cosmos/daemon" ) func main() { diff --git a/golang/cosmos/cmd/libdaemon/main.go b/golang/cosmos/cmd/libdaemon/main.go index 8278133f597..2ca531363ec 100644 --- a/golang/cosmos/cmd/libdaemon/main.go +++ b/golang/cosmos/cmd/libdaemon/main.go @@ -14,8 +14,8 @@ import ( "errors" "os" - "github.com/Agoric/cosmic-swingset/lib/daemon" - swingset "github.com/Agoric/cosmic-swingset/x/swingset" + "github.com/Agoric/agoric-sdk/golang/cosmos/daemon" + swingset "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset" ) type goReturn = struct { diff --git a/golang/cosmos/daemon/cmd/root.go b/golang/cosmos/daemon/cmd/root.go index a366b548c1f..cb0629326e5 100644 --- a/golang/cosmos/daemon/cmd/root.go +++ b/golang/cosmos/daemon/cmd/root.go @@ -31,8 +31,8 @@ import ( "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - gaia "github.com/Agoric/cosmic-swingset/app" - "github.com/Agoric/cosmic-swingset/app/params" + gaia "github.com/Agoric/agoric-sdk/golang/cosmos/app" + "github.com/Agoric/agoric-sdk/golang/cosmos/app/params" ) // Sender is a function that sends a request to the controller. diff --git a/golang/cosmos/daemon/main.go b/golang/cosmos/daemon/main.go index ff16c3e44cd..256cc5cd2c6 100644 --- a/golang/cosmos/daemon/main.go +++ b/golang/cosmos/daemon/main.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/Agoric/cosmic-swingset/lib/daemon/cmd" + "github.com/Agoric/agoric-sdk/golang/cosmos/daemon/cmd" ) const ( diff --git a/golang/cosmos/proto/agoric/dibc/msgs.proto b/golang/cosmos/proto/agoric/dibc/msgs.proto index 8bbd36d5798..9f9d561625c 100644 --- a/golang/cosmos/proto/agoric/dibc/msgs.proto +++ b/golang/cosmos/proto/agoric/dibc/msgs.proto @@ -4,7 +4,7 @@ package agoric.dibc; import "gogoproto/gogo.proto"; import "ibc/core/channel/v1/channel.proto"; -option go_package = "github.com/Agoric/cosmic-swingset/x/dibc/types"; +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/dibc/types"; service Msg { rpc SendPacket(MsgSendPacket) returns (MsgSendPacketResponse); diff --git a/golang/cosmos/proto/agoric/swingset/genesis.proto b/golang/cosmos/proto/agoric/swingset/genesis.proto index af0d6770933..3811b518214 100644 --- a/golang/cosmos/proto/agoric/swingset/genesis.proto +++ b/golang/cosmos/proto/agoric/swingset/genesis.proto @@ -3,7 +3,7 @@ package agoric.swingset; import "gogoproto/gogo.proto"; -option go_package = "github.com/Agoric/cosmic-swingset/x/swingset/types"; +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"; message GenesisState { option (gogoproto.equal) = false; diff --git a/golang/cosmos/proto/agoric/swingset/msgs.proto b/golang/cosmos/proto/agoric/swingset/msgs.proto index 0c2f7a6b68c..9401e251dec 100644 --- a/golang/cosmos/proto/agoric/swingset/msgs.proto +++ b/golang/cosmos/proto/agoric/swingset/msgs.proto @@ -3,7 +3,7 @@ package agoric.swingset; import "gogoproto/gogo.proto"; -option go_package = "github.com/Agoric/cosmic-swingset/x/swingset/types"; +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"; service Msg { rpc DeliverInbound(MsgDeliverInbound) returns (MsgDeliverInboundResponse); diff --git a/golang/cosmos/proto/agoric/swingset/query.proto b/golang/cosmos/proto/agoric/swingset/query.proto index ee06355022e..9e15e16d962 100644 --- a/golang/cosmos/proto/agoric/swingset/query.proto +++ b/golang/cosmos/proto/agoric/swingset/query.proto @@ -6,7 +6,7 @@ import "agoric/swingset/storage.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/Agoric/cosmic-swingset/x/swingset/types"; +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"; // Query provides defines the gRPC querier service service Query { diff --git a/golang/cosmos/proto/agoric/swingset/storage.proto b/golang/cosmos/proto/agoric/swingset/storage.proto index 91d33001190..b672189725b 100644 --- a/golang/cosmos/proto/agoric/swingset/storage.proto +++ b/golang/cosmos/proto/agoric/swingset/storage.proto @@ -3,7 +3,7 @@ package agoric.swingset; import "gogoproto/gogo.proto"; -option go_package = "github.com/Agoric/cosmic-swingset/x/swingset/types"; +option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"; message Storage { option (gogoproto.equal) = false; diff --git a/golang/cosmos/x/dibc/alias.go b/golang/cosmos/x/dibc/alias.go index a2d534d492f..42954a5449f 100644 --- a/golang/cosmos/x/dibc/alias.go +++ b/golang/cosmos/x/dibc/alias.go @@ -1,8 +1,8 @@ package dibc import ( - "github.com/Agoric/cosmic-swingset/x/dibc/keeper" - "github.com/Agoric/cosmic-swingset/x/dibc/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/dibc/keeper" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/dibc/types" ) const ( diff --git a/golang/cosmos/x/dibc/handler.go b/golang/cosmos/x/dibc/handler.go index e168e42d7bd..799f9c955e8 100644 --- a/golang/cosmos/x/dibc/handler.go +++ b/golang/cosmos/x/dibc/handler.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - "github.com/Agoric/cosmic-swingset/x/swingset" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/golang/cosmos/x/dibc/ibc.go b/golang/cosmos/x/dibc/ibc.go index bba7aa7d9aa..1e4e2f18ba6 100644 --- a/golang/cosmos/x/dibc/ibc.go +++ b/golang/cosmos/x/dibc/ibc.go @@ -13,7 +13,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/Agoric/cosmic-swingset/x/swingset" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset" ) type portHandler struct { diff --git a/golang/cosmos/x/dibc/keeper/keeper.go b/golang/cosmos/x/dibc/keeper/keeper.go index 8e38034e150..1380ce156c0 100644 --- a/golang/cosmos/x/dibc/keeper/keeper.go +++ b/golang/cosmos/x/dibc/keeper/keeper.go @@ -14,7 +14,7 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - "github.com/Agoric/cosmic-swingset/x/dibc/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/dibc/types" ) // Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine diff --git a/golang/cosmos/x/dibc/module.go b/golang/cosmos/x/dibc/module.go index 030c2ec676a..09e6d070bba 100644 --- a/golang/cosmos/x/dibc/module.go +++ b/golang/cosmos/x/dibc/module.go @@ -7,7 +7,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/Agoric/cosmic-swingset/x/dibc/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/dibc/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" diff --git a/golang/cosmos/x/swingset/alias.go b/golang/cosmos/x/swingset/alias.go index fef91203465..2e2a9ec27f1 100644 --- a/golang/cosmos/x/swingset/alias.go +++ b/golang/cosmos/x/swingset/alias.go @@ -1,8 +1,8 @@ package swingset import ( - "github.com/Agoric/cosmic-swingset/x/swingset/keeper" - "github.com/Agoric/cosmic-swingset/x/swingset/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/keeper" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types" ) const ( diff --git a/golang/cosmos/x/swingset/client/cli/query.go b/golang/cosmos/x/swingset/client/cli/query.go index 1e5465a016b..17826ed12a1 100644 --- a/golang/cosmos/x/swingset/client/cli/query.go +++ b/golang/cosmos/x/swingset/client/cli/query.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/Agoric/cosmic-swingset/x/swingset/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" diff --git a/golang/cosmos/x/swingset/client/cli/tx.go b/golang/cosmos/x/swingset/client/cli/tx.go index 6c4dd1b95bd..96b65f8b20a 100644 --- a/golang/cosmos/x/swingset/client/cli/tx.go +++ b/golang/cosmos/x/swingset/client/cli/tx.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/Agoric/cosmic-swingset/x/swingset/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/golang/cosmos/x/swingset/genesis.go b/golang/cosmos/x/swingset/genesis.go index 94928fb31ec..4ae6faeb7af 100644 --- a/golang/cosmos/x/swingset/genesis.go +++ b/golang/cosmos/x/swingset/genesis.go @@ -3,7 +3,7 @@ package swingset import ( // "fmt" - "github.com/Agoric/cosmic-swingset/x/swingset/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types" sdk "github.com/cosmos/cosmos-sdk/types" abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/golang/cosmos/x/swingset/handler.go b/golang/cosmos/x/swingset/handler.go index 3f61bef7c02..3bbb1258f20 100644 --- a/golang/cosmos/x/swingset/handler.go +++ b/golang/cosmos/x/swingset/handler.go @@ -6,9 +6,9 @@ import ( "fmt" "strings" - // "github.com/Agoric/cosmic-swingset/x/swingset/types" + // "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types" - "github.com/Agoric/cosmic-swingset/x/swingset/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) diff --git a/golang/cosmos/x/swingset/keeper/grpc_query.go b/golang/cosmos/x/swingset/keeper/grpc_query.go index a7bd2eec483..5fa955bb0fb 100644 --- a/golang/cosmos/x/swingset/keeper/grpc_query.go +++ b/golang/cosmos/x/swingset/keeper/grpc_query.go @@ -7,7 +7,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/Agoric/cosmic-swingset/x/swingset/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/golang/cosmos/x/swingset/keeper/keeper.go b/golang/cosmos/x/swingset/keeper/keeper.go index b3ecd33fc49..2945536abc8 100644 --- a/golang/cosmos/x/swingset/keeper/keeper.go +++ b/golang/cosmos/x/swingset/keeper/keeper.go @@ -14,7 +14,7 @@ import ( authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - "github.com/Agoric/cosmic-swingset/x/swingset/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types" ) // Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine diff --git a/golang/cosmos/x/swingset/keeper/querier.go b/golang/cosmos/x/swingset/keeper/querier.go index 6c2159c2a95..534220e5e09 100644 --- a/golang/cosmos/x/swingset/keeper/querier.go +++ b/golang/cosmos/x/swingset/keeper/querier.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/Agoric/cosmic-swingset/x/swingset/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types" ) // query endpoints supported by the swingset Querier diff --git a/golang/cosmos/x/swingset/module.go b/golang/cosmos/x/swingset/module.go index 54b383865ca..320b0a7c5d0 100644 --- a/golang/cosmos/x/swingset/module.go +++ b/golang/cosmos/x/swingset/module.go @@ -8,10 +8,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/Agoric/cosmic-swingset/x/swingset/client/cli" - "github.com/Agoric/cosmic-swingset/x/swingset/client/rest" - "github.com/Agoric/cosmic-swingset/x/swingset/keeper" - "github.com/Agoric/cosmic-swingset/x/swingset/types" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/client/cli" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/client/rest" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/keeper" + "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/packages/cosmic-swingset/Makefile b/packages/cosmic-swingset/Makefile index 65a4222619b..c9d5fb2ceb5 100644 --- a/packages/cosmic-swingset/Makefile +++ b/packages/cosmic-swingset/Makefile @@ -2,6 +2,8 @@ REPOSITORY = agoric/cosmic-swingset CHAIN_ID = agoric INITIAL_TOKENS = 1000000000000uag +GOSRC = ../../golang/cosmos + # By default, make the fake chain in scenario3 produce # "blocks" as soon as they come in. FAKE_CHAIN_DELAY = 0 @@ -19,36 +21,8 @@ NAME := $(shell sed -ne 's/.*"name": "\([^"]*\)".*/\1/p' package.json) VERSION := $(shell sed -ne 's/.*"version": "\([^"]*\)".*/\1/p' package.json) COMMIT := $(shell git log -1 --format='%H' 2>/dev/null || cat lib/git-revision.txt) -MOD_READONLY = # -mod=readonly - BIN := $(shell echo $${GOBIN-$${GOPATH-$$HOME/go}/bin}) -whitespace := -whitespace += $(whitespace) -comma := , -build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags)) - -# process linker flags -ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=$(NAME) \ - -X github.com/cosmos/cosmos-sdk/version.AppName=ag-cosmos-server \ - -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ - -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ - -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" - -gcflags = - -ifneq ($(GO_DEBUG),) -ldflags += -compressdwarf=false -gcflags += -N -l -endif - - -ldflags_helper = $(ldflags) \ - -X github.com/cosmos/cosmos-sdk/version.AppName=ag-cosmos-helper -BUILD_FLAGS := -tags "$(build_tags)" -gcflags '$(gcflags)' -ldflags '$(ldflags)' -BUILD_FLAGS_HELPER := -tags "$(build_tags)" -gcflags '$(gcflags)' -ldflags '$(ldflags_helper)' - -include Makefile.ledger all: build-cosmos install scenario0-setup: @@ -148,16 +122,11 @@ docker-pull: docker-install: docker-pull install -m 755 docker/* /usr/local/bin/ -compile-go: go.sum - go install -v $(MOD_READONLY) $(BUILD_FLAGS_HELPER) ./cmd/ag-cosmos-helper - go build -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=c-shared -o lib/libagcosmosdaemon.so lib/agcosmosdaemon.go - test "`uname -s 2>/dev/null`" != Darwin || install_name_tool -id `pwd`/lib/libagcosmosdaemon.so lib/libagcosmosdaemon.so +compile-go: + $(MAKE) -C $(GOSRC) all LIBDAEMON=`pwd`/lib/libagcosmosdaemon.so NAME=$(NAME) VERSION=$(VERSION) COMMIT=$(COMMIT) build-cosmos: compile-go node-compile-gyp install -compile-debug: - go install -v $(MOD_READONLY) $(BUILD_FLAGS) ./cmd/ag-cosmos-daemon - # We need this so that node-gyp can be found. node-compile-gyp: if yarn -v >/dev/null 2>&1; then \ @@ -172,17 +141,9 @@ compile-gyp: node-gyp configure build $(GYP_DEBUG) || { status=$$?; rm -f binding.gyp; exit $$status; } rm -f binding.gyp -install: go.sum - mkdir -p "${BIN}" - ln -sf "$$PWD/bin/ag-chain-cosmos" "$$PWD/bin/ag-nchainz" "${BIN}/" - -go-mod-cache: go.sum - @echo "--> Download go modules to local cache" - @go mod download - -go.sum: go.mod - @echo "--> Ensure dependencies have not been modified" - GO111MODULE=on go mod verify +install: + mkdir -p "$(BIN)" + ln -sf "$$PWD/bin/ag-chain-cosmos" "$$PWD/bin/ag-nchainz" "$(BIN)/" start-ag-solo: rm -rf t1 @@ -200,84 +161,3 @@ set-local-gci-ingress: (cd $$dir && \ ../../bin/ag-solo set-gci-ingress --chainID=$(CHAIN_ID) $$gci $$rpcport); \ done - -############################################################################### -### Protobuf ### -############################################################################### - -proto-gen: proto-tools - ./scripts/protocgen.sh - -proto-lint: proto-tools - buf check lint --error-format=json - -proto-check-breaking: proto-tools - buf check breaking --against-input '.git#branch=master' - -TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc3/proto/tendermint -GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos -IBC_PROTO_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/master/proto/ibc/core -COSMOS_SDK_PROTO_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/master/proto/cosmos/base - -GOGO_PROTO_TYPES = third_party/proto/gogoproto -IBC_CHANNEL_TYPES = third_party/proto/ibc/core/channel/v1 -IBC_CLIENT_TYPES = third_party/proto/ibc/core/client/v1 -SDK_QUERY_TYPES = third_party/proto/cosmos/base/query/v1beta1 - -proto-update-deps: - mkdir -p $(GOGO_PROTO_TYPES) - curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto - - mkdir -p $(IBC_CHANNEL_TYPES) - curl -sSL $(IBC_PROTO_URL)/channel/v1/channel.proto > $(IBC_CHANNEL_TYPES)/channel.proto - - mkdir -p $(IBC_CLIENT_TYPES) - curl -sSL $(IBC_PROTO_URL)/client/v1/client.proto > $(IBC_CLIENT_TYPES)/client.proto - - mkdir -p $(SDK_QUERY_TYPES) - curl -sSL $(COSMOS_SDK_PROTO_URL)/query/v1beta1/pagination.proto > $(SDK_QUERY_TYPES)/pagination.proto - - -UNAME_S ?= $(shell uname -s) -UNAME_M ?= $(shell uname -m) - -BUF_VERSION ?= 0.11.0 - -PROTOC_VERSION ?= 3.11.2 -ifeq ($(UNAME_S),Linux) - PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-linux-x86_64.zip -endif -ifeq ($(UNAME_S),Darwin) - PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-osx-x86_64.zip -endif - -proto-tools: proto-tools-stamp buf - -proto-tools-stamp: - echo "Installing protoc compiler..." - (cd /tmp; \ - curl -OL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"; \ - unzip -o ${PROTOC_ZIP} -d ${BIN}/.. bin/protoc 'include/*'; \ - rm -f ${PROTOC_ZIP}) - - echo "Installing protoc-gen-gocosmos..." - go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos - - # Create dummy file to satisfy dependency and avoid - # rebuilding when this Makefile target is hit twice - # in a row - touch $@ - -buf: buf-stamp - -buf-stamp: - echo "Installing buf..." - curl -sSL \ - "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-${UNAME_S}-${UNAME_M}" \ - -o "${BIN}/buf" && \ - chmod +x "${BIN}/buf" - - touch $@ - -tools-clean: - rm -f proto-tools-stamp buf-stamp From 3191216a672a072262b4d96bb3ebe48277f3bf2a Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Thu, 3 Dec 2020 22:55:17 -0600 Subject: [PATCH 3/5] chore: rename more files --- {packages/cosmic-swingset => golang/cosmos}/binding.gyp.in | 4 ++-- .../cosmic-swingset => golang/cosmos}/scripts/protocgen.sh | 2 +- .../lib => golang/cosmos/src}/agcosmosdaemon-node.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename {packages/cosmic-swingset => golang/cosmos}/binding.gyp.in (87%) rename {packages/cosmic-swingset => golang/cosmos}/scripts/protocgen.sh (89%) rename {packages/cosmic-swingset/lib => golang/cosmos/src}/agcosmosdaemon-node.cc (99%) diff --git a/packages/cosmic-swingset/binding.gyp.in b/golang/cosmos/binding.gyp.in similarity index 87% rename from packages/cosmic-swingset/binding.gyp.in rename to golang/cosmos/binding.gyp.in index 4437f5a771e..2c08dd5b535 100644 --- a/packages/cosmic-swingset/binding.gyp.in +++ b/golang/cosmos/binding.gyp.in @@ -12,13 +12,13 @@ "msvs_settings": { "VCCLCompilerTool": { "ExceptionHandling": 1 }, }, - "sources": [ "lib/agcosmosdaemon-node.cc" ], + "sources": [ "src/agcosmosdaemon-node.cc" ], "include_dirs": [ " #include #include -#include "libagcosmosdaemon.h" +#include "../build/libagcosmosdaemon.h" namespace ss { From 7c7379db95f9b09151ad17533c9fa0c5c864c54c Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Thu, 3 Dec 2020 23:03:46 -0600 Subject: [PATCH 4/5] fix: update Docker build steps --- .github/workflows/docker.yml | 21 +---- go.sum | 5 ++ golang/cosmos/.gitignore | 1 + golang/cosmos/Makefile | 41 +++++++--- golang/cosmos/package.json | 58 ++++++++++++++ golang/cosmos/src/index.js | 1 + .../proto/ibc/core/client/v1/client.proto | 16 ++-- golang/cosmos/x/dibc/types/msgs.pb.go | 47 +++++------ golang/cosmos/x/swingset/types/genesis.pb.go | 14 ++-- golang/cosmos/x/swingset/types/msgs.pb.go | 66 ++++++++-------- golang/cosmos/x/swingset/types/query.pb.go | 79 ++++++++++--------- golang/cosmos/x/swingset/types/storage.pb.go | 50 ++++++------ package.json | 1 + packages/cosmic-swingset/Dockerfile | 17 ---- packages/cosmic-swingset/Makefile | 30 +++---- .../cosmic-swingset/docker/ag-cosmos-helper | 36 +-------- .../cosmic-swingset/lib/chain-entrypoint.js | 2 +- packages/cosmic-swingset/package.json | 6 +- packages/deployment/Dockerfile.sdk | 24 ++++-- packages/deployment/Makefile | 13 ++- 20 files changed, 275 insertions(+), 253 deletions(-) create mode 100644 golang/cosmos/package.json create mode 100644 golang/cosmos/src/index.js delete mode 100644 packages/cosmic-swingset/Dockerfile diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 197692d9e5a..21382ea2e20 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,30 +6,13 @@ on: - "@agoric/sdk@*" jobs: - docker-godeps: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Save Git revision - run: git log -1 --format='%H' > packages/cosmic-swingset/lib/git-revision.txt - - name: Build Go dependencies image - uses: elgohr/Publish-Docker-Github-Action@master - with: - name: agoric/cosmic-swingset - dockerfile: packages/cosmic-swingset/Dockerfile - context: packages/cosmic-swingset - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - snapshot: true - tags: latest - docker-sdk: - needs: docker-godeps runs-on: ubuntu-latest steps: - uses: actions/checkout@master + - name: Save Git revision + run: git rev-parse HEAD > packages/cosmic-swingset/lib/git-revision.txt - name: Build SDK image - # needs agoric/cosmic-swingset:latest uses: elgohr/Publish-Docker-Github-Action@master with: name: agoric/agoric-sdk diff --git a/go.sum b/go.sum index 96582c14793..24d4a626771 100644 --- a/go.sum +++ b/go.sum @@ -237,6 +237,7 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4er github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= @@ -268,6 +269,7 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -492,6 +494,7 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -617,6 +620,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= @@ -936,6 +940,7 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= diff --git a/golang/cosmos/.gitignore b/golang/cosmos/.gitignore index dd2758ab36e..cdef6c15c64 100644 --- a/golang/cosmos/.gitignore +++ b/golang/cosmos/.gitignore @@ -88,3 +88,4 @@ typings/ lib/git-revision.txt /binding.gyp *-stamp +build/ diff --git a/golang/cosmos/Makefile b/golang/cosmos/Makefile index 4c55659ba81..4f49947a006 100644 --- a/golang/cosmos/Makefile +++ b/golang/cosmos/Makefile @@ -1,11 +1,12 @@ -NAME := unknown -VERSION := unknown -COMMIT = $(shell git log -1 --format='%H' 2>/dev/null) +NAME := $(shell sed -ne 's/.*"name": "\([^"]*\)".*/\1/p' package.json) +VERSION := $(shell sed -ne 's/.*"version": "\([^"]*\)".*/\1/p' package.json) +COMMIT = $(shell hash=`git rev-parse --short HEAD 2>/dev/null`; if test -n "$$hash"; then echo $$hash`git diff --quiet || echo -dirty`; else cat git-revision.txt; fi) + +default: all MOD_READONLY = # -mod=readonly BIN := $(shell echo $${GOBIN-$${GOPATH-$$HOME/go}/bin}) -LIBDAEMON := $(shell echo $${GOBIN-$${GOPATH-$$HOME/go}/lib})/libdaemon.so whitespace := whitespace += $(whitespace) @@ -26,7 +27,6 @@ ldflags += -compressdwarf=false gcflags += -N -l endif - ldflags_helper = $(ldflags) \ -X github.com/cosmos/cosmos-sdk/version.AppName=ag-cosmos-helper BUILD_FLAGS := -tags "$(build_tags)" -gcflags '$(gcflags)' -ldflags '$(ldflags)' @@ -34,10 +34,33 @@ BUILD_FLAGS_HELPER := -tags "$(build_tags)" -gcflags '$(gcflags)' -ldflags '$(l include Makefile.ledger -all: ../../go.sum - go install -v $(MOD_READONLY) $(BUILD_FLAGS_HELPER) ./cmd/helper - go build -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=c-shared -o $(LIBDAEMON) ./cmd/libdaemon/main.go - test "`uname -s 2>/dev/null`" != Darwin || install_name_tool -id $(LIBDAEMON) $(LIBDAEMON) +all: compile-helper compile-daemon +compile-go: compile-helper compile-libdaemon +compile-node: node-compile-gyp + + +compile-daemon: compile-libdaemon node-compile-gyp + +# We need this so that node-gyp can be found. +node-compile-gyp: + if yarn -v >/dev/null 2>&1; then \ + yarn build:gyp; \ + else \ + npm run build:gyp; \ + fi + +# Only run from the package.json build:gyp script. +compile-gyp: + cp binding.gyp.in binding.gyp + node-gyp configure build $(GYP_DEBUG) || { status=$$?; rm -f binding.gyp; exit $$status; } + rm -f binding.gyp + +compile-helper: ../../go.sum + go build -v $(MOD_READONLY) $(BUILD_FLAGS_HELPER) -o build/ag-cosmos-helper ./cmd/helper + +compile-libdaemon: ../../go.sum + go build -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=c-shared -o build/libagcosmosdaemon.so ./cmd/libdaemon/main.go + test "`uname -s 2>/dev/null`" != Darwin || install_name_tool -id $$PWD/build/libagcosmosdaemon.so build/libagcosmosdaemon.so go-mod-cache: ../../go.sum @echo "--> Download go modules to local cache" diff --git a/golang/cosmos/package.json b/golang/cosmos/package.json new file mode 100644 index 00000000000..3eae014d1b2 --- /dev/null +++ b/golang/cosmos/package.json @@ -0,0 +1,58 @@ +{ + "name": "@agoric/cosmos", + "version": "0.23.0", + "description": "Connect JS to the Cosmos blockchain SDK", + "private": true, + "parsers": { + "js": "mjs" + }, + "main": "src/index.js", + "module": "src/index.js", + "engines": { + "node": ">=10.15.1" + }, + "scripts": { + "test": "exit 0", + "build:gyp": "make compile-gyp", + "build:gyp-debug": "make compile-gyp GYP_DEBUG=--debug", + "test:nyc": "nyc ava", + "build": "exit 0", + "lint-fix": "eslint --fix '**/*.js'", + "lint-check": "eslint '**/*.js'" + }, + "dependencies": { + "bindings": "^1.2.1" + }, + "devDependencies": { + "esm": "^3.2.5", + "napi-thread-safe-callback": "0.0.6", + "node-addon-api": "^1.7.1" + }, + "author": "Agoric", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/Agoric/agoric-sdk/issues" + }, + "homepage": "https://github.com/Agoric/agoric-sdk/packages/connector-cosmos", + "eslintConfig": { + "extends": [ + "@agoric" + ] + }, + "prettier": { + "trailingComma": "all", + "singleQuote": true + }, + "publishConfig": { + "access": "public" + }, + "ava": { + "files": [ + "test/**/test-*.js" + ], + "require": [ + "esm" + ], + "timeout": "2m" + } +} diff --git a/golang/cosmos/src/index.js b/golang/cosmos/src/index.js new file mode 100644 index 00000000000..008478e7e72 --- /dev/null +++ b/golang/cosmos/src/index.js @@ -0,0 +1 @@ +module.exports = require('bindings')('agcosmosdaemon.node'); diff --git a/golang/cosmos/third_party/proto/ibc/core/client/v1/client.proto b/golang/cosmos/third_party/proto/ibc/core/client/v1/client.proto index a5d2b0f19e7..11d2195aaf6 100644 --- a/golang/cosmos/third_party/proto/ibc/core/client/v1/client.proto +++ b/golang/cosmos/third_party/proto/ibc/core/client/v1/client.proto @@ -52,19 +52,19 @@ message ClientUpdateProposal { // that can be compared against another Height for the purposes of updating and // freezing clients // -// Normally the VersionHeight is incremented at each height while keeping version -// number the same However some consensus algorithms may choose to reset the +// Normally the RevisionHeight is incremented at each height while keeping RevisionNumber +// the same. However some consensus algorithms may choose to reset the // height in certain conditions e.g. hard forks, state-machine breaking changes -// In these cases, the version number is incremented so that height continues to -// be monitonically increasing even as the VersionHeight gets reset +// In these cases, the RevisionNumber is incremented so that height continues to +// be monitonically increasing even as the RevisionHeight gets reset message Height { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - // the version that the client is currently on - uint64 version_number = 1 [(gogoproto.moretags) = "yaml:\"version_number\""]; - // the height within the given version - uint64 version_height = 2 [(gogoproto.moretags) = "yaml:\"version_height\""]; + // the revision that the client is currently on + uint64 revision_number = 1 [(gogoproto.moretags) = "yaml:\"revision_number\""]; + // the height within the given revision + uint64 revision_height = 2 [(gogoproto.moretags) = "yaml:\"revision_height\""]; } // Params defines the set of IBC light client parameters. diff --git a/golang/cosmos/x/dibc/types/msgs.pb.go b/golang/cosmos/x/dibc/types/msgs.pb.go index 7d845ffea31..ee17e8a7da1 100644 --- a/golang/cosmos/x/dibc/types/msgs.pb.go +++ b/golang/cosmos/x/dibc/types/msgs.pb.go @@ -127,29 +127,30 @@ func init() { func init() { proto.RegisterFile("agoric/dibc/msgs.proto", fileDescriptor_468315585ca8bc1d) } var fileDescriptor_468315585ca8bc1d = []byte{ - // 352 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x51, 0xbf, 0x6e, 0xfa, 0x30, - 0x18, 0x4c, 0x7e, 0xbf, 0x0a, 0xa9, 0xa6, 0x48, 0x55, 0xd4, 0x3f, 0x28, 0x95, 0x62, 0x9a, 0x89, - 0x05, 0x5b, 0xd0, 0x8d, 0x0d, 0xa6, 0x0e, 0x45, 0xaa, 0x42, 0xa7, 0x6e, 0x89, 0x63, 0x99, 0x14, - 0x12, 0x47, 0xf9, 0x02, 0x2d, 0x6f, 0xd1, 0x47, 0xe8, 0xe3, 0x30, 0xb2, 0xb5, 0x53, 0x54, 0xc1, - 0x52, 0x31, 0x32, 0x76, 0xaa, 0x12, 0x87, 0x0a, 0x86, 0x4e, 0x3e, 0xdf, 0x77, 0xf7, 0x59, 0xe7, - 0x43, 0x17, 0xae, 0x90, 0x49, 0xc0, 0xa8, 0x1f, 0x78, 0x8c, 0x86, 0x20, 0x80, 0xc4, 0x89, 0x4c, - 0xa5, 0x51, 0x55, 0x3c, 0xc9, 0x79, 0xf3, 0x4c, 0x48, 0x21, 0x0b, 0x9e, 0xe6, 0x48, 0x49, 0xcc, - 0xeb, 0xdc, 0xc2, 0x64, 0xc2, 0x29, 0x1b, 0xb9, 0x51, 0xc4, 0x27, 0x74, 0xd6, 0xde, 0x41, 0x25, - 0xb1, 0xdf, 0x75, 0x54, 0x1b, 0x80, 0x18, 0xf2, 0xc8, 0xbf, 0x77, 0xd9, 0x98, 0xa7, 0xc6, 0x03, - 0xaa, 0xc4, 0x05, 0xaa, 0xeb, 0x0d, 0xbd, 0x59, 0xed, 0x5c, 0x91, 0xc0, 0x63, 0x24, 0xdf, 0x42, - 0x76, 0xd6, 0x59, 0x9b,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0xa3, 0xf8, 0x01, 0x00, 0x00, + // 354 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xbf, 0x6e, 0xea, 0x30, + 0x14, 0xc6, 0x93, 0x7b, 0xaf, 0x90, 0xae, 0xb9, 0x48, 0x57, 0x51, 0xff, 0xa0, 0x54, 0x8a, 0x69, + 0x26, 0x16, 0x6c, 0x41, 0x87, 0x4a, 0x6c, 0x30, 0x17, 0xa9, 0x0d, 0x9d, 0xba, 0x25, 0x8e, 0x65, + 0x52, 0x48, 0x1c, 0xe5, 0x04, 0x54, 0xde, 0xa2, 0x8f, 0xd0, 0xc7, 0x61, 0x64, 0x6b, 0xa7, 0xa8, + 0x82, 0xa5, 0x62, 0x64, 0xec, 0x54, 0x25, 0x4e, 0x2a, 0x18, 0x3a, 0xf9, 0xf8, 0x3b, 0xe7, 0x3b, + 0xd6, 0xcf, 0x1f, 0x3a, 0x73, 0x85, 0x4c, 0x02, 0x46, 0xfd, 0xc0, 0x63, 0x34, 0x04, 0x01, 0x24, + 0x4e, 0x64, 0x2a, 0x8d, 0xba, 0xd2, 0x49, 0xae, 0x9b, 0x27, 0x42, 0x0a, 0x59, 0xe8, 0x34, 0xaf, + 0xd4, 0x88, 0x79, 0x99, 0x5b, 0x98, 0x4c, 0x38, 0x65, 0x13, 0x37, 0x8a, 0xf8, 0x8c, 0x2e, 0xba, + 0x55, 0xa9, 0x46, 0xec, 0x57, 0x1d, 0x35, 0x46, 0x20, 0xc6, 0x3c, 0xf2, 0x6f, 0x5d, 0x36, 0xe5, + 0xa9, 0x71, 0x8f, 0x6a, 0x71, 0x51, 0x35, 0xf5, 0x96, 0xde, 0xae, 0xf7, 0x2e, 0x48, 0xe0, 0x31, + 0x92, 0x6f, 0x21, 0x95, 0x75, 0xd1, 0x25, 0x6a, 0x78, 0x88, 0x57, 0x19, 0xd6, 0x76, 0x19, 0x2e, + 0x2d, 0xfb, 0x0c, 0x37, 0x96, 0x6e, 0x38, 0xeb, 0xdb, 0xea, 0x6e, 0x3b, 0x65, 0xc3, 0x78, 0x44, + 0x35, 0xe0, 0x91, 0xcf, 0x93, 0xe6, 0xaf, 0x96, 0xde, 0xfe, 0x37, 0x74, 0x76, 0x19, 0xfe, 0x0b, + 0x73, 0x2f, 0x0c, 0xd2, 0x94, 0x27, 0xfb, 0x0c, 0xff, 0x57, 0xbe, 0x6f, 0xc9, 0xfe, 0xcc, 0x70, + 0x47, 0x04, 0xe9, 0x64, 0xee, 0x11, 0x26, 0x43, 0xca, 0x24, 0x84, 0x12, 0xca, 0xa3, 0x03, 0xfe, + 0x94, 0xa6, 0xcb, 0x98, 0x03, 0x19, 0x30, 0x36, 0xf0, 0xfd, 0x84, 0x03, 0x38, 0xe5, 0x0b, 0xfd, + 0x3f, 0x1f, 0x2f, 0x58, 0xb3, 0xcf, 0xd1, 0xe9, 0x11, 0x98, 0xc3, 0x21, 0x96, 0x11, 0xf0, 0xde, + 0x18, 0xfd, 0x1e, 0x81, 0x30, 0x6e, 0x10, 0x3a, 0xa0, 0x36, 0xc9, 0xc1, 0x77, 0x92, 0x23, 0xa3, + 0x69, 0xff, 0xdc, 0xab, 0x96, 0x0e, 0xef, 0x56, 0x1b, 0x4b, 0x5f, 0x6f, 0x2c, 0xfd, 0x7d, 0x63, + 0xe9, 0xcf, 0x5b, 0x4b, 0x5b, 0x6f, 0x2d, 0xed, 0x6d, 0x6b, 0x69, 0x0f, 0xd7, 0x07, 0x10, 0x03, + 0x15, 0xa5, 0x5a, 0x57, 0x40, 0x08, 0x39, 0x73, 0x23, 0x51, 0xd1, 0x3d, 0xa9, 0x94, 0x0b, 0x32, + 0xaf, 0x56, 0x24, 0x74, 0xf5, 0x15, 0x00, 0x00, 0xff, 0xff, 0x7a, 0xce, 0xaf, 0x2f, 0x01, 0x02, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/golang/cosmos/x/swingset/types/genesis.pb.go b/golang/cosmos/x/swingset/types/genesis.pb.go index e9bcb8c535f..063e7a01f29 100644 --- a/golang/cosmos/x/swingset/types/genesis.pb.go +++ b/golang/cosmos/x/swingset/types/genesis.pb.go @@ -75,7 +75,7 @@ func init() { func init() { proto.RegisterFile("agoric/swingset/genesis.proto", fileDescriptor_49b057311de9d296) } var fileDescriptor_49b057311de9d296 = []byte{ - // 259 bytes of a gzipped FileDescriptorProto + // 271 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0x4c, 0xcf, 0x2f, 0xca, 0x4c, 0xd6, 0x2f, 0x2e, 0xcf, 0xcc, 0x4b, 0x2f, 0x4e, 0x2d, 0xd1, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0x48, 0xeb, 0xc1, 0xa4, @@ -87,12 +87,12 @@ var fileDescriptor_49b057311de9d296 = []byte{ 0x29, 0x08, 0x26, 0x25, 0x65, 0xc5, 0xc5, 0x83, 0xac, 0x4f, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x52, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc4, 0x14, 0x12, 0xe1, 0x62, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0x95, 0x60, 0x02, 0x8b, 0x41, 0x38, 0x56, 0x4c, 0x16, 0x8c, 0x56, 0x2c, 0x2f, 0x16, - 0xc8, 0x33, 0x38, 0xf9, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, - 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x51, - 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0xbe, 0x23, 0x24, 0x88, 0x92, 0xf3, - 0x8b, 0x73, 0x33, 0x93, 0x75, 0xe1, 0x21, 0x55, 0x81, 0x08, 0xb4, 0x92, 0xca, 0x82, 0xd4, 0xe2, - 0x24, 0x36, 0x70, 0x60, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xeb, 0xba, 0x72, 0xfe, 0x54, - 0x01, 0x00, 0x00, + 0xc8, 0x33, 0x38, 0x85, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, + 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x75, + 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0xbe, 0x23, 0x24, 0x88, 0x20, 0x1e, + 0xd0, 0x2d, 0x4e, 0xc9, 0xd6, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x4f, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0xaf, 0x40, 0x84, 0x5e, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x54, + 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0x20, 0xf8, 0x8d, 0x5d, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/golang/cosmos/x/swingset/types/msgs.pb.go b/golang/cosmos/x/swingset/types/msgs.pb.go index 7bb1b155780..620ad6d481f 100644 --- a/golang/cosmos/x/swingset/types/msgs.pb.go +++ b/golang/cosmos/x/swingset/types/msgs.pb.go @@ -249,40 +249,40 @@ func init() { func init() { proto.RegisterFile("agoric/swingset/msgs.proto", fileDescriptor_788baa062b181a57) } var fileDescriptor_788baa062b181a57 = []byte{ - // 518 bytes of a gzipped FileDescriptorProto + // 522 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x94, 0x31, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0xe3, 0xd8, 0x02, 0x72, 0xad, 0x5a, 0x6a, 0x15, 0x30, 0x41, 0xf8, 0xac, 0x93, 0x10, - 0x11, 0x28, 0xb6, 0x28, 0x5b, 0x99, 0x62, 0x21, 0x24, 0x24, 0x82, 0x8a, 0x47, 0x16, 0x70, 0x9c, - 0xe3, 0x6a, 0x25, 0xf6, 0x59, 0x7e, 0x4e, 0x4b, 0x47, 0xbe, 0x01, 0x9f, 0x00, 0xf1, 0x39, 0xf8, - 0x04, 0x8c, 0x1d, 0x99, 0x4e, 0x28, 0x59, 0x90, 0x47, 0x8f, 0x4c, 0xc8, 0x76, 0xcf, 0x8e, 0x1a, - 0x04, 0x12, 0x0b, 0x53, 0xf2, 0x7e, 0xff, 0x77, 0xef, 0x7c, 0xff, 0x77, 0xef, 0x50, 0xdf, 0x67, - 0x3c, 0x0d, 0x03, 0x07, 0x4e, 0xc3, 0x98, 0x01, 0xcd, 0x9c, 0x08, 0x18, 0xd8, 0x49, 0xca, 0x33, - 0xae, 0xef, 0xd6, 0x9a, 0x2d, 0xb5, 0xfe, 0x3e, 0xe3, 0x8c, 0x57, 0x9a, 0x53, 0xfe, 0xab, 0xd3, - 0xc8, 0xa7, 0x2e, 0xda, 0x1b, 0x03, 0x7b, 0x4a, 0xe7, 0xe1, 0x09, 0x4d, 0x9f, 0xc7, 0x13, 0xbe, - 0x88, 0xa7, 0xfa, 0x13, 0x74, 0x2d, 0xa2, 0x00, 0x3e, 0xa3, 0x60, 0x28, 0x96, 0x3a, 0xe8, 0xb9, - 0x38, 0x17, 0xb8, 0x61, 0x85, 0xc0, 0xbb, 0x67, 0x7e, 0x34, 0x3f, 0x24, 0x92, 0x10, 0xaf, 0x11, - 0xf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24, 0x86, 0xa0, 0x62, 0x89, 0x85, 0x05, 0x1c, + 0xe7, 0xb8, 0x5a, 0x89, 0x7d, 0x96, 0x9f, 0xd3, 0xd2, 0x91, 0x6f, 0xc0, 0x27, 0x40, 0x7c, 0x0e, + 0x3e, 0x01, 0x63, 0x47, 0xa6, 0x13, 0x4a, 0x16, 0xe4, 0xd1, 0x23, 0x13, 0xb2, 0xaf, 0x67, 0x47, + 0x2d, 0x02, 0x89, 0x85, 0xc9, 0x7e, 0xbf, 0xff, 0xbb, 0x77, 0xbe, 0xff, 0xbb, 0x67, 0x34, 0x08, + 0x18, 0xcf, 0xa2, 0xd0, 0x85, 0x93, 0x28, 0x61, 0x40, 0x73, 0x37, 0x06, 0x06, 0x4e, 0x9a, 0xf1, + 0x9c, 0x1b, 0xdb, 0x52, 0x73, 0x94, 0x36, 0xd8, 0x65, 0x9c, 0xf1, 0x5a, 0x73, 0xab, 0x37, 0x99, + 0x46, 0x3e, 0x75, 0xd1, 0xce, 0x18, 0xd8, 0x53, 0x3a, 0x8f, 0x8e, 0x69, 0xf6, 0x3c, 0x99, 0xf0, + 0x45, 0x32, 0x35, 0x0e, 0xd0, 0xb5, 0x98, 0x02, 0x04, 0x8c, 0x82, 0xa9, 0xd9, 0xfa, 0xb0, 0xef, + 0xe1, 0x42, 0xe0, 0x86, 0x95, 0x02, 0x6f, 0x9f, 0x06, 0xf1, 0x7c, 0x9f, 0x28, 0x42, 0xfc, 0x46, + 0x34, 0x1e, 0xa2, 0x5e, 0xb2, 0x88, 0xc1, 0xec, 0xda, 0xfa, 0xb0, 0xe7, 0xdd, 0x2a, 0x04, 0xae, + 0xe3, 0x52, 0xe0, 0x0d, 0xb9, 0xa8, 0x8a, 0x88, 0x5f, 0x43, 0xe3, 0x3e, 0xd2, 0x83, 0x70, 0x66, + 0xea, 0xb6, 0x36, 0xec, 0x79, 0x37, 0x0a, 0x81, 0xab, 0xb0, 0x14, 0x18, 0xc9, 0xd4, 0x20, 0x9c, + 0x11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x89, 0x76, 0xd7, 0x5b, 0xa0, 0x7a, 0xf3, 0xf8, 0x8b, + 0x86, 0xf4, 0x31, 0x30, 0xe3, 0x2d, 0xda, 0xba, 0x70, 0xbb, 0x89, 0x73, 0x61, 0x36, 0x9c, 0x4b, + 0x1d, 0x1e, 0x3c, 0xf8, 0x7b, 0x8e, 0xda, 0xc9, 0x78, 0x89, 0xfa, 0xed, 0x0d, 0xb8, 0xfb, 0xbb, + 0x85, 0x8d, 0x3c, 0xb8, 0xf7, 0x47, 0x59, 0x95, 0xf4, 0x5e, 0x7d, 0x5d, 0x5a, 0xda, 0xd9, 0xd2, + 0xd2, 0xbe, 0x2f, 0x2d, 0xed, 0xe3, 0xca, 0xea, 0x9c, 0xad, 0xac, 0xce, 0xb7, 0x95, 0xd5, 0x79, + 0x7d, 0xb0, 0x66, 0xd7, 0x48, 0x8e, 0xbf, 0xac, 0x58, 0xdb, 0xc5, 0xf8, 0x3c, 0x48, 0x98, 0xf2, + 0xf1, 0x7d, 0xfb, 0x67, 0xa8, 0x7d, 0x9c, 0x5c, 0xa9, 0x87, 0xfe, 0xc9, 0xaf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xaf, 0x8a, 0xd8, 0x23, 0x39, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/golang/cosmos/x/swingset/types/query.pb.go b/golang/cosmos/x/swingset/types/query.pb.go index 8aebb9fca43..db578c77ce8 100644 --- a/golang/cosmos/x/swingset/types/query.pb.go +++ b/golang/cosmos/x/swingset/types/query.pb.go @@ -324,45 +324,46 @@ func init() { func init() { proto.RegisterFile("agoric/swingset/query.proto", fileDescriptor_76266f656a1a9971) } var fileDescriptor_76266f656a1a9971 = []byte{ - // 605 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xbf, 0x6f, 0x13, 0x3f, - 0x18, 0xc6, 0xeb, 0x7e, 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x12, 0xd7, 0x45, 0xd9, 0x2a, 0xea, 0x38, - 0xfa, 0x6e, 0xf1, 0xa7, 0xf0, 0xe1, 0xc8, 0xc3, 0x5c, 0x1f, 0xb5, 0x65, 0x73, 0x3b, 0xde, 0xf9, - 0x11, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xcd, 0x38, 0x16, 0xcc, 0x05, 0x00, 0x00, + // 610 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x3f, 0x6f, 0x13, 0x31, + 0x18, 0xc6, 0xe3, 0x92, 0xb6, 0xaa, 0x5b, 0x09, 0xc9, 0x54, 0x4a, 0x08, 0x70, 0x89, 0x0c, 0xb4, + 0x29, 0xa5, 0xb6, 0x5a, 0x98, 0x60, 0x4a, 0x24, 0x28, 0x12, 0x42, 0x82, 0x20, 0x16, 0xc4, 0xe2, + 0x24, 0x96, 0x73, 0x6a, 0x72, 0xbe, 0x9e, 0x9d, 0xd0, 0xa8, 0xea, 0xc2, 0xc2, 0x82, 0x50, 0x11, + 0x5f, 0x83, 0x0f, 0xc2, 0x58, 0x89, 0x85, 0x29, 0x42, 0x09, 0x53, 0xc7, 0x8e, 0x4c, 0xe8, 0xec, + 0x3b, 0xe5, 0xf2, 0x0f, 0x0a, 0x43, 0xa7, 0xf6, 0xf5, 0xfb, 0xde, 0xf3, 0xfc, 0xee, 0xf2, 0xf8, + 0x85, 0xd7, 0x98, 0x90, 0x81, 0x5b, 0xa3, 0xea, 0xad, 0xeb, 0x09, 0xc5, 0x35, 0xdd, 0x6f, 0xf3, + 0xa0, 0x4b, 0xfc, 0x40, 0x6a, 0x89, 0x2e, 0xdb, 0x26, 0x89, 0x9b, 0xb9, 0x55, 0x21, 0x85, 0x34, + 0x3d, 0x1a, 0xfe, 0x67, 0xc7, 0x72, 0x37, 0xc6, 0x35, 0x94, 0x96, 0x01, 0x13, 0x3c, 0x6a, 0xdf, +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 0xbc, 0x3d, 0x38, 0xeb, 0xe5, 0x57, 0xac, 0x8c, 0x29, + 0x71, 0xc5, 0x1e, 0xe3, 0x8f, 0x00, 0x66, 0x92, 0x4a, 0x4f, 0x79, 0x57, 0xfd, 0x0f, 0x11, 0x7a, + 0x0c, 0xe1, 0xf0, 0x07, 0xcf, 0xce, 0x15, 0x40, 0x71, 0x79, 0x67, 0x8d, 0xd8, 0xaf, 0x41, 0xc2, + 0x74, 0x10, 0x1b, 0xbe, 0x28, 0x1d, 0xe4, 0xf9, 0xf0, 0xd5, 0x2b, 0x89, 0x27, 0xf1, 0x31, 0x80, + 0xd9, 0x49, 0xa0, 0xe8, 0xf5, 0x36, 0x61, 0x7a, 0x8f, 0x77, 0x55, 0x92, 0x28, 0xac, 0x87, 0x44, + 0x61, 0x85, 0x2b, 0xe6, 0x10, 0xed, 0x4e, 0x21, 0x5a, 0xff, 0x2b, 0x91, 0x75, 0x4a, 0x22, 0xed, + 0x7c, 0x49, 0xc3, 0x79, 0x83, 0x84, 0x3a, 0x70, 0xc1, 0xc6, 0x13, 0xdd, 0x24, 0x63, 0xd7, 0x87, + 0x4c, 0x86, 0x37, 0x97, 0x99, 0x18, 0xb2, 0x7d, 0x4c, 0xde, 0x7d, 0xfb, 0xf9, 0x79, 0xae, 0x88, + 0xd6, 0xe8, 0xf8, 0xed, 0x8a, 0x2f, 0x0f, 0x37, 0x83, 0xf4, 0x30, 0x4c, 0xcc, 0x11, 0x7a, 0x0f, + 0xe0, 0x62, 0x94, 0x51, 0x74, 0x6b, 0xba, 0xf3, 0x68, 0x84, 0x73, 0xb7, 0xa7, 0x4f, 0x8d, 0xe5, + 0x05, 0x53, 0x03, 0xb2, 0x81, 0xd6, 0x67, 0x82, 0xb4, 0xac, 0x6e, 0x4c, 0xf2, 0x01, 0xc0, 0xc5, + 0x48, 0x64, 0x16, 0xc9, 0x68, 0xae, 0xcf, 0x4b, 0x72, 0xdf, 0x90, 0x10, 0x74, 0x77, 0x26, 0x49, + 0xb4, 0x78, 0x68, 0x9d, 0x69, 0x46, 0x0f, 0xc3, 0xd0, 0x1d, 0xa1, 0x4f, 0x00, 0xa6, 0xc3, 0x84, + 0xa0, 0xe2, 0x1f, 0x5d, 0x12, 0xa9, 0xce, 0x6d, 0x9c, 0x63, 0xf2, 0x9f, 0x99, 0xc2, 0xc0, 0x45, + 0x4c, 0xe5, 0x57, 0x5f, 0xfb, 0x0e, 0x38, 0xe9, 0x3b, 0xe0, 0x47, 0xdf, 0x01, 0xc7, 0x03, 0x27, + 0x75, 0x32, 0x70, 0x52, 0xdf, 0x07, 0x4e, 0xea, 0xf5, 0xc3, 0xc4, 0xba, 0x28, 0x59, 0x45, 0x2b, + 0x6c, 0xd6, 0x85, 0x90, 0x4d, 0xe6, 0x89, 0x78, 0x8f, 0x1c, 0x0c, 0xcd, 0xcc, 0x1e, 0xa9, 0x2e, + 0x98, 0x35, 0x79, 0xef, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfa, 0xe3, 0xc6, 0x31, 0xd5, 0x05, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/golang/cosmos/x/swingset/types/storage.pb.go b/golang/cosmos/x/swingset/types/storage.pb.go index 35b14520cf9..cf2be66db43 100644 --- a/golang/cosmos/x/swingset/types/storage.pb.go +++ b/golang/cosmos/x/swingset/types/storage.pb.go @@ -181,31 +181,31 @@ func init() { func init() { proto.RegisterFile("agoric/swingset/storage.proto", fileDescriptor_4e196a9f45e310a8) } var fileDescriptor_4e196a9f45e310a8 = []byte{ - // 380 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x41, 0x6b, 0xdb, 0x30, - 0x1c, 0xc5, 0xad, 0xc5, 0xcb, 0x16, 0x25, 0x10, 0x66, 0x06, 0xf3, 0x06, 0xb3, 0x82, 0x4e, 0x81, - 0x11, 0x9b, 0x6d, 0xa7, 0x65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ac, 0x16, 0xa8, 0xaf, 0x6f, 0xd9, - 0x13, 0x1c, 0x34, 0x43, 0xeb, 0x14, 0x9a, 0x29, 0x21, 0x99, 0xfd, 0x62, 0x00, 0x86, 0x3d, 0xff, - 0xb7, 0xb4, 0x96, 0xfa, 0x60, 0x2d, 0x15, 0x7e, 0x14, 0x68, 0x44, 0xe3, 0xfc, 0x62, 0x35, 0x75, - 0x23, 0x96, 0x78, 0x11, 0xe3, 0x09, 0xe3, 0xbb, 0xcf, 0x88, 0xcf, 0xe6, 0x5e, 0x5e, 0xa4, 0x84, - 0xbb, 0x93, 0x28, 0x9a, 0xcc, 0x66, 0x32, 0x54, 0xa0, 0x6e, 0xb1, 0x02, 0xd8, 0x4d, 0xd9, 0x9a, - 0x64, 0x67, 0xe7, 0x8b, 0x90, 0x72, 0xbb, 0xa5, 0xde, 0xf7, 0xb9, 0x14, 0x08, 0xfe, 0x93, 0xf8, - 0x97, 0xa4, 0x95, 0x40, 0x30, 0x6d, 0x54, 0x2d, 0xd0, 0x9b, 0x9d, 0x71, 0xc3, 0x70, 0x70, 0x74, - 0x40, 0xbf, 0xdf, 0xff, 0x7b, 0x5b, 0x3a, 0x60, 0x53, 0x3a, 0xe0, 0xbe, 0x74, 0xc0, 0xf5, 0xd6, - 0x31, 0x36, 0x5b, 0xc7, 0xb8, 0xdb, 0x3a, 0xc6, 0xc9, 0x97, 0xa3, 0xa0, 0x13, 0xdd, 0xb3, 0x0c, - 0x1a, 0x47, 0xa3, 0xa6, 0xee, 0xab, 0x43, 0xf3, 0x2a, 0xf8, 0xb4, 0xad, 0x1a, 0xfd, 0xfa, 0x1c, - 0x00, 0x00, 0xff, 0xff, 0xb2, 0x03, 0x1e, 0x87, 0x19, 0x02, 0x00, 0x00, + // 382 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x92, 0x41, 0xeb, 0xd3, 0x30, + 0x18, 0xc6,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*Storage) Marshal() (dAtA []byte, err error) { diff --git a/package.json b/package.json index 089ea62af50..9aab842e525 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "useWorkspaces": true, "workspaces": [ + "golang/cosmos", "packages/eslint-config", "packages/assert", "packages/base64", diff --git a/packages/cosmic-swingset/Dockerfile b/packages/cosmic-swingset/Dockerfile deleted file mode 100644 index 4e8cef30ffa..00000000000 --- a/packages/cosmic-swingset/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -# The Golang build container. -# TODO This should be split out into the cosmos-connector. -FROM golang:1.14-buster - -WORKDIR /usr/src/app -COPY go.mod go.sum ./ -RUN go mod download - -COPY Makefile* *.go ./ -COPY app/ app/ -COPY bin/ bin/ -COPY x/ x/ -COPY cmd/ cmd/ -COPY lib/*.go lib/ -COPY lib/daemon/ lib/daemon/ -COPY package.json ./ -RUN make MOD_READONLY= compile-go install diff --git a/packages/cosmic-swingset/Makefile b/packages/cosmic-swingset/Makefile index c9d5fb2ceb5..17229940387 100644 --- a/packages/cosmic-swingset/Makefile +++ b/packages/cosmic-swingset/Makefile @@ -17,13 +17,11 @@ INSPECT_ADDRESS = 127.0.0.1 BREAK_CHAIN = false NODE_DEBUG = node --inspect-port=$(INSPECT_ADDRESS):9229 -NAME := $(shell sed -ne 's/.*"name": "\([^"]*\)".*/\1/p' package.json) -VERSION := $(shell sed -ne 's/.*"version": "\([^"]*\)".*/\1/p' package.json) -COMMIT := $(shell git log -1 --format='%H' 2>/dev/null || cat lib/git-revision.txt) - BIN := $(shell echo $${GOBIN-$${GOPATH-$$HOME/go}/bin}) -all: build-cosmos install +all: build-chain install install-helper + +client: build-helper install install-helper scenario0-setup: mkdir -p t9 @@ -122,24 +120,14 @@ docker-pull: docker-install: docker-pull install -m 755 docker/* /usr/local/bin/ -compile-go: - $(MAKE) -C $(GOSRC) all LIBDAEMON=`pwd`/lib/libagcosmosdaemon.so NAME=$(NAME) VERSION=$(VERSION) COMMIT=$(COMMIT) - -build-cosmos: compile-go node-compile-gyp install +build-chain: + $(MAKE) -C $(GOSRC) all -# We need this so that node-gyp can be found. -node-compile-gyp: - if yarn -v >/dev/null 2>&1; then \ - yarn build:gyp; \ - else \ - npm run build:gyp; \ - fi +build-helper: + $(MAKE) -C $(GOSRC) compile-helper -# Only run from the package.json build:gyp script. -compile-gyp: - cp binding.gyp.in binding.gyp - node-gyp configure build $(GYP_DEBUG) || { status=$$?; rm -f binding.gyp; exit $$status; } - rm -f binding.gyp +install-helper: + install -c $(GOSRC)/build/ag-cosmos-helper "$(BIN)/ag-cosmos-helper" install: mkdir -p "$(BIN)" diff --git a/packages/cosmic-swingset/docker/ag-cosmos-helper b/packages/cosmic-swingset/docker/ag-cosmos-helper index 39339d60393..d8e51a8ad1a 100755 --- a/packages/cosmic-swingset/docker/ag-cosmos-helper +++ b/packages/cosmic-swingset/docker/ag-cosmos-helper @@ -1,12 +1,6 @@ #! /bin/sh { test -t 1 || test -t 0; } && FLAGS=-t -thisdir=`dirname "$0"` -ABS=`cd "$thisdir" && pwd` -COSSD_PORT=26657 -REST_PORT=1317 -ENTRY=./ag-cosmos-helper -ARGS= -IMAGE=agoric/cosmic-swingset +IMAGE=agoric/agoric-sdk:${TAG-latest} case "$1" in --pull) @@ -15,28 +9,6 @@ case "$1" in ;; esac -case "$1" in -rest-server) - # FIXME: Does this actually work? - FLAGS="-p127.0.0.1:$REST_PORT:$REST_PORT" - case " $@ " in - *" --help "*) ;; - *) - if test `uname -s 2>/dev/null` = Darwin; then - # On MacOS, run the tunnel to host.docker.internal:$COSSD_PORT. - # FIXME: Windows needs the same. - ENTRY=/ssh-tunnel - FLAGS="$FLAGS -t --volume=$HOME/.ssh:/root/.ssh" # --volume=$ABS/ssh-tunnel:/ssh-tunnel" - ARGS=" $USER@host.docker.internal $COSSD_PORT ./ag-cosmos-helper" - fi - ;; - esac - ;; -*) - FLAGS="$FLAGS --net=host" - ;; -esac - -exec docker run -i $FLAGS --entrypoint="$ENTRY" \ - --volume=ag-chain-cosmos-state:/root/.ag-chain-cosmos \ - --rm "$IMAGE"$ARGS ${1+"$@"} +exec docker run -i $FLAGS --net=host --entrypoint=ag-cosmos-helper \ + --volume=ag-cosmos-helper-state:/root/.ag-cosmos-helper \ + --rm "$IMAGE" ${1+"$@"} diff --git a/packages/cosmic-swingset/lib/chain-entrypoint.js b/packages/cosmic-swingset/lib/chain-entrypoint.js index b1a1a518506..8f699a48ae5 100644 --- a/packages/cosmic-swingset/lib/chain-entrypoint.js +++ b/packages/cosmic-swingset/lib/chain-entrypoint.js @@ -5,7 +5,7 @@ const esmRequire = require('esm')(module); // import node-lmdb early to work around SES incompatibility require('node-lmdb'); -const agcc = require('bindings')('agcosmosdaemon.node'); +const agcc = require('@agoric/cosmos'); // we need to enable Math.random as a workaround for 'brace-expansion' module // (dep chain: temp->glob->minimatch->brace-expansion) diff --git a/packages/cosmic-swingset/package.json b/packages/cosmic-swingset/package.json index 48220e0c099..9c2d31b53d1 100644 --- a/packages/cosmic-swingset/package.json +++ b/packages/cosmic-swingset/package.json @@ -9,8 +9,6 @@ "repository": "https://github.com/Agoric/agoric-sdk", "scripts": { "build": "exit 0", - "build:gyp": "make compile-gyp", - "build:gyp-debug": "make compile-gyp GYP_DEBUG=--debug", "test": "ava", "test:nyc": "nyc ava", "pretty-fix": "prettier --write '**/*.js'", @@ -29,6 +27,7 @@ "@agoric/babel-parser": "^7.6.4", "@agoric/bundle-source": "^1.1.10", "@agoric/captp": "^1.6.0", + "@agoric/cosmos": "^0.23.0", "@agoric/dapp-svelte-wallet": "^0.5.0", "@agoric/ertp": "^0.8.0", "@agoric/eventual-send": "^0.12.0", @@ -54,7 +53,6 @@ "@iarna/toml": "^2.2.3", "agoric": "^0.10.1", "anylogger": "^0.21.0", - "bindings": "^1.2.1", "chalk": "^2.4.2", "deterministic-json": "^1.0.5", "esm": "^3.2.25", @@ -72,8 +70,6 @@ }, "devDependencies": { "ava": "^3.12.1", - "napi-thread-safe-callback": "0.0.6", - "node-addon-api": "^1.7.1", "nyc": "^15.1.0" }, "eslintConfig": { diff --git a/packages/deployment/Dockerfile.sdk b/packages/deployment/Dockerfile.sdk index 5df4a9a73e2..3d3c805bd04 100644 --- a/packages/deployment/Dockerfile.sdk +++ b/packages/deployment/Dockerfile.sdk @@ -1,6 +1,15 @@ -ARG SWINGSET_TAG=latest -ARG REPO=agoric/cosmic-swingset -FROM $REPO:$SWINGSET_TAG as cosmic-swingset-go +########################### +# The golang build container +FROM golang:1.14-buster as cosmos-go + +WORKDIR /usr/src/agoric-sdk/golang/cosmos +COPY go.mod go.sum ../../ +RUN go mod download + +COPY golang/cosmos ./ + +COPY packages/cosmic-swingset/lib/*.txt ./ +RUN make MOD_READONLY= compile-go ############################### # The js build container @@ -8,13 +17,16 @@ FROM node:12-buster AS build-js WORKDIR /usr/src/agoric-sdk COPY . . -COPY --from=cosmic-swingset-go /usr/src/app/lib/ packages/cosmic-swingset/lib/ RUN ln -s agoric-sdk/packages/cosmic-swingset ../app RUN yarn install --frozen-lockfile --ignore-scripts # Need to build the Node.js node extension that uses our above Golang shared library. -RUN cd packages/cosmic-swingset && yarn build:gyp +COPY --from=cosmos-go /usr/src/agoric-sdk/golang/cosmos/build golang/cosmos/build/ +RUN cd golang/cosmos && yarn build:gyp + +# Install the entry points in the path. +RUN cd packages/cosmic-swingset && make install install-helper RUN yarn build @@ -33,7 +45,7 @@ WORKDIR /usr/src COPY --from=build-js /usr/src/agoric-sdk agoric-sdk RUN ln -s agoric-sdk/packages/cosmic-swingset app -COPY --from=cosmic-swingset-go /go/bin/ag-cosmos-helper /usr/local/bin/ +COPY --from=build-js /root/go/bin/ag-cosmos-helper /usr/local/bin/ RUN ln -s /usr/src/app/bin/ag-chain-cosmos /usr/local/bin/ # By default, run the daemon with specified arguments. diff --git a/packages/deployment/Makefile b/packages/deployment/Makefile index 7b2de30b7ec..0ecb501a8da 100644 --- a/packages/deployment/Makefile +++ b/packages/deployment/Makefile @@ -10,21 +10,18 @@ docker-show-fat: date > show-fat-bust-cache.stamp docker build --file=Dockerfile.show-fat ../.. -docker-build: docker-build-base docker-build-sdk docker-build-solo \ +docker-build: docker-build-sdk docker-build-solo \ docker-build-setup docker-build-deployment docker-build-sdk: - docker build --build-arg=SWINGSET_TAG=$(TAG) -t $(REPOSITORY_SDK):$(TAG) --file=Dockerfile.sdk ../.. + hash=`git rev-parse --short HEAD`; \ + dirty=`git diff --quiet || echo -dirty`; \ + echo "$$hash$$dirty" > $(SS)lib/git-revision.txt && \ + docker build -t $(REPOSITORY_SDK):$(TAG) --file=Dockerfile.sdk ../.. docker-build-setup: docker build -t $(REPOSITORY)-setup:$(TAG) . -docker-build-base: - hash=`git rev-parse --short HEAD`; \ - dirty=`git diff --quiet || echo -dirty`; \ - echo "$$hash$$dirty" > $(SS)lib/git-revision.txt - docker build -t $(REPOSITORY):$(TAG) $(SS) - docker-build-solo: docker build -t $(REPOSITORY)-solo:$(TAG) $(SS)lib/ag-solo From f58df9c1ca9e94747e7f1f9fd9509b4ee0858984 Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Fri, 4 Dec 2020 14:22:59 -0600 Subject: [PATCH 5/5] fix: use nodejs instead of sed for parsing package.json --- golang/cosmos/Makefile | 4 ++-- packages/deployment/Makefile | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/golang/cosmos/Makefile b/golang/cosmos/Makefile index 4f49947a006..64c1cb05ea7 100644 --- a/golang/cosmos/Makefile +++ b/golang/cosmos/Makefile @@ -1,5 +1,5 @@ -NAME := $(shell sed -ne 's/.*"name": "\([^"]*\)".*/\1/p' package.json) -VERSION := $(shell sed -ne 's/.*"version": "\([^"]*\)".*/\1/p' package.json) +NAME := $(shell node -e 'console.log(require("./package.json").name)') +VERSION := $(shell node -e 'console.log(require("./package.json").version)') COMMIT = $(shell hash=`git rev-parse --short HEAD 2>/dev/null`; if test -n "$$hash"; then echo $$hash`git diff --quiet || echo -dirty`; else cat git-revision.txt; fi) default: all diff --git a/packages/deployment/Makefile b/packages/deployment/Makefile index 0ecb501a8da..af3d973ad62 100644 --- a/packages/deployment/Makefile +++ b/packages/deployment/Makefile @@ -1,10 +1,16 @@ REPOSITORY = agoric/cosmic-swingset REPOSITORY_SDK = agoric/agoric-sdk SS := ../cosmic-swingset/ -TAG := $(shell test ! -f ../../package.json || sed -ne 's/.*"version": "\(.*\)".*/\1/p' ../../package.json) +VERSION := $(shell node -e 'console.log(require("../../package.json").version)' 2>/dev/null) + +TAG := $(if $(VERSION),$(VERSION),latest) # Don't push alpha tags as ":$(TAG)". +ifeq ($(TAG),latest) +DONT_PUSH_LATEST := : +else DONT_PUSH_LATEST := $(if $(findstring -,$(TAG)),:,) +endif docker-show-fat: date > show-fat-bust-cache.stamp