chore: downgrade to tendermint v0.34.x (#12958)
This commit is contained in:
parent
f6b5822557
commit
1dee068932
@ -45,6 +45,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
### Improvements
|
||||
|
||||
* [#12958](https://github.com/cosmos/cosmos-sdk/pull/12958) (deps) Downgrade to Tendermint [v0.34.21](https://github.com/tendermint/tendermint/releases/tag/v0.34.21).
|
||||
* [#12952](https://github.com/cosmos/cosmos-sdk/pull/12952) Replace keyring module to Cosmos fork.
|
||||
* [#12352](https://github.com/cosmos/cosmos-sdk/pull/12352) Move the `RegisterSwaggerAPI` logic into a separate helper function in the server package.
|
||||
* [#12876](https://github.com/cosmos/cosmos-sdk/pull/12876) Remove proposer-based rewards.
|
||||
|
||||
2
Makefile
2
Makefile
@ -429,7 +429,7 @@ proto-check-breaking:
|
||||
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main
|
||||
|
||||
|
||||
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.35.9/proto/tendermint
|
||||
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.21/proto/tendermint
|
||||
GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
|
||||
COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master
|
||||
CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.7.0
|
||||
|
||||
@ -5,7 +5,7 @@ go 1.18
|
||||
require (
|
||||
github.com/cosmos/cosmos-proto v1.0.0-alpha7
|
||||
github.com/gogo/protobuf v1.3.2
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b
|
||||
google.golang.org/grpc v1.48.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
)
|
||||
@ -13,7 +13,7 @@ require (
|
||||
require (
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/google/go-cmp v0.5.8 // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
)
|
||||
|
||||
16
api/go.sum
16
api/go.sum
@ -80,9 +80,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e h1:wOQNKh1uuDGRnmgF0jDxh7ctgGy/3P4rYWQRVJD4/Yg=
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@ -96,16 +95,11 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@ -126,15 +120,14 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I=
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b h1:SfSkJugek6xm7lWywqth4r2iTrYLpD8lOj1nMIIhMNM=
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
|
||||
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
@ -149,7 +142,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
||||
@ -111,6 +111,12 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC
|
||||
}
|
||||
}
|
||||
|
||||
// SetOption implements the ABCI interface.
|
||||
func (app *BaseApp) SetOption(req abci.RequestSetOption) (res abci.ResponseSetOption) {
|
||||
// TODO: Implement!
|
||||
return
|
||||
}
|
||||
|
||||
// Info implements the ABCI interface.
|
||||
func (app *BaseApp) Info(req abci.RequestInfo) abci.ResponseInfo {
|
||||
lastCommitID := app.cms.LastCommitID()
|
||||
|
||||
@ -6,7 +6,6 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmprototypes "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
dbm "github.com/tendermint/tm-db"
|
||||
|
||||
pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types"
|
||||
@ -111,8 +110,8 @@ func TestGetBlockRentionHeight(t *testing.T) {
|
||||
|
||||
tc.bapp.SetParamStore(¶mStore{db: dbm.NewMemDB()})
|
||||
tc.bapp.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmprototypes.ConsensusParams{
|
||||
Evidence: &tmprototypes.EvidenceParams{
|
||||
ConsensusParams: &abci.ConsensusParams{
|
||||
Evidence: &tmproto.EvidenceParams{
|
||||
MaxAgeNumBlocks: tc.maxAgeBlocks,
|
||||
},
|
||||
},
|
||||
|
||||
@ -416,15 +416,15 @@ func (app *BaseApp) setDeliverState(header tmproto.Header) {
|
||||
|
||||
// GetConsensusParams returns the current consensus parameters from the BaseApp's
|
||||
// ParamStore. If the BaseApp has no ParamStore defined, nil is returned.
|
||||
func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams {
|
||||
func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *abci.ConsensusParams {
|
||||
if app.paramStore == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
cp := new(tmproto.ConsensusParams)
|
||||
cp := new(abci.ConsensusParams)
|
||||
|
||||
if app.paramStore.Has(ctx, ParamStoreKeyBlockParams) {
|
||||
var bp tmproto.BlockParams
|
||||
var bp abci.BlockParams
|
||||
|
||||
app.paramStore.Get(ctx, ParamStoreKeyBlockParams, &bp)
|
||||
cp.Block = &bp
|
||||
@ -455,7 +455,7 @@ func (app *BaseApp) AddRunTxRecoveryHandler(handlers ...RecoveryHandler) {
|
||||
}
|
||||
|
||||
// StoreConsensusParams sets the consensus parameters to the baseapp's param store.
|
||||
func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp *tmproto.ConsensusParams) {
|
||||
func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp *abci.ConsensusParams) {
|
||||
if app.paramStore == nil {
|
||||
panic("cannot store consensus params with no params store set")
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
@ -88,7 +89,7 @@ func (ps *paramStore) Get(_ sdk.Context, key []byte, ptr interface{}) {
|
||||
}
|
||||
|
||||
func defaultLogger() log.Logger {
|
||||
return log.MustNewDefaultLogger("plain", "info", false).With("module", "sdk/app")
|
||||
return log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app")
|
||||
}
|
||||
|
||||
func newBaseApp(name string, options ...func(*BaseApp)) *BaseApp {
|
||||
@ -1391,8 +1392,8 @@ func TestMaxBlockGasLimits(t *testing.T) {
|
||||
|
||||
app := setupBaseApp(t, anteOpt, routerOpt)
|
||||
app.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{
|
||||
Block: &tmproto.BlockParams{
|
||||
ConsensusParams: &abci.ConsensusParams{
|
||||
Block: &abci.BlockParams{
|
||||
MaxGas: 100,
|
||||
},
|
||||
},
|
||||
@ -1616,8 +1617,8 @@ func TestGasConsumptionBadTx(t *testing.T) {
|
||||
|
||||
app := setupBaseApp(t, anteOpt, routerOpt)
|
||||
app.InitChain(abci.RequestInitChain{
|
||||
ConsensusParams: &tmproto.ConsensusParams{
|
||||
Block: &tmproto.BlockParams{
|
||||
ConsensusParams: &abci.ConsensusParams{
|
||||
Block: &abci.BlockParams{
|
||||
MaxGas: 9,
|
||||
},
|
||||
},
|
||||
@ -1776,16 +1777,16 @@ func TestGetMaximumBlockGas(t *testing.T) {
|
||||
app.InitChain(abci.RequestInitChain{})
|
||||
ctx := app.NewContext(true, tmproto.Header{})
|
||||
|
||||
app.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: 0}})
|
||||
app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: 0}})
|
||||
require.Equal(t, uint64(0), app.getMaximumBlockGas(ctx))
|
||||
|
||||
app.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: -1}})
|
||||
app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: -1}})
|
||||
require.Equal(t, uint64(0), app.getMaximumBlockGas(ctx))
|
||||
|
||||
app.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: 5000000}})
|
||||
app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: 5000000}})
|
||||
require.Equal(t, uint64(5000000), app.getMaximumBlockGas(ctx))
|
||||
|
||||
app.StoreConsensusParams(ctx, &tmproto.ConsensusParams{Block: &tmproto.BlockParams{MaxGas: -5000000}})
|
||||
app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: -5000000}})
|
||||
require.Panics(t, func() { app.getMaximumBlockGas(ctx) })
|
||||
}
|
||||
|
||||
@ -2184,8 +2185,8 @@ func TestBaseApp_EndBlock(t *testing.T) {
|
||||
name := t.Name()
|
||||
logger := defaultLogger()
|
||||
|
||||
cp := &tmproto.ConsensusParams{
|
||||
Block: &tmproto.BlockParams{
|
||||
cp := &abci.ConsensusParams{
|
||||
Block: &abci.BlockParams{
|
||||
MaxGas: 5000000,
|
||||
},
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package baseapp_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
@ -58,7 +59,7 @@ func TestRegisterQueryServiceTwice(t *testing.T) {
|
||||
err := depinject.Inject(makeMinimalConfig(), &appBuilder)
|
||||
require.NoError(t, err)
|
||||
db := dbm.NewMemDB()
|
||||
app := appBuilder.Build(log.MustNewDefaultLogger("plain", "info", false), db, nil)
|
||||
app := appBuilder.Build(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil)
|
||||
|
||||
// First time registering service shouldn't panic.
|
||||
require.NotPanics(t, func() {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package baseapp_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
@ -28,7 +29,7 @@ func TestRegisterMsgService(t *testing.T) {
|
||||
)
|
||||
err := depinject.Inject(makeMinimalConfig(), &appBuilder, ®istry)
|
||||
require.NoError(t, err)
|
||||
app := appBuilder.Build(log.MustNewDefaultLogger("plain", "info", false), dbm.NewMemDB(), nil)
|
||||
app := appBuilder.Build(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), dbm.NewMemDB(), nil)
|
||||
|
||||
require.Panics(t, func() {
|
||||
testdata.RegisterMsgServer(
|
||||
@ -57,7 +58,7 @@ func TestRegisterMsgServiceTwice(t *testing.T) {
|
||||
err := depinject.Inject(makeMinimalConfig(), &appBuilder, ®istry)
|
||||
require.NoError(t, err)
|
||||
db := dbm.NewMemDB()
|
||||
app := appBuilder.Build(log.MustNewDefaultLogger("plain", "info", false), db, nil)
|
||||
app := appBuilder.Build(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil)
|
||||
testdata.RegisterInterfaces(registry)
|
||||
|
||||
// First time registering service shouldn't panic.
|
||||
|
||||
@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
@ -30,7 +31,7 @@ type ParamStore interface {
|
||||
// ValidateBlockParams defines a stateless validation on BlockParams. This function
|
||||
// is called whenever the parameters are updated or stored.
|
||||
func ValidateBlockParams(i interface{}) error {
|
||||
v, ok := i.(tmproto.BlockParams)
|
||||
v, ok := i.(abci.BlockParams)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid parameter type: %T", i)
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
@ -15,11 +16,11 @@ func TestValidateBlockParams(t *testing.T) {
|
||||
expectErr bool
|
||||
}{
|
||||
{nil, true},
|
||||
{&tmproto.BlockParams{}, true},
|
||||
{tmproto.BlockParams{}, true},
|
||||
{tmproto.BlockParams{MaxBytes: -1, MaxGas: -1}, true},
|
||||
{tmproto.BlockParams{MaxBytes: 2000000, MaxGas: -5}, true},
|
||||
{tmproto.BlockParams{MaxBytes: 2000000, MaxGas: 300000}, false},
|
||||
{&abci.BlockParams{}, true},
|
||||
{abci.BlockParams{}, true},
|
||||
{abci.BlockParams{MaxBytes: -1, MaxGas: -1}, true},
|
||||
{abci.BlockParams{MaxBytes: 2000000, MaxGas: -5}, true},
|
||||
{abci.BlockParams{MaxBytes: 2000000, MaxGas: 300000}, false},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package baseapp_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
@ -42,7 +41,7 @@ func GenesisStateWithSingleValidator(t *testing.T, codec codec.Codec, builder *r
|
||||
t.Helper()
|
||||
|
||||
privVal := mock.NewPV()
|
||||
pubKey, err := privVal.GetPubKey(context.TODO())
|
||||
pubKey, err := privVal.GetPubKey()
|
||||
require.NoError(t, err)
|
||||
|
||||
// create validator set with single validator
|
||||
|
||||
@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/tendermint/tendermint/mempool"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
@ -54,7 +55,7 @@ func CheckTendermintError(err error, tx tmtypes.Tx) *sdk.TxResponse {
|
||||
txHash := fmt.Sprintf("%X", tx.Hash())
|
||||
|
||||
switch {
|
||||
case strings.Contains(errStr, strings.ToLower(tmtypes.ErrTxInCache.Error())):
|
||||
case strings.Contains(errStr, strings.ToLower(mempool.ErrTxInCache.Error())):
|
||||
return &sdk.TxResponse{
|
||||
Code: sdkerrors.ErrTxInMempoolCache.ABCICode(),
|
||||
Codespace: sdkerrors.ErrTxInMempoolCache.Codespace(),
|
||||
|
||||
@ -7,8 +7,9 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tendermint/tendermint/crypto/tmhash"
|
||||
"github.com/tendermint/tendermint/mempool"
|
||||
"github.com/tendermint/tendermint/rpc/client/mock"
|
||||
"github.com/tendermint/tendermint/rpc/coretypes"
|
||||
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
@ -42,9 +43,9 @@ func CreateContextWithErrorAndMode(err error, mode string) Context {
|
||||
// Test the correct code is returned when
|
||||
func TestBroadcastError(t *testing.T) {
|
||||
errors := map[error]uint32{
|
||||
tmtypes.ErrTxInCache: sdkerrors.ErrTxInMempoolCache.ABCICode(),
|
||||
tmtypes.ErrTxTooLarge{}: sdkerrors.ErrTxTooLarge.ABCICode(),
|
||||
tmtypes.ErrMempoolIsFull{}: sdkerrors.ErrMempoolIsFull.ABCICode(),
|
||||
mempool.ErrTxInCache: sdkerrors.ErrTxInMempoolCache.ABCICode(),
|
||||
mempool.ErrTxTooLarge{}: sdkerrors.ErrTxTooLarge.ABCICode(),
|
||||
mempool.ErrMempoolIsFull{}: sdkerrors.ErrMempoolIsFull.ABCICode(),
|
||||
}
|
||||
|
||||
modes := []string{
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
"github.com/tendermint/tendermint/rpc/coretypes"
|
||||
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
)
|
||||
|
||||
func getBlock(ctx context.Context, clientCtx client.Context, height *int64) (*coretypes.ResultBlock, error) {
|
||||
|
||||
@ -656,8 +656,8 @@ var xxx_messageInfo_GetNodeInfoRequest proto.InternalMessageInfo
|
||||
|
||||
// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method.
|
||||
type GetNodeInfoResponse struct {
|
||||
NodeInfo *p2p.NodeInfo `protobuf:"bytes,1,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"`
|
||||
ApplicationVersion *VersionInfo `protobuf:"bytes,2,opt,name=application_version,json=applicationVersion,proto3" json:"application_version,omitempty"`
|
||||
DefaultNodeInfo *p2p.DefaultNodeInfo `protobuf:"bytes,1,opt,name=default_node_info,json=defaultNodeInfo,proto3" json:"default_node_info,omitempty"`
|
||||
ApplicationVersion *VersionInfo `protobuf:"bytes,2,opt,name=application_version,json=applicationVersion,proto3" json:"application_version,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GetNodeInfoResponse) Reset() { *m = GetNodeInfoResponse{} }
|
||||
@ -693,9 +693,9 @@ func (m *GetNodeInfoResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_GetNodeInfoResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *GetNodeInfoResponse) GetNodeInfo() *p2p.NodeInfo {
|
||||
func (m *GetNodeInfoResponse) GetDefaultNodeInfo() *p2p.DefaultNodeInfo {
|
||||
if m != nil {
|
||||
return m.NodeInfo
|
||||
return m.DefaultNodeInfo
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -1193,93 +1193,94 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_40c93fb3ef485c5d = []byte{
|
||||
// 1370 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcd, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0xcf, 0xda, 0x69, 0x6c, 0x3f, 0x17, 0x94, 0x4e, 0x43, 0xbb, 0xb1, 0x52, 0xb7, 0xac, 0x44,
|
||||
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, 0xa8, 0x05, 0x15, 0x16, 0x6c, 0x7b,
|
||||
0xca, 0x45, 0x75, 0xef, 0x9d, 0x49, 0x1b, 0x41, 0x05, 0x28, 0xb3, 0x60, 0x5b, 0xae, 0xac, 0xc3,
|
||||
0xf0, 0xd6, 0x68, 0x47, 0x2a, 0x9d, 0xa2, 0x6d, 0xfd, 0x6e, 0xc0, 0xa1, 0xe7, 0x35, 0xaf, 0x1b,
|
||||
0xb9, 0x83, 0x70, 0x60, 0x15, 0xf3, 0x8d, 0x61, 0xdc, 0x11, 0x7b, 0x4d, 0x13, 0xb3, 0x01, 0x65,
|
||||
0x85, 0x9a, 0x93, 0x09, 0x25, 0xa6, 0x44, 0x92, 0x52, 0xd9, 0x4d, 0x3f, 0xad, 0x05, 0x69, 0x7f,
|
||||
0x97, 0x04, 0x78, 0x2d, 0xde, 0x24, 0x69, 0x94, 0x9f, 0x0d, 0x38, 0x98, 0x13, 0xeb, 0x38, 0xe7,
|
||||
0xa1, 0x12, 0x93, 0x00, 0x7b, 0x51, 0xbc, 0x49, 0x74, 0x71, 0xcc, 0x2c, 0x54, 0xda, 0xa4, 0xf6,
|
||||
0xc8, 0xa9, 0x1c, 0xeb, 0x15, 0xfa, 0x1c, 0x0e, 0xfa, 0x94, 0x76, 0xa3, 0x8e, 0x3c, 0x4f, 0xde,
|
||||
0x00, 0x27, 0x6c, 0x3c, 0xad, 0x4f, 0x4f, 0x3c, 0xdd, 0xca, 0x5c, 0xc6, 0x44, 0x99, 0x38, 0x5a,
|
||||
0x6e, 0xfd, 0x58, 0x80, 0x6a, 0xc6, 0x06, 0x21, 0x98, 0x8d, 0xfd, 0x1e, 0x56, 0xa7, 0xd3, 0x95,
|
||||
0x6b, 0xb4, 0x08, 0x65, 0x9f, 0x52, 0x4f, 0xca, 0x0b, 0x52, 0x5e, 0xf2, 0x29, 0xbd, 0x2b, 0x54,
|
||||
0x26, 0x94, 0x52, 0x40, 0x45, 0xa5, 0xd1, 0x9f, 0xe8, 0x08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fc, 0x86, 0x2b, 0xd7, 0x02, 0x65, 0x97, 0x84,
|
||||
0x29, 0xca, 0x2e, 0x09, 0x85, 0x95, 0xdc, 0xaa, 0xaa, 0x77, 0x72, 0x2d, 0xb2, 0x44, 0x71, 0x80,
|
||||
0xbf, 0x94, 0x1d, 0x2b, 0xba, 0xea, 0x43, 0xf8, 0x8a, 0xe9, 0x3c, 0x27, 0xa1, 0x8b, 0xa5, 0xb0,
|
||||
0x1b, 0xf8, 0xdd, 0x3e, 0x36, 0x4b, 0x52, 0xa6, 0x3e, 0xd0, 0x4d, 0xa8, 0xd0, 0x84, 0x90, 0x4d,
|
||||
0x8f, 0x50, 0x26, 0xcb, 0x5c, 0x6d, 0x2e, 0x4f, 0xea, 0xda, 0xba, 0x70, 0xf8, 0x88, 0x32, 0xb7,
|
||||
0x4c, 0xf5, 0x2a, 0x53, 0x82, 0x4a, 0xae, 0x04, 0x4b, 0x50, 0x11, 0x54, 0x18, 0xf5, 0x3b, 0xd8,
|
||||
0x04, 0xb5, 0x67, 0x46, 0x82, 0x0f, 0x66, 0xcb, 0x85, 0xf9, 0xa2, 0x75, 0x1d, 0x4a, 0x3a, 0xa2,
|
||||
0xe0, 0x27, 0x86, 0x4b, 0xda, 0x45, 0xb1, 0x4e, 0x99, 0x14, 0xc6, 0x4c, 0xd2, 0xbe, 0x14, 0xc7,
|
||||
0x7d, 0xb1, 0x6e, 0x43, 0x39, 0x85, 0x85, 0xae, 0x42, 0x51, 0xb0, 0x31, 0xe4, 0x1e, 0x3c, 0x31,
|
||||
0x25, 0x9b, 0xd6, 0xec, 0xc3, 0x7f, 0x8e, 0xce, 0xb8, 0xc2, 0xb3, 0xf9, 0x0b, 0x40, 0x69, 0x03,
|
||||
0x27, 0x83, 0xa8, 0x83, 0xd1, 0x4f, 0x06, 0x54, 0x33, 0xa3, 0x03, 0x35, 0x27, 0xc5, 0x7b, 0x71,
|
||||
0xfc, 0xd4, 0xce, 0xee, 0xc9, 0x47, 0xed, 0x08,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, 0x17, 0xf6, 0x46, 0x6d, 0xd4, 0xb1, 0xfb, 0x06, 0x54, 0x46,
|
||||
0xb7, 0x05, 0x7a, 0x77, 0x12, 0x9c, 0xe7, 0xef, 0xb0, 0x5a, 0x63, 0x0f, 0x1e, 0x1a, 0x72, 0x53,
|
||||
0x42, 0x3e, 0x83, 0x4e, 0x4d, 0x82, 0xec, 0xb7, 0x3b, 0x91, 0x27, 0xff, 0x73, 0xb4, 0xee, 0x3c,
|
||||
0x7c, 0x5a, 0x37, 0x1e, 0x3d, 0xad, 0x1b, 0xff, 0x3e, 0xad, 0x1b, 0xdf, 0x3f, 0xab, 0xcf, 0x3c,
|
||||
0x7a, 0x56, 0x9f, 0x79, 0xf2, 0xac, 0x3e, 0xf3, 0x59, 0x33, 0x8c, 0xf8, 0x56, 0xbf, 0x6d, 0x77,
|
||||
0x48, 0x2f, 0x8d, 0xa7, 0x7e, 0x56, 0x58, 0xb0, 0xed, 0x74, 0xba, 0x11, 0x8e, 0xb9, 0x13, 0x26,
|
||||
0xb4, 0xe3, 0xf0, 0x1e, 0x53, 0x33, 0xb7, 0x3d, 0x27, 0xff, 0x45, 0x9c, 0xfd, 0x3f, 0x00, 0x00,
|
||||
0xff, 0xff, 0x70, 0x47, 0x21, 0xd5, 0xae, 0x10, 0x00, 0x00,
|
||||
// 1382 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x4d, 0x6f, 0x1b, 0xc5,
|
||||
0x1b, 0xcf, 0xda, 0x69, 0x6c, 0x3f, 0xee, 0xff, 0x4f, 0x32, 0x0d, 0xad, 0x63, 0xa5, 0x6e, 0x59,
|
||||
0x89, 0x36, 0x7d, 0xc9, 0x2e, 0x76, 0x5f, 0x0f, 0xa5, 0x55, 0xdd, 0x96, 0x34, 0xb4, 0x94, 0xb0,
|
||||
0x41, 0x1c, 0x10, 0xd2, 0x6a, 0xed, 0x9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5d, 0xc5, 0x51, 0x57, 0x63, 0x2f, 0x40, 0xad, 0x0e, 0x69, 0xef,
|
||||
0x28, 0xad, 0xf9, 0xb5, 0x01, 0xb5, 0x35, 0xcc, 0x3f, 0xf1, 0x3a, 0xa1, 0xef, 0x71, 0x12, 0x6f,
|
||||
0x62, 0xde, 0x1c, 0xdc, 0xc6, 0x61, 0xb0, 0xcd, 0x1d, 0x7c, 0xbf, 0x87, 0x19, 0x47, 0x87, 0x61,
|
||||
0x6e, 0x5b, 0x0a, 0x2a, 0xc6, 0x71, 0x63, 0x25, 0xef, 0xe8, 0x2f, 0xf4, 0x1e, 0xc0, 0x08, 0x73,
|
||||
0x25, 0x77, 0xdc, 0x58, 0x29, 0x37, 0x4e, 0x58, 0xe9, 0x4e, 0xa8, 0x16, 0x69, 0xbc, 0xd6, 0x86,
|
||||
0x17, 0x60, 0x1d, 0xd3, 0x49, 0x79, 0x9a, 0x4f, 0x0d, 0x38, 0xb6, 0x27, 0x04, 0x46, 0x49, 0xc4,
|
||||
0x30, 0x7a, 0x0b, 0x0e, 0x4a, 0xd4, 0x6e, 0x06, 0x49, 0x59, 0xca, 0x94, 0x29, 0x5a, 0x07, 0xe8,
|
||||
0x27, 0x21, 0x58, 0x25, 0x77, 0x3c, 0xbf, 0x52, 0x6e, 0x9c, 0xb2, 0x5e, 0xbd, 0x31, 0xac, 0x61,
|
||||
0x52, 0x27, 0xe5, 0x8c, 0xd6, 0x32, 0xcc, 0xf2, 0x92, 0xd9, 0xc9, 0xb1, 0xcc, 0x14, 0xd4, 0x0c,
|
||||
0xb5, 0x2d, 0x58, 0x5e, 0xc3, 0xfc, 0xae, 0xc7, 0x31, 0xcb, 0xf0, 0x4b, 0x4a, 0x9b, 0x2d, 0xa1,
|
||||
0xb1, 0xef, 0x12, 0xfe, 0x69, 0xc0, 0xd1, 0x3d, 0x12, 0xbd, 0xde, 0x05, 0x7c, 0x68, 0x40, 0x69,
|
||||
0x98, 0x02, 0x35, 0xa0, 0xe0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0x78, 0x5b, 0xa0, 0x77, 0xc6,
|
||||
0xc1, 0x79, 0xf1, 0x0e, 0xab, 0xd6, 0xa7, 0xf0, 0xd0, 0x90, 0x1b, 0x12, 0xf2, 0x59, 0x74, 0x7a,
|
||||
0x1c, 0x64, 0xaf, 0xd5, 0x0e, 0x5d, 0xf9, 0x4f, 0xa4, 0x79, 0xf7, 0xd1, 0xb3, 0x9a, 0xf1, 0xf8,
|
||||
0x59, 0xcd, 0xf8, 0xe7, 0x59, 0xcd, 0xf8, 0xee, 0x79, 0x6d, 0xe6, 0xf1, 0xf3, 0xda, 0xcc, 0xd3,
|
||||
0xe7, 0xb5, 0x99, 0x4f, 0x1b, 0x41, 0xc8, 0xb7, 0x7b, 0x2d, 0xab, 0x4d, 0xba, 0x49, 0x3c, 0xf5,
|
||||
0xb3, 0xca, 0xfc, 0x1d, 0xbb, 0xdd, 0x09, 0x71, 0xc4, 0xed, 0x20, 0xa6, 0x6d, 0x9b, 0x77, 0x99,
|
||||
0x9a, 0xb9, 0xad, 0x39, 0xf9, 0xdf, 0xe2, 0xdc, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x95, 0x18,
|
||||
0x32, 0x53, 0xc4, 0x10, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -2115,9 +2116,9 @@ func (m *GetNodeInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.NodeInfo != nil {
|
||||
if m.DefaultNodeInfo != nil {
|
||||
{
|
||||
size, err := m.NodeInfo.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.DefaultNodeInfo.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@ -2684,8 +2685,8 @@ func (m *GetNodeInfoResponse) Size() (n int) {
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.NodeInfo != nil {
|
||||
l = m.NodeInfo.Size()
|
||||
if m.DefaultNodeInfo != nil {
|
||||
l = m.DefaultNodeInfo.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.ApplicationVersion != nil {
|
||||
@ -4127,7 +4128,7 @@ func (m *GetNodeInfoResponse) Unmarshal(dAtA []byte) error {
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field DefaultNodeInfo", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@ -4154,10 +4155,10 @@ func (m *GetNodeInfoResponse) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.NodeInfo == nil {
|
||||
m.NodeInfo = &p2p.NodeInfo{}
|
||||
if m.DefaultNodeInfo == nil {
|
||||
m.DefaultNodeInfo = &p2p.DefaultNodeInfo{}
|
||||
}
|
||||
if err := m.NodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.DefaultNodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
||||
@ -203,7 +203,7 @@ func (s queryServer) GetNodeInfo(ctx context.Context, req *GetNodeInfoRequest) (
|
||||
}
|
||||
|
||||
resp := GetNodeInfoResponse{
|
||||
NodeInfo: protoNodeInfo,
|
||||
DefaultNodeInfo: protoNodeInfo,
|
||||
ApplicationVersion: &VersionInfo{
|
||||
AppName: nodeInfo.AppName,
|
||||
Name: nodeInfo.Name,
|
||||
|
||||
@ -3,7 +3,7 @@ package tmservice
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/tendermint/tendermint/rpc/coretypes"
|
||||
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
)
|
||||
|
||||
@ -6,8 +6,8 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/tendermint/tendermint/libs/bytes"
|
||||
"github.com/tendermint/tendermint/rpc/coretypes"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
@ -26,7 +26,7 @@ type validatorInfo struct {
|
||||
// ResultStatus is node's info, same as Tendermint, except that we use our own
|
||||
// PubKey.
|
||||
type resultStatus struct {
|
||||
NodeInfo tmtypes.NodeInfo
|
||||
NodeInfo p2p.DefaultNodeInfo
|
||||
SyncInfo coretypes.SyncInfo
|
||||
ValidatorInfo validatorInfo
|
||||
}
|
||||
|
||||
@ -3,9 +3,8 @@ package client
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/tendermint/tendermint/libs/bytes"
|
||||
rpcclient "github.com/tendermint/tendermint/rpc/client"
|
||||
"github.com/tendermint/tendermint/rpc/coretypes"
|
||||
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
)
|
||||
|
||||
// TendermintRPC defines the interface of a Tendermint RPC client needed for
|
||||
@ -17,7 +16,7 @@ type TendermintRPC interface {
|
||||
Status(context.Context) (*coretypes.ResultStatus, error)
|
||||
Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error)
|
||||
BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error)
|
||||
Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error)
|
||||
Tx(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error)
|
||||
TxSearch(
|
||||
ctx context.Context,
|
||||
query string,
|
||||
|
||||
@ -76,7 +76,7 @@ func ReadPageRequest(flagSet *pflag.FlagSet) (*query.PageRequest, error) {
|
||||
// NewClientFromNode sets up Client implementation that communicates with a Tendermint node over
|
||||
// JSON RPC and WebSockets
|
||||
func NewClientFromNode(nodeURI string) (*rpchttp.HTTP, error) {
|
||||
return rpchttp.New(nodeURI)
|
||||
return rpchttp.New(nodeURI, "/websocket")
|
||||
}
|
||||
|
||||
// FlagSetWithPageKeyDecoded returns the provided flagSet with the page-key value base64 decoded (if it exists).
|
||||
|
||||
@ -18,8 +18,8 @@ require (
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/google/go-cmp v0.5.8 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b // indirect
|
||||
)
|
||||
|
||||
@ -93,9 +93,7 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e h1:wOQNKh1uuDGRnmgF0jDxh7ctgGy/3P4rYWQRVJD4/Yg=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@ -109,16 +107,11 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@ -140,15 +133,13 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I=
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b h1:SfSkJugek6xm7lWywqth4r2iTrYLpD8lOj1nMIIhMNM=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
|
||||
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
@ -163,7 +154,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
||||
@ -33,7 +33,7 @@ sed -i 's/127.0.0.1/0.0.0.0/g' /root/.simapp/config/config.toml
|
||||
|
||||
# start simd
|
||||
echo starting simd...
|
||||
simd start --pruning=nothing --mode validator &
|
||||
simd start --pruning=nothing &
|
||||
pid=$!
|
||||
echo simd started with PID $pid
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ version: "3"
|
||||
services:
|
||||
cosmos:
|
||||
image: rosetta-ci:latest
|
||||
command: ["simd", "start","--mode","validator", "--pruning", "nothing", "--grpc-web.enable", "true", "--grpc-web.address", "0.0.0.0:9091"]
|
||||
command: ["simd", "start", "--pruning", "nothing", "--grpc-web.enable", "true", "--grpc-web.address", "0.0.0.0:9091"]
|
||||
ports:
|
||||
- 9090:9090
|
||||
- 26657:26657
|
||||
|
||||
@ -17,10 +17,10 @@ require (
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
golang.org/x/exp v0.0.0-20220428152302-39d4317da171 // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b // indirect
|
||||
google.golang.org/grpc v1.48.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
)
|
||||
|
||||
16
core/go.sum
16
core/go.sum
@ -97,9 +97,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e h1:wOQNKh1uuDGRnmgF0jDxh7ctgGy/3P4rYWQRVJD4/Yg=
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@ -112,16 +111,11 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@ -141,15 +135,14 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I=
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b h1:SfSkJugek6xm7lWywqth4r2iTrYLpD8lOj1nMIIhMNM=
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
|
||||
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
@ -164,7 +157,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
||||
@ -21,6 +21,7 @@ require (
|
||||
filippo.io/edwards25519 v1.0.0-rc.1 // indirect
|
||||
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
|
||||
github.com/99designs/keyring v1.2.1 // indirect
|
||||
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
|
||||
github.com/armon/go-metrics v0.4.0 // indirect
|
||||
github.com/aws/aws-sdk-go v1.40.45 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
@ -45,7 +46,11 @@ require (
|
||||
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
|
||||
github.com/dustin/go-humanize v1.0.0 // indirect
|
||||
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.2 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/go-kit/kit v0.12.0 // indirect
|
||||
github.com/go-kit/log v0.2.1 // indirect
|
||||
github.com/go-logfmt/logfmt v0.5.1 // indirect
|
||||
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/glog v1.0.0 // indirect
|
||||
@ -53,16 +58,18 @@ require (
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/google/btree v1.0.1 // indirect
|
||||
github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
||||
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
|
||||
github.com/gtank/merlin v0.1.1 // indirect
|
||||
github.com/gtank/ristretto255 v0.1.2 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/hashicorp/go-safetemp v1.0.0 // indirect
|
||||
github.com/hashicorp/go-uuid v1.0.1 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
@ -70,16 +77,19 @@ require (
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/jmhodges/levigo v1.0.0 // indirect
|
||||
github.com/klauspost/compress v1.15.1 // indirect
|
||||
github.com/klauspost/compress v1.15.9 // indirect
|
||||
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/mattn/go-colorable v0.1.12 // indirect
|
||||
github.com/mattn/go-isatty v0.0.16 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/mtibben/percent v0.2.1 // indirect
|
||||
github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b // indirect
|
||||
github.com/onsi/ginkgo v1.16.4 // indirect
|
||||
github.com/onsi/gomega v1.19.0 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
|
||||
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
|
||||
@ -90,6 +100,7 @@ require (
|
||||
github.com/prometheus/common v0.37.0 // indirect
|
||||
github.com/prometheus/procfs v0.8.0 // indirect
|
||||
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.8.1 // indirect
|
||||
github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
@ -101,23 +112,22 @@ require (
|
||||
github.com/tendermint/btcd v0.1.1 // indirect
|
||||
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect
|
||||
github.com/tendermint/go-amino v0.16.0 // indirect
|
||||
github.com/tendermint/tendermint v0.35.9 // indirect
|
||||
github.com/tendermint/tendermint v0.34.21 // indirect
|
||||
github.com/tendermint/tm-db v0.6.7 // indirect
|
||||
github.com/ulikunitz/xz v0.5.8 // indirect
|
||||
github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect
|
||||
go.etcd.io/bbolt v1.3.6 // indirect
|
||||
go.opencensus.io v0.23.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect
|
||||
google.golang.org/api v0.81.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b // indirect
|
||||
google.golang.org/grpc v1.48.0 // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
@ -126,3 +136,5 @@ require (
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -25,13 +25,13 @@ require (
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/google/flatbuffers v2.0.0+incompatible // indirect
|
||||
github.com/google/go-cmp v0.5.8 // indirect
|
||||
github.com/klauspost/compress v1.15.1 // indirect
|
||||
github.com/klauspost/compress v1.15.9 // indirect
|
||||
github.com/kr/pretty v0.3.0 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.8.1 // indirect
|
||||
go.opencensus.io v0.23.0 // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
|
||||
@ -85,8 +85,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
|
||||
github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A=
|
||||
github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY=
|
||||
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
@ -152,8 +152,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e h1:wOQNKh1uuDGRnmgF0jDxh7ctgGy/3P4rYWQRVJD4/Yg=
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
||||
@ -114,11 +114,9 @@ One example config to tweak is the `minimum-gas-prices` field inside `app.toml`,
|
||||
Now that everything is set up, you can finally start your node:
|
||||
|
||||
```bash
|
||||
simd start --mode validator
|
||||
simd start
|
||||
```
|
||||
|
||||
> Note: By default nodes are run in full node mode. Running a local network means in most cases, the node is the only node in the network, requiring you to set the mode.
|
||||
|
||||
You should see blocks come in.
|
||||
|
||||
The previous command allow you to run a single node. This is enough for the next section on interacting with this node, but you may wish to run multiple nodes at the same time, and see how consensus happens between them.
|
||||
|
||||
@ -15,9 +15,9 @@ require (
|
||||
github.com/kr/pretty v0.3.0 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.8.1 // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
|
||||
@ -89,9 +89,8 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e h1:wOQNKh1uuDGRnmgF0jDxh7ctgGy/3P4rYWQRVJD4/Yg=
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@ -103,16 +102,11 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@ -127,15 +121,14 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I=
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b h1:SfSkJugek6xm7lWywqth4r2iTrYLpD8lOj1nMIIhMNM=
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
|
||||
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
@ -150,7 +143,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
||||
35
go.mod
35
go.mod
@ -18,7 +18,7 @@ require (
|
||||
github.com/cosmos/btcutil v1.0.4
|
||||
github.com/cosmos/cosmos-proto v1.0.0-alpha7
|
||||
github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a
|
||||
github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-20220726092710-f848e4300a8a
|
||||
github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-00010101000000-000000000000
|
||||
github.com/cosmos/go-bip39 v1.0.0
|
||||
github.com/cosmos/iavl v0.19.1
|
||||
github.com/cosmos/ledger-cosmos-go v0.11.1
|
||||
@ -36,7 +36,7 @@ require (
|
||||
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
|
||||
github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3
|
||||
github.com/improbable-eng/grpc-web v0.15.0
|
||||
github.com/jhump/protoreflect v1.12.1-0.20220417024638-438db461d753
|
||||
github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b
|
||||
github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554
|
||||
github.com/magiconair/properties v1.8.6
|
||||
github.com/mattn/go-isatty v0.0.16
|
||||
@ -54,11 +54,11 @@ require (
|
||||
github.com/tendermint/btcd v0.1.1
|
||||
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15
|
||||
github.com/tendermint/go-amino v0.16.0
|
||||
github.com/tendermint/tendermint v0.35.9
|
||||
github.com/tendermint/tendermint v0.34.21
|
||||
github.com/tendermint/tm-db v0.6.7
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
|
||||
golang.org/x/exp v0.0.0-20220428152302-39d4317da171
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b
|
||||
google.golang.org/grpc v1.48.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
pgregory.net/rapid v0.4.8
|
||||
@ -76,15 +76,18 @@ require (
|
||||
github.com/Antonboom/errname v0.1.7 // indirect
|
||||
github.com/Antonboom/nilnil v0.1.1 // indirect
|
||||
github.com/BurntSushi/toml v1.2.0 // indirect
|
||||
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
|
||||
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
|
||||
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.2.2 // indirect
|
||||
github.com/Masterminds/semver v1.5.0 // indirect
|
||||
github.com/OpenPeeDeeP/depguard v1.1.0 // indirect
|
||||
github.com/Workiva/go-datastructures v1.0.53 // indirect
|
||||
github.com/alexkohler/prealloc v1.0.0 // indirect
|
||||
github.com/alingse/asasalint v0.0.11 // indirect
|
||||
github.com/ashanbrown/forbidigo v1.3.0 // indirect
|
||||
github.com/ashanbrown/makezero v1.1.1 // indirect
|
||||
github.com/aws/aws-sdk-go v1.40.45 // indirect
|
||||
github.com/benbjohnson/clock v1.3.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
|
||||
github.com/bkielbasa/cyclop v1.2.0 // indirect
|
||||
@ -115,12 +118,14 @@ require (
|
||||
github.com/ettle/strcase v0.1.1 // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
github.com/fatih/structtag v1.2.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.1 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.2 // indirect
|
||||
github.com/firefart/nonamedreturns v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/fzipp/gocyclo v0.6.0 // indirect
|
||||
github.com/go-critic/go-critic v0.6.3 // indirect
|
||||
github.com/go-kit/kit v0.12.0 // indirect
|
||||
github.com/go-kit/log v0.2.1 // indirect
|
||||
github.com/go-logfmt/logfmt v0.5.1 // indirect
|
||||
github.com/go-toolsmith/astcast v1.0.0 // indirect
|
||||
github.com/go-toolsmith/astcopy v1.0.0 // indirect
|
||||
github.com/go-toolsmith/astequal v1.0.1 // indirect
|
||||
@ -146,7 +151,7 @@ require (
|
||||
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
|
||||
github.com/google/btree v1.0.1 // indirect
|
||||
github.com/google/go-cmp v0.5.8 // indirect
|
||||
github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/orderedcode v0.0.1 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
|
||||
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
|
||||
@ -155,9 +160,10 @@ require (
|
||||
github.com/gostaticanalysis/comment v1.4.2 // indirect
|
||||
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
|
||||
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/gtank/merlin v0.1.1 // indirect
|
||||
github.com/gtank/ristretto255 v0.1.2 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
@ -174,7 +180,7 @@ require (
|
||||
github.com/julz/importas v0.1.0 // indirect
|
||||
github.com/kisielk/errcheck v1.6.2 // indirect
|
||||
github.com/kisielk/gotool v1.0.0 // indirect
|
||||
github.com/klauspost/compress v1.15.1 // indirect
|
||||
github.com/klauspost/compress v1.15.9 // indirect
|
||||
github.com/kulti/thelper v0.6.3 // indirect
|
||||
github.com/kunwardeep/paralleltest v1.0.6 // indirect
|
||||
github.com/kyoh86/exportloopref v0.1.8 // indirect
|
||||
@ -188,9 +194,10 @@ require (
|
||||
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect
|
||||
github.com/mattn/go-colorable v0.1.12 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
|
||||
github.com/mgechev/revive v1.2.1 // indirect
|
||||
github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect
|
||||
github.com/minio/highwayhash v1.0.2 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
|
||||
@ -201,7 +208,6 @@ require (
|
||||
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
|
||||
github.com/nishanths/exhaustive v0.8.1 // indirect
|
||||
github.com/nishanths/predeclared v0.2.2 // indirect
|
||||
github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/otiai10/copy v1.7.0 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
@ -259,11 +265,11 @@ require (
|
||||
go.uber.org/zap v1.21.0 // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/tools v0.1.12 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect
|
||||
@ -282,6 +288,9 @@ require (
|
||||
|
||||
replace (
|
||||
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
|
||||
// Added temporarily until this get merged (because the pseudo version uses tm 0.35.9 and this causes problem).
|
||||
// Will be in the right next PR.
|
||||
github.com/cosmos/cosmos-sdk/store/tools/ics23 => ./store/tools/ics23
|
||||
// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
|
||||
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
|
||||
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0
|
||||
|
||||
22
go.work.sum
22
go.work.sum
@ -1,21 +1 @@
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
|
||||
github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
|
||||
github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig=
|
||||
github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM=
|
||||
github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8=
|
||||
github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
||||
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
|
||||
github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI=
|
||||
github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI=
|
||||
github.com/consensys/gnark-crypto v0.5.3/go.mod h1:hOdPlWQV1gDLp7faZVeg8Y0iEPFaOUnCc4XeCCk96p0=
|
||||
github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1/go.mod h1:JUMM2MxF9wuwzRWZJjb8BjXsn1BmPmdBd3a75pIct4I=
|
||||
github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
|
||||
github.com/ethereum/go-ethereum v1.10.19/go.mod h1:IJBNMtzKcNHPtllYihy6BL2IgK1u+32JriaTbdt4v+w=
|
||||
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=
|
||||
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0=
|
||||
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90 h1:WXb3TSNmHp2vHoCroCIB1foO/yQ36swABL8aOVeDpgg=
|
||||
github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=
|
||||
github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=
|
||||
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
|
||||
|
||||
@ -39,7 +39,7 @@ require (
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/google/btree v1.0.1 // indirect
|
||||
github.com/jmhodges/levigo v1.0.0 // indirect
|
||||
github.com/klauspost/compress v1.15.1 // indirect
|
||||
github.com/klauspost/compress v1.15.9 // indirect
|
||||
github.com/kr/pretty v0.3.0 // indirect
|
||||
github.com/lib/pq v1.10.6 // indirect
|
||||
github.com/onsi/ginkgo v1.16.4 // indirect
|
||||
@ -49,10 +49,10 @@ require (
|
||||
github.com/rogpeppe/go-internal v1.8.1 // indirect
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
|
||||
go.etcd.io/bbolt v1.3.6 // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
15
orm/go.sum
15
orm/go.sum
@ -121,8 +121,8 @@ github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
|
||||
github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A=
|
||||
github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY=
|
||||
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
@ -219,8 +219,8 @@ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81R
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e h1:wOQNKh1uuDGRnmgF0jDxh7ctgGy/3P4rYWQRVJD4/Yg=
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@ -256,7 +256,6 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@ -280,15 +279,14 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I=
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b h1:SfSkJugek6xm7lWywqth4r2iTrYLpD8lOj1nMIIhMNM=
|
||||
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
|
||||
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
@ -303,7 +301,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
||||
@ -135,8 +135,8 @@ message GetNodeInfoRequest {}
|
||||
|
||||
// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method.
|
||||
message GetNodeInfoResponse {
|
||||
.tendermint.p2p.NodeInfo node_info = 1;
|
||||
VersionInfo application_version = 2;
|
||||
.tendermint.p2p.DefaultNodeInfo default_node_info = 1;
|
||||
VersionInfo application_version = 2;
|
||||
}
|
||||
|
||||
// VersionInfo is the type for the GetNodeInfoResponse message.
|
||||
|
||||
@ -12,31 +12,18 @@ message ProtocolVersion {
|
||||
uint64 app = 3;
|
||||
}
|
||||
|
||||
message NodeInfo {
|
||||
ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false];
|
||||
string node_id = 2 [(gogoproto.customname) = "NodeID"];
|
||||
string listen_addr = 3;
|
||||
string network = 4;
|
||||
string version = 5;
|
||||
bytes channels = 6;
|
||||
string moniker = 7;
|
||||
NodeInfoOther other = 8 [(gogoproto.nullable) = false];
|
||||
message DefaultNodeInfo {
|
||||
ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false];
|
||||
string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"];
|
||||
string listen_addr = 3;
|
||||
string network = 4;
|
||||
string version = 5;
|
||||
bytes channels = 6;
|
||||
string moniker = 7;
|
||||
DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message NodeInfoOther {
|
||||
message DefaultNodeInfoOther {
|
||||
string tx_index = 1;
|
||||
string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"];
|
||||
}
|
||||
|
||||
message PeerInfo {
|
||||
string id = 1 [(gogoproto.customname) = "ID"];
|
||||
repeated PeerAddressInfo address_info = 2;
|
||||
google.protobuf.Timestamp last_connected = 3 [(gogoproto.stdtime) = true];
|
||||
}
|
||||
|
||||
message PeerAddressInfo {
|
||||
string address = 1;
|
||||
google.protobuf.Timestamp last_dial_success = 2 [(gogoproto.stdtime) = true];
|
||||
google.protobuf.Timestamp last_dial_failure = 3 [(gogoproto.stdtime) = true];
|
||||
uint32 dial_failures = 4;
|
||||
}
|
||||
}
|
||||
@ -39,6 +39,6 @@ cd ..
|
||||
cp -r github.com/cosmos/cosmos-sdk/* ./
|
||||
rm -rf github.com
|
||||
|
||||
go mod tidy -compat=1.17
|
||||
go mod tidy -compat=1.18
|
||||
|
||||
./scripts/protocgen2.sh
|
||||
./scripts/protocgen-pulsar.sh
|
||||
|
||||
@ -94,7 +94,7 @@ func (s *Server) Start(cfg config.Config) error {
|
||||
tmCfg.WriteTimeout = time.Duration(cfg.API.RPCWriteTimeout) * time.Second
|
||||
tmCfg.MaxBodyBytes = int64(cfg.API.RPCMaxBodyBytes)
|
||||
|
||||
listener, err := tmrpcserver.Listen(cfg.API.Address, tmCfg.MaxOpenConnections)
|
||||
listener, err := tmrpcserver.Listen(cfg.API.Address, tmCfg)
|
||||
if err != nil {
|
||||
s.mtx.Unlock()
|
||||
return err
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/spf13/cobra"
|
||||
tmcfg "github.com/tendermint/tendermint/config"
|
||||
tmcli "github.com/tendermint/tendermint/libs/cli"
|
||||
tmlog "github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
@ -27,7 +27,7 @@ func Execute(rootCmd *cobra.Command, envPrefix string, defaultHome string) error
|
||||
ctx := CreateExecuteContext(context.Background())
|
||||
|
||||
rootCmd.PersistentFlags().String(flags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic)")
|
||||
rootCmd.PersistentFlags().String(flags.FlagLogFormat, tmlog.LogFormatPlain, "The logging format (json|plain)")
|
||||
rootCmd.PersistentFlags().String(flags.FlagLogFormat, tmcfg.LogFormatPlain, "The logging format (json|plain)")
|
||||
|
||||
executor := tmcli.PrepareBaseCmd(rootCmd, envPrefix, defaultHome)
|
||||
return executor.ExecuteContext(ctx)
|
||||
|
||||
@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
tmjson "github.com/tendermint/tendermint/libs/json"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
@ -79,17 +80,17 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com
|
||||
doc.AppState = exported.AppState
|
||||
doc.Validators = exported.Validators
|
||||
doc.InitialHeight = exported.Height
|
||||
doc.ConsensusParams = &tmtypes.ConsensusParams{
|
||||
Block: tmtypes.BlockParams{
|
||||
doc.ConsensusParams = &tmproto.ConsensusParams{
|
||||
Block: tmproto.BlockParams{
|
||||
MaxBytes: exported.ConsensusParams.Block.MaxBytes,
|
||||
MaxGas: exported.ConsensusParams.Block.MaxGas,
|
||||
},
|
||||
Evidence: tmtypes.EvidenceParams{
|
||||
Evidence: tmproto.EvidenceParams{
|
||||
MaxAgeNumBlocks: exported.ConsensusParams.Evidence.MaxAgeNumBlocks,
|
||||
MaxAgeDuration: exported.ConsensusParams.Evidence.MaxAgeDuration,
|
||||
MaxBytes: exported.ConsensusParams.Evidence.MaxBytes,
|
||||
},
|
||||
Validator: tmtypes.ValidatorParams{
|
||||
Validator: tmproto.ValidatorParams{
|
||||
PubKeyTypes: exported.ConsensusParams.Validator.PubKeyTypes,
|
||||
},
|
||||
}
|
||||
|
||||
@ -37,7 +37,10 @@ import (
|
||||
// interface assertion
|
||||
var _ crgtypes.Client = (*Client)(nil)
|
||||
|
||||
const defaultNodeTimeout = time.Minute
|
||||
const (
|
||||
defaultNodeTimeout = time.Minute
|
||||
tmWebsocketPath = "/websocket"
|
||||
)
|
||||
|
||||
// Client implements a single network client to interact with cosmos based chains
|
||||
type Client struct {
|
||||
@ -104,7 +107,7 @@ func (c *Client) Bootstrap() error {
|
||||
return err
|
||||
}
|
||||
|
||||
tmRPC, err := http.New(c.config.TendermintRPC)
|
||||
tmRPC, err := http.New(c.config.TendermintRPC, tmWebsocketPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
rosettatypes "github.com/coinbase/rosetta-sdk-go/types"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
tmcoretypes "github.com/tendermint/tendermint/rpc/coretypes"
|
||||
tmcoretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
sdkclient "github.com/cosmos/cosmos-sdk/client"
|
||||
@ -338,8 +338,8 @@ func sdkEventToBalanceOperations(status string, event abci.Event) (operations []
|
||||
default:
|
||||
return nil, false
|
||||
case banktypes.EventTypeCoinSpent:
|
||||
spender := sdk.MustAccAddressFromBech32(event.Attributes[0].Value)
|
||||
coins, err := sdk.ParseCoinsNormalized(event.Attributes[1].Value)
|
||||
spender := sdk.MustAccAddressFromBech32(string(event.Attributes[0].Value))
|
||||
coins, err := sdk.ParseCoinsNormalized(string(event.Attributes[1].Value))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -349,8 +349,8 @@ func sdkEventToBalanceOperations(status string, event abci.Event) (operations []
|
||||
accountIdentifier = spender.String()
|
||||
|
||||
case banktypes.EventTypeCoinReceived:
|
||||
receiver := sdk.MustAccAddressFromBech32(event.Attributes[0].Value)
|
||||
coins, err := sdk.ParseCoinsNormalized(event.Attributes[1].Value)
|
||||
receiver := sdk.MustAccAddressFromBech32(string(event.Attributes[0].Value))
|
||||
coins, err := sdk.ParseCoinsNormalized(string(event.Attributes[1].Value))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -362,7 +362,7 @@ func sdkEventToBalanceOperations(status string, event abci.Event) (operations []
|
||||
// rosetta does not have the concept of burning coins, so we need to mock
|
||||
// the burn as a send to an address that cannot be resolved to anything
|
||||
case banktypes.EventTypeCoinBurn:
|
||||
coins, err := sdk.ParseCoinsNormalized(event.Attributes[1].Value)
|
||||
coins, err := sdk.ParseCoinsNormalized(string(event.Attributes[1].Value))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -558,9 +558,9 @@ func (c converter) Peers(peers []tmcoretypes.Peer) []*rosettatypes.Peer {
|
||||
|
||||
for i, peer := range peers {
|
||||
converted[i] = &rosettatypes.Peer{
|
||||
PeerID: string(peer.ID),
|
||||
PeerID: peer.NodeInfo.Moniker,
|
||||
Metadata: map[string]interface{}{
|
||||
"addr": peer.URL,
|
||||
"addr": peer.NodeInfo.ListenAddr,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,14 +11,14 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
abciclient "github.com/tendermint/tendermint/abci/client"
|
||||
"github.com/tendermint/tendermint/abci/server"
|
||||
tcmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
|
||||
tmos "github.com/tendermint/tendermint/libs/os"
|
||||
tmservice "github.com/tendermint/tendermint/libs/service"
|
||||
"github.com/tendermint/tendermint/node"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
pvm "github.com/tendermint/tendermint/privval"
|
||||
"github.com/tendermint/tendermint/proxy"
|
||||
"github.com/tendermint/tendermint/rpc/client/local"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
|
||||
@ -278,22 +278,33 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
|
||||
|
||||
app := appCreator(ctx.Logger, db, traceWriter, ctx.Viper)
|
||||
|
||||
genDoc, err := tmtypes.GenesisDocFromFile(cfg.GenesisFile())
|
||||
nodeKey, err := p2p.LoadOrGenNodeKey(cfg.NodeKeyFile())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
genDocProvider := node.DefaultGenesisDocProviderFunc(cfg)
|
||||
|
||||
var (
|
||||
tmNode tmservice.Service
|
||||
tmNode *node.Node
|
||||
gRPCOnly = ctx.Viper.GetBool(flagGRPCOnly)
|
||||
)
|
||||
|
||||
if gRPCOnly {
|
||||
ctx.Logger.Info("starting node in gRPC only mode; Tendermint is disabled")
|
||||
config.GRPC.Enable = true
|
||||
} else {
|
||||
ctx.Logger.Info("starting node with ABCI Tendermint in-process")
|
||||
|
||||
tmNode, err = node.New(cfg, ctx.Logger, abciclient.NewLocalCreator(app), genDoc)
|
||||
tmNode, err = node.NewNode(
|
||||
cfg,
|
||||
pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()),
|
||||
nodeKey,
|
||||
proxy.NewLocalClientCreator(app),
|
||||
genDocProvider,
|
||||
node.DefaultDBProvider,
|
||||
node.DefaultMetricsProvider(cfg.Instrumentation),
|
||||
ctx.Logger,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -307,18 +318,7 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
|
||||
// service if API or gRPC is enabled, and avoid doing so in the general
|
||||
// case, because it spawns a new local tendermint RPC client.
|
||||
if (config.API.Enable || config.GRPC.Enable) && tmNode != nil {
|
||||
node, ok := tmNode.(local.NodeService)
|
||||
if !ok {
|
||||
return fmt.Errorf("unable to set node type; please try re-installing the binary")
|
||||
}
|
||||
|
||||
localNode, err := local.New(node)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
clientCtx = clientCtx.WithClient(localNode)
|
||||
|
||||
clientCtx := clientCtx.WithClient(local.New(tmNode))
|
||||
app.RegisterTxService(clientCtx)
|
||||
app.RegisterTendermintService(clientCtx)
|
||||
}
|
||||
@ -330,7 +330,7 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
|
||||
|
||||
var apiSrv *api.Server
|
||||
if config.API.Enable {
|
||||
genDoc, err := tmtypes.GenesisDocFromFile(cfg.GenesisFile())
|
||||
genDoc, err := genDocProvider()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -3,14 +3,11 @@ package server
|
||||
// DONTCOVER
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
pvm "github.com/tendermint/tendermint/privval"
|
||||
"github.com/tendermint/tendermint/scripts/keymigrate"
|
||||
"github.com/tendermint/tendermint/scripts/scmigrate"
|
||||
tversion "github.com/tendermint/tendermint/version"
|
||||
"sigs.k8s.io/yaml"
|
||||
|
||||
@ -28,12 +25,12 @@ func ShowNodeIDCmd() *cobra.Command {
|
||||
serverCtx := GetServerContextFromCmd(cmd)
|
||||
cfg := serverCtx.Config
|
||||
|
||||
nodeKey, err := cfg.LoadNodeKeyID()
|
||||
nodeKey, err := p2p.LoadNodeKey(cfg.NodeKeyFile())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println(nodeKey)
|
||||
fmt.Println(nodeKey.ID())
|
||||
return nil
|
||||
},
|
||||
}
|
||||
@ -48,12 +45,8 @@ func ShowValidatorCmd() *cobra.Command {
|
||||
serverCtx := GetServerContextFromCmd(cmd)
|
||||
cfg := serverCtx.Config
|
||||
|
||||
privValidator, err := pvm.LoadFilePV(cfg.PrivValidator.KeyFile(), cfg.PrivValidator.StateFile())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pk, err := privValidator.GetPubKey(cmd.Context())
|
||||
privValidator := pvm.LoadFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile())
|
||||
pk, err := privValidator.GetPubKey()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -86,10 +79,7 @@ func ShowAddressCmd() *cobra.Command {
|
||||
serverCtx := GetServerContextFromCmd(cmd)
|
||||
cfg := serverCtx.Config
|
||||
|
||||
privValidator, err := pvm.LoadFilePV(cfg.PrivValidator.KeyFile(), cfg.PrivValidator.StateFile())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
privValidator := pvm.LoadFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile())
|
||||
|
||||
valConsAddr := (sdk.ConsAddress)(privValidator.GetAddress())
|
||||
fmt.Println(valConsAddr.String())
|
||||
@ -113,7 +103,7 @@ func VersionCmd() *cobra.Command {
|
||||
BlockProtocol uint64
|
||||
P2PProtocol uint64
|
||||
}{
|
||||
Tendermint: tversion.TMVersion,
|
||||
Tendermint: tversion.TMCoreSemVer,
|
||||
ABCI: tversion.ABCIVersion,
|
||||
BlockProtocol: tversion.BlockProtocol,
|
||||
P2PProtocol: tversion.P2PProtocol,
|
||||
@ -127,65 +117,3 @@ func VersionCmd() *cobra.Command {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// makeKeyMigrateCmd is ported from tendermint's key-migrate command, but
|
||||
// uses the SDK's own server.Context.
|
||||
// ref: https://github.com/tendermint/tendermint/blob/master/UPGRADING.md#database-key-format-changes
|
||||
func makeKeyMigrateCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "key-migrate",
|
||||
Short: "Run Tendermint database key migration",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
ctx, cancel := context.WithCancel(cmd.Context())
|
||||
defer cancel()
|
||||
|
||||
serverCtx := GetServerContextFromCmd(cmd)
|
||||
config := serverCtx.Config
|
||||
|
||||
contexts := []string{
|
||||
// this is ordered to put the
|
||||
// (presumably) biggest/most important
|
||||
// subsets first.
|
||||
"blockstore",
|
||||
"state",
|
||||
"peerstore",
|
||||
"tx_index",
|
||||
"evidence",
|
||||
"light",
|
||||
}
|
||||
|
||||
for idx, dbctx := range contexts {
|
||||
serverCtx.Logger.Info("beginning a key migration",
|
||||
"dbctx", dbctx,
|
||||
"num", idx+1,
|
||||
"total", len(contexts),
|
||||
)
|
||||
|
||||
db, err := cfg.DefaultDBProvider(&cfg.DBContext{
|
||||
ID: dbctx,
|
||||
Config: config,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("constructing database handle: %w", err)
|
||||
}
|
||||
|
||||
if err = keymigrate.Migrate(ctx, dbctx, db); err != nil {
|
||||
return fmt.Errorf("running migration for context %q: %w",
|
||||
dbctx, err)
|
||||
}
|
||||
|
||||
if dbctx == "blockstore" {
|
||||
if err := scmigrate.Migrate(ctx, db); err != nil {
|
||||
return fmt.Errorf("running seen commit migration: %w", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
serverCtx.Logger.Info("completed database migration successfully")
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
@ -9,7 +9,6 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
dbm "github.com/tendermint/tm-db"
|
||||
|
||||
@ -71,7 +70,7 @@ type (
|
||||
// Height is the app's latest block height.
|
||||
Height int64
|
||||
// ConsensusParams are the exported consensus params for ABCI.
|
||||
ConsensusParams *tmproto.ConsensusParams
|
||||
ConsensusParams *abci.ConsensusParams
|
||||
}
|
||||
|
||||
// AppExporter is a function that dumps all app state to
|
||||
|
||||
@ -146,7 +146,7 @@ func InterceptConfigsPreRunHandler(cmd *cobra.Command, customAppConfigTemplate s
|
||||
}
|
||||
|
||||
var logWriter io.Writer
|
||||
if strings.ToLower(serverCtx.Viper.GetString(flags.FlagLogFormat)) == tmlog.LogFormatPlain {
|
||||
if strings.ToLower(serverCtx.Viper.GetString(flags.FlagLogFormat)) == tmcfg.LogFormatPlain {
|
||||
logWriter = zerolog.ConsoleWriter{Out: os.Stderr}
|
||||
} else {
|
||||
logWriter = os.Stderr
|
||||
@ -211,9 +211,7 @@ func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customCo
|
||||
conf.P2P.RecvRate = 5120000
|
||||
conf.P2P.SendRate = 5120000
|
||||
conf.Consensus.TimeoutCommit = 5 * time.Second
|
||||
if err := tmcfg.WriteConfigFile(rootDir, conf); err != nil {
|
||||
return nil, fmt.Errorf("error writing config file: %w", err)
|
||||
}
|
||||
tmcfg.WriteConfigFile(tmCfgFile, conf)
|
||||
|
||||
case err != nil:
|
||||
return nil, err
|
||||
@ -282,8 +280,6 @@ func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator type
|
||||
VersionCmd(),
|
||||
tmcmd.ResetAllCmd,
|
||||
tmcmd.ResetStateCmd,
|
||||
tmcmd.InspectCmd,
|
||||
makeKeyMigrateCmd(),
|
||||
)
|
||||
|
||||
startCmd := StartCmd(appCreator, defaultNodeHome)
|
||||
|
||||
@ -107,7 +107,7 @@ func TestInterceptConfigsPreRunHandlerReadsConfigToml(t *testing.T) {
|
||||
t.Fatalf("creating config.toml file failed: %v", err)
|
||||
}
|
||||
|
||||
_, err = writer.WriteString(fmt.Sprintf("db-backend = '%s'\n", testDbBackend))
|
||||
_, err = writer.WriteString(fmt.Sprintf("db_backend = '%s'\n", testDbBackend))
|
||||
if err != nil {
|
||||
t.Fatalf("Failed writing string to config.toml: %v", err)
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package simapp
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
@ -38,7 +39,7 @@ import (
|
||||
|
||||
func TestSimAppExportAndBlockedAddrs(t *testing.T) {
|
||||
db := dbm.NewMemDB()
|
||||
logger, _ := log.NewDefaultLogger("plain", "info", false)
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
app := NewSimappWithCustomOptions(t, false, SetupOptions{
|
||||
Logger: logger,
|
||||
DB: db,
|
||||
@ -55,7 +56,7 @@ func TestSimAppExportAndBlockedAddrs(t *testing.T) {
|
||||
|
||||
app.Commit()
|
||||
|
||||
logger2, _ := log.NewDefaultLogger("plain", "info", false)
|
||||
logger2 := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
// Making a new app object with the db, so that initchain hasn't been called
|
||||
app2 := NewSimApp(logger2, db, nil, true, simtestutil.NewAppOptionsWithFlagHome(DefaultNodeHome))
|
||||
_, err := app2.ExportAppStateAndValidators(false, []string{})
|
||||
@ -69,7 +70,7 @@ func TestGetMaccPerms(t *testing.T) {
|
||||
|
||||
func TestRunMigrations(t *testing.T) {
|
||||
db := dbm.NewMemDB()
|
||||
logger, _ := log.NewDefaultLogger("plain", "info", false)
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
app := NewSimApp(logger, db, nil, true, simtestutil.NewAppOptionsWithFlagHome(DefaultNodeHome))
|
||||
|
||||
// Create a new baseapp and configurator for the purpose of this test.
|
||||
@ -201,7 +202,7 @@ func TestRunMigrations(t *testing.T) {
|
||||
|
||||
func TestInitGenesisOnMigration(t *testing.T) {
|
||||
db := dbm.NewMemDB()
|
||||
logger, _ := log.NewDefaultLogger("plain", "info", false)
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
app := NewSimApp(logger, db, nil, true, simtestutil.NewAppOptionsWithFlagHome(DefaultNodeHome))
|
||||
ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()})
|
||||
|
||||
@ -244,7 +245,7 @@ func TestInitGenesisOnMigration(t *testing.T) {
|
||||
|
||||
func TestUpgradeStateOnGenesis(t *testing.T) {
|
||||
db := dbm.NewMemDB()
|
||||
logger, _ := log.NewDefaultLogger("plain", "info", false)
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
app := NewSimappWithCustomOptions(t, false, SetupOptions{
|
||||
Logger: logger,
|
||||
DB: db,
|
||||
|
||||
@ -15,8 +15,8 @@ import (
|
||||
tmconfig "github.com/tendermint/tendermint/config"
|
||||
tmos "github.com/tendermint/tendermint/libs/os"
|
||||
tmrand "github.com/tendermint/tendermint/libs/rand"
|
||||
tmtime "github.com/tendermint/tendermint/libs/time"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
@ -229,7 +229,6 @@ func initTestnetFiles(
|
||||
nodeConfig.SetRoot(nodeDir)
|
||||
nodeConfig.Moniker = nodeDirName
|
||||
nodeConfig.RPC.ListenAddress = "tcp://0.0.0.0:26657"
|
||||
nodeConfig.Mode = tmconfig.ModeValidator
|
||||
|
||||
if err := os.MkdirAll(filepath.Join(nodeDir, "config"), nodeDirPerm); err != nil {
|
||||
_ = os.RemoveAll(args.outputDir)
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package simapp
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
@ -59,7 +58,7 @@ func NewSimappWithCustomOptions(t *testing.T, isCheckTx bool, options SetupOptio
|
||||
t.Helper()
|
||||
|
||||
privVal := mock.NewPV()
|
||||
pubKey, err := privVal.GetPubKey(context.TODO())
|
||||
pubKey, err := privVal.GetPubKey()
|
||||
require.NoError(t, err)
|
||||
// create validator set with single validator
|
||||
validator := tmtypes.NewValidator(pubKey, 1)
|
||||
@ -101,7 +100,7 @@ func Setup(t *testing.T, isCheckTx bool) *SimApp {
|
||||
t.Helper()
|
||||
|
||||
privVal := mock.NewPV()
|
||||
pubKey, err := privVal.GetPubKey(context.TODO())
|
||||
pubKey, err := privVal.GetPubKey()
|
||||
require.NoError(t, err)
|
||||
|
||||
// create validator set with single validator
|
||||
@ -162,7 +161,7 @@ func SetupWithGenesisAccounts(t *testing.T, genAccs []authtypes.GenesisAccount,
|
||||
t.Helper()
|
||||
|
||||
privVal := mock.NewPV()
|
||||
pubKey, err := privVal.GetPubKey(context.TODO())
|
||||
pubKey, err := privVal.GetPubKey()
|
||||
require.NoError(t, err)
|
||||
|
||||
// create validator set with single validator
|
||||
@ -178,7 +177,7 @@ func GenesisStateWithSingleValidator(t *testing.T, app *SimApp) GenesisState {
|
||||
t.Helper()
|
||||
|
||||
privVal := mock.NewPV()
|
||||
pubKey, err := privVal.GetPubKey(context.TODO())
|
||||
pubKey, err := privVal.GetPubKey()
|
||||
require.NoError(t, err)
|
||||
|
||||
// create validator set with single validator
|
||||
|
||||
@ -53,7 +53,7 @@ var (
|
||||
}
|
||||
testEndBlockRes = abci.ResponseEndBlock{
|
||||
Events: []abci.Event{},
|
||||
ConsensusParamUpdates: &types1.ConsensusParams{},
|
||||
ConsensusParamUpdates: &abci.ConsensusParams{},
|
||||
ValidatorUpdates: []abci.ValidatorUpdate{},
|
||||
}
|
||||
mockTxBytes1 = []byte{9, 8, 7, 6, 5, 4, 3, 2, 1}
|
||||
|
||||
@ -7,7 +7,7 @@ require (
|
||||
github.com/cosmos/cosmos-sdk v0.46.0
|
||||
github.com/cosmos/iavl v0.19.1
|
||||
github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554
|
||||
github.com/tendermint/tendermint v0.35.9
|
||||
github.com/tendermint/tendermint v0.34.21
|
||||
github.com/tendermint/tm-db v0.6.7
|
||||
)
|
||||
|
||||
@ -25,12 +25,16 @@ require (
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/google/btree v1.0.1 // indirect
|
||||
github.com/jmhodges/levigo v1.0.0 // indirect
|
||||
github.com/klauspost/compress v1.15.1 // indirect
|
||||
github.com/klauspost/compress v1.15.9 // indirect
|
||||
github.com/onsi/ginkgo v1.16.4 // indirect
|
||||
github.com/onsi/gomega v1.19.0 // indirect
|
||||
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
|
||||
go.etcd.io/bbolt v1.3.6 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -225,7 +225,7 @@ func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPC() {
|
||||
expErrMsg string
|
||||
}{
|
||||
{"nil request", nil, true, "request cannot be nil"},
|
||||
{"empty request", &tmservice.GetValidatorSetByHeightRequest{}, true, "height must be greater than zero"},
|
||||
{"empty request", &tmservice.GetValidatorSetByHeightRequest{}, true, "height must be greater than 0"},
|
||||
{"no pagination", &tmservice.GetValidatorSetByHeightRequest{Height: 1}, false, ""},
|
||||
{"with pagination", &tmservice.GetValidatorSetByHeightRequest{Height: 1, Pagination: &qtypes.PageRequest{Offset: 0, Limit: 1}}, false, ""},
|
||||
}
|
||||
@ -253,7 +253,7 @@ func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() {
|
||||
expErr bool
|
||||
expErrMsg string
|
||||
}{
|
||||
{"invalid height", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d", vals[0].APIAddress, -1), true, "height must be greater than zero"},
|
||||
{"invalid height", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d", vals[0].APIAddress, -1), true, "height must be greater than 0"},
|
||||
{"no pagination", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d", vals[0].APIAddress, 1), false, ""},
|
||||
{"pagination invalid fields", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d?pagination.offset=-1&pagination.limit=-2", vals[0].APIAddress, 1), true, "strconv.ParseUint"},
|
||||
{"with pagination", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d?pagination.offset=0&pagination.limit=2", vals[0].APIAddress, 1), false, ""},
|
||||
|
||||
@ -129,7 +129,7 @@ func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *t
|
||||
t.Fatalf("error creating config folder: %s", err)
|
||||
}
|
||||
|
||||
logger, _ := log.NewDefaultLogger("plain", "info", false)
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
db := dbm.NewMemDB()
|
||||
app := simapp.NewSimApp(logger, db, nil, true, simtestutil.NewAppOptionsWithFlagHome(tempDir))
|
||||
|
||||
|
||||
@ -608,6 +608,7 @@ func (s *IntegrationTestSuite) TestSimMultiSigTx() {
|
||||
s.Require().NoError(err)
|
||||
|
||||
height, err := s.network.LatestHeight()
|
||||
s.Require().NoError(err)
|
||||
_, err = s.network.WaitForHeight(height + 1)
|
||||
s.Require().NoError(err)
|
||||
|
||||
@ -626,8 +627,10 @@ func (s *IntegrationTestSuite) TestSimMultiSigTx() {
|
||||
fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()),
|
||||
fmt.Sprintf("--gas=%d", flags.DefaultGasLimit),
|
||||
)
|
||||
s.Require().NoError(err)
|
||||
|
||||
height, err = s.network.LatestHeight()
|
||||
s.Require().NoError(err)
|
||||
_, err = s.network.WaitForHeight(height + 1)
|
||||
s.Require().NoError(err)
|
||||
|
||||
@ -672,7 +675,9 @@ func (s *IntegrationTestSuite) TestSimMultiSigTx() {
|
||||
|
||||
// convert from protoJSON to protoBinary for sim
|
||||
sdkTx, err := val1.ClientCtx.TxConfig.TxJSONDecoder()(multiSigWith2Signatures.Bytes())
|
||||
s.Require().NoError(err)
|
||||
txBytes, err := val1.ClientCtx.TxConfig.TxEncoder()(sdkTx)
|
||||
s.Require().NoError(err)
|
||||
|
||||
// simulate tx
|
||||
sim := &tx.SimulateRequest{TxBytes: txBytes}
|
||||
|
||||
@ -23,8 +23,8 @@ import (
|
||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
tmtime "github.com/tendermint/tendermint/libs/time"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/simapp"
|
||||
@ -602,15 +602,15 @@ func (suite *IntegrationTestSuite) TestMsgSendEvents() {
|
||||
}
|
||||
event1.Attributes = append(
|
||||
event1.Attributes,
|
||||
abci.EventAttribute{Key: types.AttributeKeyRecipient, Value: addr2.String()},
|
||||
abci.EventAttribute{Key: []byte(types.AttributeKeyRecipient), Value: []byte(addr2.String())},
|
||||
)
|
||||
event1.Attributes = append(
|
||||
event1.Attributes,
|
||||
abci.EventAttribute{Key: types.AttributeKeySender, Value: addr.String()},
|
||||
abci.EventAttribute{Key: []byte(types.AttributeKeySender), Value: []byte(addr.String())},
|
||||
)
|
||||
event1.Attributes = append(
|
||||
event1.Attributes,
|
||||
abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()},
|
||||
abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins.String())},
|
||||
)
|
||||
|
||||
event2 := sdk.Event{
|
||||
@ -619,7 +619,7 @@ func (suite *IntegrationTestSuite) TestMsgSendEvents() {
|
||||
}
|
||||
event2.Attributes = append(
|
||||
event2.Attributes,
|
||||
abci.EventAttribute{Key: types.AttributeKeySender, Value: addr.String()},
|
||||
abci.EventAttribute{Key: []byte(types.AttributeKeySender), Value: []byte(addr.String())},
|
||||
)
|
||||
|
||||
// events are shifted due to the funding account events
|
||||
@ -668,7 +668,7 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() {
|
||||
suite.Require().NoError(suite.bankKeeper.InputOutputCoins(ctx, input, outputs))
|
||||
|
||||
events = ctx.EventManager().ABCIEvents()
|
||||
suite.Require().Equal(12, len(events)) // 9 events because account funding causes extra minting + coin_spent + coin_recv events
|
||||
suite.Require().Equal(12, len(events)) // 12 events because account funding causes extra minting + coin_spent + coin_recv events
|
||||
|
||||
event1 := sdk.Event{
|
||||
Type: sdk.EventTypeMessage,
|
||||
@ -676,7 +676,7 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() {
|
||||
}
|
||||
event1.Attributes = append(
|
||||
event1.Attributes,
|
||||
abci.EventAttribute{Key: types.AttributeKeySender, Value: addr.String()},
|
||||
abci.EventAttribute{Key: []byte(types.AttributeKeySender), Value: []byte(addr.String())},
|
||||
)
|
||||
suite.Require().Equal(abci.Event(event1), events[7])
|
||||
|
||||
@ -698,22 +698,22 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() {
|
||||
}
|
||||
event2.Attributes = append(
|
||||
event2.Attributes,
|
||||
abci.EventAttribute{Key: types.AttributeKeyRecipient, Value: addr3.String()},
|
||||
abci.EventAttribute{Key: []byte(types.AttributeKeyRecipient), Value: []byte(addr3.String())},
|
||||
)
|
||||
event2.Attributes = append(
|
||||
event2.Attributes,
|
||||
abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()})
|
||||
abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins.String())})
|
||||
event3 := sdk.Event{
|
||||
Type: types.EventTypeTransfer,
|
||||
Attributes: []abci.EventAttribute{},
|
||||
}
|
||||
event3.Attributes = append(
|
||||
event3.Attributes,
|
||||
abci.EventAttribute{Key: types.AttributeKeyRecipient, Value: addr4.String()},
|
||||
abci.EventAttribute{Key: []byte(types.AttributeKeyRecipient), Value: []byte(addr4.String())},
|
||||
)
|
||||
event3.Attributes = append(
|
||||
event3.Attributes,
|
||||
abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins2.String()},
|
||||
abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins2.String())},
|
||||
)
|
||||
// events are shifted due to the funding account events
|
||||
suite.Require().Equal(abci.Event(event1), events[25])
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
package mock
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
@ -25,12 +23,12 @@ func NewPV() PV {
|
||||
}
|
||||
|
||||
// GetPubKey implements PrivValidator interface
|
||||
func (pv PV) GetPubKey(_ context.Context) (crypto.PubKey, error) {
|
||||
func (pv PV) GetPubKey() (crypto.PubKey, error) {
|
||||
return cryptocodec.ToTmPubKeyInterface(pv.PrivKey.PubKey())
|
||||
}
|
||||
|
||||
// SignVote implements PrivValidator interface
|
||||
func (pv PV) SignVote(_ context.Context, chainID string, vote *tmproto.Vote) error {
|
||||
func (pv PV) SignVote(chainID string, vote *tmproto.Vote) error {
|
||||
signBytes := tmtypes.VoteSignBytes(chainID, vote)
|
||||
sig, err := pv.PrivKey.Sign(signBytes)
|
||||
if err != nil {
|
||||
@ -41,7 +39,7 @@ func (pv PV) SignVote(_ context.Context, chainID string, vote *tmproto.Vote) err
|
||||
}
|
||||
|
||||
// SignProposal implements PrivValidator interface
|
||||
func (pv PV) SignProposal(_ context.Context, chainID string, proposal *tmproto.Proposal) error {
|
||||
func (pv PV) SignProposal(chainID string, proposal *tmproto.Proposal) error {
|
||||
signBytes := tmtypes.ProposalSignBytes(chainID, proposal)
|
||||
sig, err := pv.PrivKey.Sign(signBytes)
|
||||
if err != nil {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package mock
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
@ -10,7 +9,7 @@ import (
|
||||
|
||||
func TestGetPubKey(t *testing.T) {
|
||||
pv := NewPV()
|
||||
pb, err := pv.GetPubKey(context.Background())
|
||||
pb, err := pv.GetPubKey()
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, pb)
|
||||
}
|
||||
@ -18,7 +17,7 @@ func TestGetPubKey(t *testing.T) {
|
||||
func TestSignVote(t *testing.T) {
|
||||
pv := NewPV()
|
||||
v := tmproto.Vote{}
|
||||
err := pv.SignVote(context.Background(), "chain-id", &v)
|
||||
err := pv.SignVote("chain-id", &v)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, v.Signature)
|
||||
}
|
||||
@ -26,7 +25,7 @@ func TestSignVote(t *testing.T) {
|
||||
func TestSignProposal(t *testing.T) {
|
||||
pv := NewPV()
|
||||
p := tmproto.Proposal{}
|
||||
err := pv.SignProposal(context.Background(), "chain-id", &p)
|
||||
err := pv.SignProposal("chain-id", &p)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, p.Signature)
|
||||
}
|
||||
|
||||
@ -17,9 +17,8 @@ import (
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/tendermint/tendermint/config"
|
||||
tmrand "github.com/tendermint/tendermint/libs/rand"
|
||||
"github.com/tendermint/tendermint/libs/service"
|
||||
"github.com/tendermint/tendermint/node"
|
||||
tmclient "github.com/tendermint/tendermint/rpc/client"
|
||||
dbm "github.com/tendermint/tm-db"
|
||||
"google.golang.org/grpc"
|
||||
@ -234,7 +233,7 @@ type (
|
||||
ValAddress sdk.ValAddress
|
||||
RPCClient tmclient.Client
|
||||
|
||||
tmNode service.Service
|
||||
tmNode *node.Node
|
||||
api *api.Server
|
||||
grpc *grpc.Server
|
||||
grpcWeb *http.Server
|
||||
@ -321,7 +320,6 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) {
|
||||
ctx := server.NewDefaultContext()
|
||||
tmCfg := ctx.Config
|
||||
tmCfg.Consensus.TimeoutCommit = cfg.TimeoutCommit
|
||||
tmCfg.Mode = config.ModeValidator
|
||||
|
||||
// Only allow the first validator to expose an RPC, API and gRPC
|
||||
// server/client due to Tendermint in-process constraints.
|
||||
|
||||
@ -2,22 +2,22 @@ package network
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
abciclient "github.com/tendermint/tendermint/abci/client"
|
||||
tmos "github.com/tendermint/tendermint/libs/os"
|
||||
tmtime "github.com/tendermint/tendermint/libs/time"
|
||||
"github.com/tendermint/tendermint/node"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
pvm "github.com/tendermint/tendermint/privval"
|
||||
"github.com/tendermint/tendermint/proxy"
|
||||
"github.com/tendermint/tendermint/rpc/client/local"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/server/api"
|
||||
servergrpc "github.com/cosmos/cosmos-sdk/server/grpc"
|
||||
srvtypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/errors"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/genutil"
|
||||
@ -33,36 +33,35 @@ func startInProcess(cfg Config, val *Validator) error {
|
||||
return err
|
||||
}
|
||||
|
||||
app := cfg.AppConstructor(*val)
|
||||
|
||||
genDoc, err := types.GenesisDocFromFile(tmCfg.GenesisFile())
|
||||
nodeKey, err := p2p.LoadOrGenNodeKey(tmCfg.NodeKeyFile())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
val.tmNode, err = node.New(
|
||||
app := cfg.AppConstructor(*val)
|
||||
genDocProvider := node.DefaultGenesisDocProviderFunc(tmCfg)
|
||||
|
||||
tmNode, err := node.NewNode(
|
||||
tmCfg,
|
||||
pvm.LoadOrGenFilePV(tmCfg.PrivValidatorKeyFile(), tmCfg.PrivValidatorStateFile()),
|
||||
nodeKey,
|
||||
proxy.NewLocalClientCreator(app),
|
||||
genDocProvider,
|
||||
node.DefaultDBProvider,
|
||||
node.DefaultMetricsProvider(tmCfg.Instrumentation),
|
||||
logger.With("module", val.Moniker),
|
||||
abciclient.NewLocalCreator(app),
|
||||
genDoc,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := val.tmNode.Start(); err != nil {
|
||||
if err := tmNode.Start(); err != nil {
|
||||
return err
|
||||
}
|
||||
val.tmNode = tmNode
|
||||
|
||||
if val.RPCAddress != "" {
|
||||
node, ok := val.tmNode.(local.NodeService)
|
||||
if !ok {
|
||||
return fmt.Errorf("failed to cast %T to NodeService", val.tmNode)
|
||||
}
|
||||
val.RPCClient, err = local.New(node)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to create a local node")
|
||||
}
|
||||
val.RPCClient = local.New(tmNode)
|
||||
}
|
||||
|
||||
// We'll need a RPC client if the validator exposes a gRPC or REST endpoint.
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package sims
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
@ -37,8 +36,8 @@ const (
|
||||
|
||||
// DefaultConsensusParams defines the default Tendermint consensus params used in
|
||||
// SimApp testing.
|
||||
var DefaultConsensusParams = &tmproto.ConsensusParams{
|
||||
Block: &tmproto.BlockParams{
|
||||
var DefaultConsensusParams = &abci.ConsensusParams{
|
||||
Block: &abci.BlockParams{
|
||||
MaxBytes: 200000,
|
||||
MaxGas: 2000000,
|
||||
},
|
||||
@ -57,7 +56,7 @@ var DefaultConsensusParams = &tmproto.ConsensusParams{
|
||||
// CreateRandomValidatorSet creates a validator set with one random validator
|
||||
func CreateRandomValidatorSet() (*tmtypes.ValidatorSet, error) {
|
||||
privVal := mock.NewPV()
|
||||
pubKey, err := privVal.GetPubKey(context.TODO())
|
||||
pubKey, err := privVal.GetPubKey()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get pub key: %w", err)
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ type Context struct {
|
||||
checkTx bool
|
||||
recheckTx bool // if recheckTx == true, then checkTx must also be true
|
||||
minGasPrice DecCoins
|
||||
consParams *tmproto.ConsensusParams
|
||||
consParams *abci.ConsensusParams
|
||||
eventManager *EventManager
|
||||
priority int64 // The tx priority, only relevant in CheckTx
|
||||
}
|
||||
@ -74,8 +74,8 @@ func (c Context) HeaderHash() tmbytes.HexBytes {
|
||||
return hash
|
||||
}
|
||||
|
||||
func (c Context) ConsensusParams() *tmproto.ConsensusParams {
|
||||
return proto.Clone(c.consParams).(*tmproto.ConsensusParams)
|
||||
func (c Context) ConsensusParams() *abci.ConsensusParams {
|
||||
return proto.Clone(c.consParams).(*abci.ConsensusParams)
|
||||
}
|
||||
|
||||
func (c Context) Deadline() (deadline time.Time, ok bool) {
|
||||
@ -217,7 +217,7 @@ func (c Context) WithMinGasPrices(gasPrices DecCoins) Context {
|
||||
}
|
||||
|
||||
// WithConsensusParams returns a Context with an updated consensus params
|
||||
func (c Context) WithConsensusParams(params *tmproto.ConsensusParams) Context {
|
||||
func (c Context) WithConsensusParams(params *abci.ConsensusParams) Context {
|
||||
c.consParams = params
|
||||
return c
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ func (s *contextTestSuite) TestContextWithCustom() {
|
||||
|
||||
// test consensus param
|
||||
s.Require().Nil(ctx.ConsensusParams())
|
||||
cp := &tmproto.ConsensusParams{}
|
||||
cp := &abci.ConsensusParams{}
|
||||
s.Require().Equal(cp, ctx.WithConsensusParams(cp).ConsensusParams())
|
||||
|
||||
// test inner context
|
||||
|
||||
@ -98,8 +98,8 @@ func TypedEventToEvent(tev proto.Message) (Event, error) {
|
||||
for _, k := range keys {
|
||||
v := attrMap[k]
|
||||
attrs = append(attrs, abci.EventAttribute{
|
||||
Key: k,
|
||||
Value: string(v),
|
||||
Key: []byte(k),
|
||||
Value: v,
|
||||
})
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ func ParseTypedEvent(event abci.Event) (proto.Message, error) {
|
||||
|
||||
attrMap := make(map[string]json.RawMessage)
|
||||
for _, attr := range event.Attributes {
|
||||
attrMap[attr.Key] = json.RawMessage(attr.Value)
|
||||
attrMap[string(attr.Key)] = json.RawMessage(attr.Value)
|
||||
}
|
||||
|
||||
attrBytes, err := json.Marshal(attrMap)
|
||||
@ -186,7 +186,18 @@ func (a Attribute) String() string {
|
||||
|
||||
// ToKVPair converts an Attribute object into a Tendermint key/value pair.
|
||||
func (a Attribute) ToKVPair() abci.EventAttribute {
|
||||
return abci.EventAttribute{Key: a.Key, Value: a.Value}
|
||||
return abci.EventAttribute{Key: toBytes(a.Key), Value: toBytes(a.Value)}
|
||||
}
|
||||
|
||||
func toBytes(i interface{}) []byte {
|
||||
switch x := i.(type) {
|
||||
case []uint8:
|
||||
return x
|
||||
case string:
|
||||
return []byte(x)
|
||||
default:
|
||||
panic(i)
|
||||
}
|
||||
}
|
||||
|
||||
// AppendAttributes adds one or more attributes to an Event.
|
||||
@ -284,7 +295,7 @@ func StringifyEvent(e abci.Event) StringEvent {
|
||||
for _, attr := range e.Attributes {
|
||||
res.Attributes = append(
|
||||
res.Attributes,
|
||||
Attribute{Key: attr.Key, Value: attr.Value},
|
||||
Attribute{Key: string(attr.Key), Value: string(attr.Value)},
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -76,8 +76,8 @@ func (s *eventsTestSuite) TestEmitTypedEvent() {
|
||||
s.Require().Len(em.Events(), 1)
|
||||
attrs := em.Events()[0].Attributes
|
||||
s.Require().Len(attrs, 2)
|
||||
s.Require().Equal(attrs[0].Key, "amount")
|
||||
s.Require().Equal(attrs[1].Key, "denom")
|
||||
s.Require().Equal(string(attrs[0].Key), "amount")
|
||||
s.Require().Equal(string(attrs[1].Key), "denom")
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -158,15 +158,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() {
|
||||
{
|
||||
Type: "message",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{Key: "sender", Value: "foo"},
|
||||
{Key: "recipient", Value: "bar"},
|
||||
{Key: []byte("sender"), Value: []byte("foo")},
|
||||
{Key: []byte("recipient"), Value: []byte("bar")},
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: "staking",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{Key: "deposit", Value: "5"},
|
||||
{Key: "unbond", Value: "10"},
|
||||
{Key: []byte("deposit"), Value: []byte("5")},
|
||||
{Key: []byte("unbond"), Value: []byte("10")},
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -182,15 +182,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() {
|
||||
{
|
||||
Type: "message",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{Key: "sender", Value: "foo", Index: true},
|
||||
{Key: "recipient", Value: "bar", Index: true},
|
||||
{Key: []byte("sender"), Value: []byte("foo"), Index: true},
|
||||
{Key: []byte("recipient"), Value: []byte("bar"), Index: true},
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: "staking",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{Key: "deposit", Value: "5", Index: true},
|
||||
{Key: "unbond", Value: "10", Index: true},
|
||||
{Key: []byte("deposit"), Value: []byte("5"), Index: true},
|
||||
{Key: []byte("unbond"), Value: []byte("10"), Index: true},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -202,15 +202,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() {
|
||||
{
|
||||
Type: "message",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{Key: "sender", Value: "foo", Index: true},
|
||||
{Key: "recipient", Value: "bar"},
|
||||
{Key: []byte("sender"), Value: []byte("foo"), Index: true},
|
||||
{Key: []byte("recipient"), Value: []byte("bar")},
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: "staking",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{Key: "deposit", Value: "5", Index: true},
|
||||
{Key: "unbond", Value: "10"},
|
||||
{Key: []byte("deposit"), Value: []byte("5"), Index: true},
|
||||
{Key: []byte("unbond"), Value: []byte("10")},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -225,15 +225,15 @@ func (s *eventsTestSuite) TestMarkEventsToIndex() {
|
||||
{
|
||||
Type: "message",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{Key: "sender", Value: "foo", Index: true},
|
||||
{Key: "recipient", Value: "bar", Index: true},
|
||||
{Key: []byte("sender"), Value: []byte("foo"), Index: true},
|
||||
{Key: []byte("recipient"), Value: []byte("bar"), Index: true},
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: "staking",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{Key: "deposit", Value: "5", Index: true},
|
||||
{Key: "unbond", Value: "10", Index: true},
|
||||
{Key: []byte("deposit"), Value: []byte("5"), Index: true},
|
||||
{Key: []byte("unbond"), Value: []byte("10"), Index: true},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
"github.com/tendermint/tendermint/rpc/coretypes"
|
||||
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
"github.com/tendermint/tendermint/libs/bytes"
|
||||
"github.com/tendermint/tendermint/rpc/coretypes"
|
||||
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
@ -159,8 +159,8 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() {
|
||||
Type: "message",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{
|
||||
Key: "action",
|
||||
Value: "foo",
|
||||
Key: []byte("action"),
|
||||
Value: []byte("foo"),
|
||||
Index: true,
|
||||
},
|
||||
},
|
||||
@ -184,8 +184,8 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() {
|
||||
Type: "message",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{
|
||||
Key: "action",
|
||||
Value: "foo",
|
||||
Key: []byte("action"),
|
||||
Value: []byte("foo"),
|
||||
Index: true,
|
||||
},
|
||||
},
|
||||
@ -209,8 +209,8 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() {
|
||||
Type: "message",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{
|
||||
Key: "action",
|
||||
Value: "foo",
|
||||
Key: []byte("action"),
|
||||
Value: []byte("foo"),
|
||||
Index: true,
|
||||
},
|
||||
},
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/rpc/coretypes"
|
||||
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
|
||||
@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
tmtime "github.com/tendermint/tendermint/libs/time"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
|
||||
@ -149,7 +149,7 @@ func (k Keeper) DispatchActions(ctx sdk.Context, grantee sdk.AccAddress, msgs []
|
||||
sdkEvents := make([]sdk.Event, 0, len(events))
|
||||
for _, event := range events {
|
||||
e := event
|
||||
e.Attributes = append(e.Attributes, abci.EventAttribute{Key: "authz_msg_index", Value: strconv.Itoa(i)})
|
||||
e.Attributes = append(e.Attributes, abci.EventAttribute{Key: []byte("authz_msg_index"), Value: []byte(strconv.Itoa(i))})
|
||||
|
||||
sdkEvents = append(sdkEvents, sdk.Event(e))
|
||||
}
|
||||
|
||||
@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
tmtime "github.com/tendermint/tendermint/libs/time"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"github.com/tendermint/tendermint/libs/bytes"
|
||||
rpcclient "github.com/tendermint/tendermint/rpc/client"
|
||||
rpcclientmock "github.com/tendermint/tendermint/rpc/client/mock"
|
||||
"github.com/tendermint/tendermint/rpc/coretypes"
|
||||
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@ -62,7 +62,7 @@ func (s *CLITestSuite) SetupSuite() {
|
||||
WithKeyring(s.kr).
|
||||
WithTxConfig(s.encCfg.TxConfig).
|
||||
WithCodec(s.encCfg.Codec).
|
||||
WithClient(mockTendermintRPC{Client: rpcclientmock.New()}).
|
||||
WithClient(mockTendermintRPC{Client: rpcclientmock.Client{}}).
|
||||
WithAccountRetriever(client.MockAccountRetriever{}).
|
||||
WithOutput(io.Discard)
|
||||
}
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
tmtime "github.com/tendermint/tendermint/libs/time"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
@ -643,15 +643,15 @@ func (suite *KeeperTestSuite) TestMsgSendEvents() {
|
||||
}
|
||||
event1.Attributes = append(
|
||||
event1.Attributes,
|
||||
abci.EventAttribute{Key: banktypes.AttributeKeyRecipient, Value: accAddrs[1].String()},
|
||||
abci.EventAttribute{Key: []byte(banktypes.AttributeKeyRecipient), Value: []byte(accAddrs[1].String())},
|
||||
)
|
||||
event1.Attributes = append(
|
||||
event1.Attributes,
|
||||
abci.EventAttribute{Key: banktypes.AttributeKeySender, Value: accAddrs[0].String()},
|
||||
abci.EventAttribute{Key: []byte(banktypes.AttributeKeySender), Value: []byte(accAddrs[0].String())},
|
||||
)
|
||||
event1.Attributes = append(
|
||||
event1.Attributes,
|
||||
abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()},
|
||||
abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins.String())},
|
||||
)
|
||||
|
||||
event2 := sdk.Event{
|
||||
@ -660,7 +660,7 @@ func (suite *KeeperTestSuite) TestMsgSendEvents() {
|
||||
}
|
||||
event2.Attributes = append(
|
||||
event2.Attributes,
|
||||
abci.EventAttribute{Key: banktypes.AttributeKeySender, Value: accAddrs[0].String()},
|
||||
abci.EventAttribute{Key: []byte(banktypes.AttributeKeySender), Value: []byte(accAddrs[0].String())},
|
||||
)
|
||||
|
||||
// events are shifted due to the funding account events
|
||||
@ -705,7 +705,7 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() {
|
||||
require.NoError(suite.bankKeeper.InputOutputCoins(ctx, inputs, outputs))
|
||||
|
||||
events = ctx.EventManager().ABCIEvents()
|
||||
require.Equal(12, len(events)) // 9 events because account funding causes extra minting + coin_spent + coin_recv events
|
||||
require.Equal(12, len(events)) // 12 events because account funding causes extra minting + coin_spent + coin_recv events
|
||||
|
||||
event1 := sdk.Event{
|
||||
Type: sdk.EventTypeMessage,
|
||||
@ -713,7 +713,7 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() {
|
||||
}
|
||||
event1.Attributes = append(
|
||||
event1.Attributes,
|
||||
abci.EventAttribute{Key: banktypes.AttributeKeySender, Value: accAddrs[0].String()},
|
||||
abci.EventAttribute{Key: []byte(banktypes.AttributeKeySender), Value: []byte(accAddrs[0].String())},
|
||||
)
|
||||
require.Equal(abci.Event(event1), events[7])
|
||||
|
||||
@ -738,22 +738,22 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() {
|
||||
}
|
||||
event2.Attributes = append(
|
||||
event2.Attributes,
|
||||
abci.EventAttribute{Key: banktypes.AttributeKeyRecipient, Value: accAddrs[2].String()},
|
||||
abci.EventAttribute{Key: []byte(banktypes.AttributeKeyRecipient), Value: []byte(accAddrs[2].String())},
|
||||
)
|
||||
event2.Attributes = append(
|
||||
event2.Attributes,
|
||||
abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()})
|
||||
abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins.String())})
|
||||
event3 := sdk.Event{
|
||||
Type: banktypes.EventTypeTransfer,
|
||||
Attributes: []abci.EventAttribute{},
|
||||
}
|
||||
event3.Attributes = append(
|
||||
event3.Attributes,
|
||||
abci.EventAttribute{Key: banktypes.AttributeKeyRecipient, Value: accAddrs[3].String()},
|
||||
abci.EventAttribute{Key: []byte(banktypes.AttributeKeyRecipient), Value: []byte(accAddrs[3].String())},
|
||||
)
|
||||
event3.Attributes = append(
|
||||
event3.Attributes,
|
||||
abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins2.String()},
|
||||
abci.EventAttribute{Key: []byte(sdk.AttributeKeyAmount), Value: []byte(newCoins2.String())},
|
||||
)
|
||||
// events are shifted due to the funding account events
|
||||
require.Equal(abci.Event(event1), events[25])
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
rpcclientmock "github.com/tendermint/tendermint/rpc/client/mock"
|
||||
"github.com/tendermint/tendermint/rpc/coretypes"
|
||||
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@ -42,7 +42,7 @@ func TestNewMsgVerifyInvariantTxCmd(t *testing.T) {
|
||||
WithKeyring(kr).
|
||||
WithTxConfig(encCfg.TxConfig).
|
||||
WithCodec(encCfg.Codec).
|
||||
WithClient(mockTendermintRPC{Client: rpcclientmock.New()}).
|
||||
WithClient(mockTendermintRPC{Client: rpcclientmock.Client{}}).
|
||||
WithAccountRetriever(client.MockAccountRetriever{}).
|
||||
WithOutput(io.Discard).
|
||||
WithChainID("test-chain")
|
||||
|
||||
@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/cosmos/go-bip39"
|
||||
"github.com/pkg/errors"
|
||||
@ -168,7 +169,7 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command {
|
||||
|
||||
toPrint := newPrintInfo(config.Moniker, chainID, nodeID, "", appState)
|
||||
|
||||
cfg.WriteConfigFile(config.RootDir, config)
|
||||
cfg.WriteConfigFile(filepath.Join(config.RootDir, "config", "config.toml"), config)
|
||||
return displayInfo(toPrint)
|
||||
},
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ func GenAppStateFromConfig(cdc codec.JSONCodec, txEncodingConfig client.TxEncodi
|
||||
}
|
||||
|
||||
config.P2P.PersistentPeers = persistentPeers
|
||||
cfg.WriteConfigFile(config.RootDir, config)
|
||||
cfg.WriteConfigFile(filepath.Join(config.RootDir, "config", "config.toml"), config)
|
||||
|
||||
// if there are no gen txs to be processed, return the default empty state
|
||||
if len(appGenTxs) == 0 {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package genutil
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
@ -11,6 +10,7 @@ import (
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
tmed25519 "github.com/tendermint/tendermint/crypto/ed25519"
|
||||
tmos "github.com/tendermint/tendermint/libs/os"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/privval"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
@ -59,36 +59,33 @@ func InitializeNodeValidatorFilesFromMnemonic(config *cfg.Config, mnemonic strin
|
||||
if len(mnemonic) > 0 && !bip39.IsMnemonicValid(mnemonic) {
|
||||
return "", nil, fmt.Errorf("invalid mnemonic")
|
||||
}
|
||||
nodeKey, err := tmtypes.LoadOrGenNodeKey(config.NodeKeyFile())
|
||||
nodeKey, err := p2p.LoadOrGenNodeKey(config.NodeKeyFile())
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
nodeID = string(nodeKey.ID)
|
||||
nodeID = string(nodeKey.ID())
|
||||
|
||||
pvKeyFile := config.PrivValidator.KeyFile()
|
||||
pvKeyFile := config.PrivValidatorKeyFile()
|
||||
if err := tmos.EnsureDir(filepath.Dir(pvKeyFile), 0o777); err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
pvStateFile := config.PrivValidator.StateFile()
|
||||
pvStateFile := config.PrivValidatorStateFile()
|
||||
if err := tmos.EnsureDir(filepath.Dir(pvStateFile), 0o777); err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
var filePV *privval.FilePV
|
||||
if len(mnemonic) == 0 {
|
||||
filePV, err = privval.LoadOrGenFilePV(pvKeyFile, pvStateFile)
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
filePV = privval.LoadOrGenFilePV(pvKeyFile, pvStateFile)
|
||||
} else {
|
||||
privKey := tmed25519.GenPrivKeyFromSecret([]byte(mnemonic))
|
||||
filePV = privval.NewFilePV(privKey, pvKeyFile, pvStateFile)
|
||||
filePV.Save()
|
||||
}
|
||||
|
||||
tmValPubKey, err := filePV.GetPubKey(context.TODO())
|
||||
tmValPubKey, err := filePV.GetPubKey()
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
@ -62,9 +62,9 @@ func TestInitializeNodeValidatorFilesFromMnemonic(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
if tt.mnemonic != "" {
|
||||
actualPVFile, _ := privval.LoadFilePV(cfg.PrivValidator.KeyFile(), cfg.PrivValidator.StateFile())
|
||||
actualPVFile := privval.LoadFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile())
|
||||
expectedPrivateKey := tmed25519.GenPrivKeyFromSecret([]byte(tt.mnemonic))
|
||||
expectedFile := privval.NewFilePV(expectedPrivateKey, cfg.PrivValidator.KeyFile(), cfg.PrivValidator.StateFile())
|
||||
expectedFile := privval.NewFilePV(expectedPrivateKey, cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile())
|
||||
require.Equal(t, expectedFile, actualPVFile)
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tendermint/tendermint/rpc/client/mock"
|
||||
"github.com/tendermint/tendermint/rpc/coretypes"
|
||||
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
|
||||
@ -9,8 +9,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
tmtime "github.com/tendermint/tendermint/libs/time"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/cosmos-sdk/runtime"
|
||||
|
||||
@ -18,8 +18,8 @@ import (
|
||||
grouptestutil "github.com/cosmos/cosmos-sdk/x/group/testutil"
|
||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||
"github.com/stretchr/testify/suite"
|
||||
tmtime "github.com/tendermint/tendermint/libs/time"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
tmtime "github.com/tendermint/tendermint/libs/time"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
@ -14,7 +15,7 @@ import (
|
||||
func ConsensusParamsKeyTable() KeyTable {
|
||||
return NewKeyTable(
|
||||
NewParamSetPair(
|
||||
baseapp.ParamStoreKeyBlockParams, tmproto.BlockParams{}, baseapp.ValidateBlockParams,
|
||||
baseapp.ParamStoreKeyBlockParams, abci.BlockParams{}, baseapp.ValidateBlockParams,
|
||||
),
|
||||
NewParamSetPair(
|
||||
baseapp.ParamStoreKeyEvidenceParams, tmproto.EvidenceParams{}, baseapp.ValidateEvidenceParams,
|
||||
|
||||
@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
|
||||
@ -150,7 +151,7 @@ func (w WeightedProposalContent) ContentSimulatorFn() simulation.ContentSimulato
|
||||
// Param change proposals
|
||||
|
||||
// randomConsensusParams returns random simulation consensus parameters, it extracts the Evidence from the Staking genesis state.
|
||||
func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSONCodec) *tmproto.ConsensusParams {
|
||||
func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSONCodec) *abci.ConsensusParams {
|
||||
var genesisState map[string]json.RawMessage
|
||||
err := json.Unmarshal(appState, &genesisState)
|
||||
if err != nil {
|
||||
@ -158,8 +159,8 @@ func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSO
|
||||
}
|
||||
|
||||
stakingGenesisState := stakingtypes.GetGenesisStateFromAppState(cdc, genesisState)
|
||||
consensusParams := &tmproto.ConsensusParams{
|
||||
Block: &tmproto.BlockParams{
|
||||
consensusParams := &abci.ConsensusParams{
|
||||
Block: &abci.BlockParams{
|
||||
MaxBytes: int64(simulation.RandIntBetween(r, 20000000, 30000000)),
|
||||
MaxGas: -1,
|
||||
},
|
||||
|
||||
@ -7,8 +7,8 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
|
||||
tmtime "github.com/tendermint/tendermint/libs/time"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
|
||||
@ -1468,7 +1468,7 @@ func (s *IntegrationTestSuite) TestBlockResults() {
|
||||
require.NoError(err)
|
||||
|
||||
// Create a HTTP rpc client.
|
||||
rpcClient, err := http.New(val.RPCAddress)
|
||||
rpcClient, err := http.New(val.RPCAddress, "/websocket")
|
||||
require.NoError(err)
|
||||
|
||||
// Loop until we find a block result with the correct validator updates.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user