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

tendermint: Update to master #6471

Closed
wants to merge 69 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
8d258c2
start a branch with needed tm updates
tac0turtle Jun 14, 2020
ac995e3
build(deps): bump github.com/prometheus/client_golang
dependabot-preview[bot] Jun 18, 2020
80ec7b3
Merge branch 'master' into dependabot/go_modules/github.com/prometheu…
alexanderbez Jun 18, 2020
1398a99
generate new proto files
tac0turtle Jun 18, 2020
df5ec42
Merge branch 'master' into dependabot/go_modules/github.com/prometheu…
mergify[bot] Jun 18, 2020
38a0d01
more updates
tac0turtle Jun 19, 2020
012b486
some more fixes
tac0turtle Jun 19, 2020
332aa29
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk
tac0turtle Jun 19, 2020
c6116b6
Merge branch 'master' into marko/tm_update
tac0turtle Jun 19, 2020
581dbf4
moar changes
tac0turtle Jun 19, 2020
7026c42
add simpleproofsfrommap and various fixes
tac0turtle Jun 19, 2020
a540a84
add simplemap
tac0turtle Jun 19, 2020
735a2e3
fix type
tac0turtle Jun 19, 2020
c0869ca
move to tendermint tag
tac0turtle Jun 24, 2020
c6be83b
Merge branch 'master' into marko/tm_update
tac0turtle Jun 24, 2020
7ccba89
fix conflicts with master
fedekunze Jun 26, 2020
b20f010
update tm version for proto update deps
fedekunze Jun 26, 2020
13f02f3
Merge branch 'master' into marko/tm_update
tac0turtle Jun 29, 2020
910255f
fix a lot more issues
tac0turtle Jun 29, 2020
4a19534
go through fixing modules
tac0turtle Jun 29, 2020
f7a79e3
bring over and update proto deps
tac0turtle Jun 29, 2020
4e1c82e
fix more modules
tac0turtle Jun 29, 2020
5f85168
Merge branch 'master' into marko/tm_update
tac0turtle Jun 29, 2020
72029d9
minor updates
tac0turtle Jun 29, 2020
dfee53a
remove tmkv
tac0turtle Jun 29, 2020
b7b7ed4
install more tools
tac0turtle Jun 30, 2020
fb48b41
fix more issues
tac0turtle Jun 30, 2020
dbe492c
more fixes
tac0turtle Jun 30, 2020
043fd1c
more fixes and updates
tac0turtle Jun 30, 2020
2ae8e58
update deps
tac0turtle Jun 30, 2020
ca2290d
Merge branch 'master' into marko/tm_update
tac0turtle Jun 30, 2020
98e09f6
fix some things from master merge
tac0turtle Jun 30, 2020
e268f3d
comment out light client thigs
tac0turtle Jul 1, 2020
0853145
more fixes but blocked on iavl merge
tac0turtle Jul 1, 2020
f0cb879
something??
tac0turtle Jul 1, 2020
087d836
Merge branch 'master' into marko/tm_update
tac0turtle Jul 6, 2020
4029572
Merge branch 'master' into marko/tm_update
tac0turtle Jul 8, 2020
ec1ead2
so close
tac0turtle Jul 8, 2020
09a8bbb
it builds
tac0turtle Jul 8, 2020
b26eef6
Merge branch 'master' into marko/tm_update
tac0turtle Jul 8, 2020
f86ae3e
some linting fixes
tac0turtle Jul 8, 2020
14c08ce
Merge branch 'marko/tm_update' of https://github.com/cosmos/cosmos-sd…
tac0turtle Jul 8, 2020
11049c7
remove verifier
tac0turtle Jul 8, 2020
bbbef3d
fix proto-lint
tac0turtle Jul 8, 2020
c5bc810
fix some tests but others are failing
tac0turtle Jul 8, 2020
1a8ca72
Merge branch 'master' into marko/tm_update
tac0turtle Jul 13, 2020
9da421e
fix some tests
tac0turtle Jul 13, 2020
d166479
fix more tests
tac0turtle Jul 14, 2020
1c36d51
fix events test
tac0turtle Jul 14, 2020
0b887d0
fix more tests
tac0turtle Jul 14, 2020
7ebc066
update to latest tm and iavl
tac0turtle Jul 14, 2020
b4ab5ec
idk something
tac0turtle Jul 16, 2020
6f46118
undo comment
tac0turtle Jul 16, 2020
101133d
fix iterator tests
tac0turtle Jul 20, 2020
436a728
fix imports
tac0turtle Jul 20, 2020
ff815fa
Merge branch 'master' into marko/tm_update
tac0turtle Jul 20, 2020
fb5c2ac
update proto-deps
tac0turtle Jul 20, 2020
80505e0
Merge branch 'master' into marko/tm_update
tac0turtle Jul 20, 2020
96a317c
fix more tests
tac0turtle Jul 21, 2020
13af89c
fix more tests
tac0turtle Jul 21, 2020
ace32bd
fix conflicts with master
fedekunze Jul 21, 2020
01fd97f
Merge branch 'master' into marko/tm_update
tac0turtle Jul 23, 2020
ecf36ed
Merge branch 'master' into marko/tm_update
tac0turtle Jul 23, 2020
d72ad43
fix amino useage
tac0turtle Jul 23, 2020
cae7fc9
fix build
tac0turtle Jul 23, 2020
ca011ee
key change
tac0turtle Jul 24, 2020
a780ed0
Merge branch 'master' into marko/tm_update
tac0turtle Jul 24, 2020
df13158
change test to ed25519
tac0turtle Jul 24, 2020
bf0ead2
Merge branch 'master' into marko/tm_update
tac0turtle Jul 27, 2020
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
37 changes: 24 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,18 @@ proto-check-breaking-docker:
@$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=master
.PHONY: proto-check-breaking-ci

TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.33.1
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/master

GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master

TM_KV_TYPES = third_party/proto/tendermint/libs/kv
TM_MERKLE_TYPES = third_party/proto/tendermint/crypto/merkle
TM_ABCI_TYPES = third_party/proto/tendermint/abci/types
TM_MERKLE_TYPES = third_party/proto/tendermint/crypto
TM_KEY_TYPES = third_party/proto/tendermint/crypto
TM_ABCI_TYPES = third_party/proto/tendermint/abci
TM_TYPES = third_party/proto/tendermint/types
TM_VERSION = third_party/proto/tendermint/version
TM_LIBS = third_party/proto/tendermint/libs/bits

GOGO_PROTO_TYPES = third_party/proto/gogoproto
COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto

Expand All @@ -357,19 +362,25 @@ proto-update-deps:
## (which is the standard Buf.build FILE_LAYOUT)
## Issue link: https://github.com/tendermint/tendermint/issues/5021
@mkdir -p $(TM_ABCI_TYPES)
@curl -sSL $(TM_URL)/abci/types/types.proto > $(TM_ABCI_TYPES)/types.proto
@sed -i '' '7 s|third_party/proto/||g' $(TM_ABCI_TYPES)/types.proto
@sed -i '' '8 s|crypto/merkle/merkle.proto|tendermint/crypto/merkle/merkle.proto|g' $(TM_ABCI_TYPES)/types.proto
@sed -i '' '9 s|libs/kv/types.proto|tendermint/libs/kv/types.proto|g' $(TM_ABCI_TYPES)/types.proto
@curl -sSL $(TM_URL)/proto/tendermint/abci/types.proto > $(TM_ABCI_TYPES)/types.proto

@mkdir -p $(TM_VERSION)
@curl -sSL $(TM_URL)/proto/tendermint/version/types.proto > $(TM_VERSION)/types.proto

@mkdir -p $(TM_KV_TYPES)
@curl -sSL $(TM_URL)/libs/kv/types.proto > $(TM_KV_TYPES)/types.proto
@sed -i '' '5 s|third_party/proto/||g' $(TM_KV_TYPES)/types.proto

@mkdir -p $(TM_TYPES)
@curl -sSL $(TM_URL)/proto/tendermint/types/types.proto > $(TM_TYPES)/types.proto
@curl -sSL $(TM_URL)/proto/tendermint/types/evidence.proto > $(TM_TYPES)/evidence.proto
@curl -sSL $(TM_URL)/proto/tendermint/types/params.proto > $(TM_TYPES)/params.proto

@mkdir -p $(TM_MERKLE_TYPES)
@curl -sSL $(TM_URL)/crypto/merkle/merkle.proto > $(TM_MERKLE_TYPES)/merkle.proto
@sed -i '' '7 s|third_party/proto/||g' $(TM_MERKLE_TYPES)/merkle.proto
@curl -sSL $(TM_URL)/proto/tendermint/crypto/proof.proto > $(TM_MERKLE_TYPES)/proof.proto

@mkdir -p $(TM_KEY_TYPES)
@curl -sSL $(TM_URL)/proto/tendermint/crypto/keys.proto > $(TM_KEY_TYPES)/keys.proto

