Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.1.2 #149

Merged
merged 5 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: |
go test ./...
cargo r --bin onomyd_only
cargo r --bin ics_with_interchain_security_cd
cargo r --bin ics_cdd
cargo r --bin chain_upgrade
cargo r --bin clean

Expand Down
2 changes: 2 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ import (
v1_0_3_4 "github.com/onomyprotocol/onomy/app/upgrades/v1.0.3.4"
v1_0_3_5 "github.com/onomyprotocol/onomy/app/upgrades/v1.0.3.5"
v1_1_1 "github.com/onomyprotocol/onomy/app/upgrades/v1.1.1"
v1_1_2 "github.com/onomyprotocol/onomy/app/upgrades/v1.1.2"
"github.com/onomyprotocol/onomy/docs"
"github.com/onomyprotocol/onomy/x/dao"
daoclient "github.com/onomyprotocol/onomy/x/dao/client"
Expand Down Expand Up @@ -800,6 +801,7 @@ func (app *OnomyApp) setupUpgradeHandlers() {
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
},
)
app.UpgradeKeeper.SetUpgradeHandler(v1_1_2.Name, v1_1_2.UpgradeHandler)

upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
Expand Down
9 changes: 5 additions & 4 deletions app/upgrades/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ This folder contains sub-folders for every chain upgrade.

## Version History

- v1.0.1 - IBC integration fix
- v1.0.3 - Hyperinflation fix
- v1.0.3.4 - OIP 6 Undelegate DAO from all validators
- v1.0.3.5 - OIP 6 Patch Subtract DAO Treasury from Staking Supply
- v1.1.2 - Fix that the treasury is actually subtracted from the staking supply
- v1.1.1 - Removal of Gravity module and addition of provider module
- v1.0.3.5 - OIP 6 Patch Subtract DAO Treasury from Staking Supply
- v1.0.3.4 - OIP 6 Undelegate DAO from all validators
- v1.0.3 - Hyperinflation fix
- v1.0.1 - IBC integration fix
16 changes: 16 additions & 0 deletions app/upgrades/v1.1.2/upgrade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Package v1_1_2 is contains chain upgrade of the corresponding version.
package v1_1_2 //nolint:revive,stylecheck // app version

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

// Name is migration name.
const Name = "v1.1.2"

