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

27 upgrade #107

Merged
merged 51 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9bfb7a3
Add authority cmd schedule/apply plan (WIP)
blewater Jul 21, 2021
6e8964b
Add schedule/apply upgrade message + methods
blewater Jul 22, 2021
5b1f824
Cli schedule-upgrade
blewater Jul 22, 2021
df48fe9
Add upgrade keeper
blewater Jul 22, 2021
e45615d
Upgrade v0.42.7
blewater Jul 22, 2021
16fcb02
Add startemd
blewater Jul 23, 2021
a7900c9
Add cpemd
blewater Jul 23, 2021
3c3bba6
Modify schedule-upg info param for cosmovisor compatibility
blewater Jul 23, 2021
3b05ded
Remove authority param
blewater Jul 23, 2021
3e384e8
Remove setting handler
blewater Jul 23, 2021
8215b8d
Add upgrade tests to e-Money Sim App
blewater Jul 24, 2021
297f897
Complete emSimApp upgrade keeper tests
blewater Jul 26, 2021
35a2d73
Complete the API
blewater Jul 26, 2021
d3b95e6
Fix app test and remove 2nd upg keeper creation
blewater Jul 26, 2021
134a25e
Link RPC-to-gPRC Apis, cmd documentation touches
blewater Jul 27, 2021
46ed6ac
Add msg server tests
blewater Jul 27, 2021
274e315
Add cmd integration test
blewater Jul 27, 2021
15b03b8
Add cosmovisor testing script
blewater Jul 27, 2021
57b9cd7
Add testing scripts for auto-download option
blewater Jul 28, 2021
83f2b65
Remove linux prefix
blewater Jul 29, 2021
b7fb205
Add cosmovisor docker build
blewater Jul 29, 2021
78b3383
Add cosmovisor variables
blewater Jul 29, 2021
d253536
Replace Alpine with Ubuntu and sync with Gaia
blewater Jul 29, 2021
7348309
Start testnet chain with cosmovisor
blewater Jul 30, 2021
031968a
Add nodes upgrade BDD test
blewater Jul 30, 2021
d506684
Include upgrade in bdd tests list
blewater Aug 2, 2021
ae65df2
Github workflow: Add 1.16, Macos, for go tests
blewater Aug 2, 2021
d19ffd4
Complete docker makefile
blewater Aug 2, 2021
3f786ac
Authority bdd test fix
blewater Aug 2, 2021
7be5857
Fix Macos Docker linux prefix
blewater Aug 2, 2021
120c14f
Macos and overall fixes for single node test
blewater Aug 3, 2021
3c917cf
Add Readme.md
blewater Aug 4, 2021
045ebf4
Merge branch 'develop' into 27-upgrade
blewater Aug 4, 2021
5c1bc10
Use uppercase README convention
mdyring Aug 5, 2021
6aca12f
Minor naming convention changes
mdyring Aug 5, 2021
430144f
Remove ApplyUpgrade() from cli, gRPC
blewater Aug 5, 2021
913659d
Fix copy the OS upg binary
blewater Aug 5, 2021
3844027
Recover from a failed upgrade
blewater Aug 5, 2021
0857a37
Upgrade SDK to 0.42.9
blewater Aug 5, 2021
e530458
Force removal of current, fix typo
blewater Aug 5, 2021
05e85b2
Optimize Upgrade docker image
blewater Aug 5, 2021
fee455b
Revert to buster image for linux compatibility
blewater Aug 5, 2021
4194912
Fix comment
blewater Aug 6, 2021
e92913e
Add upgrade tests by time
blewater Aug 6, 2021
94cc6d9
CapabilityKeeper Init Change per Cosmos #9800
blewater Aug 7, 2021
223ef14
Merge develop into 27-upgrade
blewater Aug 10, 2021
aea0c58
#111 Remove time based upgrade
blewater Aug 10, 2021
7923a5f
Init time to zero
blewater Aug 10, 2021
1f33422
Add text sed repl upgrade handler
blewater Aug 11, 2021
9f8be7a
Remove test ApplyUpgrade
blewater Aug 11, 2021
8f5857f
Remove upg branch dependency
blewater Aug 11, 2021
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ jobs:
test:
strategy:
matrix:
go-version: [1.15.x]
os: [ubuntu-latest]
go-version: [1.15.x, 1.16.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
Expand All @@ -14,5 +14,5 @@ jobs:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Run Makefile Tests
run: make github-ci
- name: Run Go Tests
run: go test ./...
24 changes: 17 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'

build:
go build -mod=readonly $(BUILD_FLAGS) -o build/emd$(BIN_PREFIX) ./cmd/emd

emdupg:
docker run --rm --entrypoint cat emoney/test-upg /go/src/em-ledger/build/emd > "build/emdupg"
chmod +x "build/emdupg"
blewater marked this conversation as resolved.
Show resolved Hide resolved

cosmovisor:
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest

lint:
golangci-lint run

Expand All @@ -66,9 +74,13 @@ install:
build-linux:
# Linux images for docker-compose
# CGO_ENABLED=0 added to solve this issue: https://stackoverflow.com/a/36308464
BIN_PREFIX=-linux LEDGER_ENABLED=false GOOS=linux CGO_ENABLED=0 GOARCH=amd64 $(MAKE) build
BIN_PREFIX=-linux LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build
haasted marked this conversation as resolved.
Show resolved Hide resolved
docker run --rm --entrypoint cat emoney/cosmovisor /go/bin/cosmovisor > build/cosmovisor
chmod +x build/cosmovisor
docker run --rm --entrypoint cat emoney/test-upg /go/src/em-ledger/build/emd-linux > "build/emdupg-linux"
chmod +x "build/emdupg-linux"
blewater marked this conversation as resolved.
Show resolved Hide resolved

build-all: build-linux
build-all: build-linux emdupg
$(MAKE) build

build-docker:
Expand All @@ -82,7 +94,7 @@ test:
go test -mod=readonly ./...

bdd-test:
go test -mod=readonly -v -p 1 -timeout 1h --tags="bdd" bdd_test.go multisigauthority_test.go authority_test.go market_test.go buyback_test.go capacity_test.go staking_test.go bep3swap_test.go
go test -mod=readonly -v -p 1 -timeout 1h --tags="bdd" bdd_test.go multisigauthority_test.go authority_test.go market_test.go buyback_test.go capacity_test.go staking_test.go bep3swap_test.go upgrade_test.go

github-ci: build-linux
$(MAKE) test
Expand All @@ -104,7 +116,7 @@ license:
GO111MODULE=off go get github.com/google/addlicense/
addlicense -f LICENSE .

.PHONY: build build-linux clean test bdd-test build-docker license
.PHONY: build build-linux emdupg cosmovisor clean test bdd-test build-docker license

###############################################################################
### Protobuf ###
Expand Down Expand Up @@ -133,6 +145,4 @@ proto-lint:
proto-check-breaking:
@$(DOCKER_BUF) breaking --against-input $(HTTPS_GIT)#branch=master

.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking


.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking
14 changes: 7 additions & 7 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ package emoney
import (
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
"time"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
"github.com/cosmos/cosmos-sdk/client/rpc"
Expand Down Expand Up @@ -65,11 +71,6 @@ import (
tmos "github.com/tendermint/tendermint/libs/os"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"
"io"
"net/http"
"os"
"path/filepath"
"time"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
Expand Down Expand Up @@ -104,7 +105,6 @@ const (
var (
DefaultNodeHome = os.ExpandEnv("$HOME/.emd")

// todo (reviewer) : please check the listed modules carefully. This are the defaults + em modules
ModuleBasics = module.NewBasicManager(
auth.AppModuleBasic{},
genutil.AppModuleBasic{},
Expand Down Expand Up @@ -342,7 +342,7 @@ func NewApp(
app.inflationKeeper = inflation.NewKeeper(app.appCodec, keys[inflation.StoreKey], app.bankKeeper, app.accountKeeper, app.stakingKeeper, buyback.AccountName, authtypes.FeeCollectorName)
app.lpKeeper = liquidityprovider.NewKeeper(app.appCodec, keys[lptypes.StoreKey], app.bankKeeper)
app.issuerKeeper = issuer.NewKeeper(app.appCodec, keys[issuer.StoreKey], app.lpKeeper, app.inflationKeeper)
app.authorityKeeper = authority.NewKeeper(app.appCodec, keys[authority.StoreKey], app.issuerKeeper, app.bankKeeper, app)
app.authorityKeeper = authority.NewKeeper(app.appCodec, keys[authority.StoreKey], app.issuerKeeper, app.bankKeeper, app, &app.upgradeKeeper)
app.marketKeeper = market.NewKeeper(app.appCodec, keys[market.StoreKey], memKeys[market.StoreKeyIdx], app.accountKeeper, app.bankKeeper)
app.buybackKeeper = buyback.NewKeeper(app.appCodec, keys[buyback.StoreKey], app.marketKeeper, app.accountKeeper, app.stakingKeeper, app.bankKeeper)
app.bep3Keeper = bep3.NewKeeper(app.appCodec, keys[bep3.StoreKey], app.bankKeeper, app.accountKeeper, app.paramsKeeper.Subspace(bep3.ModuleName), GetMaccs())
Expand Down
Loading