@mkdir -p $(TM_LIBS)
@curl -sSL $(TM_URL)/proto/tendermint/libs/bits/types.proto > $(TM_LIBS)/types.proto

.PHONY: proto-all proto-gen proto-lint proto-check-breaking proto-update-deps

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ this [blog post](https://blog.cosmos.network/bug-bounty-program-for-tendermint-c

The following is a list of examples of the kinds of bugs we're most interested
in for the Cosmos SDK. See [here](https://github.com/tendermint/tendermint/blob/master/SECURITY.md) for vulnerabilities we are interested
in for Tendermint and other lower-level libraries (eg. [IAVL](https://github.com/tendermint/iavl)).
in for Tendermint and other lower-level libraries (eg. [IAVL](https://github.com/cosmos/iavl)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be removed? I imagine IAVL bugs will now be reported to cosmos and not tendermint


### Core packages

Expand Down
22 changes: 20 additions & 2 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
"syscall"
"time"

"github.com/gogo/protobuf/proto"
abci "github.com/tendermint/tendermint/abci/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/telemetry"
Expand All @@ -19,7 +21,7 @@ import (
// InitChain implements the ABCI interface. It runs the initialization logic
// directly on the CommitMultiStore.
func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitChain) {
initHeader := abci.Header{ChainID: req.ChainId, Time: req.Time}
initHeader := tmproto.Header{ChainID: req.ChainId, Time: req.Time}

// initialize the deliver state and check state with a correct header
app.setDeliverState(initHeader)
Expand Down Expand Up @@ -56,7 +58,7 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC
sort.Sort(abci.ValidatorUpdates(res.Validators))

for i, val := range res.Validators {
if !val.Equal(req.Validators[i]) {
if !proto.Equal(&val, &req.Validators[i]) {
panic(fmt.Errorf("genesisValidators[%d] != req.Validators[%d] ", i, i))
}
}
Expand Down Expand Up @@ -552,3 +554,19 @@ func splitPath(requestPath string) (path []string) {

return path
}

func (app *BaseApp) ListSnapshots(abci.RequestListSnapshots) abci.ResponseListSnapshots {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we plan on supporting state sync for stargate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, there is a separate PR that integrates it but it's blocked on this PR. anyways these are added as no-ops for now

return abci.ResponseListSnapshots{}
}

func (app *BaseApp) OfferSnapshot(abci.RequestOfferSnapshot) abci.ResponseOfferSnapshot {
return abci.ResponseOfferSnapshot{}
}

func (app *BaseApp) LoadSnapshotChunk(abci.RequestLoadSnapshotChunk) abci.ResponseLoadSnapshotChunk {
return abci.ResponseLoadSnapshotChunk{}
}

func (app *BaseApp) ApplySnapshotChunk(abci.RequestApplySnapshotChunk) abci.ResponseApplySnapshotChunk {
return abci.ResponseApplySnapshotChunk{}
}
11 changes: 6 additions & 5 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto/tmhash"
"github.com/tendermint/tendermint/libs/log"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"

"github.com/cosmos/cosmos-sdk/store"
Expand Down Expand Up @@ -257,7 +258,7 @@ func (app *BaseApp) init() error {
}

// needed for the export command which inits from store but never calls initchain
app.setCheckState(abci.Header{})
app.setCheckState(tmproto.Header{})
app.Seal()

return nil
Expand Down Expand Up @@ -310,7 +311,7 @@ func (app *BaseApp) IsSealed() bool { return app.sealed }
// (i.e. a CacheMultiStore) and a new Context with the cache-wrapped multi-store,
// provided header, and minimum gas prices set. It is set on InitChain and reset
// on Commit.
func (app *BaseApp) setCheckState(header abci.Header) {
func (app *BaseApp) setCheckState(header tmproto.Header) {
ms := app.cms.CacheMultiStore()
app.checkState = &state{
ms: ms,
Expand All @@ -322,7 +323,7 @@ func (app *BaseApp) setCheckState(header abci.Header) {
// (i.e. a CacheMultiStore) and a new Context with the cache-wrapped multi-store,
// and provided header. It is set on InitChain and BeginBlock and set to nil on
// Commit.
func (app *BaseApp) setDeliverState(header abci.Header) {
func (app *BaseApp) setDeliverState(header tmproto.Header) {
ms := app.cms.CacheMultiStore()
app.deliverState = &state{
ms: ms,
Expand All @@ -347,14 +348,14 @@ func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *abci.ConsensusParams {
}

if app.paramStore.Has(ctx, ParamStoreKeyEvidenceParams) {
var ep abci.EvidenceParams
var ep tmproto.EvidenceParams

app.paramStore.Get(ctx, ParamStoreKeyEvidenceParams, &ep)
cp.Evidence = &ep
}

if app.paramStore.Has(ctx, ParamStoreKeyValidatorParams) {
var vp abci.ValidatorParams
var vp tmproto.ValidatorParams

app.paramStore.Get(ctx, ParamStoreKeyValidatorParams, &vp)
cp.Validator = &vp
Expand Down
41 changes: 21 additions & 20 deletions baseapp/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"

"github.com/cosmos/cosmos-sdk/codec"
Expand Down Expand Up @@ -137,13 +138,13 @@ func TestLoadVersion(t *testing.T) {
require.Equal(t, emptyCommitID, lastID)

// execute a block, collect commit ID
header := abci.Header{Height: 1}
header := tmproto.Header{Height: 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
res := app.Commit()
commitID1 := sdk.CommitID{Version: 1, Hash: res.Data}

// execute a block, collect commit ID
header = abci.Header{Height: 2}
header = tmproto.Header{Height: 2}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
res = app.Commit()
commitID2 := sdk.CommitID{Version: 2, Hash: res.Data}
Expand Down Expand Up @@ -242,7 +243,7 @@ func TestSetLoader(t *testing.T) {
require.Nil(t, err)

// "execute" one block
app.BeginBlock(abci.RequestBeginBlock{Header: abci.Header{Height: 2}})
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 2}})
res := app.Commit()
require.NotNil(t, res.Data)

Expand Down Expand Up @@ -287,7 +288,7 @@ func TestLoadVersionInvalid(t *testing.T) {
err = app.LoadVersion(-1)
require.Error(t, err)

header := abci.Header{Height: 1}
header := tmproto.Header{Height: 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
res := app.Commit()
commitID1 := sdk.CommitID{Version: 1, Hash: res.Data}
Expand Down Expand Up @@ -337,7 +338,7 @@ func TestLoadVersionPruning(t *testing.T) {
// Commit seven blocks, of which 7 (latest) is kept in addition to 6, 5
// (keep recent) and 3 (keep every).
for i := int64(1); i <= 7; i++ {
app.BeginBlock(abci.RequestBeginBlock{Header: abci.Header{Height: i}})
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: i}})
res := app.Commit()
lastCommitID = sdk.CommitID{Version: i, Hash: res.Data}
}
Expand Down Expand Up @@ -527,7 +528,7 @@ func TestInitChainer(t *testing.T) {
require.Equal(t, value, res.Value)

// commit and ensure we can still query
header := abci.Header{Height: app.LastBlockHeight() + 1}
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
app.Commit()

Expand Down Expand Up @@ -783,7 +784,7 @@ func TestCheckTx(t *testing.T) {
require.Equal(t, nTxs, storedCounter)

// If a block is committed, CheckTx state should be reset.
header := abci.Header{Height: 1}
header := tmproto.Header{Height: 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
app.EndBlock(abci.RequestEndBlock{})
app.Commit()
Expand Down Expand Up @@ -818,7 +819,7 @@ func TestDeliverTx(t *testing.T) {
txPerHeight := 5

for blockN := 0; blockN < nBlocks; blockN++ {
header := abci.Header{Height: int64(blockN) + 1}
header := tmproto.Header{Height: int64(blockN) + 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})

for i := 0; i < txPerHeight; i++ {
Expand Down Expand Up @@ -872,7 +873,7 @@ func TestMultiMsgDeliverTx(t *testing.T) {
// run a multi-msg tx
// with all msgs the same route

header := abci.Header{Height: 1}
header := tmproto.Header{Height: 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
tx := newTxCounter(0, 0, 1, 2)
txBytes, err := codec.MarshalBinaryBare(tx)
Expand Down Expand Up @@ -953,7 +954,7 @@ func TestSimulateTx(t *testing.T) {
nBlocks := 3
for blockN := 0; blockN < nBlocks; blockN++ {
count := int64(blockN + 1)
header := abci.Header{Height: count}
header := tmproto.Header{Height: count}
app.BeginBlock(abci.RequestBeginBlock{Header: header})

tx := newTxCounter(count, count)
Expand Down Expand Up @@ -1008,7 +1009,7 @@ func TestRunInvalidTransaction(t *testing.T) {

app := setupBaseApp(t, anteOpt, routerOpt)

header := abci.Header{Height: 1}
header := tmproto.Header{Height: 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})

// transaction with no messages
Expand Down Expand Up @@ -1136,7 +1137,7 @@ func TestTxGasLimits(t *testing.T) {

app := setupBaseApp(t, anteOpt, routerOpt)

header := abci.Header{Height: 1}
header := tmproto.Header{Height: 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})

testCases := []struct {
Expand Down Expand Up @@ -1250,7 +1251,7 @@ func TestMaxBlockGasLimits(t *testing.T) {
tx := tc.tx

// reset the block gas
header := abci.Header{Height: app.LastBlockHeight() + 1}
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})

// execute the transaction multiple times
Expand Down Expand Up @@ -1304,7 +1305,7 @@ func TestCustomRunTxPanicHandler(t *testing.T) {

app := setupBaseApp(t, anteOpt, routerOpt)

header := abci.Header{Height: 1}
header := tmproto.Header{Height: 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})

app.AddRunTxRecoveryHandler(func(recoveryObj interface{}) error {
Expand Down Expand Up @@ -1346,7 +1347,7 @@ func TestBaseAppAnteHandler(t *testing.T) {
app.InitChain(abci.RequestInitChain{})
registerTestCodec(cdc)

header := abci.Header{Height: app.LastBlockHeight() + 1}
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})

// execute a tx that will fail ante handler execution
Expand Down Expand Up @@ -1454,7 +1455,7 @@ func TestGasConsumptionBadTx(t *testing.T) {

app.InitChain(abci.RequestInitChain{})

header := abci.Header{Height: app.LastBlockHeight() + 1}
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})

tx := newTxCounter(5, 0)
Expand Down Expand Up @@ -1519,7 +1520,7 @@ func TestQuery(t *testing.T) {
require.Equal(t, 0, len(res.Value))

// query is still empty after a DeliverTx before we commit
header := abci.Header{Height: app.LastBlockHeight() + 1}
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})

_, resTx, err = app.Deliver(tx)
Expand All @@ -1545,7 +1546,7 @@ func TestGRPCQuery(t *testing.T) {
app := setupBaseApp(t, grpcQueryOpt)

app.InitChain(abci.RequestInitChain{})
header := abci.Header{Height: app.LastBlockHeight() + 1}
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
app.Commit()

Expand Down Expand Up @@ -1602,7 +1603,7 @@ func TestP2PQuery(t *testing.T) {
func TestGetMaximumBlockGas(t *testing.T) {
app := setupBaseApp(t)
app.InitChain(abci.RequestInitChain{})
ctx := app.NewContext(true, abci.Header{})
ctx := app.NewContext(true, tmproto.Header{})

app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: 0}})
require.Equal(t, uint64(0), app.getMaximumBlockGas(ctx))
Expand Down Expand Up @@ -1660,7 +1661,7 @@ func TestWithRouter(t *testing.T) {
txPerHeight := 5

for blockN := 0; blockN < nBlocks; blockN++ {
header := abci.Header{Height: int64(blockN) + 1}
header := tmproto.Header{Height: int64(blockN) + 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})

for i := 0; i < txPerHeight; i++ {
Expand Down
6 changes: 3 additions & 3 deletions baseapp/helpers.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package baseapp

import (
abci "github.com/tendermint/tendermint/abci/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand All @@ -19,7 +19,7 @@ func (app *BaseApp) Deliver(tx sdk.Tx) (sdk.GasInfo, *sdk.Result, error) {
}

// Context with current {check, deliver}State of the app used by tests.
func (app *BaseApp) NewContext(isCheckTx bool, header abci.Header) sdk.Context {
func (app *BaseApp) NewContext(isCheckTx bool, header tmproto.Header) sdk.Context {
if isCheckTx {
return sdk.NewContext(app.checkState.ms, header, true, app.logger).
WithMinGasPrices(app.minGasPrices)
Expand All @@ -28,6 +28,6 @@ func (app *BaseApp) NewContext(isCheckTx bool, header abci.Header) sdk.Context {
return sdk.NewContext(app.deliverState.ms, header, false, app.logger)
}

func (app *BaseApp) NewUncachedContext(isCheckTx bool, header abci.Header) sdk.Context {
func (app *BaseApp) NewUncachedContext(isCheckTx bool, header tmproto.Header) sdk.Context {
return sdk.NewContext(app.cms, header, isCheckTx, app.logger)
}
Loading