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

Upgrade go to 1.13 & Latest SDK Master #119

Merged
merged 41 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a342efc
Upgrade go to 1.13
alexanderbez Sep 4, 2019
39b5682
Add latest SDK (master)
alexanderbez Sep 4, 2019
e4b40f8
Temp resort to v0.37
alexanderbez Sep 4, 2019
c7c3a7a
Update newApp to set inter-block cache option
alexanderbez Sep 4, 2019
404accf
Add SetHaltTime option in newApp
alexanderbez Sep 9, 2019
f14dfa8
update GaiaApp and sims
fedekunze Sep 5, 2019
0a4b448
readd NewGaiaAppUNSAFE
fedekunze Sep 5, 2019
7863e5f
update gaia app and sims makefile
fedekunze Sep 9, 2019
252edbb
update runsim
fedekunze Sep 9, 2019
8f23386
Fix names
alexanderbez Sep 9, 2019
8571a2c
Add test_sim_multi_seed_long to CI
alexanderbez Sep 9, 2019
9399570
Remove key getter and seal codec
alexanderbez Sep 9, 2019
8984632
Godoc cleanup
alexanderbez Sep 9, 2019
c7762e0
Godoc cleanup
alexanderbez Sep 9, 2019
c89ff51
Fix NewGaiaAppUNSAFE
alexanderbez Sep 9, 2019
054b0b5
Cleanup
alexanderbez Sep 9, 2019
4647699
Update CHANGELOG and remove sim log file
alexanderbez Sep 9, 2019
941a041
Update sim makefile
alexanderbez Sep 9, 2019
154002d
More fixes
alexanderbez Sep 9, 2019
d0a8d68
Undo SIMAPP var
alexanderbez Sep 9, 2019
5c13628
Update usage of sim CLI flags
alexanderbez Sep 9, 2019
1067483
Update SDK version to latest master (15517afeb)
alexanderbez Sep 9, 2019
bed8d94
Add interBlockCacheOpt to full sim
alexanderbez Sep 9, 2019
9c9b3c1
Makefile cleanup
alexanderbez Sep 9, 2019
5d5d4fd
Attempt to fix CI
alexanderbez Sep 9, 2019
9a441d6
Update Circle CI config
alexanderbez Sep 9, 2019
100bfd5
Add missing step directive
alexanderbez Sep 9, 2019
c9938e6
Add missing step directive
alexanderbez Sep 9, 2019
f697cd8
Update app/app.go
alexanderbez Sep 9, 2019
f8d13aa
Remove old linux-defaults
alexanderbez Sep 9, 2019
aeb6852
'<<' must be escaped in 2.1
Sep 9, 2019
b37e952
added binaries persistence and make command
Sep 9, 2019
5d9e0a1
Remove trailing slash
alexanderbez Sep 10, 2019
7ceed8c
changed docs and mac jobs to use executors
Sep 10, 2019
af56933
fixed indentation
Sep 10, 2019
09bc0bf
Update SDK version
alexanderbez Sep 10, 2019
b7a6816
Add additional changelog entry
alexanderbez Sep 10, 2019
e56a17c
Remove tag
alexanderbez Sep 10, 2019
a2c2008
Update SDK version (temp)
alexanderbez Sep 10, 2019
77c8e44
Fix QueryGovProposals
alexanderbez Sep 10, 2019
32cee01
Update SDK version
alexanderbez Sep 10, 2019
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
351 changes: 156 additions & 195 deletions .circleci/config.yml

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

### Improvements

