Skip to content

Commit

Permalink
Merge branch 'master' into cosmwasm-v1-v0.45.8
Browse files Browse the repository at this point in the history
  • Loading branch information
assafmo committed Sep 20, 2022
2 parents 589bfea + 15da8c9 commit b76e788
Show file tree
Hide file tree
Showing 99 changed files with 498 additions and 487 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ x/compute/internal/keeper/testdata/ibc.wasm
x/compute/internal/keeper/testdata/static-too-high-initial-memory.wasm
x/compute/internal/keeper/testdata/too-high-initial-memory.wasm
x/compute/internal/keeper/testdata/v1-contract.wasm
/github.com
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
PACKAGES=$(shell go list ./... | grep -v '/simulation')
VERSION ?= $(shell echo $(shell git describe --tags) | sed 's/^v//')
COMMIT := $(shell git log -1 --format='%H')
CURRENT_BRANCH := $(shell git branch --show-current)
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf

Expand Down Expand Up @@ -143,8 +142,7 @@ build_cli:
go build -o secretcli -mod=readonly -tags "$(GO_TAGS) secretcli" -ldflags '$(LD_FLAGS)' ./cmd/secretd

xgo_build_secretcli: go.sum
@echo "--> WARNING! This builds from origin/$(CURRENT_BRANCH)!"
xgo --targets $(XGO_TARGET) -tags="$(GO_TAGS) secretcli" -ldflags '$(LD_FLAGS)' --branch $(CURRENT_BRANCH) github.com/enigmampc/SecretNetwork/cmd/secretd
xgo --targets $(XGO_TARGET) -tags="$(GO_TAGS) secretcli" -ldflags '$(LD_FLAGS)' --pkg cmd/secretd .

build_local_no_rust: bin-data-$(IAS_BUILD)
cp go-cosmwasm/target/$(BUILD_PROFILE)/libgo_cosmwasm.so go-cosmwasm/api
Expand All @@ -162,23 +160,23 @@ _build-linux-with-query: vendor

build_windows_cli:
$(MAKE) xgo_build_secretcli XGO_TARGET=windows/amd64
mv secretd-windows-* secretcli-windows-amd64.exe
sudo mv github.com/scrtlabs/SecretNetwork-windows-* secretcli-windows-amd64.exe

build_macos_cli:
$(MAKE) xgo_build_secretcli XGO_TARGET=darwin/amd64
mv secretd-darwin-* secretcli-macos-amd64
sudo mv github.com/scrtlabs/SecretNetwork-darwin-amd64 secretcli-macos-amd64

build_macos_arm64_cli:
$(MAKE) xgo_build_secretcli XGO_TARGET=darwin/arm64
mv secretd-darwin-* secretcli-macos-arm64
sudo mv github.com/scrtlabs/SecretNetwork-darwin-arm64 secretcli-macos-arm64

build_linux_cli:
$(MAKE) xgo_build_secretcli XGO_TARGET=linux/amd64
mv secretd-linux-amd64 secretcli-linux-amd64
sudo mv github.com/scrtlabs/SecretNetwork-linux-amd64 secretcli-linux-amd64

build_linux_arm64_cli:
$(MAKE) xgo_build_secretcli XGO_TARGET=linux/arm64
mv secretd-linux-arm64 secretcli-linux-arm64
sudo mv github.com/scrtlabs/SecretNetwork-linux-arm64 secretcli-linux-arm64

build_all: build-linux build_windows_cli build_macos_cli build_linux_arm64_cli

Expand Down
2 changes: 1 addition & 1 deletion app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/ibc-go/v3/modules/core/keeper"

"github.com/enigmampc/SecretNetwork/x/compute"
"github.com/scrtlabs/SecretNetwork/x/compute"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand Down
18 changes: 9 additions & 9 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"
"path/filepath"

