mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-25 16:46:42 +00:00
Merge remote-tracking branch 'origin/master' into main/libp2p
This commit is contained in:
@@ -27,6 +27,7 @@ Special thanks to external contributors on this release:
|
||||
|
||||
- [tendermint/spec] \#7804 Migrate spec from [spec repo](https://github.com/tendermint/spec).
|
||||
- [abci] \#7984 Remove the locks preventing concurrent use of ABCI applications by Tendermint. (@tychoish)
|
||||
- [abci] \#8605 Remove info, log, events and gasUsed fields from ResponseCheckTx as they are not used by Tendermint. (@jmalicevic)
|
||||
|
||||
- P2P Protocol
|
||||
|
||||
@@ -58,13 +59,14 @@ Special thanks to external contributors on this release:
|
||||
- [rpc] [\#7701] Add `ApplicationInfo` to `status` rpc call which contains the application version. (@jonasbostoen)
|
||||
- [cli] [#7033](https://github.com/tendermint/tendermint/pull/7033) Add a `rollback` command to rollback to the previous tendermint state in the event of non-determinstic app hash or reverting an upgrade.
|
||||
- [mempool, rpc] \#7041 Add removeTx operation to the RPC layer. (@tychoish)
|
||||
- [consensus] \#7354 add a new `synchrony` field to the `ConsensusParameter` struct for controlling the parameters of the proposer-based timestamp algorithm. (@williambanfield)
|
||||
- [consensus] \#7354 add a new `synchrony` field to the `ConsensusParams` struct for controlling the parameters of the proposer-based timestamp algorithm. (@williambanfield)
|
||||
- [consensus] \#7376 Update the proposal logic per the Propose-based timestamps specification so that the proposer will wait for the previous block time to occur before proposing the next block. (@williambanfield)
|
||||
- [consensus] \#7391 Use the proposed block timestamp as the proposal timestamp. Update the block validation logic to ensure that the proposed block's timestamp matches the timestamp in the proposal message. (@williambanfield)
|
||||
- [consensus] \#7415 Update proposal validation logic to Prevote nil if a proposal does not meet the conditions for Timelyness per the proposer-based timestamp specification. (@anca)
|
||||
- [consensus] \#7382 Update block validation to no longer require the block timestamp to be the median of the timestamps of the previous commit. (@anca)
|
||||
- [consensus] \#7711 Use the proposer timestamp for the first height instead of the genesis time. Chains will still start consensus at the genesis time. (@anca)
|
||||
- [cli] \#8281 Add a tool to update old config files to the latest version. (@creachadair)
|
||||
- [consenus] \#8514 move `RecheckTx` from the local node mempool config to a global `ConsensusParams` field in `BlockParams` (@cmwaters)
|
||||
|
||||
### IMPROVEMENTS
|
||||
|
||||
|
||||
@@ -77,9 +77,6 @@ $(BUILDDIR)/:
|
||||
###############################################################################
|
||||
|
||||
check-proto-deps:
|
||||
ifeq (,$(shell which buf))
|
||||
$(error "buf is required for Protobuf building, linting and breakage checking. See https://docs.buf.build/installation for installation instructions.")
|
||||
endif
|
||||
ifeq (,$(shell which protoc-gen-gogofaster))
|
||||
$(error "gogofaster plugin for protoc is required. Run 'go install github.com/gogo/protobuf/protoc-gen-gogofaster@latest' to install")
|
||||
endif
|
||||
@@ -93,7 +90,7 @@ endif
|
||||
|
||||
proto-gen: check-proto-deps
|
||||
@echo "Generating Protobuf files"
|
||||
@buf generate
|
||||
@go run github.com/bufbuild/buf/cmd/buf generate
|
||||
@mv ./proto/tendermint/abci/types.pb.go ./abci/types/
|
||||
.PHONY: proto-gen
|
||||
|
||||
@@ -101,7 +98,7 @@ proto-gen: check-proto-deps
|
||||
# execution only.
|
||||
proto-lint: check-proto-deps
|
||||
@echo "Linting Protobuf files"
|
||||
@buf lint
|
||||
@go run github.com/bufbuild/buf/cmd/buf lint
|
||||
.PHONY: proto-lint
|
||||
|
||||
proto-format: check-proto-format-deps
|
||||
@@ -114,7 +111,7 @@ proto-check-breaking: check-proto-deps
|
||||
@echo "Note: This is only useful if your changes have not yet been committed."
|
||||
@echo " Otherwise read up on buf's \"breaking\" command usage:"
|
||||
@echo " https://docs.buf.build/breaking/usage"
|
||||
@buf breaking --against ".git"
|
||||
@go run github.com/bufbuild/buf/cmd/buf breaking --against ".git"
|
||||
.PHONY: proto-check-breaking
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -126,6 +126,19 @@ lays out the reasoning for the changes as well as [RFC
|
||||
009](https://tinyurl.com/rfc009) for a discussion of the complexities of
|
||||
upgrading consensus parameters.
|
||||
|
||||
### RecheckTx Parameter Change
|
||||
|
||||
`RecheckTx` was previously enabled by the `recheck` parameter in the mempool
|
||||
section of the `config.toml`.
|
||||
Setting it to true made Tendermint invoke another `CheckTx` ABCI call on
|
||||
each transaction remaining in the mempool following the execution of a block.
|
||||
Similar to the timeout parameter changes, this parameter makes more sense as a
|
||||
network-wide coordinated variable so that applications can be written knowing
|
||||
either all nodes agree on whether to run `RecheckTx`.
|
||||
|
||||
Applications can turn on `RecheckTx` by altering the `ConsensusParams` in the
|
||||
`FinalizeBlock` ABCI response.
|
||||
|
||||
### CLI Changes
|
||||
|
||||
The functionality around resetting a node has been extended to make it safer. The
|
||||
|
||||
@@ -4,10 +4,8 @@ package mocks
|
||||
|
||||
import (
|
||||
context "context"
|
||||
testing "testing"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "github.com/tendermint/tendermint/abci/types"
|
||||
)
|
||||
|
||||
@@ -422,8 +420,13 @@ func (_m *Client) Wait() {
|
||||
_m.Called()
|
||||
}
|
||||
|
||||
// NewClient creates a new instance of Client. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewClient(t testing.TB) *Client {
|
||||
type NewClientT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewClient(t NewClientT) *Client {
|
||||
mock := &Client{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -546,8 +546,6 @@ func cmdCheckTx(cmd *cobra.Command, args []string) error {
|
||||
printResponse(cmd, args, response{
|
||||
Code: res.Code,
|
||||
Data: res.Data,
|
||||
Info: res.Info,
|
||||
Log: res.Log,
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -72,11 +72,11 @@ func FinalizeBlock(ctx context.Context, client abciclient.Client, txBytes [][]by
|
||||
|
||||
func CheckTx(ctx context.Context, client abciclient.Client, txBytes []byte, codeExp uint32, dataExp []byte) error {
|
||||
res, _ := client.CheckTx(ctx, &types.RequestCheckTx{Tx: txBytes})
|
||||
code, data, log := res.Code, res.Data, res.Log
|
||||
code, data := res.Code, res.Data
|
||||
if code != codeExp {
|
||||
fmt.Println("Failed test: CheckTx")
|
||||
fmt.Printf("CheckTx response code was unexpected. Got %v expected %v. Log: %v\n",
|
||||
code, codeExp, log)
|
||||
fmt.Printf("CheckTx response code was unexpected. Got %v expected %v.,",
|
||||
code, codeExp)
|
||||
return errors.New("checkTx")
|
||||
}
|
||||
if !bytes.Equal(data, dataExp) {
|
||||
|
||||
@@ -21,14 +21,6 @@ func TestMarshalJSON(t *testing.T) {
|
||||
Code: 1,
|
||||
Data: []byte("hello"),
|
||||
GasWanted: 43,
|
||||
Events: []Event{
|
||||
{
|
||||
Type: "testEvent",
|
||||
Attributes: []EventAttribute{
|
||||
{Key: "pho", Value: "bo"},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
b, err = json.Marshal(&r1)
|
||||
assert.NoError(t, err)
|
||||
@@ -86,16 +78,7 @@ func TestWriteReadMessage2(t *testing.T) {
|
||||
cases := []proto.Message{
|
||||
&ResponseCheckTx{
|
||||
Data: []byte(phrase),
|
||||
Log: phrase,
|
||||
GasWanted: 10,
|
||||
Events: []Event{
|
||||
{
|
||||
Type: "testEvent",
|
||||
Attributes: []EventAttribute{
|
||||
{Key: "abc", Value: "def"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
// TODO: add the rest
|
||||
}
|
||||
|
||||
@@ -4,10 +4,8 @@ package mocks
|
||||
|
||||
import (
|
||||
context "context"
|
||||
testing "testing"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "github.com/tendermint/tendermint/abci/types"
|
||||
)
|
||||
|
||||
@@ -338,8 +336,13 @@ func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.Reque
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// NewApplication creates a new instance of Application. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewApplication(t testing.TB) *Application {
|
||||
type NewApplicationT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewApplication creates a new instance of Application. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewApplication(t NewApplicationT) *Application {
|
||||
mock := &Application{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@ import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/gogo/protobuf/jsonpb"
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
"github.com/tendermint/tendermint/crypto/encoding"
|
||||
"github.com/tendermint/tendermint/internal/jsontypes"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -135,6 +138,48 @@ func (r *EventAttribute) UnmarshalJSON(b []byte) error {
|
||||
return jsonpbUnmarshaller.Unmarshal(reader, r)
|
||||
}
|
||||
|
||||
// validatorUpdateJSON is the JSON encoding of a validator update.
|
||||
//
|
||||
// It handles translation of public keys from the protobuf representation to
|
||||
// the legacy Amino-compatible format expected by RPC clients.
|
||||
type validatorUpdateJSON struct {
|
||||
PubKey json.RawMessage `json:"pub_key,omitempty"`
|
||||
Power int64 `json:"power,string"`
|
||||
}
|
||||
|
||||
func (v *ValidatorUpdate) MarshalJSON() ([]byte, error) {
|
||||
key, err := encoding.PubKeyFromProto(v.PubKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
jkey, err := jsontypes.Marshal(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return json.Marshal(validatorUpdateJSON{
|
||||
PubKey: jkey,
|
||||
Power: v.GetPower(),
|
||||
})
|
||||
}
|
||||
|
||||
func (v *ValidatorUpdate) UnmarshalJSON(data []byte) error {
|
||||
var vu validatorUpdateJSON
|
||||
if err := json.Unmarshal(data, &vu); err != nil {
|
||||
return err
|
||||
}
|
||||
var key crypto.PubKey
|
||||
if err := jsontypes.Unmarshal(vu.PubKey, &key); err != nil {
|
||||
return err
|
||||
}
|
||||
pkey, err := encoding.PubKeyToProto(key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
v.PubKey = pkey
|
||||
v.Power = vu.Power
|
||||
return nil
|
||||
}
|
||||
|
||||
// Some compile time assertions to ensure we don't
|
||||
// have accidental runtime surprises later on.
|
||||
|
||||
|
||||
+442
-477
File diff suppressed because it is too large
Load Diff
@@ -21,15 +21,16 @@ func MakeKeyMigrateCommand(conf *cfg.Config, logger log.Logger) *cobra.Command {
|
||||
defer cancel()
|
||||
|
||||
contexts := []string{
|
||||
// this is ordered to put the
|
||||
// (presumably) biggest/most important
|
||||
// subsets first.
|
||||
// this is ordered to put
|
||||
// the more ephemeral tables first to
|
||||
// forclose the possiblity of the
|
||||
// ephemeral data overwriting later data
|
||||
"tx_index",
|
||||
"peerstore",
|
||||
"light",
|
||||
"blockstore",
|
||||
"state",
|
||||
"peerstore",
|
||||
"tx_index",
|
||||
"evidence",
|
||||
"light",
|
||||
}
|
||||
|
||||
for idx, dbctx := range contexts {
|
||||
|
||||
+4
-4
@@ -739,9 +739,10 @@ func TestP2PConfig() *P2PConfig {
|
||||
|
||||
// MempoolConfig defines the configuration options for the Tendermint mempool.
|
||||
type MempoolConfig struct {
|
||||
RootDir string `mapstructure:"home"`
|
||||
Recheck bool `mapstructure:"recheck"`
|
||||
Broadcast bool `mapstructure:"broadcast"`
|
||||
RootDir string `mapstructure:"home"`
|
||||
|
||||
// Whether to broadcast transactions to other nodes
|
||||
Broadcast bool `mapstructure:"broadcast"`
|
||||
|
||||
// Maximum number of transactions in the mempool
|
||||
Size int `mapstructure:"size"`
|
||||
@@ -788,7 +789,6 @@ type MempoolConfig struct {
|
||||
// DefaultMempoolConfig returns a default configuration for the Tendermint mempool.
|
||||
func DefaultMempoolConfig() *MempoolConfig {
|
||||
return &MempoolConfig{
|
||||
Recheck: true,
|
||||
Broadcast: true,
|
||||
// Each signature verification takes .5ms, Size reduced until we implement
|
||||
// ABCI Recheck
|
||||
|
||||
+5
-1
@@ -355,7 +355,11 @@ recv-rate = {{ .P2P.RecvRate }}
|
||||
#######################################################
|
||||
[mempool]
|
||||
|
||||
recheck = {{ .Mempool.Recheck }}
|
||||
# recheck has been moved from a config option to a global
|
||||
# consensus param in v0.36
|
||||
# See https://github.com/tendermint/tendermint/issues/8244 for more information.
|
||||
|
||||
# Set true to broadcast transactions in the mempool to other nodes
|
||||
broadcast = {{ .Mempool.Broadcast }}
|
||||
|
||||
# Maximum number of transactions in the mempool
|
||||
|
||||
@@ -295,14 +295,6 @@ flush-throttle-timeout=10
|
||||
max-packet-msg-payload-size=10240 # 10KB
|
||||
```
|
||||
|
||||
- `mempool.recheck`
|
||||
|
||||
After every block, Tendermint rechecks every transaction left in the
|
||||
mempool to see if transactions committed in that block affected the
|
||||
application state, so some of the transactions left may become invalid.
|
||||
If that does not apply to your application, you can disable it by
|
||||
setting `mempool.recheck=false`.
|
||||
|
||||
- `mempool.broadcast`
|
||||
|
||||
Setting this to false will stop the mempool from relaying transactions
|
||||
|
||||
@@ -14,9 +14,8 @@ Config:
|
||||
```toml
|
||||
[mempool]
|
||||
|
||||
recheck = true
|
||||
# Set true to broadcast transactions in the mempool to other nodes
|
||||
broadcast = true
|
||||
wal-dir = ""
|
||||
|
||||
# Maximum number of transactions in the mempool
|
||||
size = 5000
|
||||
@@ -44,20 +43,6 @@ max-tx-bytes = 1048576
|
||||
max-batch-bytes = 0
|
||||
```
|
||||
|
||||
<!-- Flag: `--mempool.recheck=false`
|
||||
|
||||
Environment: `TM_MEMPOOL_RECHECK=false` -->
|
||||
|
||||
## Recheck
|
||||
|
||||
Recheck determines if the mempool rechecks all pending
|
||||
transactions after a block was committed. Once a block
|
||||
is committed, the mempool removes all valid transactions
|
||||
that were successfully included in the block.
|
||||
|
||||
If `recheck` is true, then it will rerun CheckTx on
|
||||
all remaining transactions with the new block state.
|
||||
|
||||
## Broadcast
|
||||
|
||||
Determines whether this node gossips any valid transactions
|
||||
@@ -92,7 +77,7 @@ Cache size determines the size of the cache holding transactions we have already
|
||||
|
||||
## Keep Invalid Transactions In Cache
|
||||
|
||||
Keep invalid transactions in cache determines wether a transaction in the cache, which is invalid, should be evicted. An invalid transaction here may mean that the transaction may rely on a different tx that has not been included in a block.
|
||||
Keep invalid transactions in cache determines wether a transaction in the cache, which is invalid, should be evicted. An invalid transaction here may mean that the transaction may rely on a different tx that has not been included in a block.
|
||||
|
||||
## Max Transaction Bytes
|
||||
|
||||
|
||||
@@ -38,22 +38,39 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/bufbuild/buf v1.3.1
|
||||
github.com/creachadair/atomicfile v0.2.6
|
||||
github.com/creachadair/taskgroup v0.3.2
|
||||
github.com/golangci/golangci-lint v1.46.0
|
||||
github.com/google/go-cmp v0.5.8
|
||||
github.com/tychoish/emt v0.1.0
|
||||
github.com/vektra/mockery/v2 v2.12.2
|
||||
github.com/vektra/mockery/v2 v2.12.3
|
||||
gotest.tools v2.2.0+incompatible
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.1.0 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
|
||||
github.com/firefart/nonamedreturns v1.0.1 // indirect
|
||||
github.com/gofrs/uuid v4.2.0+incompatible // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a // indirect
|
||||
github.com/jhump/protocompile v0.0.0-20220216033700-d705409f108f // indirect
|
||||
github.com/jhump/protoreflect v1.11.1-0.20220213155251-0c2aedc66cf4 // indirect
|
||||
github.com/klauspost/compress v1.15.1 // indirect
|
||||
github.com/klauspost/pgzip v1.2.5 // indirect
|
||||
github.com/lufeee/execinquery v1.0.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.0 // indirect
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
|
||||
github.com/pkg/profile v1.6.0 // indirect
|
||||
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
|
||||
go.opencensus.io v0.23.0 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/goleak v1.1.12 // indirect
|
||||
go.uber.org/multierr v1.8.0 // indirect
|
||||
go.uber.org/zap v1.21.0 // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect
|
||||
)
|
||||
|
||||
@@ -208,7 +225,6 @@ require (
|
||||
github.com/opencontainers/runc v1.0.3 // indirect
|
||||
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.0 // indirect
|
||||
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
@@ -254,9 +270,6 @@ require (
|
||||
github.com/yeya24/promlinter v0.2.0 // indirect
|
||||
gitlab.com/bosi/decorder v0.2.1 // indirect
|
||||
go.etcd.io/bbolt v1.3.6 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/multierr v1.8.0 // indirect
|
||||
go.uber.org/zap v1.21.0 // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
|
||||
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
|
||||
|
||||
@@ -197,6 +197,8 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku
|
||||
github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
|
||||
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
|
||||
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
|
||||
github.com/bufbuild/buf v1.3.1 h1:AelWcENnbNEjwxmQXIZaU51GHgnWQ8Mc94kZdDUKgRs=
|
||||
github.com/bufbuild/buf v1.3.1/go.mod h1:CTRUb23N+zlm1U8ZIBKz0Sqluk++qQloB2i/MZNZHIs=
|
||||
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||
github.com/butuzov/ireturn v0.1.1 h1:QvrO2QF2+/Cx1WA/vETCIYBKtRjc30vesdoPUNo1EbY=
|
||||
github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc=
|
||||
@@ -264,9 +266,11 @@ github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzA
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
|
||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creachadair/atomicfile v0.2.6 h1:FgYxYvGcqREApTY8Nxg8msM6P/KVKK3ob5h9FaRUTNg=
|
||||
github.com/creachadair/atomicfile v0.2.6/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2fzVzf28JxrIkBc=
|
||||
@@ -431,6 +435,8 @@ github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
|
||||
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
|
||||
github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
|
||||
github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0=
|
||||
github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
@@ -451,6 +457,7 @@ github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4er
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
@@ -728,12 +735,18 @@ github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABo
|
||||
github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk=
|
||||
github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4=
|
||||
github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4=
|
||||
github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a h1:d4+I1YEKVmWZrgkt6jpXBnLgV2ZjO0YxEtLDdfIZfH4=
|
||||
github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw=
|
||||
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
|
||||
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM=
|
||||
github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4=
|
||||
github.com/jhump/protocompile v0.0.0-20220216033700-d705409f108f h1:BNuUg9k2EiJmlMwjoef3e8vZLHplbVw6DrjGFjLL+Yo=
|
||||
github.com/jhump/protocompile v0.0.0-20220216033700-d705409f108f/go.mod h1:qr2b5kx4HbFS7/g4uYO5qv9ei8303JMsC7ESbYiqr2Q=
|
||||
github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4=
|
||||
github.com/jhump/protoreflect v1.11.1-0.20220213155251-0c2aedc66cf4 h1:E2CdxLXYSn6Zrj2+u8DWrwMJW3YZLSWtM/7kIL8OL18=
|
||||
github.com/jhump/protoreflect v1.11.1-0.20220213155251-0c2aedc66cf4/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E=
|
||||
github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs=
|
||||
github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c=
|
||||
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48=
|
||||
@@ -785,6 +798,8 @@ github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.0.12 h1:p9dKCg8i4gmOxtv35DvrYoWqYzQrvEVdjQ762Y0OqZE=
|
||||
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
|
||||
github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
|
||||
github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
@@ -1163,6 +1178,7 @@ github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b/go.mo
|
||||
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
|
||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68=
|
||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||
github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ=
|
||||
@@ -1226,6 +1242,7 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI
|
||||
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0=
|
||||
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y=
|
||||
github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
|
||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
@@ -1242,12 +1259,16 @@ github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7
|
||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
|
||||
github.com/pkg/profile v1.6.0 h1:hUDfIISABYI59DyeB3OTay/HxSRwTQ8rB/H83k6r5dM=
|
||||
github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
|
||||
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
|
||||
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
|
||||
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
@@ -1343,8 +1364,10 @@ github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
||||
github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc=
|
||||
github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc=
|
||||
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ryancurrah/gomodguard v1.2.3 h1:ww2fsjqocGCAFamzvv/b8IsRduuHHeK2MHTcTxZTQX8=
|
||||
github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg=
|
||||
@@ -1521,8 +1544,8 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC
|
||||
github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus=
|
||||
github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8=
|
||||
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
|
||||
github.com/vektra/mockery/v2 v2.12.2 h1:JbRx9F+XcCJiDTyCm3V5lXYwl56m5ZouV6I9eZa1Dj0=
|
||||
github.com/vektra/mockery/v2 v2.12.2/go.mod h1:8vf4KDDUptfkyypzdHLuE7OE2xA7Gdt60WgIS8PgD+U=
|
||||
github.com/vektra/mockery/v2 v2.12.3 h1:74h0R+p75tdr3QNwiNz3MXeCwSP/I5bYUbZY6oT4t20=
|
||||
github.com/vektra/mockery/v2 v2.12.3/go.mod h1:8vf4KDDUptfkyypzdHLuE7OE2xA7Gdt60WgIS8PgD+U=
|
||||
github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
|
||||
github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
|
||||
github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE=
|
||||
@@ -1582,6 +1605,7 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
||||
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
|
||||
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
@@ -1917,6 +1941,7 @@ golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@@ -2278,6 +2303,7 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
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.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 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
@@ -2286,6 +2312,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
||||
|
||||
@@ -126,6 +126,7 @@ func makeReactor(
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything).Return(nil)
|
||||
|
||||
eventbus := eventbus.NewDefault(logger)
|
||||
|
||||
@@ -295,7 +295,6 @@ func (app *CounterApplication) CheckTx(_ context.Context, req *abci.RequestCheck
|
||||
if txValue != uint64(app.mempoolTxCount) {
|
||||
return &abci.ResponseCheckTx{
|
||||
Code: code.CodeTypeBadNonce,
|
||||
Log: fmt.Sprintf("Invalid nonce. Expected %v, got %v", app.mempoolTxCount, txValue),
|
||||
}, nil
|
||||
}
|
||||
app.mempoolTxCount++
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
testing "testing"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
state "github.com/tendermint/tendermint/internal/state"
|
||||
)
|
||||
@@ -29,8 +27,13 @@ func (_m *ConsSyncReactor) SwitchToConsensus(_a0 state.State, _a1 bool) {
|
||||
_m.Called(_a0, _a1)
|
||||
}
|
||||
|
||||
// NewConsSyncReactor creates a new instance of ConsSyncReactor. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewConsSyncReactor(t testing.TB) *ConsSyncReactor {
|
||||
type NewConsSyncReactorT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewConsSyncReactor creates a new instance of ConsSyncReactor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewConsSyncReactor(t NewConsSyncReactorT) *ConsSyncReactor {
|
||||
mock := &ConsSyncReactor{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ func (emptyMempool) Update(
|
||||
_ []*abci.ExecTxResult,
|
||||
_ mempool.PreCheckFunc,
|
||||
_ mempool.PostCheckFunc,
|
||||
_ bool,
|
||||
) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
testing "testing"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
@@ -61,8 +58,13 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta {
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewBlockStore creates a new instance of BlockStore. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewBlockStore(t testing.TB) *BlockStore {
|
||||
type NewBlockStoreT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewBlockStore(t NewBlockStoreT) *BlockStore {
|
||||
mock := &BlockStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -420,6 +420,7 @@ func (txmp *TxMempool) Update(
|
||||
execTxResult []*abci.ExecTxResult,
|
||||
newPreFn PreCheckFunc,
|
||||
newPostFn PostCheckFunc,
|
||||
recheck bool,
|
||||
) error {
|
||||
txmp.height = blockHeight
|
||||
txmp.notifiedTxsAvailable = false
|
||||
@@ -452,7 +453,7 @@ func (txmp *TxMempool) Update(
|
||||
// initiate re-CheckTx per remaining transaction or notify that remaining
|
||||
// transactions are left.
|
||||
if txmp.Size() > 0 {
|
||||
if txmp.config.Recheck {
|
||||
if recheck {
|
||||
txmp.logger.Debug(
|
||||
"executing re-CheckTx for all remaining transactions",
|
||||
"num_txs", txmp.Size(),
|
||||
|
||||
@@ -173,7 +173,7 @@ func TestTxMempool_TxsAvailable(t *testing.T) {
|
||||
|
||||
// commit half the transactions and ensure we fire an event
|
||||
txmp.Lock()
|
||||
require.NoError(t, txmp.Update(ctx, 1, rawTxs[:50], responses, nil, nil))
|
||||
require.NoError(t, txmp.Update(ctx, 1, rawTxs[:50], responses, nil, nil, true))
|
||||
txmp.Unlock()
|
||||
ensureTxFire()
|
||||
ensureNoTxFire()
|
||||
@@ -210,7 +210,7 @@ func TestTxMempool_Size(t *testing.T) {
|
||||
}
|
||||
|
||||
txmp.Lock()
|
||||
require.NoError(t, txmp.Update(ctx, 1, rawTxs[:50], responses, nil, nil))
|
||||
require.NoError(t, txmp.Update(ctx, 1, rawTxs[:50], responses, nil, nil, true))
|
||||
txmp.Unlock()
|
||||
|
||||
require.Equal(t, len(rawTxs)/2, txmp.Size())
|
||||
@@ -243,7 +243,7 @@ func TestTxMempool_Flush(t *testing.T) {
|
||||
}
|
||||
|
||||
txmp.Lock()
|
||||
require.NoError(t, txmp.Update(ctx, 1, rawTxs[:50], responses, nil, nil))
|
||||
require.NoError(t, txmp.Update(ctx, 1, rawTxs[:50], responses, nil, nil, true))
|
||||
txmp.Unlock()
|
||||
|
||||
txmp.Flush()
|
||||
@@ -501,7 +501,7 @@ func TestTxMempool_ConcurrentTxs(t *testing.T) {
|
||||
}
|
||||
|
||||
txmp.Lock()
|
||||
require.NoError(t, txmp.Update(ctx, height, reapedTxs, responses, nil, nil))
|
||||
require.NoError(t, txmp.Update(ctx, height, reapedTxs, responses, nil, nil, true))
|
||||
txmp.Unlock()
|
||||
|
||||
height++
|
||||
@@ -547,7 +547,7 @@ func TestTxMempool_ExpiredTxs_NumBlocks(t *testing.T) {
|
||||
}
|
||||
|
||||
txmp.Lock()
|
||||
require.NoError(t, txmp.Update(ctx, txmp.height+1, reapedTxs, responses, nil, nil))
|
||||
require.NoError(t, txmp.Update(ctx, txmp.height+1, reapedTxs, responses, nil, nil, true))
|
||||
txmp.Unlock()
|
||||
|
||||
require.Equal(t, 95, txmp.Size())
|
||||
@@ -573,7 +573,7 @@ func TestTxMempool_ExpiredTxs_NumBlocks(t *testing.T) {
|
||||
}
|
||||
|
||||
txmp.Lock()
|
||||
require.NoError(t, txmp.Update(ctx, txmp.height+10, reapedTxs, responses, nil, nil))
|
||||
require.NoError(t, txmp.Update(ctx, txmp.height+10, reapedTxs, responses, nil, nil, true))
|
||||
txmp.Unlock()
|
||||
|
||||
require.GreaterOrEqual(t, txmp.Size(), 45)
|
||||
|
||||
@@ -11,8 +11,6 @@ import (
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
testing "testing"
|
||||
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
@@ -159,13 +157,13 @@ func (_m *Mempool) Unlock() {
|
||||
_m.Called()
|
||||
}
|
||||
|
||||
// Update provides a mock function with given fields: ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn
|
||||
func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types.Txs, txResults []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc) error {
|
||||
ret := _m.Called(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn)
|
||||
// Update provides a mock function with given fields: ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck
|
||||
func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types.Txs, txResults []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc, recheck bool) error {
|
||||
ret := _m.Called(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, types.Txs, []*abcitypes.ExecTxResult, mempool.PreCheckFunc, mempool.PostCheckFunc) error); ok {
|
||||
r0 = rf(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn)
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, types.Txs, []*abcitypes.ExecTxResult, mempool.PreCheckFunc, mempool.PostCheckFunc, bool) error); ok {
|
||||
r0 = rf(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
@@ -173,8 +171,13 @@ func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewMempool creates a new instance of Mempool. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewMempool(t testing.TB) *Mempool {
|
||||
type NewMempoolT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewMempool creates a new instance of Mempool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewMempool(t NewMempoolT) *Mempool {
|
||||
mock := &Mempool{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ func TestReactorConcurrency(t *testing.T) {
|
||||
deliverTxResponses[i] = &abci.ExecTxResult{Code: 0}
|
||||
}
|
||||
|
||||
require.NoError(t, mempool.Update(ctx, 1, convertTex(txs), deliverTxResponses, nil, nil))
|
||||
require.NoError(t, mempool.Update(ctx, 1, convertTex(txs), deliverTxResponses, nil, nil, true))
|
||||
}()
|
||||
|
||||
// 1. submit a bunch of txs
|
||||
@@ -267,7 +267,7 @@ func TestReactorConcurrency(t *testing.T) {
|
||||
mempool.Lock()
|
||||
defer mempool.Unlock()
|
||||
|
||||
err := mempool.Update(ctx, 1, []types.Tx{}, make([]*abci.ExecTxResult, 0), nil, nil)
|
||||
err := mempool.Update(ctx, 1, []types.Tx{}, make([]*abci.ExecTxResult, 0), nil, nil, true)
|
||||
require.NoError(t, err)
|
||||
}()
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ type Mempool interface {
|
||||
txResults []*abci.ExecTxResult,
|
||||
newPreFn PreCheckFunc,
|
||||
newPostFn PostCheckFunc,
|
||||
recheck bool,
|
||||
) error
|
||||
|
||||
// FlushAppConn flushes the mempool connection to ensure async callback calls
|
||||
|
||||
@@ -66,6 +66,7 @@ type Channel interface {
|
||||
type PeerError struct {
|
||||
NodeID types.NodeID
|
||||
Err error
|
||||
Fatal bool
|
||||
}
|
||||
|
||||
func (pe PeerError) Error() string { return fmt.Sprintf("peer=%q: %s", pe.NodeID, pe.Err.Error()) }
|
||||
|
||||
@@ -13,8 +13,6 @@ import (
|
||||
|
||||
p2p "github.com/tendermint/tendermint/internal/p2p"
|
||||
|
||||
testing "testing"
|
||||
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
@@ -153,8 +151,13 @@ func (_m *Connection) String() string {
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewConnection creates a new instance of Connection. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewConnection(t testing.TB) *Connection {
|
||||
type NewConnectionT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewConnection creates a new instance of Connection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewConnection(t NewConnectionT) *Connection {
|
||||
mock := &Connection{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@ import (
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
p2p "github.com/tendermint/tendermint/internal/p2p"
|
||||
|
||||
testing "testing"
|
||||
)
|
||||
|
||||
// Transport is an autogenerated mock type for the Transport type
|
||||
@@ -151,8 +149,13 @@ func (_m *Transport) String() string {
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewTransport creates a new instance of Transport. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewTransport(t testing.TB) *Transport {
|
||||
type NewTransportT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewTransport creates a new instance of Transport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewTransport(t NewTransportT) *Transport {
|
||||
mock := &Transport{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -430,6 +430,13 @@ func (m *PeerManager) PeerRatio() float64 {
|
||||
return float64(m.store.Size()) / float64(m.options.MaxPeers)
|
||||
}
|
||||
|
||||
func (m *PeerManager) HasMaxPeerCapacity() bool {
|
||||
m.mtx.Lock()
|
||||
defer m.mtx.Unlock()
|
||||
|
||||
return len(m.connected) >= int(m.options.MaxConnected)
|
||||
}
|
||||
|
||||
// DialNext finds an appropriate peer address to dial, and marks it as dialing.
|
||||
// If no peer is found, or all connection slots are full, it blocks until one
|
||||
// becomes available. The caller must call Dialed() or DialFailed() for the
|
||||
|
||||
+14
-3
@@ -479,9 +479,20 @@ func (r *Router) routeChannel(
|
||||
return
|
||||
}
|
||||
|
||||
r.logger.Error("peer error, evicting", "peer", peerError.NodeID, "err", peerError.Err)
|
||||
|
||||
r.legacy.peerManager.Errored(peerError.NodeID, peerError.Err)
|
||||
shouldEvict := peerError.Fatal || r.legacy.peerManager.HasMaxPeerCapacity()
|
||||
r.logger.Error("peer error",
|
||||
"peer", peerError.NodeID,
|
||||
"err", peerError.Err,
|
||||
"evicting", shouldEvict,
|
||||
)
|
||||
if shouldEvict {
|
||||
r.legacy.peerManager.Errored(peerError.NodeID, peerError.Err)
|
||||
} else {
|
||||
r.legacy.peerManager.processPeerEvent(ctx, PeerUpdate{
|
||||
NodeID: peerError.NodeID,
|
||||
Status: PeerStatusBad,
|
||||
})
|
||||
}
|
||||
case <-ctx.Done():
|
||||
return
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ func (env *Environment) BroadcastTxSync(ctx context.Context, req *coretypes.Requ
|
||||
return &coretypes.ResultBroadcastTx{
|
||||
Code: r.Code,
|
||||
Data: r.Data,
|
||||
Log: r.Log,
|
||||
Codespace: r.Codespace,
|
||||
MempoolError: r.MempoolError,
|
||||
Hash: req.Tx.Hash(),
|
||||
|
||||
@@ -373,6 +373,7 @@ func (blockExec *BlockExecutor) Commit(
|
||||
txResults,
|
||||
TxPreCheckForState(state),
|
||||
TxPostCheckForState(state),
|
||||
state.ConsensusParams.ABCI.RecheckTx,
|
||||
)
|
||||
|
||||
return res.Data, res.RetainHeight, err
|
||||
@@ -534,7 +535,7 @@ func (state State) Update(
|
||||
if len(validatorUpdates) > 0 {
|
||||
err := nValSet.UpdateWithChangeSet(validatorUpdates)
|
||||
if err != nil {
|
||||
return state, fmt.Errorf("error changing validator set: %w", err)
|
||||
return state, fmt.Errorf("changing validator set: %w", err)
|
||||
}
|
||||
// Change results from this height but only applies to the next next height.
|
||||
lastHeightValsChanged = header.Height + 1 + 1
|
||||
@@ -551,7 +552,12 @@ func (state State) Update(
|
||||
nextParams = state.ConsensusParams.UpdateConsensusParams(consensusParamUpdates)
|
||||
err := nextParams.ValidateConsensusParams()
|
||||
if err != nil {
|
||||
return state, fmt.Errorf("error updating consensus params: %w", err)
|
||||
return state, fmt.Errorf("updating consensus params: %w", err)
|
||||
}
|
||||
|
||||
err = state.ConsensusParams.ValidateUpdate(consensusParamUpdates, header.Height)
|
||||
if err != nil {
|
||||
return state, fmt.Errorf("updating consensus params: %w", err)
|
||||
}
|
||||
|
||||
state.Version.Consensus.App = nextParams.Version.AppVersion
|
||||
|
||||
@@ -64,6 +64,7 @@ func TestApplyBlock(t *testing.T) {
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything).Return(nil)
|
||||
blockExec := sm.NewBlockExecutor(stateStore, logger, proxyApp, mp, sm.EmptyEvidencePool{}, blockStore, eventBus, sm.NopMetrics())
|
||||
|
||||
@@ -125,6 +126,7 @@ func TestFinalizeBlockDecidedLastCommit(t *testing.T) {
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything).Return(nil)
|
||||
|
||||
eventBus := eventbus.NewDefault(logger)
|
||||
@@ -250,6 +252,7 @@ func TestFinalizeBlockByzantineValidators(t *testing.T) {
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything).Return(nil)
|
||||
|
||||
eventBus := eventbus.NewDefault(logger)
|
||||
@@ -511,6 +514,7 @@ func TestFinalizeBlockValidatorUpdates(t *testing.T) {
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything).Return(nil)
|
||||
mp.On("ReapMaxBytesMaxGas", mock.Anything, mock.Anything).Return(types.Txs{})
|
||||
|
||||
@@ -645,6 +649,7 @@ func TestEmptyPrepareProposal(t *testing.T) {
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything).Return(nil)
|
||||
mp.On("ReapMaxBytesMaxGas", mock.Anything, mock.Anything).Return(types.Txs{})
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ import (
|
||||
|
||||
tenderminttypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
testing "testing"
|
||||
|
||||
types "github.com/tendermint/tendermint/abci/types"
|
||||
)
|
||||
|
||||
@@ -168,8 +166,13 @@ func (_m *EventSink) Type() indexer.EventSinkType {
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewEventSink creates a new instance of EventSink. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewEventSink(t testing.TB) *EventSink {
|
||||
type NewEventSinkT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewEventSink creates a new instance of EventSink. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewEventSink(t NewEventSinkT) *EventSink {
|
||||
mock := &EventSink{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@ package mocks
|
||||
import (
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
testing "testing"
|
||||
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
@@ -232,8 +230,13 @@ func (_m *BlockStore) Size() int64 {
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewBlockStore creates a new instance of BlockStore. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewBlockStore(t testing.TB) *BlockStore {
|
||||
type NewBlockStoreT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewBlockStore(t NewBlockStoreT) *BlockStore {
|
||||
mock := &BlockStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ import (
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
state "github.com/tendermint/tendermint/internal/state"
|
||||
|
||||
testing "testing"
|
||||
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
@@ -74,8 +72,13 @@ func (_m *EvidencePool) Update(_a0 context.Context, _a1 state.State, _a2 types.E
|
||||
_m.Called(_a0, _a1, _a2)
|
||||
}
|
||||
|
||||
// NewEvidencePool creates a new instance of EvidencePool. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewEvidencePool(t testing.TB) *EvidencePool {
|
||||
type NewEvidencePoolT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewEvidencePool creates a new instance of EvidencePool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewEvidencePool(t NewEvidencePoolT) *EvidencePool {
|
||||
mock := &EvidencePool{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ import (
|
||||
state "github.com/tendermint/tendermint/internal/state"
|
||||
tendermintstate "github.com/tendermint/tendermint/proto/tendermint/state"
|
||||
|
||||
testing "testing"
|
||||
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
@@ -189,8 +187,13 @@ func (_m *Store) SaveValidatorSets(_a0 int64, _a1 int64, _a2 *types.ValidatorSet
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewStore creates a new instance of Store. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewStore(t testing.TB) *Store {
|
||||
type NewStoreT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewStore(t NewStoreT) *Store {
|
||||
mock := &Store{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package state
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
@@ -60,7 +59,6 @@ func abciResponsesKey(height int64) []byte {
|
||||
|
||||
// stateKey should never change after being set in init()
|
||||
var stateKey []byte
|
||||
var tmpABCIKey []byte
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
@@ -68,12 +66,6 @@ func init() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
// temporary extra key before consensus param protos are regenerated
|
||||
// TODO(wbanfield) remove in next PR
|
||||
tmpABCIKey, err = orderedcode.Append(nil, int64(10000))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------
|
||||
@@ -145,13 +137,6 @@ func (store dbStore) loadState(key []byte) (state State, err error) {
|
||||
if err != nil {
|
||||
return state, err
|
||||
}
|
||||
buf, err = store.db.Get(tmpABCIKey)
|
||||
if err != nil {
|
||||
return state, err
|
||||
}
|
||||
h, _ := binary.Varint(buf)
|
||||
sm.ConsensusParams.ABCI.VoteExtensionsEnableHeight = h
|
||||
|
||||
return *sm, nil
|
||||
}
|
||||
|
||||
@@ -195,11 +180,6 @@ func (store dbStore) save(state State, key []byte) error {
|
||||
if err := batch.Set(key, stateBz); err != nil {
|
||||
return err
|
||||
}
|
||||
bz := make([]byte, 5)
|
||||
binary.PutVarint(bz, state.ConsensusParams.ABCI.VoteExtensionsEnableHeight)
|
||||
if err := batch.Set(tmpABCIKey, bz); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return batch.WriteSync()
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ func TestValidateBlockHeader(t *testing.T) {
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything).Return(nil)
|
||||
|
||||
blockStore := store.NewBlockStore(dbm.NewMemDB())
|
||||
@@ -158,6 +159,7 @@ func TestValidateBlockCommit(t *testing.T) {
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything).Return(nil)
|
||||
|
||||
blockStore := store.NewBlockStore(dbm.NewMemDB())
|
||||
@@ -314,6 +316,7 @@ func TestValidateBlockEvidence(t *testing.T) {
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything,
|
||||
mock.Anything).Return(nil)
|
||||
|
||||
state.ConsensusParams.Evidence.MaxBytes = 1000
|
||||
|
||||
@@ -8,8 +8,6 @@ import (
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
state "github.com/tendermint/tendermint/internal/state"
|
||||
|
||||
testing "testing"
|
||||
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
@@ -85,8 +83,13 @@ func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State,
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// NewStateProvider creates a new instance of StateProvider. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewStateProvider(t testing.TB) *StateProvider {
|
||||
type NewStateProviderT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewStateProvider creates a new instance of StateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewStateProvider(t NewStateProviderT) *StateProvider {
|
||||
mock := &StateProvider{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
testing "testing"
|
||||
time "time"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
time "time"
|
||||
)
|
||||
|
||||
// Source is an autogenerated mock type for the Source type
|
||||
@@ -29,8 +27,13 @@ func (_m *Source) Now() time.Time {
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewSource creates a new instance of Source. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewSource(t testing.TB) *Source {
|
||||
type NewSourceT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewSource creates a new instance of Source. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewSource(t NewSourceT) *Source {
|
||||
mock := &Source{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ import (
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
testing "testing"
|
||||
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
@@ -68,8 +66,13 @@ func (_m *Provider) ReportEvidence(_a0 context.Context, _a1 types.Evidence) erro
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewProvider creates a new instance of Provider. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewProvider(t testing.TB) *Provider {
|
||||
type NewProviderT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewProvider creates a new instance of Provider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewProvider(t NewProviderT) *Provider {
|
||||
mock := &Provider{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ import (
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
testing "testing"
|
||||
|
||||
time "time"
|
||||
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
@@ -118,8 +116,13 @@ func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int6
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// NewLightClient creates a new instance of LightClient. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewLightClient(t testing.TB) *LightClient {
|
||||
type NewLightClientT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewLightClient creates a new instance of LightClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewLightClient(t NewLightClientT) *LightClient {
|
||||
mock := &LightClient{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -251,11 +251,7 @@ message ResponseBeginBlock {
|
||||
message ResponseCheckTx {
|
||||
uint32 code = 1;
|
||||
bytes data = 2;
|
||||
string log = 3; // nondeterministic
|
||||
string info = 4; // nondeterministic
|
||||
int64 gas_wanted = 5;
|
||||
int64 gas_used = 6;
|
||||
repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
||||
string codespace = 8;
|
||||
string sender = 9;
|
||||
int64 priority = 10;
|
||||
@@ -264,6 +260,8 @@ message ResponseCheckTx {
|
||||
|
||||
// ABCI applications creating a ResponseCheckTX should not set mempool_error.
|
||||
string mempool_error = 11;
|
||||
|
||||
reserved 3, 4, 6, 7; // see https://github.com/tendermint/tendermint/issues/8543
|
||||
}
|
||||
|
||||
message ResponseDeliverTx {
|
||||
@@ -392,7 +390,7 @@ message ExtendedCommitInfo {
|
||||
}
|
||||
|
||||
// Event allows application developers to attach additional information to
|
||||
// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.
|
||||
// ResponseBeginBlock, ResponseEndBlock and ResponseDeliverTx.
|
||||
// Later, transactions may be queried using these events.
|
||||
message Event {
|
||||
string type = 1;
|
||||
|
||||
@@ -927,7 +927,10 @@ func (m *BlockRequest) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -996,7 +999,10 @@ func (m *NoBlockResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1118,7 +1124,10 @@ func (m *BlockResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1168,7 +1177,10 @@ func (m *StatusRequest) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1256,7 +1268,10 @@ func (m *StatusResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1481,7 +1496,10 @@ func (m *Message) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -19,7 +19,7 @@ message NoBlockResponse {
|
||||
|
||||
// BlockResponse returns block to the requested
|
||||
message BlockResponse {
|
||||
tendermint.types.Block block = 1;
|
||||
tendermint.types.Block block = 1;
|
||||
tendermint.types.ExtendedCommit ext_commit = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -1935,7 +1935,10 @@ func (m *NewRoundStep) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2112,7 +2115,10 @@ func (m *NewValidBlock) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2195,7 +2201,10 @@ func (m *Proposal) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2316,7 +2325,10 @@ func (m *ProposalPOL) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2437,7 +2449,10 @@ func (m *BlockPart) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2523,7 +2538,10 @@ func (m *Vote) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2649,7 +2667,10 @@ func (m *HasVote) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2789,7 +2810,10 @@ func (m *VoteSetMaj23) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2962,7 +2986,10 @@ func (m *VoteSetBits) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -3327,7 +3354,10 @@ func (m *Message) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -921,7 +921,10 @@ func (m *MsgInfo) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthWal
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthWal
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1061,7 +1064,10 @@ func (m *TimeoutInfo) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthWal
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthWal
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1130,7 +1136,10 @@ func (m *EndHeight) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthWal
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthWal
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1320,7 +1329,10 @@ func (m *WALMessage) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthWal
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthWal
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1439,7 +1451,10 @@ func (m *TimedWALMessage) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthWal
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthWal
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -687,7 +687,10 @@ func (m *PublicKey) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthKeys
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthKeys
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -820,7 +820,10 @@ func (m *Proof) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthProof
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthProof
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -940,7 +943,10 @@ func (m *ValueOp) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthProof
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthProof
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1086,7 +1092,10 @@ func (m *DominoOp) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthProof
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthProof
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1236,7 +1245,10 @@ func (m *ProofOp) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthProof
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthProof
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1320,7 +1332,10 @@ func (m *ProofOps) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthProof
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthProof
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -307,7 +307,10 @@ func (m *BitArray) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -370,7 +370,10 @@ func (m *Txs) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -455,7 +458,10 @@ func (m *Message) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -723,7 +723,10 @@ func (m *PacketPing) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthConn
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthConn
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -773,7 +776,10 @@ func (m *PacketPong) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthConn
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthConn
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -896,7 +902,10 @@ func (m *PacketMsg) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthConn
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthConn
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1051,7 +1060,10 @@ func (m *Packet) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthConn
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthConn
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1168,7 +1180,10 @@ func (m *AuthSigMessage) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthConn
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthConn
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -587,7 +587,10 @@ func (m *PexAddress) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthPex
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthPex
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -637,7 +640,10 @@ func (m *PexRequest) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthPex
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthPex
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -721,7 +727,10 @@ func (m *PexResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthPex
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthPex
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -841,7 +850,10 @@ func (m *PexMessage) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthPex
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthPex
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -917,7 +917,10 @@ func (m *ProtocolVersion) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1227,7 +1230,10 @@ func (m *NodeInfo) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1341,7 +1347,10 @@ func (m *NodeInfoOther) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1493,7 +1502,10 @@ func (m *PeerInfo) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1666,7 +1678,10 @@ func (m *PeerAddressInfo) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.privval;
|
||||
option go_package = "github.com/tendermint/tendermint/proto/tendermint/privval";
|
||||
option go_package = "github.com/tendermint/tendermint/proto/tendermint/privval";
|
||||
|
||||
import "tendermint/privval/types.proto";
|
||||
|
||||
|
||||
@@ -1708,7 +1708,10 @@ func (m *RemoteSignerError) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1790,7 +1793,10 @@ func (m *PubKeyRequest) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1909,7 +1915,10 @@ func (m *PubKeyResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2027,7 +2036,10 @@ func (m *SignVoteRequest) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2146,7 +2158,10 @@ func (m *SignedVoteResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2264,7 +2279,10 @@ func (m *SignProposalRequest) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2383,7 +2401,10 @@ func (m *SignedProposalResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2433,7 +2454,10 @@ func (m *PingRequest) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2483,7 +2507,10 @@ func (m *PingResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2813,7 +2840,10 @@ func (m *Message) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2930,7 +2960,10 @@ func (m *AuthSigMessage) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -944,7 +944,10 @@ func (m *ABCIResponses) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1049,7 +1052,10 @@ func (m *ValidatorsInfo) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1151,7 +1157,10 @@ func (m *ConsensusParamsInfo) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1266,7 +1275,10 @@ func (m *Version) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1732,7 +1744,10 @@ func (m *State) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -1740,7 +1740,10 @@ func (m *Message) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1790,7 +1793,10 @@ func (m *SnapshotsRequest) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1965,7 +1971,10 @@ func (m *SnapshotsResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2072,7 +2081,10 @@ func (m *ChunkRequest) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2233,7 +2245,10 @@ func (m *ChunkResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2302,7 +2317,10 @@ func (m *LightBlockRequest) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2388,7 +2406,10 @@ func (m *LightBlockResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2457,7 +2478,10 @@ func (m *ParamsRequest) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2559,7 +2583,10 @@ func (m *ParamsResponse) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -389,7 +389,10 @@ func (m *Block) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthBlock
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthBlock
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -920,7 +920,10 @@ func (m *CanonicalBlockID) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthCanonical
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthCanonical
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1023,7 +1026,10 @@ func (m *CanonicalPartSetHeader) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthCanonical
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthCanonical
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1232,7 +1238,10 @@ func (m *CanonicalProposal) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthCanonical
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthCanonical
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1422,7 +1431,10 @@ func (m *CanonicalVote) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthCanonical
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthCanonical
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1558,7 +1570,10 @@ func (m *CanonicalVoteExtension) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthCanonical
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthCanonical
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -285,7 +285,10 @@ func (m *EventDataRoundState) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthEvents
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthEvents
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -827,7 +827,10 @@ func (m *Evidence) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthEvidence
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthEvidence
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1020,7 +1023,10 @@ func (m *DuplicateVoteEvidence) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthEvidence
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthEvidence
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1211,7 +1217,10 @@ func (m *LightClientAttackEvidence) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthEvidence
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthEvidence
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1295,7 +1304,10 @@ func (m *EvidenceList) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthEvidence
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthEvidence
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -36,6 +36,7 @@ type ConsensusParams struct {
|
||||
Version *VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
|
||||
Synchrony *SynchronyParams `protobuf:"bytes,5,opt,name=synchrony,proto3" json:"synchrony,omitempty"`
|
||||
Timeout *TimeoutParams `protobuf:"bytes,6,opt,name=timeout,proto3" json:"timeout,omitempty"`
|
||||
Abci *ABCIParams `protobuf:"bytes,7,opt,name=abci,proto3" json:"abci,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ConsensusParams) Reset() { *m = ConsensusParams{} }
|
||||
@@ -113,6 +114,13 @@ func (m *ConsensusParams) GetTimeout() *TimeoutParams {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConsensusParams) GetAbci() *ABCIParams {
|
||||
if m != nil {
|
||||
return m.Abci
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// BlockParams contains limits on the block size.
|
||||
type BlockParams struct {
|
||||
// Max block size, in bytes.
|
||||
@@ -566,6 +574,70 @@ func (m *TimeoutParams) GetBypassCommitTimeout() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// ABCIParams configure functionality specific to the Application Blockchain Interface.
|
||||
type ABCIParams struct {
|
||||
// vote_extensions_enable_height configures the first height during which
|
||||
// vote extensions will be enabled. During this specified height, and for all
|
||||
// subsequent heights, precommit messages that do not contain valid extension data
|
||||
// will be considered invalid. Prior to this height, vote extensions will not
|
||||
// be used or accepted by validators on the network.
|
||||
//
|
||||
// Once enabled, vote extensions will be created by the application in ExtendVote,
|
||||
// passed to the application for validation in VerifyVoteExtension and given
|
||||
// to the application to use when proposing a block during PrepareProposal.
|
||||
VoteExtensionsEnableHeight int64 `protobuf:"varint,1,opt,name=vote_extensions_enable_height,json=voteExtensionsEnableHeight,proto3" json:"vote_extensions_enable_height,omitempty"`
|
||||
// Indicates if CheckTx should be called on all the transactions
|
||||
// remaining in the mempool after a block is executed.
|
||||
RecheckTx bool `protobuf:"varint,2,opt,name=recheck_tx,json=recheckTx,proto3" json:"recheck_tx,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ABCIParams) Reset() { *m = ABCIParams{} }
|
||||
func (m *ABCIParams) String() string { return proto.CompactTextString(m) }
|
||||
func (*ABCIParams) ProtoMessage() {}
|
||||
func (*ABCIParams) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e12598271a686f57, []int{8}
|
||||
}
|
||||
func (m *ABCIParams) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ABCIParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ABCIParams.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *ABCIParams) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ABCIParams.Merge(m, src)
|
||||
}
|
||||
func (m *ABCIParams) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *ABCIParams) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ABCIParams.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ABCIParams proto.InternalMessageInfo
|
||||
|
||||
func (m *ABCIParams) GetVoteExtensionsEnableHeight() int64 {
|
||||
if m != nil {
|
||||
return m.VoteExtensionsEnableHeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ABCIParams) GetRecheckTx() bool {
|
||||
if m != nil {
|
||||
return m.RecheckTx
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ConsensusParams)(nil), "tendermint.types.ConsensusParams")
|
||||
proto.RegisterType((*BlockParams)(nil), "tendermint.types.BlockParams")
|
||||
@@ -575,55 +647,61 @@ func init() {
|
||||
proto.RegisterType((*HashedParams)(nil), "tendermint.types.HashedParams")
|
||||
proto.RegisterType((*SynchronyParams)(nil), "tendermint.types.SynchronyParams")
|
||||
proto.RegisterType((*TimeoutParams)(nil), "tendermint.types.TimeoutParams")
|
||||
proto.RegisterType((*ABCIParams)(nil), "tendermint.types.ABCIParams")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("tendermint/types/params.proto", fileDescriptor_e12598271a686f57) }
|
||||
|
||||
var fileDescriptor_e12598271a686f57 = []byte{
|
||||
// 680 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcf, 0x6e, 0xd3, 0x4a,
|
||||
0x14, 0xc6, 0xe3, 0x26, 0x4d, 0x93, 0x93, 0xa6, 0xa9, 0xe6, 0xde, 0xab, 0xeb, 0xdb, 0xab, 0x3a,
|
||||
0xc5, 0x0b, 0x54, 0x09, 0xc9, 0x41, 0xad, 0x50, 0x85, 0xc4, 0x1f, 0x91, 0x06, 0x81, 0x84, 0x8a,
|
||||
0x90, 0x29, 0x2c, 0xba, 0xb1, 0xc6, 0xc9, 0xe0, 0x5a, 0x8d, 0x3d, 0x96, 0xc7, 0x8e, 0xe2, 0xb7,
|
||||
0x60, 0x85, 0x78, 0x04, 0x78, 0x93, 0x2e, 0xbb, 0x64, 0x05, 0x28, 0x7d, 0x03, 0xd6, 0x2c, 0xd0,
|
||||
0xfc, 0x6b, 0x9a, 0x94, 0xd2, 0xac, 0xe2, 0xcc, 0xf9, 0x7e, 0xfe, 0x3c, 0xdf, 0x39, 0x33, 0xb0,
|
||||
0x99, 0x91, 0x78, 0x40, 0xd2, 0x28, 0x8c, 0xb3, 0x4e, 0x56, 0x24, 0x84, 0x75, 0x12, 0x9c, 0xe2,
|
||||
0x88, 0x39, 0x49, 0x4a, 0x33, 0x8a, 0xd6, 0xa7, 0x65, 0x47, 0x94, 0x37, 0xfe, 0x0e, 0x68, 0x40,
|
||||
0x45, 0xb1, 0xc3, 0x9f, 0xa4, 0x6e, 0xc3, 0x0a, 0x28, 0x0d, 0x86, 0xa4, 0x23, 0xfe, 0xf9, 0xf9,
|
||||
0xbb, 0xce, 0x20, 0x4f, 0x71, 0x16, 0xd2, 0x58, 0xd6, 0xed, 0x9f, 0x4b, 0xd0, 0xda, 0xa7, 0x31,
|
||||
0x23, 0x31, 0xcb, 0xd9, 0x2b, 0xe1, 0x80, 0x76, 0x61, 0xd9, 0x1f, 0xd2, 0xfe, 0x89, 0x69, 0x6c,
|
||||
0x19, 0xdb, 0x8d, 0x9d, 0x4d, 0x67, 0xde, 0xcb, 0xe9, 0xf2, 0xb2, 0x54, 0xbb, 0x52, 0x8b, 0x1e,
|
||||
0x40, 0x8d, 0x8c, 0xc2, 0x01, 0x89, 0xfb, 0xc4, 0x5c, 0x12, 0xdc, 0xd6, 0x55, 0xee, 0xa9, 0x52,
|
||||
0x28, 0xf4, 0x82, 0x40, 0x8f, 0xa1, 0x3e, 0xc2, 0xc3, 0x70, 0x80, 0x33, 0x9a, 0x9a, 0x65, 0x81,
|
||||
0xdf, 0xba, 0x8a, 0xbf, 0xd5, 0x12, 0xc5, 0x4f, 0x19, 0x74, 0x1f, 0x56, 0x46, 0x24, 0x65, 0x21,
|
||||
0x8d, 0xcd, 0x8a, 0xc0, 0xdb, 0xbf, 0xc1, 0xa5, 0x40, 0xc1, 0x5a, 0xcf, 0xbd, 0x59, 0x11, 0xf7,
|
||||
0x8f, 0x53, 0x1a, 0x17, 0xe6, 0xf2, 0x75, 0xde, 0xaf, 0xb5, 0x44, 0x7b, 0x5f, 0x30, 0xdc, 0x3b,
|
||||
0x0b, 0x23, 0x42, 0xf3, 0xcc, 0xac, 0x5e, 0xe7, 0x7d, 0x28, 0x05, 0xda, 0x5b, 0xe9, 0xed, 0x7d,
|
||||
0x68, 0x5c, 0xca, 0x12, 0xfd, 0x0f, 0xf5, 0x08, 0x8f, 0x3d, 0xbf, 0xc8, 0x08, 0x13, 0xe9, 0x97,
|
||||
0xdd, 0x5a, 0x84, 0xc7, 0x5d, 0xfe, 0x1f, 0xfd, 0x0b, 0x2b, 0xbc, 0x18, 0x60, 0x26, 0x02, 0x2e,
|
||||
0xbb, 0xd5, 0x08, 0x8f, 0x9f, 0x61, 0x66, 0x7f, 0x36, 0x60, 0x6d, 0x36, 0x59, 0x74, 0x07, 0x10,
|
||||
0xd7, 0xe2, 0x80, 0x78, 0x71, 0x1e, 0x79, 0xa2, 0x45, 0xfa, 0x8d, 0xad, 0x08, 0x8f, 0x9f, 0x04,
|
||||
0xe4, 0x65, 0x1e, 0x09, 0x6b, 0x86, 0x0e, 0x60, 0x5d, 0x8b, 0xf5, 0x74, 0xa8, 0x16, 0xfe, 0xe7,
|
||||
0xc8, 0xf1, 0x71, 0xf4, 0xf8, 0x38, 0x3d, 0x25, 0xe8, 0xd6, 0x4e, 0xbf, 0xb6, 0x4b, 0x1f, 0xbf,
|
||||
0xb5, 0x0d, 0x77, 0x4d, 0xbe, 0x4f, 0x57, 0x66, 0x37, 0x51, 0x9e, 0xdd, 0x84, 0x7d, 0x0f, 0x5a,
|
||||
0x73, 0x5d, 0x44, 0x36, 0x34, 0x93, 0xdc, 0xf7, 0x4e, 0x48, 0xe1, 0x89, 0xac, 0x4c, 0x63, 0xab,
|
||||
0xbc, 0x5d, 0x77, 0x1b, 0x49, 0xee, 0xbf, 0x20, 0xc5, 0x21, 0x5f, 0xb2, 0xef, 0x42, 0x73, 0xa6,
|
||||
0x7b, 0xa8, 0x0d, 0x0d, 0x9c, 0x24, 0x9e, 0xee, 0x39, 0xdf, 0x59, 0xc5, 0x05, 0x9c, 0x24, 0x4a,
|
||||
0x66, 0x1f, 0xc1, 0xea, 0x73, 0xcc, 0x8e, 0xc9, 0x40, 0x01, 0xb7, 0xa1, 0x25, 0x52, 0xf0, 0xe6,
|
||||
0x03, 0x6e, 0x8a, 0xe5, 0x03, 0x9d, 0xb2, 0x0d, 0xcd, 0xa9, 0x6e, 0x9a, 0x75, 0x43, 0xab, 0x78,
|
||||
0xe0, 0x1f, 0x0c, 0x68, 0xcd, 0xcd, 0x03, 0xea, 0x41, 0x33, 0x22, 0x8c, 0x89, 0x10, 0xc9, 0x10,
|
||||
0x17, 0xea, 0xf0, 0xfc, 0x21, 0xc1, 0x8a, 0x48, 0x6f, 0x55, 0x51, 0x3d, 0x0e, 0xa1, 0x87, 0x50,
|
||||
0x4f, 0x52, 0xd2, 0x0f, 0xd9, 0x42, 0x3d, 0x90, 0x6f, 0x98, 0x12, 0xf6, 0x8f, 0x25, 0x68, 0xce,
|
||||
0x4c, 0x1a, 0x9f, 0xcd, 0x24, 0xa5, 0x09, 0x65, 0x64, 0xd1, 0x0f, 0xd2, 0x7a, 0xbe, 0x23, 0xf5,
|
||||
0xc8, 0x77, 0x94, 0xe1, 0x45, 0xbf, 0x67, 0x55, 0x51, 0x3d, 0x0e, 0xa1, 0x5d, 0xa8, 0x8c, 0x68,
|
||||
0x46, 0xd4, 0xa1, 0xbe, 0x11, 0x16, 0x62, 0xf4, 0x08, 0x80, 0xff, 0x2a, 0xdf, 0xca, 0x82, 0x39,
|
||||
0x70, 0x44, 0x9a, 0xee, 0x41, 0xb5, 0x4f, 0xa3, 0x28, 0xcc, 0xd4, 0x79, 0xbe, 0x91, 0x55, 0x72,
|
||||
0xb4, 0x03, 0xff, 0xf8, 0x45, 0x82, 0x19, 0xf3, 0xe4, 0x82, 0x77, 0xf9, 0x60, 0xd7, 0xdc, 0xbf,
|
||||
0x64, 0x71, 0x5f, 0xd4, 0x54, 0xd0, 0xdd, 0x37, 0x9f, 0x26, 0x96, 0x71, 0x3a, 0xb1, 0x8c, 0xb3,
|
||||
0x89, 0x65, 0x7c, 0x9f, 0x58, 0xc6, 0xfb, 0x73, 0xab, 0x74, 0x76, 0x6e, 0x95, 0xbe, 0x9c, 0x5b,
|
||||
0xa5, 0xa3, 0xbd, 0x20, 0xcc, 0x8e, 0x73, 0xdf, 0xe9, 0xd3, 0xa8, 0x73, 0xf9, 0x4a, 0x9f, 0x3e,
|
||||
0xca, 0x3b, 0x7b, 0xfe, 0xba, 0xf7, 0xab, 0x62, 0x7d, 0xf7, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||
0xfc, 0x06, 0xae, 0x9f, 0x09, 0x06, 0x00, 0x00,
|
||||
// 762 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x95, 0xdf, 0x6e, 0xdb, 0x36,
|
||||
0x14, 0xc6, 0xad, 0xd8, 0x71, 0xec, 0xe3, 0x38, 0x0e, 0xb8, 0x0d, 0xd3, 0xb2, 0x59, 0xce, 0x74,
|
||||
0x31, 0x04, 0x18, 0x20, 0x07, 0x09, 0x86, 0x60, 0xc0, 0xfe, 0x20, 0xb6, 0x83, 0x65, 0x18, 0x32,
|
||||
0x0c, 0x5a, 0xda, 0x8b, 0xdc, 0x08, 0x94, 0xcc, 0xca, 0x42, 0x2c, 0x51, 0x10, 0x29, 0xc3, 0x7a,
|
||||
0x8b, 0x5e, 0x15, 0x7d, 0x84, 0xf6, 0xa6, 0xcf, 0x91, 0xcb, 0x5c, 0xf6, 0xaa, 0x2d, 0x9c, 0x37,
|
||||
0xe8, 0x13, 0x14, 0xa4, 0xa8, 0x38, 0x76, 0x9a, 0xc6, 0x57, 0xa6, 0x79, 0xbe, 0x1f, 0x0f, 0xf9,
|
||||
0x9d, 0x23, 0x12, 0xda, 0x9c, 0x44, 0x43, 0x92, 0x84, 0x41, 0xc4, 0xbb, 0x3c, 0x8b, 0x09, 0xeb,
|
||||
0xc6, 0x38, 0xc1, 0x21, 0xb3, 0xe2, 0x84, 0x72, 0x8a, 0xb6, 0xe7, 0x61, 0x4b, 0x86, 0x77, 0xbe,
|
||||
0xf6, 0xa9, 0x4f, 0x65, 0xb0, 0x2b, 0x46, 0xb9, 0x6e, 0xc7, 0xf0, 0x29, 0xf5, 0xc7, 0xa4, 0x2b,
|
||||
0xff, 0xb9, 0xe9, 0xb3, 0xee, 0x30, 0x4d, 0x30, 0x0f, 0x68, 0x94, 0xc7, 0xcd, 0x37, 0x65, 0x68,
|
||||
0xf5, 0x69, 0xc4, 0x48, 0xc4, 0x52, 0xf6, 0x9f, 0xcc, 0x80, 0x0e, 0x61, 0xdd, 0x1d, 0x53, 0xef,
|
||||
0x52, 0xd7, 0x76, 0xb5, 0xbd, 0xc6, 0x41, 0xdb, 0x5a, 0xce, 0x65, 0xf5, 0x44, 0x38, 0x57, 0xdb,
|
||||
0xb9, 0x16, 0xfd, 0x06, 0x35, 0x32, 0x09, 0x86, 0x24, 0xf2, 0x88, 0xbe, 0x26, 0xb9, 0xdd, 0xfb,
|
||||
0xdc, 0x89, 0x52, 0x28, 0xf4, 0x96, 0x40, 0x7f, 0x42, 0x7d, 0x82, 0xc7, 0xc1, 0x10, 0x73, 0x9a,
|
||||
0xe8, 0x65, 0x89, 0xff, 0x78, 0x1f, 0x7f, 0x5a, 0x48, 0x14, 0x3f, 0x67, 0xd0, 0xaf, 0xb0, 0x31,
|
||||
0x21, 0x09, 0x0b, 0x68, 0xa4, 0x57, 0x24, 0xde, 0xf9, 0x0c, 0x9e, 0x0b, 0x14, 0x5c, 0xe8, 0x45,
|
||||
0x6e, 0x96, 0x45, 0xde, 0x28, 0xa1, 0x51, 0xa6, 0xaf, 0x3f, 0x94, 0xfb, 0xff, 0x42, 0x52, 0xe4,
|
||||
0xbe, 0x65, 0x44, 0x6e, 0x1e, 0x84, 0x84, 0xa6, 0x5c, 0xaf, 0x3e, 0x94, 0xfb, 0x3c, 0x17, 0x14,
|
||||
0xb9, 0x95, 0x1e, 0xed, 0x43, 0x05, 0xbb, 0x5e, 0xa0, 0x6f, 0x48, 0xee, 0x87, 0xfb, 0xdc, 0x71,
|
||||
0xaf, 0xff, 0xb7, 0x82, 0xa4, 0xd2, 0xec, 0x43, 0xe3, 0x8e, 0xfb, 0xe8, 0x7b, 0xa8, 0x87, 0x78,
|
||||
0xea, 0xb8, 0x19, 0x27, 0x4c, 0xd6, 0xab, 0x6c, 0xd7, 0x42, 0x3c, 0xed, 0x89, 0xff, 0xe8, 0x5b,
|
||||
0xd8, 0x10, 0x41, 0x1f, 0x33, 0x59, 0x92, 0xb2, 0x5d, 0x0d, 0xf1, 0xf4, 0x2f, 0xcc, 0xcc, 0xd7,
|
||||
0x1a, 0x6c, 0x2d, 0xd6, 0x02, 0xfd, 0x0c, 0x48, 0x68, 0xb1, 0x4f, 0x9c, 0x28, 0x0d, 0x1d, 0x59,
|
||||
0xd4, 0x62, 0xc5, 0x56, 0x88, 0xa7, 0xc7, 0x3e, 0xf9, 0x37, 0x0d, 0x65, 0x6a, 0x86, 0xce, 0x60,
|
||||
0xbb, 0x10, 0x17, 0xfd, 0xa4, 0x8a, 0xfe, 0x9d, 0x95, 0x37, 0x9c, 0x55, 0x34, 0x9c, 0x35, 0x50,
|
||||
0x82, 0x5e, 0xed, 0xea, 0x5d, 0xa7, 0xf4, 0xf2, 0x7d, 0x47, 0xb3, 0xb7, 0xf2, 0xf5, 0x8a, 0xc8,
|
||||
0xe2, 0x21, 0xca, 0x8b, 0x87, 0x30, 0x7f, 0x81, 0xd6, 0x52, 0xdd, 0x91, 0x09, 0xcd, 0x38, 0x75,
|
||||
0x9d, 0x4b, 0x92, 0x39, 0xd2, 0x25, 0x5d, 0xdb, 0x2d, 0xef, 0xd5, 0xed, 0x46, 0x9c, 0xba, 0xff,
|
||||
0x90, 0xec, 0x5c, 0x4c, 0x99, 0xfb, 0xd0, 0x5c, 0xa8, 0x37, 0xea, 0x40, 0x03, 0xc7, 0xb1, 0x53,
|
||||
0x74, 0x89, 0x38, 0x59, 0xc5, 0x06, 0x1c, 0xc7, 0x4a, 0x66, 0x5e, 0xc0, 0xe6, 0x29, 0x66, 0x23,
|
||||
0x32, 0x54, 0xc0, 0x4f, 0xd0, 0x92, 0x2e, 0x38, 0xcb, 0x06, 0x37, 0xe5, 0xf4, 0x59, 0xe1, 0xb2,
|
||||
0x09, 0xcd, 0xb9, 0x6e, 0xee, 0x75, 0xa3, 0x50, 0x09, 0xc3, 0x5f, 0x68, 0xd0, 0x5a, 0xea, 0x20,
|
||||
0x34, 0x80, 0x66, 0x48, 0x18, 0x93, 0x26, 0x92, 0x31, 0xce, 0xd4, 0xe7, 0xf6, 0x05, 0x07, 0x2b,
|
||||
0xd2, 0xbd, 0x4d, 0x45, 0x0d, 0x04, 0x84, 0x7e, 0x87, 0x7a, 0x9c, 0x10, 0x2f, 0x60, 0x2b, 0xd5,
|
||||
0x20, 0x5f, 0x61, 0x4e, 0x98, 0x1f, 0xd7, 0xa0, 0xb9, 0xd0, 0x9b, 0xa2, 0x9b, 0xe3, 0x84, 0xc6,
|
||||
0x94, 0x91, 0x55, 0x37, 0x54, 0xe8, 0xc5, 0x89, 0xd4, 0x50, 0x9c, 0x88, 0xe3, 0x55, 0xf7, 0xb3,
|
||||
0xa9, 0xa8, 0x81, 0x80, 0xd0, 0x21, 0x54, 0x26, 0x94, 0x13, 0x75, 0x0d, 0x3c, 0x0a, 0x4b, 0x31,
|
||||
0xfa, 0x03, 0x40, 0xfc, 0xaa, 0xbc, 0x95, 0x15, 0x7d, 0x10, 0x48, 0x9e, 0xf4, 0x08, 0xaa, 0x1e,
|
||||
0x0d, 0xc3, 0x80, 0xab, 0x1b, 0xe0, 0x51, 0x56, 0xc9, 0xd1, 0x01, 0x7c, 0xe3, 0x66, 0x31, 0x66,
|
||||
0xcc, 0xc9, 0x27, 0x9c, 0xbb, 0x57, 0x41, 0xcd, 0xfe, 0x2a, 0x0f, 0xf6, 0x65, 0x4c, 0x19, 0x6d,
|
||||
0x46, 0x00, 0xf3, 0xef, 0x1a, 0x1d, 0x43, 0x5b, 0x6e, 0x9d, 0x4c, 0x39, 0x89, 0x44, 0x51, 0x98,
|
||||
0x43, 0x22, 0xec, 0x8e, 0x89, 0x33, 0x22, 0x81, 0x3f, 0xe2, 0xaa, 0xeb, 0x76, 0x84, 0xe8, 0xe4,
|
||||
0x56, 0x73, 0x22, 0x25, 0xa7, 0x52, 0x81, 0xda, 0x00, 0x09, 0xf1, 0x46, 0xc4, 0xbb, 0x74, 0xf8,
|
||||
0x54, 0xba, 0x5e, 0xb3, 0xeb, 0x6a, 0xe6, 0x7c, 0xda, 0x7b, 0xf2, 0x6a, 0x66, 0x68, 0x57, 0x33,
|
||||
0x43, 0xbb, 0x9e, 0x19, 0xda, 0x87, 0x99, 0xa1, 0x3d, 0xbf, 0x31, 0x4a, 0xd7, 0x37, 0x46, 0xe9,
|
||||
0xed, 0x8d, 0x51, 0xba, 0x38, 0xf2, 0x03, 0x3e, 0x4a, 0x5d, 0xcb, 0xa3, 0x61, 0xf7, 0xee, 0xa3,
|
||||
0x33, 0x1f, 0xe6, 0xaf, 0xca, 0xf2, 0x83, 0xe4, 0x56, 0xe5, 0xfc, 0xe1, 0xa7, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x06, 0x54, 0xd3, 0xab, 0x06, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (this *ConsensusParams) Equal(that interface{}) bool {
|
||||
@@ -663,6 +741,9 @@ func (this *ConsensusParams) Equal(that interface{}) bool {
|
||||
if !this.Timeout.Equal(that1.Timeout) {
|
||||
return false
|
||||
}
|
||||
if !this.Abci.Equal(that1.Abci) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *BlockParams) Equal(that interface{}) bool {
|
||||
@@ -910,6 +991,33 @@ func (this *TimeoutParams) Equal(that interface{}) bool {
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *ABCIParams) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*ABCIParams)
|
||||
if !ok {
|
||||
that2, ok := that.(ABCIParams)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if this.VoteExtensionsEnableHeight != that1.VoteExtensionsEnableHeight {
|
||||
return false
|
||||
}
|
||||
if this.RecheckTx != that1.RecheckTx {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (m *ConsensusParams) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
@@ -930,6 +1038,18 @@ func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Abci != nil {
|
||||
{
|
||||
size, err := m.Abci.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintParams(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
if m.Timeout != nil {
|
||||
{
|
||||
size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i])
|
||||
@@ -1063,12 +1183,12 @@ func (m *EvidenceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
n7, err7 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration):])
|
||||
if err7 != nil {
|
||||
return 0, err7
|
||||
n8, err8 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration):])
|
||||
if err8 != nil {
|
||||
return 0, err8
|
||||
}
|
||||
i -= n7
|
||||
i = encodeVarintParams(dAtA, i, uint64(n7))
|
||||
i -= n8
|
||||
i = encodeVarintParams(dAtA, i, uint64(n8))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
if m.MaxAgeNumBlocks != 0 {
|
||||
@@ -1193,23 +1313,23 @@ func (m *SynchronyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
var l int
|
||||
_ = l
|
||||
if m.Precision != nil {
|
||||
n8, err8 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Precision, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Precision):])
|
||||
if err8 != nil {
|
||||
return 0, err8
|
||||
}
|
||||
i -= n8
|
||||
i = encodeVarintParams(dAtA, i, uint64(n8))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.MessageDelay != nil {
|
||||
n9, err9 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.MessageDelay, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MessageDelay):])
|
||||
n9, err9 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Precision, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Precision):])
|
||||
if err9 != nil {
|
||||
return 0, err9
|
||||
}
|
||||
i -= n9
|
||||
i = encodeVarintParams(dAtA, i, uint64(n9))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.MessageDelay != nil {
|
||||
n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.MessageDelay, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MessageDelay):])
|
||||
if err10 != nil {
|
||||
return 0, err10
|
||||
}
|
||||
i -= n10
|
||||
i = encodeVarintParams(dAtA, i, uint64(n10))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
@@ -1246,58 +1366,96 @@ func (m *TimeoutParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x30
|
||||
}
|
||||
if m.Commit != nil {
|
||||
n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Commit, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Commit):])
|
||||
if err10 != nil {
|
||||
return 0, err10
|
||||
}
|
||||
i -= n10
|
||||
i = encodeVarintParams(dAtA, i, uint64(n10))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if m.VoteDelta != nil {
|
||||
n11, err11 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.VoteDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VoteDelta):])
|
||||
n11, err11 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Commit, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Commit):])
|
||||
if err11 != nil {
|
||||
return 0, err11
|
||||
}
|
||||
i -= n11
|
||||
i = encodeVarintParams(dAtA, i, uint64(n11))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if m.Vote != nil {
|
||||
n12, err12 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Vote, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Vote):])
|
||||
if m.VoteDelta != nil {
|
||||
n12, err12 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.VoteDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VoteDelta):])
|
||||
if err12 != nil {
|
||||
return 0, err12
|
||||
}
|
||||
i -= n12
|
||||
i = encodeVarintParams(dAtA, i, uint64(n12))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if m.ProposeDelta != nil {
|
||||
n13, err13 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.ProposeDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ProposeDelta):])
|
||||
if m.Vote != nil {
|
||||
n13, err13 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Vote, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Vote):])
|
||||
if err13 != nil {
|
||||
return 0, err13
|
||||
}
|
||||
i -= n13
|
||||
i = encodeVarintParams(dAtA, i, uint64(n13))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if m.Propose != nil {
|
||||
n14, err14 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Propose, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Propose):])
|
||||
if m.ProposeDelta != nil {
|
||||
n14, err14 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.ProposeDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ProposeDelta):])
|
||||
if err14 != nil {
|
||||
return 0, err14
|
||||
}
|
||||
i -= n14
|
||||
i = encodeVarintParams(dAtA, i, uint64(n14))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.Propose != nil {
|
||||
n15, err15 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Propose, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Propose):])
|
||||
if err15 != nil {
|
||||
return 0, err15
|
||||
}
|
||||
i -= n15
|
||||
i = encodeVarintParams(dAtA, i, uint64(n15))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *ABCIParams) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *ABCIParams) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *ABCIParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.RecheckTx {
|
||||
i--
|
||||
if m.RecheckTx {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x10
|
||||
}
|
||||
if m.VoteExtensionsEnableHeight != 0 {
|
||||
i = encodeVarintParams(dAtA, i, uint64(m.VoteExtensionsEnableHeight))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintParams(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovParams(v)
|
||||
base := offset
|
||||
@@ -1339,6 +1497,10 @@ func (m *ConsensusParams) Size() (n int) {
|
||||
l = m.Timeout.Size()
|
||||
n += 1 + l + sovParams(uint64(l))
|
||||
}
|
||||
if m.Abci != nil {
|
||||
l = m.Abci.Size()
|
||||
n += 1 + l + sovParams(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -1465,6 +1627,21 @@ func (m *TimeoutParams) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ABCIParams) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.VoteExtensionsEnableHeight != 0 {
|
||||
n += 1 + sovParams(uint64(m.VoteExtensionsEnableHeight))
|
||||
}
|
||||
if m.RecheckTx {
|
||||
n += 2
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovParams(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
@@ -1716,13 +1893,52 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 7:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Abci", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowParams
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Abci == nil {
|
||||
m.Abci = &ABCIParams{}
|
||||
}
|
||||
if err := m.Abci.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipParams(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1810,7 +2026,10 @@ func (m *BlockParams) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -1931,7 +2150,10 @@ func (m *EvidenceParams) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2013,7 +2235,10 @@ func (m *ValidatorParams) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2082,7 +2307,10 @@ func (m *VersionParams) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2170,7 +2398,10 @@ func (m *HashedParams) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2292,7 +2523,10 @@ func (m *SynchronyParams) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2542,7 +2776,102 @@ func (m *TimeoutParams) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ABCIParams) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowParams
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ABCIParams: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ABCIParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field VoteExtensionsEnableHeight", wireType)
|
||||
}
|
||||
m.VoteExtensionsEnableHeight = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowParams
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.VoteExtensionsEnableHeight |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field RecheckTx", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowParams
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.RecheckTx = bool(v != 0)
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipParams(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthParams
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -17,6 +17,7 @@ message ConsensusParams {
|
||||
VersionParams version = 4;
|
||||
SynchronyParams synchrony = 5;
|
||||
TimeoutParams timeout = 6;
|
||||
ABCIParams abci = 7;
|
||||
}
|
||||
|
||||
// BlockParams contains limits on the block size.
|
||||
@@ -127,3 +128,21 @@ message TimeoutParams {
|
||||
// for the full commit timeout.
|
||||
bool bypass_commit_timeout = 6;
|
||||
}
|
||||
|
||||
// ABCIParams configure functionality specific to the Application Blockchain Interface.
|
||||
message ABCIParams {
|
||||
// vote_extensions_enable_height configures the first height during which
|
||||
// vote extensions will be enabled. During this specified height, and for all
|
||||
// subsequent heights, precommit messages that do not contain valid extension data
|
||||
// will be considered invalid. Prior to this height, vote extensions will not
|
||||
// be used or accepted by validators on the network.
|
||||
//
|
||||
// Once enabled, vote extensions will be created by the application in ExtendVote,
|
||||
// passed to the application for validation in VerifyVoteExtension and given
|
||||
// to the application to use when proposing a block during PrepareProposal.
|
||||
int64 vote_extensions_enable_height = 1;
|
||||
|
||||
// Indicates if CheckTx should be called on all the transactions
|
||||
// remaining in the mempool after a block is executed.
|
||||
bool recheck_tx = 2;
|
||||
}
|
||||
|
||||
@@ -2650,7 +2650,10 @@ func (m *PartSetHeader) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2786,7 +2789,10 @@ func (m *Part) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -2903,7 +2909,10 @@ func (m *BlockID) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -3409,7 +3418,10 @@ func (m *Header) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -3491,7 +3503,10 @@ func (m *Data) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -3819,7 +3834,10 @@ func (m *Vote) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -3974,7 +3992,10 @@ func (m *Commit) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -4144,7 +4165,10 @@ func (m *CommitSig) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -4299,7 +4323,10 @@ func (m *ExtendedCommit) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -4537,7 +4564,10 @@ func (m *ExtendedCommitSig) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -4763,7 +4793,10 @@ func (m *Proposal) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -4885,7 +4918,10 @@ func (m *SignedHeader) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -5007,7 +5043,10 @@ func (m *LightBlock) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -5161,7 +5200,10 @@ func (m *BlockMeta) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -5315,7 +5357,10 @@ func (m *TxProof) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -583,7 +583,10 @@ func (m *ValidatorSet) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthValidator
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthValidator
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -738,7 +741,10 @@ func (m *Validator) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthValidator
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthValidator
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
@@ -843,7 +849,10 @@ func (m *SimpleValidator) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthValidator
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthValidator
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -265,7 +265,10 @@ func (m *Consensus) Unmarshal(dAtA []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthTypes
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
|
||||
@@ -88,7 +88,6 @@ func (a ABCIApp) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*coretypes.
|
||||
return &coretypes.ResultBroadcastTx{
|
||||
Code: c.Code,
|
||||
Data: c.Data,
|
||||
Log: c.Log,
|
||||
Codespace: c.Codespace,
|
||||
Hash: tx.Hash(),
|
||||
}, nil
|
||||
@@ -107,7 +106,6 @@ func (a ABCIApp) BroadcastTxSync(ctx context.Context, tx types.Tx) (*coretypes.R
|
||||
return &coretypes.ResultBroadcastTx{
|
||||
Code: c.Code,
|
||||
Data: c.Data,
|
||||
Log: c.Log,
|
||||
Codespace: c.Codespace,
|
||||
Hash: tx.Hash(),
|
||||
}, nil
|
||||
|
||||
@@ -12,8 +12,6 @@ import (
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
testing "testing"
|
||||
|
||||
types "github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
@@ -798,8 +796,13 @@ func (_m *Client) Validators(ctx context.Context, height *int64, page *int, perP
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// NewClient creates a new instance of Client. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewClient(t testing.TB) *Client {
|
||||
type NewClientT interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewClient(t NewClientT) *Client {
|
||||
mock := &Client{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -233,7 +233,6 @@ type ResultConsensusState struct {
|
||||
type ResultBroadcastTx struct {
|
||||
Code uint32 `json:"code"`
|
||||
Data bytes.HexBytes `json:"data"`
|
||||
Log string `json:"log"`
|
||||
Codespace string `json:"codespace"`
|
||||
MempoolError string `json:"mempool_error"`
|
||||
Hash bytes.HexBytes `json:"hash"`
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
package coretypes
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
pbcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
@@ -33,3 +41,53 @@ func TestStatusIndexer(t *testing.T) {
|
||||
assert.Equal(t, tc.expected, status.TxIndexEnabled())
|
||||
}
|
||||
}
|
||||
|
||||
// A regression test for https://github.com/tendermint/tendermint/issues/8583.
|
||||
func TestResultBlockResults_regression8583(t *testing.T) {
|
||||
const keyData = "0123456789abcdef0123456789abcdef" // 32 bytes
|
||||
wantKey := base64.StdEncoding.EncodeToString([]byte(keyData))
|
||||
|
||||
rsp := &ResultBlockResults{
|
||||
ValidatorUpdates: []abci.ValidatorUpdate{{
|
||||
PubKey: pbcrypto.PublicKey{
|
||||
Sum: &pbcrypto.PublicKey_Ed25519{Ed25519: []byte(keyData)},
|
||||
},
|
||||
Power: 400,
|
||||
}},
|
||||
}
|
||||
|
||||
// Use compact here so the test data remain legible. The output from the
|
||||
// marshaler will have whitespace folded out so we need to do that too for
|
||||
// the comparison to be valid.
|
||||
var buf bytes.Buffer
|
||||
require.NoError(t, json.Compact(&buf, []byte(fmt.Sprintf(`
|
||||
{
|
||||
"height": "0",
|
||||
"txs_results": null,
|
||||
"total_gas_used": "0",
|
||||
"finalize_block_events": null,
|
||||
"validator_updates": [
|
||||
{
|
||||
"pub_key":{"type": "tendermint/PubKeyEd25519", "value": "%s"},
|
||||
"power": "400"
|
||||
}
|
||||
],
|
||||
"consensus_param_updates": null
|
||||
}`, wantKey))))
|
||||
|
||||
bits, err := json.Marshal(rsp)
|
||||
if err != nil {
|
||||
t.Fatalf("Encoding block result: %v", err)
|
||||
}
|
||||
if diff := cmp.Diff(buf.String(), string(bits)); diff != "" {
|
||||
t.Errorf("Marshaled result (-want, +got):\n%s", diff)
|
||||
}
|
||||
|
||||
back := new(ResultBlockResults)
|
||||
if err := json.Unmarshal(bits, back); err != nil {
|
||||
t.Fatalf("Unmarshaling: %v", err)
|
||||
}
|
||||
if diff := cmp.Diff(rsp, back); diff != "" {
|
||||
t.Errorf("Unmarshaled result (-want, +got):\n%s", diff)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1507,7 +1507,7 @@ components:
|
||||
description: Event filter query
|
||||
type: object
|
||||
properties:
|
||||
filter:
|
||||
query:
|
||||
type: string
|
||||
example: "tm.event = 'Tx'"
|
||||
EventsResponse:
|
||||
|
||||
@@ -222,4 +222,10 @@ var plan = transform.Plan{
|
||||
return fmt.Errorf("unrecognized value: %v", idx.KeyValue)
|
||||
}),
|
||||
},
|
||||
{
|
||||
// Since https://github.com/tendermint/tendermint/pull/8514.
|
||||
Desc: "Remove the recheck option from the [mempool] section",
|
||||
T: transform.Remove(parser.Key{"mempool", "recheck"}),
|
||||
ErrorOK: true,
|
||||
},
|
||||
}
|
||||
|
||||
+1
@@ -9,6 +9,7 @@
|
||||
-M consensus.timeout-prevote-delta
|
||||
-M consensus.timeout-propose
|
||||
-M consensus.timeout-propose-delta
|
||||
-M mempool.recheck
|
||||
-M mempool.version
|
||||
-M p2p.addr-book-file
|
||||
-M p2p.addr-book-strict
|
||||
|
||||
+5
-1
@@ -281,7 +281,11 @@ recv-rate = 5120000
|
||||
#######################################################
|
||||
[mempool]
|
||||
|
||||
recheck = true
|
||||
# recheck has been moved from a config option to a global
|
||||
# consensus param in v0.36
|
||||
# See https://github.com/tendermint/tendermint/issues/8244 for more information.
|
||||
|
||||
# Set true to broadcast transactions in the mempool to other nodes
|
||||
broadcast = true
|
||||
|
||||
# Maximum number of transactions in the mempool
|
||||
|
||||
@@ -436,9 +436,6 @@ might have a different *CheckTxState* values when they receive it and check thei
|
||||
via `CheckTx`.
|
||||
Tendermint ignores this value in `ResponseCheckTx`.
|
||||
|
||||
`Events` include any events for the execution, though since the transaction has not
|
||||
been committed yet, they are effectively ignored by Tendermint.
|
||||
|
||||
From v0.35.x on, there is a `Priority` field in `ResponseCheckTx` that can be
|
||||
used to explicitly prioritize transactions in the mempool for inclusion in a block
|
||||
proposal.
|
||||
|
||||
@@ -136,11 +136,7 @@ title: Methods
|
||||
|------------|-------------------------------------------------------------|-----------------------------------------------------------------------|--------------|
|
||||
| code | uint32 | Response code. | 1 |
|
||||
| data | bytes | Result bytes, if any. | 2 |
|
||||
| log | string | The output of the application's logger. **May be non-deterministic.** | 3 |
|
||||
| info | string | Additional information. **May be non-deterministic.** | 4 |
|
||||
| gas_wanted | int64 | Amount of gas requested for transaction. | 5 |
|
||||
| gas_used | int64 | Amount of gas consumed by transaction. | 6 |
|
||||
| events | repeated [Event](abci++_basic_concepts_002_draft.md#events) | Type & Key-Value events for indexing transactions (eg. by account). | 7 |
|
||||
| codespace | string | Namespace for the `code`. | 8 |
|
||||
| sender | string | The transaction's sender (e.g. the signer) | 9 |
|
||||
| priority | int64 | The transaction's priority (for mempool ordering) | 10 |
|
||||
|
||||
+14
-5
@@ -13,7 +13,7 @@ Here we cover the following components of ABCI applications:
|
||||
and the differences between `CheckTx` and `DeliverTx`.
|
||||
- [Transaction Results](#transaction-results) - rules around transaction
|
||||
results and validity
|
||||
- [Validator Set Updates](#validator-updates) - how validator sets are
|
||||
- [Validator Set Updates](#updating-the-validator-set) - how validator sets are
|
||||
changed during `InitChain` and `EndBlock`
|
||||
- [Query](#query) - standards for using the `Query` method and proofs about the
|
||||
application state
|
||||
@@ -204,9 +204,6 @@ not broadcasted to other peers and not included in a proposal block.
|
||||
`Data` contains the result of the CheckTx transaction execution, if any. It is
|
||||
semantically meaningless to Tendermint.
|
||||
|
||||
`Events` include any events for the execution, though since the transaction has not
|
||||
been committed yet, they are effectively ignored by Tendermint.
|
||||
|
||||
### DeliverTx
|
||||
|
||||
DeliverTx is the workhorse of the blockchain. Tendermint sends the
|
||||
@@ -315,6 +312,18 @@ txs included in a proposed block.
|
||||
Must have `MaxGas >= -1`.
|
||||
If `MaxGas == -1`, no limit is enforced.
|
||||
|
||||
### BlockParams.RecheckTx
|
||||
|
||||
This indicates whether all nodes in the network should perform a `CheckTx` on all
|
||||
transactions remaining in the mempool directly *after* the execution of every block,
|
||||
i.e. whenever a new application state is created. This is often useful for garbage
|
||||
collection.
|
||||
|
||||
The change will come into effect immediately after `FinalizeBlock` has been
|
||||
called.
|
||||
|
||||
This was previously a local mempool config parameter.
|
||||
|
||||
### EvidenceParams.MaxAgeDuration
|
||||
|
||||
This is the maximum age of evidence in time units.
|
||||
@@ -355,7 +364,7 @@ are expected to have clocks that differ by at most `Precision`.
|
||||
|
||||
### SynchronyParams.MessageDelay
|
||||
|
||||
`SynchronyParams.MessageDelay` is a parameter of the Proposer-Based Timestamps
|
||||
`SynchronyParams.MessageDelay` is a parameter of the Proposer-Based Timestamps
|
||||
algorithm that configures the acceptable upper-bound for transmitting a `Proposal`
|
||||
message from the proposer to all of the validators on the network.
|
||||
|
||||
|
||||
@@ -5,40 +5,40 @@ Here we describe the data structures in the Tendermint blockchain and the rules
|
||||
The Tendermint blockchains consists of a short list of data types:
|
||||
|
||||
- [Data Structures](#data-structures)
|
||||
- [Block](#block)
|
||||
- [Execution](#execution)
|
||||
- [Header](#header)
|
||||
- [Version](#version)
|
||||
- [BlockID](#blockid)
|
||||
- [PartSetHeader](#partsetheader)
|
||||
- [Part](#part)
|
||||
- [Time](#time)
|
||||
- [Data](#data)
|
||||
- [Commit](#commit)
|
||||
- [CommitSig](#commitsig)
|
||||
- [BlockIDFlag](#blockidflag)
|
||||
- [Vote](#vote)
|
||||
- [CanonicalVote](#canonicalvote)
|
||||
- [Proposal](#proposal)
|
||||
- [SignedMsgType](#signedmsgtype)
|
||||
- [Signature](#signature)
|
||||
- [EvidenceList](#evidencelist)
|
||||
- [Evidence](#evidence)
|
||||
- [DuplicateVoteEvidence](#duplicatevoteevidence)
|
||||
- [LightClientAttackEvidence](#lightclientattackevidence)
|
||||
- [LightBlock](#lightblock)
|
||||
- [SignedHeader](#signedheader)
|
||||
- [ValidatorSet](#validatorset)
|
||||
- [Validator](#validator)
|
||||
- [Address](#address)
|
||||
- [ConsensusParams](#consensusparams)
|
||||
- [BlockParams](#blockparams)
|
||||
- [EvidenceParams](#evidenceparams)
|
||||
- [ValidatorParams](#validatorparams)
|
||||
- [VersionParams](#versionparams)
|
||||
- [SynchronyParams](#synchronyparams)
|
||||
- [TimeoutParams](#timeoutparams)
|
||||
- [Proof](#proof)
|
||||
- [Block](#block)
|
||||
- [Execution](#execution)
|
||||
- [Header](#header)
|
||||
- [Version](#version)
|
||||
- [BlockID](#blockid)
|
||||
- [PartSetHeader](#partsetheader)
|
||||
- [Part](#part)
|
||||
- [Time](#time)
|
||||
- [Data](#data)
|
||||
- [Commit](#commit)
|
||||
- [CommitSig](#commitsig)
|
||||
- [BlockIDFlag](#blockidflag)
|
||||
- [Vote](#vote)
|
||||
- [CanonicalVote](#canonicalvote)
|
||||
- [Proposal](#proposal)
|
||||
- [SignedMsgType](#signedmsgtype)
|
||||
- [Signature](#signature)
|
||||
- [EvidenceList](#evidencelist)
|
||||
- [Evidence](#evidence)
|
||||
- [DuplicateVoteEvidence](#duplicatevoteevidence)
|
||||
- [LightClientAttackEvidence](#lightclientattackevidence)
|
||||
- [LightBlock](#lightblock)
|
||||
- [SignedHeader](#signedheader)
|
||||
- [ValidatorSet](#validatorset)
|
||||
- [Validator](#validator)
|
||||
- [Address](#address)
|
||||
- [ConsensusParams](#consensusparams)
|
||||
- [BlockParams](#blockparams)
|
||||
- [EvidenceParams](#evidenceparams)
|
||||
- [ValidatorParams](#validatorparams)
|
||||
- [VersionParams](#versionparams)
|
||||
- [SynchronyParams](#synchronyparams)
|
||||
- [TimeoutParams](#timeoutparams)
|
||||
- [Proof](#proof)
|
||||
|
||||
## Block
|
||||
|
||||
@@ -49,7 +49,7 @@ and a list of evidence of malfeasance (ie. signing conflicting votes).
|
||||
|--------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
|
||||
| Header | [Header](#header) | Header corresponding to the block. This field contains information used throughout consensus and other areas of the protocol. To find out what it contains, visit [header] (#header) | Must adhere to the validation rules of [header](#header) |
|
||||
| Data | [Data](#data) | Data contains a list of transactions. The contents of the transaction is unknown to Tendermint. | This field can be empty or populated, but no validation is performed. Applications can perform validation on individual transactions prior to block creation using [checkTx](../abci/abci.md#checktx).
|
||||
| Evidence | [EvidenceList](#evidence_list) | Evidence contains a list of infractions committed by validators. | Can be empty, but when populated the validations rules from [evidenceList](#evidence_list) apply |
|
||||
| Evidence | [EvidenceList](#evidencelist) | Evidence contains a list of infractions committed by validators. | Can be empty, but when populated the validations rules from [evidenceList](#evidencelist) apply |
|
||||
| LastCommit | [Commit](#commit) | `LastCommit` includes one vote for every validator. All votes must either be for the previous block, nil or absent. If a vote is for the previous block it must have a valid signature from the corresponding validator. The sum of the voting power of the validators that voted must be greater than 2/3 of the total voting power of the complete validator set. The number of votes in a commit is limited to 10000 (see `types.MaxVotesCount`). | Must be empty for the initial height and must adhere to the validation rules of [commit](#commit). |
|
||||
|
||||
## Execution
|
||||
@@ -152,7 +152,7 @@ The `BlockID` contains two distinct Merkle roots of the block. The `BlockID` inc
|
||||
| Name | Type | Description | Validation |
|
||||
|---------------|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------|
|
||||
| Hash | slice of bytes (`[]byte`) | MerkleRoot of all the fields in the header (ie. `MerkleRoot(header)`. | hash must be of length 32 |
|
||||
| PartSetHeader | [PartSetHeader](#PartSetHeader) | Used for secure gossiping of the block during consensus, is the MerkleRoot of the complete serialized block cut into parts (ie. `MerkleRoot(MakeParts(block))`). | Must adhere to the validation rules of [PartSetHeader](#PartSetHeader) |
|
||||
| PartSetHeader | [PartSetHeader](#partsetheader) | Used for secure gossiping of the block during consensus, is the MerkleRoot of the complete serialized block cut into parts (ie. `MerkleRoot(MakeParts(block))`). | Must adhere to the validation rules of [PartSetHeader](#partsetheader) |
|
||||
|
||||
See [MerkleRoot](./encoding.md#MerkleRoot) for details.
|
||||
|
||||
@@ -238,7 +238,7 @@ The vote extension is not part of the [`CanonicalVote`](#canonicalvote).
|
||||
| Height | uint64 | Height for which this vote was created. | Must be > 0 |
|
||||
| Round | int32 | Round that the commit corresponds to. | Must be > 0 |
|
||||
| BlockID | [BlockID](#blockid) | The blockID of the corresponding block. | [BlockID](#blockid) |
|
||||
| Timestamp | [Time](#Time) | The time at which a validator signed. | [Time](#time) |
|
||||
| Timestamp | [Time](#time) | The time at which a validator signed. | [Time](#time) |
|
||||
| ValidatorAddress | slice of bytes (`[]byte`) | Address of the validator | Length must be equal to 20 |
|
||||
| ValidatorIndex | int32 | Index at a specific block height that corresponds to the Index of the validator in the set. | must be > 0 |
|
||||
| Signature | slice of bytes (`[]byte`) | Signature by the validator if they participated in consensus for the associated bock. | Length of signature must be > 0 and < 64 |
|
||||
@@ -295,7 +295,7 @@ is locked in POLRound. The message is signed by the validator private key.
|
||||
| Round | int32 | Round that the commit corresponds to. | Must be > 0 |
|
||||
| POLRound | int64 | Proof of lock | Must be > 0 |
|
||||
| BlockID | [BlockID](#blockid) | The blockID of the corresponding block. | [BlockID](#blockid) |
|
||||
| Timestamp | [Time](#Time) | Timestamp represents the time at which a validator signed. | [Time](#time) |
|
||||
| Timestamp | [Time](#time) | Timestamp represents the time at which a validator signed. | [Time](#time) |
|
||||
| Signature | slice of bytes (`[]byte`) | Signature by the validator if they participated in consensus for the associated bock. | Length of signature must be > 0 and < 64 |
|
||||
|
||||
## SignedMsgType
|
||||
@@ -346,7 +346,7 @@ in the same round of the same height. Votes are lexicographically sorted on `Blo
|
||||
| VoteB | [Vote](#vote) | The second vote submitted by a validator when they equivocated | VoteB must adhere to [Vote](#vote) validation rules |
|
||||
| TotalVotingPower | int64 | The total power of the validator set at the height of equivocation | Must be equal to nodes own copy of the data |
|
||||
| ValidatorPower | int64 | Power of the equivocating validator at the height | Must be equal to the nodes own copy of the data |
|
||||
| Timestamp | [Time](#Time) | Time of the block where the equivocation occurred | Must be equal to the nodes own copy of the data |
|
||||
| Timestamp | [Time](#time) | Time of the block where the equivocation occurred | Must be equal to the nodes own copy of the data |
|
||||
|
||||
### LightClientAttackEvidence
|
||||
|
||||
@@ -355,13 +355,13 @@ a light client such that a full node can verify, propose and commit the evidence
|
||||
punishment of the malicious validators. There are three forms of attacks: Lunatic, Equivocation
|
||||
and Amnesia. These attacks are exhaustive. You can find a more detailed overview of this [here](../light-client/accountability#the_misbehavior_of_faulty_validators)
|
||||
|
||||
| Name | Type | Description | Validation |
|
||||
|----------------------|------------------------------------|----------------------------------------------------------------------|------------------------------------------------------------------|
|
||||
| ConflictingBlock | [LightBlock](#LightBlock) | Read Below | Must adhere to the validation rules of [lightBlock](#lightblock) |
|
||||
| CommonHeight | int64 | Read Below | must be > 0 |
|
||||
| Byzantine Validators | Array of [Validators](#Validators) | validators that acted maliciously | Read Below |
|
||||
| TotalVotingPower | int64 | The total power of the validator set at the height of the infraction | Must be equal to the nodes own copy of the data |
|
||||
| Timestamp | [Time](#Time) | Time of the block where the infraction occurred | Must be equal to the nodes own copy of the data |
|
||||
| Name | Type | Description | Validation |
|
||||
|----------------------|----------------------------------|----------------------------------------------------------------------|------------------------------------------------------------------|
|
||||
| ConflictingBlock | [LightBlock](#lightblock) | Read Below | Must adhere to the validation rules of [lightBlock](#lightblock) |
|
||||
| CommonHeight | int64 | Read Below | must be > 0 |
|
||||
| Byzantine Validators | Array of [Validator](#validator) | validators that acted maliciously | Read Below |
|
||||
| TotalVotingPower | int64 | The total power of the validator set at the height of the infraction | Must be equal to the nodes own copy of the data |
|
||||
| Timestamp | [Time](#time) | Time of the block where the infraction occurred | Must be equal to the nodes own copy of the data |
|
||||
|
||||
## LightBlock
|
||||
|
||||
@@ -380,7 +380,7 @@ The SignedhHeader is the [header](#header) accompanied by the commit to prove it
|
||||
|
||||
| Name | Type | Description | Validation |
|
||||
|--------|-------------------|-------------------|-----------------------------------------------------------------------------------|
|
||||
| Header | [Header](#Header) | [Header](#header) | Header cannot be nil and must adhere to the [Header](#Header) validation criteria |
|
||||
| Header | [Header](#header) | [Header](#header) | Header cannot be nil and must adhere to the [Header](#header) validation criteria |
|
||||
| Commit | [Commit](#commit) | [Commit](#commit) | Commit cannot be nil and must adhere to the [Commit](#commit) criteria |
|
||||
|
||||
## ValidatorSet
|
||||
@@ -429,6 +429,7 @@ func SumTruncated(bz []byte) []byte {
|
||||
|--------------|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
|
||||
| max_bytes | int64 | Max size of a block, in bytes. | 1 |
|
||||
| max_gas | int64 | Max sum of `GasWanted` in a proposed block. NOTE: blocks that violate this may be committed if there are Byzantine proposers. It's the application's responsibility to handle this when processing a block! | 2 |
|
||||
| recheck_tx | bool | Indicated whether to run `CheckTx` on all remaining transactions *after* every execution of a block | 3 |
|
||||
|
||||
### EvidenceParams
|
||||
|
||||
|
||||
@@ -162,7 +162,6 @@ func (app *Application) CheckTx(_ context.Context, req *abci.RequestCheckTx) (*a
|
||||
if err != nil {
|
||||
return &abci.ResponseCheckTx{
|
||||
Code: code.CodeTypeEncodingError,
|
||||
Log: err.Error(),
|
||||
}, nil
|
||||
}
|
||||
return &abci.ResponseCheckTx{Code: code.CodeTypeOK, GasWanted: 1}, nil
|
||||
|
||||
@@ -66,6 +66,9 @@ var (
|
||||
txSize = uniformChoice{1024, 4096} // either 1kb or 4kb
|
||||
ipv6 = uniformChoice{false, true}
|
||||
keyType = uniformChoice{types.ABCIPubKeyTypeEd25519, types.ABCIPubKeyTypeSecp256k1}
|
||||
|
||||
voteExtensionEnableHeightOffset = uniformChoice{int64(0), int64(10), int64(100)}
|
||||
voteExtensionEnabled = uniformChoice{true, false}
|
||||
)
|
||||
|
||||
// Generate generates random testnets using the given RNG.
|
||||
@@ -116,6 +119,10 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
|
||||
TxSize: txSize.Choose(r).(int),
|
||||
}
|
||||
|
||||
if voteExtensionEnabled.Choose(r).(bool) {
|
||||
manifest.VoteExtensionsEnableHeight = manifest.InitialHeight + voteExtensionEnableHeightOffset.Choose(r).(int64)
|
||||
}
|
||||
|
||||
var numSeeds, numValidators, numFulls, numLightClients int
|
||||
switch opt["topology"].(string) {
|
||||
case "single":
|
||||
|
||||
@@ -66,6 +66,11 @@ type Manifest struct {
|
||||
// Number of bytes per tx. Default is 1kb (1024)
|
||||
TxSize int
|
||||
|
||||
// VoteExtensionsEnableHeight configures the first height during which
|
||||
// the chain will use and require vote extension data to be present
|
||||
// in precommit messages.
|
||||
VoteExtensionsEnableHeight int64 `toml:"vote_extensions_enable_height"`
|
||||
|
||||
// ABCIProtocol specifies the protocol used to communicate with the ABCI
|
||||
// application: "unix", "tcp", "grpc", or "builtin". Defaults to builtin.
|
||||
// builtin will build a complete Tendermint node into the application and
|
||||
|
||||
+15
-14
@@ -58,20 +58,21 @@ const (
|
||||
|
||||
// Testnet represents a single testnet.
|
||||
type Testnet struct {
|
||||
Name string
|
||||
File string
|
||||
Dir string
|
||||
IP *net.IPNet
|
||||
InitialHeight int64
|
||||
InitialState map[string]string
|
||||
Validators map[*Node]int64
|
||||
ValidatorUpdates map[int64]map[*Node]int64
|
||||
Nodes []*Node
|
||||
KeyType string
|
||||
Evidence int
|
||||
LogLevel string
|
||||
TxSize int
|
||||
ABCIProtocol string
|
||||
Name string
|
||||
File string
|
||||
Dir string
|
||||
IP *net.IPNet
|
||||
InitialHeight int64
|
||||
InitialState map[string]string
|
||||
Validators map[*Node]int64
|
||||
ValidatorUpdates map[int64]map[*Node]int64
|
||||
Nodes []*Node
|
||||
KeyType string
|
||||
Evidence int
|
||||
VoteExtensionsEnableHeight int64
|
||||
LogLevel string
|
||||
TxSize int
|
||||
ABCIProtocol string
|
||||
}
|
||||
|
||||
// Node represents a Tendermint node in a testnet.
|
||||
|
||||
@@ -86,9 +86,15 @@ func InjectEvidence(ctx context.Context, logger log.Logger, r *rand.Rand, testne
|
||||
privVals, evidenceHeight, valSet, testnet.Name, blockRes.Block.Time,
|
||||
)
|
||||
} else {
|
||||
ev, err = generateDuplicateVoteEvidence(ctx,
|
||||
var dve *types.DuplicateVoteEvidence
|
||||
dve, err = generateDuplicateVoteEvidence(ctx,
|
||||
privVals, evidenceHeight, valSet, testnet.Name, blockRes.Block.Time,
|
||||
)
|
||||
if dve.VoteA.Height < testnet.VoteExtensionsEnableHeight {
|
||||
dve.VoteA.StripExtension()
|
||||
dve.VoteB.StripExtension()
|
||||
}
|
||||
ev = dve
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -209,6 +209,7 @@ func MakeGenesis(testnet *e2e.Testnet) (types.GenesisDoc, error) {
|
||||
}
|
||||
genesis.ConsensusParams.Evidence.MaxAgeNumBlocks = e2e.EvidenceAgeHeight
|
||||
genesis.ConsensusParams.Evidence.MaxAgeDuration = e2e.EvidenceAgeTime
|
||||
genesis.ConsensusParams.ABCI.VoteExtensionsEnableHeight = testnet.VoteExtensionsEnableHeight
|
||||
for validator, power := range testnet.Validators {
|
||||
genesis.Validators = append(genesis.Validators, types.GenesisValidator{
|
||||
Name: validator.Name,
|
||||
|
||||
@@ -3,6 +3,7 @@ package e2e_test
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
@@ -190,16 +191,25 @@ func TestApp_Tx(t *testing.T) {
|
||||
|
||||
func TestApp_VoteExtensions(t *testing.T) {
|
||||
testNode(t, func(ctx context.Context, t *testing.T, node e2e.Node) {
|
||||
t.Skip()
|
||||
client, err := node.Client()
|
||||
require.NoError(t, err)
|
||||
info, err := client.ABCIInfo(ctx)
|
||||
require.NoError(t, err)
|
||||
|
||||
// This special value should have been created by way of vote extensions
|
||||
resp, err := client.ABCIQuery(ctx, "", []byte("extensionSum"))
|
||||
require.NoError(t, err)
|
||||
|
||||
extSum, err := strconv.Atoi(string(resp.Response.Value))
|
||||
require.NoError(t, err)
|
||||
require.GreaterOrEqual(t, extSum, 0)
|
||||
// if extensions are not enabled on the network, we should not expect
|
||||
// the app to have any extension value set.
|
||||
if node.Testnet.VoteExtensionsEnableHeight == 0 ||
|
||||
info.Response.LastBlockHeight < node.Testnet.VoteExtensionsEnableHeight+1 {
|
||||
target := &strconv.NumError{}
|
||||
require.True(t, errors.As(err, &target))
|
||||
} else {
|
||||
require.NoError(t, err)
|
||||
require.GreaterOrEqual(t, extSum, 0)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
package tools
|
||||
|
||||
import (
|
||||
_ "github.com/bufbuild/buf/cmd/buf"
|
||||
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
_ "github.com/vektra/mockery/v2"
|
||||
)
|
||||
|
||||
@@ -101,6 +101,7 @@ type TimeoutParams struct {
|
||||
// Interface.
|
||||
type ABCIParams struct {
|
||||
VoteExtensionsEnableHeight int64 `json:"vote_extensions_enable_height"`
|
||||
RecheckTx bool `json:"recheck_tx"`
|
||||
}
|
||||
|
||||
// VoteExtensionsEnabled returns true if vote extensions are enabled at height h
|
||||
@@ -197,6 +198,8 @@ func DefaultABCIParams() ABCIParams {
|
||||
return ABCIParams{
|
||||
// When set to 0, vote extensions are not required.
|
||||
VoteExtensionsEnableHeight: 0,
|
||||
// When true, run CheckTx on each transaction in the mempool after each height.
|
||||
RecheckTx: true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,6 +333,9 @@ func (params ConsensusParams) ValidateConsensusParams() error {
|
||||
if params.Timeout.Commit <= 0 {
|
||||
return fmt.Errorf("timeout.Commit must be greater than 0. Got: %d", params.Timeout.Commit)
|
||||
}
|
||||
if params.ABCI.VoteExtensionsEnableHeight < 0 {
|
||||
return fmt.Errorf("ABCI.VoteExtensionsEnableHeight cannot be negative. Got: %d", params.ABCI.VoteExtensionsEnableHeight)
|
||||
}
|
||||
|
||||
if len(params.Validator.PubKeyTypes) == 0 {
|
||||
return errors.New("len(Validator.PubKeyTypes) must be greater than 0")
|
||||
@@ -347,10 +353,35 @@ func (params ConsensusParams) ValidateConsensusParams() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (params ConsensusParams) ValidateUpdate(updated *tmproto.ConsensusParams, h int64) error {
|
||||
if updated.Abci == nil {
|
||||
return nil
|
||||
}
|
||||
if params.ABCI.VoteExtensionsEnableHeight == updated.Abci.VoteExtensionsEnableHeight {
|
||||
return nil
|
||||
}
|
||||
if params.ABCI.VoteExtensionsEnableHeight != 0 && updated.Abci.VoteExtensionsEnableHeight == 0 {
|
||||
return errors.New("vote extensions cannot be disabled once enabled")
|
||||
}
|
||||
if updated.Abci.VoteExtensionsEnableHeight <= h {
|
||||
return fmt.Errorf("VoteExtensionsEnableHeight cannot be updated to a past height, "+
|
||||
"initial height: %d, current height %d",
|
||||
params.ABCI.VoteExtensionsEnableHeight, h)
|
||||
}
|
||||
if params.ABCI.VoteExtensionsEnableHeight <= h {
|
||||
return fmt.Errorf("VoteExtensionsEnableHeight cannot be updated modified once"+
|
||||
"the initial height has occurred, "+
|
||||
"initial height: %d, current height %d",
|
||||
params.ABCI.VoteExtensionsEnableHeight, h)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Hash returns a hash of a subset of the parameters to store in the block header.
|
||||
// Only the Block.MaxBytes and Block.MaxGas are included in the hash.
|
||||
// This allows the ConsensusParams to evolve more without breaking the block
|
||||
// protocol. No need for a Merkle tree here, just a small struct to hash.
|
||||
// TODO: We should hash the other parameters as well
|
||||
func (params ConsensusParams) HashConsensusParams() []byte {
|
||||
hp := tmproto.HashedParams{
|
||||
BlockMaxBytes: params.Block.MaxBytes,
|
||||
@@ -373,6 +404,7 @@ func (params *ConsensusParams) Equals(params2 *ConsensusParams) bool {
|
||||
params.Version == params2.Version &&
|
||||
params.Synchrony == params2.Synchrony &&
|
||||
params.Timeout == params2.Timeout &&
|
||||
params.ABCI == params2.ABCI &&
|
||||
tmstrings.StringSliceEqual(params.Validator.PubKeyTypes, params2.Validator.PubKeyTypes)
|
||||
}
|
||||
|
||||
@@ -429,6 +461,10 @@ func (params ConsensusParams) UpdateConsensusParams(params2 *tmproto.ConsensusPa
|
||||
}
|
||||
res.Timeout.BypassCommitTimeout = params2.Timeout.GetBypassCommitTimeout()
|
||||
}
|
||||
if params2.Abci != nil {
|
||||
res.ABCI.VoteExtensionsEnableHeight = params2.Abci.GetVoteExtensionsEnableHeight()
|
||||
res.ABCI.RecheckTx = params2.Abci.GetRecheckTx()
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
@@ -461,6 +497,10 @@ func (params *ConsensusParams) ToProto() tmproto.ConsensusParams {
|
||||
Commit: ¶ms.Timeout.Commit,
|
||||
BypassCommitTimeout: params.Timeout.BypassCommitTimeout,
|
||||
},
|
||||
Abci: &tmproto.ABCIParams{
|
||||
VoteExtensionsEnableHeight: params.ABCI.VoteExtensionsEnableHeight,
|
||||
RecheckTx: params.ABCI.RecheckTx,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,5 +548,9 @@ func ConsensusParamsFromProto(pbParams tmproto.ConsensusParams) ConsensusParams
|
||||
}
|
||||
c.Timeout.BypassCommitTimeout = pbParams.Timeout.BypassCommitTimeout
|
||||
}
|
||||
if pbParams.Abci != nil {
|
||||
c.ABCI.VoteExtensionsEnableHeight = pbParams.Abci.GetVoteExtensionsEnableHeight()
|
||||
c.ABCI.RecheckTx = pbParams.Abci.GetRecheckTx()
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
+111
-7
@@ -7,6 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
)
|
||||
@@ -177,6 +178,7 @@ func TestConsensusParamsValidation(t *testing.T) {
|
||||
type makeParamsArgs struct {
|
||||
blockBytes int64
|
||||
blockGas int64
|
||||
recheck bool
|
||||
evidenceAge int64
|
||||
maxEvidenceBytes int64
|
||||
pubkeyTypes []string
|
||||
@@ -189,6 +191,8 @@ type makeParamsArgs struct {
|
||||
vote *time.Duration
|
||||
voteDelta *time.Duration
|
||||
commit *time.Duration
|
||||
|
||||
abciExtensionHeight int64
|
||||
}
|
||||
|
||||
func makeParams(args makeParamsArgs) ConsensusParams {
|
||||
@@ -235,6 +239,10 @@ func makeParams(args makeParamsArgs) ConsensusParams {
|
||||
Commit: *args.commit,
|
||||
BypassCommitTimeout: args.bypassCommitTimeout,
|
||||
},
|
||||
ABCI: ABCIParams{
|
||||
VoteExtensionsEnableHeight: args.abciExtensionHeight,
|
||||
RecheckTx: args.recheck,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,19 +275,19 @@ func TestConsensusParamsHash(t *testing.T) {
|
||||
|
||||
func TestConsensusParamsUpdate(t *testing.T) {
|
||||
testCases := []struct {
|
||||
intialParams ConsensusParams
|
||||
initialParams ConsensusParams
|
||||
updates *tmproto.ConsensusParams
|
||||
updatedParams ConsensusParams
|
||||
}{
|
||||
// empty updates
|
||||
{
|
||||
intialParams: makeParams(makeParamsArgs{blockBytes: 1, blockGas: 2, evidenceAge: 3}),
|
||||
initialParams: makeParams(makeParamsArgs{blockBytes: 1, blockGas: 2, evidenceAge: 3}),
|
||||
updates: &tmproto.ConsensusParams{},
|
||||
updatedParams: makeParams(makeParamsArgs{blockBytes: 1, blockGas: 2, evidenceAge: 3}),
|
||||
},
|
||||
{
|
||||
// update synchrony params
|
||||
intialParams: makeParams(makeParamsArgs{evidenceAge: 3, precision: time.Second, messageDelay: 3 * time.Second}),
|
||||
initialParams: makeParams(makeParamsArgs{evidenceAge: 3, precision: time.Second, messageDelay: 3 * time.Second}),
|
||||
updates: &tmproto.ConsensusParams{
|
||||
Synchrony: &tmproto.SynchronyParams{
|
||||
Precision: durationPtr(time.Second * 2),
|
||||
@@ -290,7 +298,21 @@ func TestConsensusParamsUpdate(t *testing.T) {
|
||||
},
|
||||
{
|
||||
// update timeout params
|
||||
intialParams: makeParams(makeParamsArgs{
|
||||
initialParams: makeParams(makeParamsArgs{
|
||||
abciExtensionHeight: 1,
|
||||
}),
|
||||
updates: &tmproto.ConsensusParams{
|
||||
Abci: &tmproto.ABCIParams{
|
||||
VoteExtensionsEnableHeight: 10,
|
||||
},
|
||||
},
|
||||
updatedParams: makeParams(makeParamsArgs{
|
||||
abciExtensionHeight: 10,
|
||||
}),
|
||||
},
|
||||
{
|
||||
// update timeout params
|
||||
initialParams: makeParams(makeParamsArgs{
|
||||
propose: durationPtr(3 * time.Second),
|
||||
proposeDelta: durationPtr(500 * time.Millisecond),
|
||||
vote: durationPtr(time.Second),
|
||||
@@ -319,7 +341,7 @@ func TestConsensusParamsUpdate(t *testing.T) {
|
||||
},
|
||||
// fine updates
|
||||
{
|
||||
intialParams: makeParams(makeParamsArgs{blockBytes: 1, blockGas: 2, evidenceAge: 3}),
|
||||
initialParams: makeParams(makeParamsArgs{blockBytes: 1, blockGas: 2, evidenceAge: 3}),
|
||||
updates: &tmproto.ConsensusParams{
|
||||
Block: &tmproto.BlockParams{
|
||||
MaxBytes: 100,
|
||||
@@ -341,7 +363,7 @@ func TestConsensusParamsUpdate(t *testing.T) {
|
||||
pubkeyTypes: valSecp256k1}),
|
||||
},
|
||||
{
|
||||
intialParams: makeParams(makeParamsArgs{blockBytes: 1, blockGas: 2, evidenceAge: 3}),
|
||||
initialParams: makeParams(makeParamsArgs{blockBytes: 1, blockGas: 2, evidenceAge: 3}),
|
||||
updates: &tmproto.ConsensusParams{
|
||||
Block: &tmproto.BlockParams{
|
||||
MaxBytes: 100,
|
||||
@@ -366,7 +388,7 @@ func TestConsensusParamsUpdate(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
assert.Equal(t, tc.updatedParams, tc.intialParams.UpdateConsensusParams(tc.updates))
|
||||
assert.Equal(t, tc.updatedParams, tc.initialParams.UpdateConsensusParams(tc.updates))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,6 +403,78 @@ func TestConsensusParamsUpdate_AppVersion(t *testing.T) {
|
||||
assert.EqualValues(t, 1, updated.Version.AppVersion)
|
||||
}
|
||||
|
||||
func TestConsensusParamsUpdate_VoteExtensionsEnableHeight(t *testing.T) {
|
||||
t.Run("set to height but initial height already run", func(*testing.T) {
|
||||
initialParams := makeParams(makeParamsArgs{
|
||||
abciExtensionHeight: 1,
|
||||
})
|
||||
update := &tmproto.ConsensusParams{
|
||||
Abci: &tmproto.ABCIParams{
|
||||
VoteExtensionsEnableHeight: 10,
|
||||
},
|
||||
}
|
||||
require.Error(t, initialParams.ValidateUpdate(update, 1))
|
||||
require.Error(t, initialParams.ValidateUpdate(update, 5))
|
||||
})
|
||||
t.Run("reset to 0", func(t *testing.T) {
|
||||
initialParams := makeParams(makeParamsArgs{
|
||||
abciExtensionHeight: 1,
|
||||
})
|
||||
update := &tmproto.ConsensusParams{
|
||||
Abci: &tmproto.ABCIParams{
|
||||
VoteExtensionsEnableHeight: 0,
|
||||
},
|
||||
}
|
||||
require.Error(t, initialParams.ValidateUpdate(update, 1))
|
||||
})
|
||||
t.Run("set to height before current height run", func(*testing.T) {
|
||||
initialParams := makeParams(makeParamsArgs{
|
||||
abciExtensionHeight: 100,
|
||||
})
|
||||
update := &tmproto.ConsensusParams{
|
||||
Abci: &tmproto.ABCIParams{
|
||||
VoteExtensionsEnableHeight: 10,
|
||||
},
|
||||
}
|
||||
require.Error(t, initialParams.ValidateUpdate(update, 11))
|
||||
require.Error(t, initialParams.ValidateUpdate(update, 99))
|
||||
})
|
||||
t.Run("set to height after current height run", func(*testing.T) {
|
||||
initialParams := makeParams(makeParamsArgs{
|
||||
abciExtensionHeight: 300,
|
||||
})
|
||||
update := &tmproto.ConsensusParams{
|
||||
Abci: &tmproto.ABCIParams{
|
||||
VoteExtensionsEnableHeight: 99,
|
||||
},
|
||||
}
|
||||
require.NoError(t, initialParams.ValidateUpdate(update, 11))
|
||||
require.NoError(t, initialParams.ValidateUpdate(update, 98))
|
||||
})
|
||||
t.Run("no error when unchanged", func(*testing.T) {
|
||||
initialParams := makeParams(makeParamsArgs{
|
||||
abciExtensionHeight: 100,
|
||||
})
|
||||
update := &tmproto.ConsensusParams{
|
||||
Abci: &tmproto.ABCIParams{
|
||||
VoteExtensionsEnableHeight: 100,
|
||||
},
|
||||
}
|
||||
require.NoError(t, initialParams.ValidateUpdate(update, 500))
|
||||
})
|
||||
t.Run("updated from 0 to 0", func(t *testing.T) {
|
||||
initialParams := makeParams(makeParamsArgs{
|
||||
abciExtensionHeight: 0,
|
||||
})
|
||||
update := &tmproto.ConsensusParams{
|
||||
Abci: &tmproto.ABCIParams{
|
||||
VoteExtensionsEnableHeight: 0,
|
||||
},
|
||||
}
|
||||
require.NoError(t, initialParams.ValidateUpdate(update, 100))
|
||||
})
|
||||
}
|
||||
|
||||
func TestProto(t *testing.T) {
|
||||
params := []ConsensusParams{
|
||||
makeParams(makeParamsArgs{blockBytes: 4, blockGas: 2, evidenceAge: 3, maxEvidenceBytes: 1}),
|
||||
@@ -393,6 +487,16 @@ func TestProto(t *testing.T) {
|
||||
makeParams(makeParamsArgs{blockBytes: 4, blockGas: 6, evidenceAge: 5, maxEvidenceBytes: 1}),
|
||||
makeParams(makeParamsArgs{precision: time.Second, messageDelay: time.Minute}),
|
||||
makeParams(makeParamsArgs{precision: time.Nanosecond, messageDelay: time.Millisecond}),
|
||||
makeParams(makeParamsArgs{abciExtensionHeight: 100}),
|
||||
makeParams(makeParamsArgs{abciExtensionHeight: 100}),
|
||||
makeParams(makeParamsArgs{
|
||||
propose: durationPtr(2 * time.Second),
|
||||
proposeDelta: durationPtr(400 * time.Millisecond),
|
||||
vote: durationPtr(5 * time.Second),
|
||||
voteDelta: durationPtr(400 * time.Millisecond),
|
||||
commit: durationPtr(time.Minute),
|
||||
bypassCommitTimeout: true,
|
||||
}),
|
||||
}
|
||||
|
||||
for i := range params {
|
||||
|
||||
Reference in New Issue
Block a user