Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into test-contract-state…
Browse files Browse the repository at this point in the history
…-after-failing-submsg
  • Loading branch information
eshelB committed Nov 9, 2023
2 parents d19bb15 + 593a206 commit 4c41f0c
Show file tree
Hide file tree
Showing 62 changed files with 4,443 additions and 405 deletions.
6 changes: 3 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
RUN bash /tmp/library-scripts/rust-debian.sh "${CARGO_HOME}" "${RUSTUP_HOME}" "${USERNAME}" "true" "true"

# Install Go
#ADD https://go.dev/dl/go1.18.4.linux-amd64.tar.gz go1.18.4.linux-amd64.tar.gz
#RUN tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz
#ADD https://go.dev/dl/go1.21.1.linux-amd64.tar.gz go.linux-amd64.tar.gz
#RUN tar -C /usr/local -xzf go.linux-amd64.tar.gz
#
#RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" "$GOPATH/pkg" && chmod -R 777 "$GOPATH"
#RUN chown ${USERNAME}:${USERNAME} /go -R

RUN bash /tmp/library-scripts/go-debian.sh "1.18.4" "${GOROOT}" "${GOPATH}" "${USERNAME}" "true" "true" && \
RUN bash /tmp/library-scripts/go-debian.sh "1.21.1" "${GOROOT}" "${GOPATH}" "${USERNAME}" "true" "true" && \
go install github.com/jteeuwen/go-bindata/go-bindata@latest && go-bindata -version

RUN apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
submodules: recursive
- uses: actions/setup-go@v4
with:
go-version: 1.19 # The Go version to download (if necessary) and use.
go-version: 1.21 # The Go version to download (if necessary) and use.
- name: Install Intel's SGX SDK
run: |
mkdir -p "$HOME/.sgxsdk"
Expand Down Expand Up @@ -236,7 +236,7 @@ jobs:
submodules: recursive
- uses: actions/setup-go@v4
with:
go-version: 1.19 # The Go version to download (if necessary) and use.
go-version: 1.21 # The Go version to download (if necessary) and use.
- name: Install xgo
run: |
go install github.com/crazy-max/xgo@v0.17.0
Expand Down Expand Up @@ -270,8 +270,8 @@ jobs:
FEATURES_U=debug-print,random,light-client-validation,go-tests
SGX_MODE=SW
target: build-localsecret
cache-from: type=gha
cache-to: type=gha,mode=max
# cache-from: type=gha
# cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/localsecret.tar
- name: Upload Image
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -327,12 +327,13 @@ jobs:
run: |
cd integration-tests
yarn
perl -i -pe 's/localsecret:.+?"/localsecret:v0.0.0"/' ../deployment/dockerfiles/ibc/docker-compose.yml
docker compose -f ../deployment/dockerfiles/ibc/docker-compose.yml up -d > docker-compose.log 2>&1
yarn test || { cat docker-compose.log; exit 1; }
make kill-localsecret # next step needs the localsecret ports
- name: Run secret.js tests
run: |
git clone --depth 1 --branch contract-upgrade-v2 https://github.com/scrtlabs/secret.js
git clone --depth 1 --branch master https://github.com/scrtlabs/secret.js
cd secret.js
# Use the docker images that we built just a few steps above
perl -i -pe 's/localsecret:.+?"/localsecret:v0.0.0"/' ./test/docker-compose.yml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.21
- uses: actions/checkout@v4
- name: make bin-data-sw
run: |
Expand All @@ -25,5 +25,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.2
version: v1.54.2
skip-cache: true
20 changes: 10 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.19 # The Go version to download (if necessary) and use.
go-version: 1.21 # The Go version to download (if necessary) and use.
- name: Build CLI
shell: bash
run: |
Expand All @@ -168,7 +168,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.19 # The Go version to download (if necessary) and use.
go-version: 1.21 # The Go version to download (if necessary) and use.
- name: Install xgo
run: |
go install github.com/crazy-max/xgo@v0.17.0
Expand Down Expand Up @@ -255,7 +255,7 @@ jobs:
build-args: |
SECRET_NODE_TYPE=BOOTSTRAP
CHAIN_ID=secretdev-1
FEATURES=debug-print
FEATURES=debug-print,random,light-client-validation
SGX_MODE=SW
target: build-localsecret

Expand All @@ -275,13 +275,12 @@ jobs:
version: "v1.9.0"

