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

R4R: Support export at specific height #2792

Merged
merged 39 commits into from
Nov 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7031bc8
Update PENDING.md
cwgoes Nov 9, 2018
d761eb7
Address remaining comments from #2690
cwgoes Nov 9, 2018
f9c7281
Linter fix
cwgoes Nov 9, 2018
241f636
Merge branch 'develop' into cwgoes/fix-gov-sim-more-import-export
cwgoes Nov 9, 2018
338b49b
Slight distribution spec cleanup
Nov 11, 2018
795a76d
More cleanup
Nov 11, 2018
183c7b2
use defer
jaekwon Nov 12, 2018
81ae35c
Merge branch 'develop' into cwgoes/fix-gov-sim-more-import-export
cwgoes Nov 12, 2018
2b32268
Correctly set return code
cwgoes Nov 12, 2018
d2a5353
Merge branch 'develop' into cwgoes/fix-gov-sim-more-import-export
cwgoes Nov 13, 2018
0e56ed9
Fix DiffKVStore
cwgoes Nov 13, 2018
46b331d
Address PR review
Nov 13, 2018
10713e3
Working on stake import/export
cwgoes Nov 13, 2018
3686a3f
Only apply validator set updates on initial genesis
cwgoes Nov 13, 2018
267728f
Clarify comment
cwgoes Nov 13, 2018
7cb314e
Update PENDING.md
cwgoes Nov 13, 2018
fa5622e
Export specific height
cwgoes Nov 13, 2018
737d024
Check error
cwgoes Nov 13, 2018
4a9ce8a
Update docs
cwgoes Nov 13, 2018
cb40646
Bugfix
cwgoes Nov 13, 2018
1f632e3
Merge branch 'develop' into cwgoes/export-at-height
cwgoes Nov 14, 2018
6e9c3f8
Merge PR #2744: Fix Makefile targets dependencies
alessio Nov 14, 2018
9118cd7
Update docs/spec/distribution/overview.md
rigelrozanski Nov 14, 2018
4b5be08
Update docs/spec/distribution/overview.md
rigelrozanski Nov 14, 2018
b1a1f19
Update docs/spec/distribution/overview.md
rigelrozanski Nov 14, 2018
2bff5c2
Merge PR #2748: Fix governance simulation, more import/export work
cwgoes Nov 14, 2018
bba7a30
Update overview.md
alexanderbez Nov 14, 2018
6feab55
Merge PR #2765: Slight cleanup of distribution specification
rigelrozanski Nov 14, 2018
addcfbf
Documentation Structure Change and Cleanup (#2808)
gamarin2 Nov 14, 2018
7f07e93
Bring back banner (#2814)
gamarin2 Nov 14, 2018
45b0e3a
Build docs in CircleCI (#2810)
Nov 14, 2018
0453992
Update contributing.md with new merge policy (#2789)
jackzampolin Nov 14, 2018
555b61e
deleted obsolete file (#2817)
zramsay Nov 14, 2018
2179567
Update PENDING.md
cwgoes Nov 13, 2018
17b9afa
Export specific height
cwgoes Nov 13, 2018
42402d3
Check error
cwgoes Nov 13, 2018
ac0319f
Update docs
cwgoes Nov 13, 2018
f1d5b80
Bugfix
cwgoes Nov 13, 2018
554bdfb
Merge branch 'cwgoes/export-at-height' of github.com:cosmos/cosmos-sd…
jackzampolin Nov 15, 2018
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
23 changes: 22 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ defaults: &defaults
environment:
GOBIN: /tmp/workspace/bin

docs_update: &docs_deploy
working_directory: ~/repo
docker:
- image: tendermint/docs_deployment
environment:
AWS_REGION: us-east-1

jobs:

setup_dependencies:
Expand Down Expand Up @@ -255,12 +262,26 @@ jobs:
make build-linux
make localnet-start
./scripts/localnet-blocks-test.sh 40 5 10 localhost

deploy_docs:
<<: *docs_deploy
steps:
- checkout
- run:
name: Trigger website build
command: |
export LAST_COMMIT=`git rev-parse HEAD`
export DOCS_COMMIT=`git log -1 --format=format:%H --full-diff docs`
if [[ $DOCS_COMMIT == $LAST_COMMIT ]]; then
chamber exec cosmos-sdk -- start_website_build
else
echo "No changes to docs detected"
fi

workflows:
version: 2
test-suite:
jobs:
- deploy_docs
- setup_dependencies
- lint:
requires:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ IMPROVEMENTS
* [cli] [\#2128](https://github.com/cosmos/cosmos-sdk/issues/2128) fixed segfault when exporting directly after `gaiad init`
* [cli] [\#1255](https://github.com/cosmos/cosmos-sdk/issues/1255) open KeyBase in read-only mode
for query-purpose CLI commands
* [docs] Added commands for querying governance deposits, votes and tally

* Gaia
* [x/stake] [#2023](https://github.com/cosmos/cosmos-sdk/pull/2023) Terminate iteration loop in `UpdateBondedValidators` and `UpdateBondedValidatorsFull` when the first revoked validator is encountered and perform a sanity check.
Expand Down Expand Up @@ -289,6 +290,7 @@ BUG FIXES
* Gaia
* [x/stake] Return correct Tendermint validator update set on `EndBlocker` by not
including non previously bonded validators that have zero power. [#2189](https://github.com/cosmos/cosmos-sdk/issues/2189)
* [docs] Fixed light client section links

* SDK
* [\#1988](https://github.com/cosmos/cosmos-sdk/issues/1988) Make us compile on OpenBSD (disable ledger) [#1988] (https://github.com/cosmos/cosmos-sdk/issues/1988)
Expand Down
50 changes: 37 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# Contributing

Thank you for considering making contributions to Cosmos-SDK and related
repositories!
repositories!

Contributing to this repo can mean many things such as participated in
discussion or proposing code changes. To ensure a smooth workflow for all
contributors, the general procedure for contributing has been established:

1. either [open](https://github.com/cosmos/cosmos-sdk/issues/new/choose) or
[find](https://github.com/cosmos/cosmos-sdk/issues) an issue you'd like to help with,
2. participate in thoughtful discussion on that issue,
[find](https://github.com/cosmos/cosmos-sdk/issues) an issue you'd like to help with,
2. participate in thoughtful discussion on that issue,
3. if you would then like to contribute code:
1. if a the issue is a proposal, ensure that the proposal has been accepted,
1. if a the issue is a proposal, ensure that the proposal has been accepted,
2. ensure that nobody else has already begun working on this issue, if they have
make sure to contact them to collaborate,
make sure to contact them to collaborate,
3. if nobody has been assigned the issue and you would like to work on it
make a comment on the issue to inform the community of your intentions
to begin work,
to begin work,
4. follow standard github best practices: fork the repo, branch from the
tip of `develop`, make some commits, and submit a PR to `develop`,
tip of `develop`, make some commits, and submit a PR to `develop`,
5. include `WIP:` in the PR-title to and submit your PR early, even if it's
incomplete, this indicates to the community you're working on something and
allows them to provide comments early in the development process. When the code
is complete it can be marked as ready-for-review by replacing `WIP:` with
`R4R:` in the PR-title.
`R4R:` in the PR-title.

Note that for very small or blatantly obvious problems (such as typos) it is
Note that for very small or blatantly obvious problems (such as typos) it is
not required to an open issue to submit a PR, but be aware that for more complex
problems/features, if a PR is opened before an adequate design discussion has
taken place in a github issue, that PR runs a high likelihood of being rejected.
taken place in a github issue, that PR runs a high likelihood of being rejected.

Take a peek at our [coding repo](https://github.com/tendermint/coding) for
overall information on repository workflow and standards. Note, we use `make
get_dev_tools` and `make update_dev_tools` for installing the linting tools.

Other notes:
Other notes:
- Looking for a good place to start contributing? How about checking out some
[good first
issues](https://github.com/cosmos/cosmos-sdk/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
Expand All @@ -44,9 +44,33 @@ Other notes:

## Pull Requests

To accommodate review process we suggest that PRs are categorically broken up.
To accommodate review process we suggest that PRs are categorically broken up.
Ideally each PR addresses only a single issue. Additionally, as much as possible
code refactoring and cleanup should be submitted as a separate PRs from bugfixes/feature-additions.
code refactoring and cleanup should be submitted as a separate PRs from bugfixes/feature-additions.

### Process for reviewing PRs

All PRs require two Reviews before merge (except docs changes, or variable name-changes which only require one). When reviewing PRs please use the following review explanations:

- `LGTM` without an explicit approval means that the changes look good, but you haven't pulled down the code, run tests locally and thoroughly reviewed it.
- `Approval` through the GH UI means that you understand the code, documentation/spec is updated in the right places, you have pulled down and tested the code locally. In addition:
- You must also think through anything which ought to be included but is not
- You must think through whether any added code could be partially combined (DRYed) with existing code
- You must think through any potential security issues or incentive-compatibility flaws introduced by the changes
- Naming must be consistent with conventions and the rest of the codebase
- Code must live in a reasonable location, considering dependency structures (e.g. not importing testing modules in production code, or including example code modules in production code).
- if you approve of the PR, you are responsible for fixing any of the issues mentioned here and more
- If you sat down with the PR submitter and did a pairing review please note that in the `Approval`, or your PR comments.
- If you are only making "surface level" reviews, submit any notes as `Comments` without adding a review.

### Updating Documentation

If you open a PR on the Cosmos SDK, it is mandatory to update the relevant documentation in /docs.

* If your change relates to the core SDK (baseapp, store, ...), please update the docs/gaia folder, the docs/examples folder and possibly the docs/spec folder.
* If your changes relate specifically to the gaia application (not including modules), please modify the docs/gaia folder.
* If your changes relate to a module, please update the module's spec in docs/spec. If the module is used by gaia and/or basecoin, you might also need to modify docs/gaia and/or docs/examples.
* If your changes relate to the core of the CLI or Light-client (not specifically to module's CLI/Rest), please modify the docs/clients folder.

## Forking

Expand Down
51 changes: 25 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ GOTOOLS = \
github.com/golang/dep/cmd/dep \
github.com/alecthomas/gometalinter \
github.com/rakyll/statik
GOBIN ?= $(GOPATH)/bin
all: get_tools get_vendor_deps install install_examples install_cosmos-sdk-cli test_lint test

########################################
Expand Down Expand Up @@ -65,26 +66,26 @@ endif

build_examples:
ifeq ($(OS),Windows_NT)
go build $(BUILD_FLAGS) -o build/basecoind.exe ./examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli.exe ./examples/basecoin/cmd/basecli
go build $(BUILD_FLAGS) -o build/democoind.exe ./examples/democoin/cmd/democoind
go build $(BUILD_FLAGS) -o build/democli.exe ./examples/democoin/cmd/democli
go build $(BUILD_FLAGS) -o build/basecoind.exe ./docs/examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli.exe ./docs/examples/basecoin/cmd/basecli
go build $(BUILD_FLAGS) -o build/democoind.exe ./docs/examples/democoin/cmd/democoind
go build $(BUILD_FLAGS) -o build/democli.exe ./docs/examples/democoin/cmd/democli
else
go build $(BUILD_FLAGS) -o build/basecoind ./examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli ./examples/basecoin/cmd/basecli
go build $(BUILD_FLAGS) -o build/democoind ./examples/democoin/cmd/democoind
go build $(BUILD_FLAGS) -o build/democli ./examples/democoin/cmd/democli
go build $(BUILD_FLAGS) -o build/basecoind ./docs/examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli ./docs/examples/basecoin/cmd/basecli
go build $(BUILD_FLAGS) -o build/democoind ./docs/examples/democoin/cmd/democoind
go build $(BUILD_FLAGS) -o build/democli ./docs/examples/democoin/cmd/democli
endif

install: check-ledger update_gaia_lite_docs
go install $(BUILD_FLAGS) ./cmd/gaia/cmd/gaiad
go install $(BUILD_FLAGS) ./cmd/gaia/cmd/gaiacli

install_examples:
go install $(BUILD_FLAGS) ./examples/basecoin/cmd/basecoind
go install $(BUILD_FLAGS) ./examples/basecoin/cmd/basecli
go install $(BUILD_FLAGS) ./examples/democoin/cmd/democoind
go install $(BUILD_FLAGS) ./examples/democoin/cmd/democli
go install $(BUILD_FLAGS) ./docs/examples/basecoin/cmd/basecoind
go install $(BUILD_FLAGS) ./docs/examples/basecoin/cmd/basecli
go install $(BUILD_FLAGS) ./docs/examples/democoin/cmd/democoind
go install $(BUILD_FLAGS) ./docs/examples/democoin/cmd/democli

install_cosmos-sdk-cli:
go install $(BUILD_FLAGS) ./cmd/cosmos-sdk-cli
Expand Down Expand Up @@ -113,26 +114,29 @@ update_dev_tools:
$(GOPATH)/src/github.com/alecthomas/gometalinter/scripts/install.sh -b $(GOBIN)
go get -u github.com/tendermint/lint/golint

get_tools:
get_tools: $(GOBIN)/dep $(GOBIN)/gometalinter $(GOBIN)/statik
@echo "--> Installing tools"
$(MAKE) -C scripts get_tools

get_dev_tools:
$(GOBIN)/%:
$(MAKE) -C scripts $(subst $(GOBIN)/,,$(@))

get_dev_tools: get_tools
@echo "--> Downloading linters (this may take awhile)"
$(GOPATH)/src/github.com/alecthomas/gometalinter/scripts/install.sh -b $(GOBIN)
go get github.com/tendermint/lint/golint

get_vendor_deps:
get_vendor_deps: get_tools
@echo "--> Generating vendor directory via dep ensure"
@rm -rf .vendor-new
@dep ensure -v -vendor-only

update_vendor_deps:
update_vendor_deps: get_tools
@echo "--> Running dep ensure"
@rm -rf .vendor-new
@dep ensure -v

draw_deps:
draw_deps: get_tools
@# requires brew install graphviz or apt-get install graphviz
go get github.com/RobotsAndPencils/goviz
@goviz -i github.com/cosmos/cosmos-sdk/cmd/gaia/cmd/gaiad -d 2 | dot -Tpng -o dependency-graph.png
Expand All @@ -155,8 +159,8 @@ test_cli:
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/cmd/gaia/cli_test` -tags=cli_test

test_examples:
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/examples/basecoin/cli_test` -tags=cli_test
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/examples/democoin/cli_test` -tags=cli_test
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/docs/examples/basecoin/cli_test` -tags=cli_test
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/docs/examples/democoin/cli_test` -tags=cli_test

test_unit:
@VERSION=$(VERSION) go test $(PACKAGES_NOSIMULATION)
Expand All @@ -178,12 +182,7 @@ test_sim_gaia_fast:

test_sim_gaia_import_export:
@echo "Running Gaia import/export simulation. This may take several minutes..."
@go test ./cmd/gaia/app -run TestGaiaImportExport -SimulationEnabled=true -SimulationNumBlocks=50 -SimulationBlockSize=200 -SimulationCommit=true -SimulationSeed=4 -v -timeout 24h
@go test ./cmd/gaia/app -run TestGaiaImportExport -SimulationEnabled=true -SimulationNumBlocks=50 -SimulationBlockSize=200 -SimulationCommit=true -SimulationSeed=11 -v -timeout 24h
@go test ./cmd/gaia/app -run TestGaiaImportExport -SimulationEnabled=true -SimulationNumBlocks=50 -SimulationBlockSize=200 -SimulationCommit=true -SimulationSeed=12 -v -timeout 24h
@go test ./cmd/gaia/app -run TestGaiaImportExport -SimulationEnabled=true -SimulationNumBlocks=50 -SimulationBlockSize=200 -SimulationCommit=true -SimulationSeed=13 -v -timeout 24h
@go test ./cmd/gaia/app -run TestGaiaImportExport -SimulationEnabled=true -SimulationNumBlocks=50 -SimulationBlockSize=200 -SimulationCommit=true -SimulationSeed=414 -v -timeout 24h
@go test ./cmd/gaia/app -run TestGaiaImportExport -SimulationEnabled=true -SimulationNumBlocks=50 -SimulationBlockSize=200 -SimulationCommit=true -SimulationSeed=4142 -v -timeout 24h
@bash scripts/import-export-sim.sh 50

test_sim_gaia_multi_seed:
@echo "Running multi-seed Gaia simulation. This may take awhile!"
Expand Down Expand Up @@ -261,7 +260,7 @@ localnet-stop:
# unless there is a reason not to.
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
.PHONY: build build_cosmos-sdk-cli build_examples install install_examples install_cosmos-sdk-cli install_debug dist \
check_tools check_dev_tools get_tools get_dev_tools get_vendor_deps draw_deps test test_cli test_unit \
check_tools check_dev_tools get_dev_tools get_vendor_deps draw_deps test test_cli test_unit \
test_cover test_lint benchmark devdoc_init devdoc devdoc_save devdoc_update \
build-linux build-docker-gaiadnode localnet-start localnet-stop \
format check-ledger test_sim_gaia_nondeterminism test_sim_modules test_sim_gaia_fast \
Expand Down
8 changes: 6 additions & 2 deletions PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ FEATURES
* [gov][cli] [\#2479](https://github.com/cosmos/cosmos-sdk/issues/2479) Added governance
parameter query commands.
* [stake][cli] [\#2027] Add CLI query command for getting all delegations to a specific validator.

* Gaia
* [app] \#2791 Support export at a specific height, with `gaiad export --height=HEIGHT`.
* [x/gov] [#2479](https://github.com/cosmos/cosmos-sdk/issues/2479) Implemented querier
for getting governance parameters.
* [app] \#2791 Support export at a specific height, with `gaiad export --height=HEIGHT`.

* SDK
* [simulator] \#2682 MsgEditValidator now looks at the validator's max rate, thus it now succeeds a significant portion of the time
Expand All @@ -48,7 +50,7 @@ IMPROVEMENTS
* Gaia
- #2773 Require moniker to be provided on `gaiad init`.
- #2672 [Makefile] Updated for better Windows compatibility and ledger support logic, get_tools was rewritten as a cross-compatible Makefile.

- [#110](https://github.com/tendermint/devops/issues/110) Updated CircleCI job to trigger website build when cosmos docs are updated.
* SDK
- [x/mock/simulation] [\#2720] major cleanup, introduction of helper objects, reorganization

Expand All @@ -68,5 +70,7 @@ BUG FIXES

* SDK

- \#2733 [x/gov, x/mock/simulation] Fix governance simulation, update x/gov import/export

* Tendermint
* [\#2797](https://github.com/tendermint/tendermint/pull/2797) AddressBook requires addresses to have IDs; Do not crap out immediately after sending pex addrs in seed mode
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Cosmos SDK
![banner](docs/graphics/cosmos-sdk-image.png)
![banner](docs/cosmos-sdk-image.png)

[![version](https://img.shields.io/github/tag/cosmos/cosmos-sdk.svg)](https://github.com/cosmos/cosmos-sdk/releases/latest)
[![CircleCI](https://circleci.com/gh/cosmos/cosmos-sdk/tree/master.svg?style=shield)](https://circleci.com/gh/cosmos/cosmos-sdk/tree/master)
Expand All @@ -17,27 +17,26 @@ It is being used to build `Gaia`, the first implementation of the [Cosmos Hub](h
**WARNING**: The SDK has mostly stabilized, but we are still making some
breaking changes.

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

## Gaia Testnet

To install the binaries, read the [install instructions](./docs/gaia/installation.md)

To join the latest testnet, follow
[the guide](./docs/getting-started/join-testnet.md).
[the guide](./docs/gaia/join-testnet.md).

For status updates and genesis files, see the
[testnets repo](https://github.com/cosmos/testnets).

## Install

See the
[install instructions](./docs/getting-started/installation.md).

## Quick Start

See the [Cosmos Docs](https://cosmos.network/docs/)
To learn how the SDK works from a high-level perspective, go to the [SDK Intro](./docs/intro/README.md).

If you want to get started quickly and learn how to build on top of the SDK, please follow the [SDK Application Tutorial](https://github.com/cosmos/sdk-application-tutorial). You can also fork the tutorial's repo to get started building your own Cosmos SDK application.

- [Getting started with the SDK](./docs/sdk/core/intro.md)
- [SDK Examples](/examples)
For more, please go to the [Cosmos SDK Docs](./docs/README.md)

## Disambiguation

Expand Down
2 changes: 1 addition & 1 deletion cmd/cosmos-sdk-cli/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
tmversion "github.com/tendermint/tendermint/version"
)

var remoteBasecoinPath = "github.com/cosmos/cosmos-sdk/examples/basecoin"
var remoteBasecoinPath = "github.com/cosmos/cosmos-sdk/docs/examples/basecoin"

// Replacer to replace all instances of basecoin/basecli/BasecoinApp to project specific names
// Gets initialized when initCmd is executing after getting the project name from user
Expand Down
7 changes: 7 additions & 0 deletions cmd/gaia/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ func (app *GaiaApp) initChainer(ctx sdk.Context, req abci.RequestInitChain) abci
gov.InitGenesis(ctx, app.govKeeper, genesisState.GovData)
mint.InitGenesis(ctx, app.mintKeeper, genesisState.MintData)
distr.InitGenesis(ctx, app.distrKeeper, genesisState.DistrData)

// validate genesis state
err = GaiaValidateGenesisState(genesisState)
if err != nil {
panic(err) // TODO find a way to do this w/o panics
Expand Down Expand Up @@ -322,6 +324,11 @@ func (app *GaiaApp) ExportAppStateAndValidators() (appState json.RawMessage, val
return appState, validators, nil
}

// load a particular height
func (app *GaiaApp) LoadHeight(height int64) error {
return app.LoadVersion(height, app.keyMain)
}

//______________________________________________________________________________________________

// Combined Staking Hooks
Expand Down
8 changes: 7 additions & 1 deletion cmd/gaia/cmd/gaiad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer) abci.Application
}

func exportAppStateAndTMValidators(
logger log.Logger, db dbm.DB, traceStore io.Writer,
logger log.Logger, db dbm.DB, traceStore io.Writer, height int64,
) (json.RawMessage, []tmtypes.GenesisValidator, error) {
gApp := app.NewGaiaApp(logger, db, traceStore)
if height != -1 {
err := gApp.LoadHeight(height)
if err != nil {
return nil, nil, err
}
}
return gApp.ExportAppStateAndValidators()
}
Loading