// UpgradeHandler is an x/upgrade handler.
func UpgradeHandler(_ sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
return vm, nil
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ replace (
// are anomolous build errors unless a hash from an accepted merge commit specifically is used.
//github.com/cosmos/cosmos-sdk => ../onomy-sdk
// v0.45.16-ics-onomy
github.com/cosmos/cosmos-sdk => github.com/onomyprotocol/onomy-sdk v0.44.6-0.20230608164016-6a3986f84e54
github.com/cosmos/cosmos-sdk => github.com/onomyprotocol/onomy-sdk v0.44.6-0.20230822174525-3949f4f75a37
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.28
google.golang.org/grpc => google.golang.org/grpc v1.33.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2200,8 +2200,8 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onomyprotocol/onomy-sdk v0.44.6-0.20230608164016-6a3986f84e54 h1:dQY1X5mHfft7vpx2J1ORa0zMld4pWRH4tasD6GXdgKY=
github.com/onomyprotocol/onomy-sdk v0.44.6-0.20230608164016-6a3986f84e54/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40=
github.com/onomyprotocol/onomy-sdk v0.44.6-0.20230822174525-3949f4f75a37 h1:2/Q3vA04I+3TEfdRl9S86d2ksO3AlT4F57dlsV3nMjc=
github.com/onomyprotocol/onomy-sdk v0.44.6-0.20230822174525-3949f4f75a37/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40=
github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
Expand Down
6 changes: 3 additions & 3 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ name = "common"
path = "src/lib/common.rs"

[dependencies]
clap = { version = "4.2", features = ["derive"] }
clap = { version = "4", features = ["derive"] }
log = "0.4"
#onomy_test_lib = { path = "./../../onomy_tests/onomy_test_lib" }
onomy_test_lib = { git = "https://github.com/pendulum-labs/onomy_tests", rev = "b15f4d2143ae8fe8314acd939fb77023bafbf0f5" }
onomy_test_lib = { git = "https://github.com/pendulum-labs/onomy_tests", rev = "47b5a635b8a57b3ce8c72092b4eef89ccddce167" }
serde_json = "1.0"
tokio = "1.28"
tokio = "1"
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

This uses a [super_orchestrator](https://github.com/AaronKutch/super_orchestrator) based test harness system with some middle level functionality supplied by [onomy_tests](https://github.com/pendulum-labs/onomy_tests). All tests should be run from the repository root (not from the ./test directory or anywhere else) by `cargo r --bin [test binary name]`. Run `cargo doc --open` to find developer functions. Dockerfiles used by the tests are in `tests/dockerfiles`, and various resources are located in `tests/logs`, `tests/resources`, and `tests/dockerfiles/dockerfile_resources`.
This uses a [super_orchestrator](https://github.com/AaronKutch/super_orchestrator) based test harness system with some middle level functionality supplied by [onomy_tests](https://github.com/pendulum-labs/onomy_tests). All tests should be run from the repository root (not from the ./test directory or anywhere else) by `cargo r --bin [test binary name]`. Run `cargo doc --open` to find developer functions.

If a set of running containers stalls or you need to terminate them quickly, you do not want to Ctrl-C the main runner which will leave containers running in the background, instead run `cargo r --bin auto_exec_i -- --container-name [name of a container]` from a different terminal and it will find the container. You can Ctrl-C to terminate the container (and usually will terminate the rest if super_orchestrator was used correctly), and can Ctrl-C again to terminate auto_exec_i (or you can leave it to wait for another run of the container).
1 change: 1 addition & 0 deletions tests/dockerfiles/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__tmp.dockerfile
10 changes: 6 additions & 4 deletions tests/dockerfiles/chain_upgrade.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ ENV PATH=$PATH:/root/go/bin
ENV DAEMON_NAME="onomyd"
ENV DAEMON_HOME="/root/.onomy"
# the previous version
ENV ONOMY_CURRENT_VERSION=v1.0.3.5
ENV ONOMY_CURRENT_VERSION=v1.1.1
# the version that currently is implemented by this repository's state
ENV ONOMY_UPGRADE_VERSION=v1.1.1
ENV ONOMY_UPGRADE_VERSION=v1.1.2
ENV ONOMY_UPGRADE_DIR_NAME=$ONOMY_UPGRADE_VERSION

# note that one has to go under `genesis/` and the other under `upgrades/`
ADD https://github.com/onomyprotocol/onomy/releases/download/$ONOMY_CURRENT_VERSION/$DAEMON_NAME $DAEMON_HOME/cosmovisor/genesis/$ONOMY_CURRENT_VERSION/bin/$DAEMON_NAME
ADD ./dockerfile_resources/$DAEMON_NAME $DAEMON_HOME/cosmovisor/upgrades/$ONOMY_UPGRADE_VERSION/bin/$DAEMON_NAME
ADD ./dockerfile_resources/$DAEMON_NAME $DAEMON_HOME/cosmovisor/upgrades/$ONOMY_UPGRADE_DIR_NAME/bin/$DAEMON_NAME
#ADD https://github.com/onomyprotocol/onomy/releases/download/$ONOMY_UPGRADE_VERSION/$DAEMON_NAME $DAEMON_HOME/cosmovisor/upgrades/$ONOMY_UPGRADE_DIR_NAME/bin/$DAEMON_NAME

# for manual testing
RUN chmod +x $DAEMON_HOME/cosmovisor/genesis/$ONOMY_CURRENT_VERSION/bin/$DAEMON_NAME
RUN chmod +x $DAEMON_HOME/cosmovisor/upgrades/$ONOMY_UPGRADE_VERSION/bin/$DAEMON_NAME
RUN chmod +x $DAEMON_HOME/cosmovisor/upgrades/$ONOMY_UPGRADE_DIR_NAME/bin/$DAEMON_NAME

# set up symbolic links
RUN cosmovisor init $DAEMON_HOME/cosmovisor/genesis/$ONOMY_CURRENT_VERSION/bin/$DAEMON_NAME
Expand Down
Loading
Loading