Release:
needs:
[
needs: [
native-build-cli,
build-deb-testnet,
build-deb-mainnet,
MacOS-ARM64-CLI,
check-hw-tool
check-hw-tool,
# check-hw-tool-mainnet
]
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -311,9 +310,9 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: check_hw_${{ steps.get_version.outputs.VERSION }}.tar.gz
# - uses: actions/download-artifact@v3
# with:
# name: check_hw_${{ steps.get_version.outputs.VERSION }}_mainnet.tar.gz
# - uses: actions/download-artifact@v3
# with:
# name: check_hw_${{ steps.get_version.outputs.VERSION }}_mainnet.tar.gz
- name: Release
uses: softprops/action-gh-release@v1
with:
Expand All @@ -326,4 +325,5 @@ jobs:
secretcli-Linux
secretcli-MacOS-arm64
check_hw_${{ steps.get_version.outputs.VERSION }}.tar.gz
# check_hw_${{ steps.get_version.outputs.VERSION }}_mainnet.tar.gz
# check_hw_${{ steps.get_version.outputs.VERSION }}_mainnet.tar.gz
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# CHANGELOG

# 1.12.0

- Fix the hardcoded admins feature
- Add hardcoded admins according to proposals [269](https://dev.mintscan.io/secret/proposals/269) (Shillables) & [270](https://dev.mintscan.io/secret/proposals/270) (Sienna).
- Fix PFM to stop dropping packets of IBC contracts.
- This has always been a bug in PFM. It was introduced in v1.9 and was missed because of a bug in our CI system.
- Fixed the bug in PFM and updated the dependency.
- For more info see https://github.com/cosmos/ibc-apps/pull/105.
- Add `admin` to `WasmMsg::Instantiate` in cosmwasm-std (Thanks [@luca992](https://github.com/luca992)!).
- This allows contracts to specify an admin address when instantiating other contracts.
- See usage example [here](https://github.com/scrtlabs/SecretNetwork/blob/eedfac881/cosmwasm/contracts/v1/compute-tests/test-compute-contract/src/contract.rs#L245-L259).
- Update IBC to v4.5.0

# 1.11.0

- Added ibc-hooks middleware by Osmosis.
Expand Down
8 changes: 5 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"github.com/scrtlabs/SecretNetwork/app/upgrades"
v1_10 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.10"
v1_11 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.11"
v1_12 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.12"
v1_3 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.3"
v1_4 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.4"
v1_5 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.5"
Expand Down Expand Up @@ -105,6 +106,7 @@ var (
v1_9.Upgrade,
v1_10.Upgrade,
v1_11.Upgrade,
v1_12.Upgrade,
}
)

Expand Down Expand Up @@ -425,9 +427,9 @@ func (app *SecretNetworkApp) setupUpgradeStoreLoaders() {
return
}

for _, upgradeDetails := range Upgrades {
if upgradeInfo.Name == upgradeDetails.UpgradeName {
app.BaseApp.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &upgradeDetails.StoreUpgrades))
for i := range Upgrades {
if upgradeInfo.Name == Upgrades[i].UpgradeName {
app.BaseApp.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &Upgrades[i].StoreUpgrades))
}
}
}
Expand Down
35 changes: 35 additions & 0 deletions app/upgrades/v1.12/upgrade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package v1_12

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/scrtlabs/SecretNetwork/app/keepers"
"github.com/scrtlabs/SecretNetwork/app/upgrades"
)

const upgradeName = "v1.12"

var Upgrade = upgrades.Upgrade{
UpgradeName: upgradeName,
CreateUpgradeHandler: createUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{},
}

func createUpgradeHandler(mm *module.Manager, _ *keepers.SecretAppKeepers, configurator module.Configurator,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info(` _ _ _____ _____ _____ _____ ______ `)
ctx.Logger().Info(`| | | | __ \ / ____| __ \ /\ | __ \| ____|`)
ctx.Logger().Info(`| | | | |__) | | __| |__) | / \ | | | | |__ `)
ctx.Logger().Info(`| | | | ___/| | |_ | _ / / /\ \ | | | | __| `)
ctx.Logger().Info(`| |__| | | | |__| | | \ \ / ____ \| |__| | |____ `)
ctx.Logger().Info(` \____/|_| \_____|_| \_\/_/ \_\_____/|______|`)

ctx.Logger().Info(fmt.Sprintf("Running module migrations for %s...", upgradeName))
return mm.RunMigrations(ctx, configurator, vm)
}
}
2 changes: 1 addition & 1 deletion client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Secret Network",
"description": "A REST interface for queries and transactions",
"version": "v1.10"
"version": "v1.12"
},
"apis": [
{
Expand Down
4 changes: 2 additions & 2 deletions client/docs/static/openapi/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/docs/static/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
title: Secret Network
description: A REST interface for queries and transactions
version: v1.10
version: v1.12
paths:
/cosmos/auth/v1beta1/accounts:
get:
Expand Down
2 changes: 1 addition & 1 deletion client/docs/static/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ swagger: '2.0'
info:
title: Secret Network
description: A REST interface for queries and transactions
version: v1.10
version: v1.12
paths:
/cosmos/auth/v1beta1/accounts:
get:
Expand Down
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit 4c41f0c

Please sign in to comment.