"github.com/enigmampc/SecretNetwork/app/keepers"
icaauth "github.com/enigmampc/SecretNetwork/x/mauth"
"github.com/scrtlabs/SecretNetwork/app/keepers"
icaauth "github.com/scrtlabs/SecretNetwork/x/mauth"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
Expand All @@ -30,10 +30,10 @@ import (
ibc "github.com/cosmos/ibc-go/v3/modules/core"
ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"
"github.com/enigmampc/SecretNetwork/app/upgrades"
v1_3 "github.com/enigmampc/SecretNetwork/app/upgrades/v1.3"
v1_4 "github.com/enigmampc/SecretNetwork/app/upgrades/v1.4"
icaauthtypes "github.com/enigmampc/SecretNetwork/x/mauth/types"
"github.com/scrtlabs/SecretNetwork/app/upgrades"
v1_3 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.3"
v1_4 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.4"
icaauthtypes "github.com/scrtlabs/SecretNetwork/x/mauth/types"

"github.com/cosmos/cosmos-sdk/version"
"github.com/cosmos/cosmos-sdk/x/auth"
Expand Down Expand Up @@ -71,8 +71,8 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/cosmos-sdk/x/upgrade"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/enigmampc/SecretNetwork/x/compute"
reg "github.com/enigmampc/SecretNetwork/x/registration"
"github.com/scrtlabs/SecretNetwork/x/compute"
reg "github.com/scrtlabs/SecretNetwork/x/registration"
"github.com/spf13/cast"

"github.com/gorilla/mux"
Expand All @@ -84,7 +84,7 @@ import (
dbm "github.com/tendermint/tm-db"

// unnamed import of statik for swagger UI support
_ "github.com/enigmampc/SecretNetwork/client/docs/statik"
_ "github.com/scrtlabs/SecretNetwork/client/docs/statik"
)

const appName = "secret"
Expand Down
6 changes: 3 additions & 3 deletions app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ import (
ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v3/modules/core"
ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host"
"github.com/enigmampc/SecretNetwork/x/compute"
icaauth "github.com/enigmampc/SecretNetwork/x/mauth"
"github.com/enigmampc/SecretNetwork/x/registration"
"github.com/scrtlabs/SecretNetwork/x/compute"
icaauth "github.com/scrtlabs/SecretNetwork/x/mauth"
"github.com/scrtlabs/SecretNetwork/x/registration"
)

var mbasics = module.NewBasicManager(
Expand Down
15 changes: 7 additions & 8 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package keepers

import (
"path/filepath"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -49,12 +51,11 @@ import (
porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"
"github.com/enigmampc/SecretNetwork/x/compute"
icaauth "github.com/enigmampc/SecretNetwork/x/mauth"
icaauthkeeper "github.com/enigmampc/SecretNetwork/x/mauth/keeper"
icaauthtypes "github.com/enigmampc/SecretNetwork/x/mauth/types"
reg "github.com/enigmampc/SecretNetwork/x/registration"
"path/filepath"
"github.com/scrtlabs/SecretNetwork/x/compute"
icaauth "github.com/scrtlabs/SecretNetwork/x/mauth"
icaauthkeeper "github.com/scrtlabs/SecretNetwork/x/mauth/keeper"
icaauthtypes "github.com/scrtlabs/SecretNetwork/x/mauth/types"
reg "github.com/scrtlabs/SecretNetwork/x/registration"
)

type SecretAppKeepers struct {
Expand Down Expand Up @@ -132,7 +133,6 @@ func (ak *SecretAppKeepers) InitSdkKeepers(
skipUpgradeHeights map[int64]bool,
homePath string,
) {

paramsKeeper := initParamsKeeper(appCodec, legacyAmino, ak.keys[paramstypes.StoreKey], ak.tKeys[paramstypes.TStoreKey])
ak.ParamsKeeper = &paramsKeeper

Expand Down Expand Up @@ -226,7 +226,6 @@ func (ak *SecretAppKeepers) InitSdkKeepers(
ak.DistrKeeper.Hooks(),
ak.SlashingKeeper.Hooks()),
)

}

func (ak *SecretAppKeepers) CreateScopedKeepers() {
Expand Down
2 changes: 1 addition & 1 deletion app/legacy/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/genutil/types"
staking "github.com/cosmos/cosmos-sdk/x/staking/types"

legacy120 "github.com/enigmampc/SecretNetwork/app/legacy/v120"
legacy120 "github.com/scrtlabs/SecretNetwork/app/legacy/v120"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions app/legacy/v120/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ import (
v038staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v038"
v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040"
v038upgrade "github.com/cosmos/cosmos-sdk/x/upgrade/legacy/v038"
v106registration "github.com/enigmampc/SecretNetwork/x/registration/legacy/v106"
v120registration "github.com/enigmampc/SecretNetwork/x/registration/legacy/v120"
v106registration "github.com/scrtlabs/SecretNetwork/x/registration/legacy/v106"
v120registration "github.com/scrtlabs/SecretNetwork/x/registration/legacy/v120"

cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
v106compute "github.com/enigmampc/SecretNetwork/x/compute/legacy/v106"
v120compute "github.com/enigmampc/SecretNetwork/x/compute/legacy/v120"
v106tokenswap "github.com/enigmampc/SecretNetwork/x/tokenswap/legacy/v106"
v106compute "github.com/scrtlabs/SecretNetwork/x/compute/legacy/v106"
v120compute "github.com/scrtlabs/SecretNetwork/x/compute/legacy/v120"
v106tokenswap "github.com/scrtlabs/SecretNetwork/x/tokenswap/legacy/v106"
)

func migrateGenutil(oldGenState v039genutil.GenesisState) *types.GenesisState {
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/enigmampc/SecretNetwork/app/keepers"
"github.com/scrtlabs/SecretNetwork/app/keepers"
abci "github.com/tendermint/tendermint/abci/types"
)

Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v1.3/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
icacontrollertypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types"
icahosttypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types"
"github.com/enigmampc/SecretNetwork/app/keepers"
"github.com/enigmampc/SecretNetwork/app/upgrades"
"github.com/scrtlabs/SecretNetwork/app/keepers"
"github.com/scrtlabs/SecretNetwork/app/upgrades"
)

const UpgradeName = "v1.3"
Expand Down
6 changes: 3 additions & 3 deletions app/upgrades/v1.4/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package v1_4

import (
"fmt"

store "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/enigmampc/SecretNetwork/app/keepers"
"github.com/enigmampc/SecretNetwork/app/upgrades"
"github.com/scrtlabs/SecretNetwork/app/keepers"
"github.com/scrtlabs/SecretNetwork/app/upgrades"
)

const UpgradeName = "v1.4"
Expand All @@ -32,7 +33,6 @@ func CreateUpgradeHandler(mm *module.Manager, keepers *keepers.SecretAppKeepers,
keepers.BankKeeper,
keepers.StakingKeeper,
)

if err != nil {
panic(fmt.Sprintf("failed to revert tombstoning: %s", err))
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/secretd/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/cosmos-sdk/x/genutil"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
"github.com/enigmampc/SecretNetwork/go-cosmwasm/api"
reg "github.com/enigmampc/SecretNetwork/x/registration"
ra "github.com/enigmampc/SecretNetwork/x/registration/remote_attestation"
"github.com/scrtlabs/SecretNetwork/go-cosmwasm/api"
reg "github.com/scrtlabs/SecretNetwork/x/registration"
ra "github.com/scrtlabs/SecretNetwork/x/registration/remote_attestation"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -155,7 +155,7 @@ blockchain. Writes the certificate in DER format to ~/attestation_cert
userHome, _ := os.UserHomeDir()

// Load consensus_seed_exchange_pubkey
cert := []byte(nil)
var cert []byte
if len(args) >= 1 {
cert, err = os.ReadFile(args[0])
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/secretd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
serverconfig "github.com/cosmos/cosmos-sdk/server/config"
"github.com/enigmampc/SecretNetwork/x/compute"
"github.com/scrtlabs/SecretNetwork/x/compute"
)

// SecretAppConfig terra specify app config
Expand Down
13 changes: 6 additions & 7 deletions cmd/secretd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@ import (
"path/filepath"
"strings"

"github.com/cosmos/cosmos-sdk/codec"
serverconfig "github.com/cosmos/cosmos-sdk/server/config"
"github.com/cosmos/cosmos-sdk/types/module"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
"github.com/cosmos/cosmos-sdk/x/crisis"
scrt "github.com/enigmampc/SecretNetwork/types"
"github.com/enigmampc/SecretNetwork/x/compute"
"github.com/rs/zerolog"
scrt "github.com/scrtlabs/SecretNetwork/types"
"github.com/scrtlabs/SecretNetwork/x/compute"
"github.com/spf13/pflag"
"github.com/spf13/viper"

//"github.com/tendermint/tendermint/libs/cli"

"github.com/cosmos/cosmos-sdk/snapshots"
"github.com/enigmampc/SecretNetwork/app"
"github.com/scrtlabs/SecretNetwork/app"

"github.com/spf13/cast"
"github.com/spf13/cobra"
Expand All @@ -45,7 +44,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
secretlegacy "github.com/enigmampc/SecretNetwork/app/legacy"
secretlegacy "github.com/scrtlabs/SecretNetwork/app/legacy"
)

// thanks @terra-project for this fix
Expand Down Expand Up @@ -315,8 +314,8 @@ func exportAppStateAndTMValidators(
) (servertypes.ExportedApp, error) {
bootstrap := viper.GetBool("bootstrap")

encCfg := app.MakeEncodingConfig()
encCfg.Marshaler = codec.NewProtoCodec(encCfg.InterfaceRegistry)
// encCfg := app.MakeEncodingConfig()
// encCfg.Marshaler = codec.NewProtoCodec(encCfg.InterfaceRegistry)
var wasmApp *app.SecretNetworkApp
if height != -1 {
wasmApp = app.NewSecretNetworkApp(logger, db, traceStore, false, map[int64]bool{}, "", uint(1), bootstrap, appOpts, compute.DefaultWasmConfig())
Expand Down
4 changes: 2 additions & 2 deletions cmd/secretd/secret20.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/enigmampc/SecretNetwork/x/compute"
"github.com/enigmampc/SecretNetwork/x/compute/client/cli"
"github.com/scrtlabs/SecretNetwork/x/compute"
"github.com/scrtlabs/SecretNetwork/x/compute/client/cli"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
Loading

0 comments on commit b76e788

Please sign in to comment.