* [\#119](https://github.com/cosmos/gaia/pull/119) Refactor and upgrade Circle CI
configuration.

### Features

* (gaiad) [\#119](https://github.com/cosmos/gaia/pull/119) Add support for the `--halt-time` and
`--inter-block-cache` CLI flags and configuration.

## [v2.0.0] - 2019-08-22

### Bug Fixes
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ install: go.sum check-ledger
install-debug: go.sum
go install -mod=readonly $(BUILD_FLAGS) ./cmd/gaiadebug



########################################
### Tools & dependencies

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

This repository hosts `Gaia`, the first implementation of the Cosmos Hub.

**Note**: Requires [Go 1.12+](https://golang.org/dl/)
**Note**: Requires [Go 1.13+](https://golang.org/dl/)

**DISCLAIMER**: The current version of Gaia running the Cosmos Hub (v0.34.x) is
__NOT__ maintained in this repository. Gaia and the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk/)
Expand Down
44 changes: 40 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ var (
}
)

// custom tx codec
// MakeCodec creates the application codec. The codec is sealed before it is
// returned.
func MakeCodec() *codec.Codec {
var cdc = codec.New()

Expand All @@ -77,10 +78,10 @@ func MakeCodec() *codec.Codec {
codec.RegisterCrypto(cdc)
codec.RegisterEvidences(cdc)

return cdc
return cdc.Seal()
}

// Extended ABCI application
// GaiaApp extended ABCI application
type GaiaApp struct {
*bam.BaseApp
cdc *codec.Codec
Expand All @@ -105,6 +106,9 @@ type GaiaApp struct {

// the module manager
mm *module.Manager

// simulation manager
sm *module.SimulationManager
}

// NewGaiaApp returns a reference to an initialized GaiaApp.
Expand Down Expand Up @@ -188,7 +192,7 @@ func NewGaiaApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest b
gov.NewAppModule(app.govKeeper, app.supplyKeeper),
mint.NewAppModule(app.mintKeeper),
slashing.NewAppModule(app.slashingKeeper, app.stakingKeeper),
staking.NewAppModule(app.stakingKeeper, app.distrKeeper, app.accountKeeper, app.supplyKeeper),
staking.NewAppModule(app.stakingKeeper, app.accountKeeper, app.supplyKeeper),
)

// During begin block slashing happens after distr.BeginBlocker so that
Expand All @@ -209,6 +213,24 @@ func NewGaiaApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest b
app.mm.RegisterInvariants(&app.crisisKeeper)
app.mm.RegisterRoutes(app.Router(), app.QueryRouter())

// create the simulation manager and define the order of the modules for deterministic simulations
//
// NOTE: This is not required for apps that don't use the simulator for fuzz testing
// transactions.
app.sm = module.NewSimulationManager(
genaccounts.NewAppModule(app.accountKeeper),
auth.NewAppModule(app.accountKeeper),
bank.NewAppModule(app.bankKeeper, app.accountKeeper),
supply.NewAppModule(app.supplyKeeper, app.accountKeeper),
gov.NewAppModule(app.govKeeper, app.supplyKeeper),
mint.NewAppModule(app.mintKeeper),
distr.NewAppModule(app.distrKeeper, app.supplyKeeper),
staking.NewAppModule(app.stakingKeeper, app.accountKeeper, app.supplyKeeper),
slashing.NewAppModule(app.slashingKeeper, app.stakingKeeper),
)

app.sm.RegisterStoreDecoders()

// initialize stores
app.MountKVStores(keys)
app.MountTransientStores(tkeys)
Expand Down Expand Up @@ -261,3 +283,17 @@ func (app *GaiaApp) ModuleAccountAddrs() map[string]bool {

return modAccAddrs
}

// Codec returns the application's sealed codec.
func (app *GaiaApp) Codec() *codec.Codec {
return app.cdc
}

// GetMaccPerms returns a mapping of the application's module account permissions.
func GetMaccPerms() map[string][]string {
modAccPerms := make(map[string][]string)
for k, v := range maccPerms {
modAccPerms[k] = v
}
return modAccPerms
}
4 changes: 2 additions & 2 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tm-db"
db "github.com/tendermint/tm-db"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/simapp"
Expand Down Expand Up @@ -36,7 +36,6 @@ func TestBlackListedAddrs(t *testing.T) {
}

func setGenesis(gapp *GaiaApp) error {

genesisState := simapp.NewDefaultGenesisState()
stateBytes, err := codec.MarshalJSONIndent(gapp.cdc, genesisState)
if err != nil {
Expand All @@ -50,6 +49,7 @@ func setGenesis(gapp *GaiaApp) error {
AppStateBytes: stateBytes,
},
)

gapp.Commit()
return nil
}
2 changes: 1 addition & 1 deletion app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/staking"
)

// export the state of gaia for a genesis file
// ExportAppStateAndValidators export the state of gaia for a genesis file
func (app *GaiaApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string,
) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error) {
// as if they could withdraw from the start of the next block
Expand Down
Loading