From 26b5672a54222218be4083cdcc65595b1920600d Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Fri, 8 Apr 2022 19:40:03 -0700 Subject: [PATCH 01/27] Add a tool to update old config files to the latest version (#8281) --- CHANGELOG_PENDING.md | 1 + UPGRADING.md | 26 +- go.mod | 2 + go.sum | 2 + scripts/confix/confix.go | 249 +++++++++++ scripts/confix/confix_test.go | 98 +++++ scripts/confix/testdata/non-config.toml | 6 + scripts/confix/testdata/v31-config.toml | 292 +++++++++++++ scripts/confix/testdata/v32-config.toml | 319 ++++++++++++++ scripts/confix/testdata/v33-config.toml | 335 +++++++++++++++ scripts/confix/testdata/v34-config.toml | 428 +++++++++++++++++++ scripts/confix/testdata/v35-config.toml | 527 ++++++++++++++++++++++++ scripts/confix/testdata/v36-config.toml | 479 +++++++++++++++++++++ 13 files changed, 2760 insertions(+), 4 deletions(-) create mode 100644 scripts/confix/confix.go create mode 100644 scripts/confix/confix_test.go create mode 100644 scripts/confix/testdata/non-config.toml create mode 100644 scripts/confix/testdata/v31-config.toml create mode 100644 scripts/confix/testdata/v32-config.toml create mode 100644 scripts/confix/testdata/v33-config.toml create mode 100644 scripts/confix/testdata/v34-config.toml create mode 100644 scripts/confix/testdata/v35-config.toml create mode 100644 scripts/confix/testdata/v36-config.toml diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index f0409a545..0d070d304 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -62,6 +62,7 @@ Special thanks to external contributors on this release: - [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) ### IMPROVEMENTS diff --git a/UPGRADING.md b/UPGRADING.md index 931272cce..199a5f83c 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -28,10 +28,28 @@ applications remains correct. ### Config Changes -The default configuration for a newly-created node now disables indexing for -ABCI event metadata. Existing node configurations that already have indexing -turned on are not affected. Operators who wish to enable indexing for a new -node, however, must now edit the `config.toml` explicitly. +- We have added a new, experimental tool to help operators migrate + configuration files created by previous versions of Tendermint. + To try this tool, run: + + ```shell + # Install the tool. + go install github.com/tendermint/tendermint/scripts/confix@latest + + # Run the tool with the old configuration file as input. + # Replace the -config argument with your path. + confix -config ~/.tendermint/config/config.toml -out updated.toml + ``` + + This tool should be able to update configurations from v0.34 and v0.35. We + plan to extend it to handle older configuration files in the future. For now, + it will report an error (without making any changes) if it does not recognize + the version that created the file. + +- The default configuration for a newly-created node now disables indexing for + ABCI event metadata. Existing node configurations that already have indexing + turned on are not affected. Operators who wish to enable indexing for a new + node, however, must now edit the `config.toml` explicitly. ### RPC Changes diff --git a/go.mod b/go.mod index b25b8ef39..91895c36e 100644 --- a/go.mod +++ b/go.mod @@ -73,6 +73,8 @@ require ( github.com/charithe/durationcheck v0.0.9 // indirect github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect github.com/containerd/continuity v0.2.1 // indirect + github.com/creachadair/taskgroup v0.3.2 + github.com/creachadair/tomledit v0.0.5 github.com/daixiang0/gci v0.3.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect diff --git a/go.sum b/go.sum index 4fc7fab1e..2351806cf 100644 --- a/go.sum +++ b/go.sum @@ -225,6 +225,8 @@ github.com/creachadair/atomicfile v0.2.4 h1:GRjpQLmz/78I4+nBQpGMFrRa9yrL157AUTrA github.com/creachadair/atomicfile v0.2.4/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2fzVzf28JxrIkBc= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= +github.com/creachadair/tomledit v0.0.5 h1:ILJt2EO93fr8w2UAUA5FPNThk1Pq5m4KX2qUZ1Xz4Xs= +github.com/creachadair/tomledit v0.0.5/go.mod h1:gvtfnSZLa+YNQD28vaPq0Nk12bRxEhmUdBzAWn+EGF4= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= diff --git a/scripts/confix/confix.go b/scripts/confix/confix.go new file mode 100644 index 000000000..aa73897a5 --- /dev/null +++ b/scripts/confix/confix.go @@ -0,0 +1,249 @@ +// Program confix applies fixes to a Tendermint TOML configuration file to +// update a file created with an older version of Tendermint to a compatible +// format for a newer version. +package main + +import ( + "bytes" + "context" + "errors" + "flag" + "fmt" + "log" + "os" + "path/filepath" + "strings" + + "github.com/creachadair/atomicfile" + "github.com/creachadair/tomledit" + "github.com/creachadair/tomledit/parser" + "github.com/creachadair/tomledit/transform" + "github.com/spf13/viper" + "github.com/tendermint/tendermint/config" +) + +func init() { + flag.Usage = func() { + fmt.Fprintf(os.Stderr, `Usage: %[1]s -config [-out ] + +Modify the contents of the specified -config TOML file to update the names, +locations, and values of configuration settings to the current configuration +layout. The output is written to -out, or to stdout. + +It is valid to set -config and -out to the same path. In that case, the file will +be modified in-place. In case of any error in updating the file, no output is +written. + +Options: +`, filepath.Base(os.Args[0])) + flag.PrintDefaults() + } +} + +var ( + configPath = flag.String("config", "", "Config file path (required)") + outPath = flag.String("out", "", "Output file path (default stdout)") +) + +func main() { + flag.Parse() + if *configPath == "" { + log.Fatal("You must specify a non-empty -config path") + } + + doc, err := LoadConfig(*configPath) + if err != nil { + log.Fatalf("Loading config: %v", err) + } + + ctx := transform.WithLogWriter(context.Background(), os.Stderr) + if err := ApplyFixes(ctx, doc); err != nil { + log.Fatalf("Updating %q: %v", *configPath, err) + } + + var buf bytes.Buffer + if err := tomledit.Format(&buf, doc); err != nil { + log.Fatalf("Formatting config: %v", err) + } + + // Verify that Tendermint can parse the results after our edits. + if err := CheckValid(buf.Bytes()); err != nil { + log.Fatalf("Updated config is invalid: %v", err) + } + + if *outPath == "" { + os.Stdout.Write(buf.Bytes()) + } else if err := atomicfile.WriteData(*outPath, buf.Bytes(), 0600); err != nil { + log.Fatalf("Writing output: %v", err) + } +} + +var plan = transform.Plan{ + { + Desc: "Rename everything from snake_case to kebab-case", + T: transform.SnakeToKebab(), + }, + { + Desc: "Rename [fastsync] to [blocksync]", + T: transform.Rename(parser.Key{"fastsync"}, parser.Key{"blocksync"}), + ErrorOK: true, + }, + { + Desc: "Move top-level fast_sync key under [blocksync]", + T: transform.MoveKey( + parser.Key{"fast-sync"}, + parser.Key{"blocksync"}, + parser.Key{"fast-sync"}, + ), + ErrorOK: true, + }, + { + Desc: "Move priv-validator settings under [priv-validator]", + T: transform.Func(func(_ context.Context, doc *tomledit.Document) error { + const pvPrefix = "priv-validator-" + + var found []*tomledit.Entry + doc.Scan(func(key parser.Key, e *tomledit.Entry) bool { + if e.IsSection() && !e.IsGlobal() { + return false // no more candidates + } else if len(key) == 1 && strings.HasPrefix(key[0], pvPrefix) { + found = append(found, e) + } + return true + }) + if len(found) == 0 { + return nil // nothing to do + } + + // Now that we know we have work to do, find the target table. + var sec *tomledit.Section + if dst := transform.FindTable(doc, "priv-validator"); dst == nil { + // If the table doesn't exist, create it. Old config files + // probably will not have it, so plug in the comment too. + sec = &tomledit.Section{ + Heading: &parser.Heading{ + Block: parser.Comments{ + "#######################################################", + "### Priv Validator Configuration ###", + "#######################################################", + }, + Name: parser.Key{"priv-validator"}, + }, + } + doc.Sections = append(doc.Sections, sec) + } else { + sec = dst.Section + } + + for _, e := range found { + e.Remove() + e.Name = parser.Key{strings.TrimPrefix(e.Name[0], pvPrefix)} + sec.Items = append(sec.Items, e.KeyValue) + } + return nil + }), + }, + { + Desc: `Set blocksync.version to "v0"`, + T: transform.Func(func(_ context.Context, doc *tomledit.Document) error { + v := doc.First("blocksync", "version") + if v == nil { + return nil // nothing to do + } else if !v.IsMapping() { + // This shouldn't happen, but is easier to debug than a panic. + return fmt.Errorf("blocksync.version is weird: %v", v) + } + v.Value.X = parser.MustValue(`"v0"`).X + return nil + }), + }, +} + +// ApplyFixes transforms doc and reports whether it succeeded. +func ApplyFixes(ctx context.Context, doc *tomledit.Document) error { + // Check what version of Tendermint might have created this config file, as + // a safety check for the updates we are about to make. + tmVersion := GuessConfigVersion(doc) + if tmVersion == vUnknown { + return errors.New("cannot tell what Tendermint version created this config") + } else if tmVersion < v34 { + // TODO(creachadair): Add in rewrites for older versions. This will + // require some digging to discover what the changes were. The upgrade + // instructions do not give specifics. + return fmt.Errorf("unable to update version %s config", tmVersion) + } + return plan.Apply(ctx, doc) +} + +// LoadConfig loads and parses the TOML document from path. +func LoadConfig(path string) (*tomledit.Document, error) { + f, err := os.Open(path) + if err != nil { + return nil, err + } + defer f.Close() + return tomledit.Parse(f) +} + +const ( + vUnknown = "" + v32 = "v0.32" + v33 = "v0.33" + v34 = "v0.34" + v35 = "v0.35" + v36 = "v0.36" +) + +// GuessConfigVersion attempts to figure out which version of Tendermint +// created the specified config document. It returns "" if the creating version +// cannot be determined, otherwise a string of the form "vX.YY". +func GuessConfigVersion(doc *tomledit.Document) string { + hasDisableWS := doc.First("rpc", "experimental-disable-websocket") != nil + hasUseLegacy := doc.First("p2p", "use-legacy") != nil // v0.35 only + if hasDisableWS && !hasUseLegacy { + return v36 + } + + hasBlockSync := transform.FindTable(doc, "blocksync") != nil // add: v0.35 + hasStateSync := transform.FindTable(doc, "statesync") != nil // add: v0.34 + if hasBlockSync && hasStateSync { + return v35 + } else if hasStateSync { + return v34 + } + + hasIndexKeys := doc.First("tx_index", "index_keys") != nil // add: v0.33 + hasIndexTags := doc.First("tx_index", "index_tags") != nil // rem: v0.33 + if hasIndexKeys && !hasIndexTags { + return v33 + } + + hasFastSync := transform.FindTable(doc, "fastsync") != nil // add: v0.32 + if hasIndexTags && hasFastSync { + return v32 + } + + // Something older, probably. + return vUnknown +} + +// CheckValid checks whether the specified config appears to be a valid +// Tendermint config file. This emulates how the node loads the config. +func CheckValid(data []byte) error { + v := viper.New() + v.SetConfigType("toml") + + if err := v.ReadConfig(bytes.NewReader(data)); err != nil { + return fmt.Errorf("reading config: %w", err) + } + + var cfg config.Config + if err := v.Unmarshal(&cfg); err != nil { + return fmt.Errorf("decoding config: %w", err) + } + + // Stub in required value not stored in the config file, so that validation + // will not fail spuriously. + cfg.Mode = config.ModeValidator + return cfg.ValidateBasic() +} diff --git a/scripts/confix/confix_test.go b/scripts/confix/confix_test.go new file mode 100644 index 000000000..b7be1247d --- /dev/null +++ b/scripts/confix/confix_test.go @@ -0,0 +1,98 @@ +package main_test + +import ( + "bytes" + "context" + "strings" + "testing" + + "github.com/creachadair/tomledit" + "github.com/google/go-cmp/cmp" + + confix "github.com/tendermint/tendermint/scripts/confix" +) + +func mustParseConfig(t *testing.T, path string) *tomledit.Document { + doc, err := confix.LoadConfig(path) + if err != nil { + t.Fatalf("Loading config: %v", err) + } + return doc +} + +func TestGuessConfigVersion(t *testing.T) { + tests := []struct { + path, want string + }{ + {"testdata/non-config.toml", ""}, + {"testdata/v31-config.toml", ""}, + {"testdata/v32-config.toml", "v0.32"}, + {"testdata/v33-config.toml", "v0.33"}, + {"testdata/v34-config.toml", "v0.34"}, + {"testdata/v35-config.toml", "v0.35"}, + {"testdata/v36-config.toml", "v0.36"}, + } + for _, test := range tests { + t.Run(test.path, func(t *testing.T) { + got := confix.GuessConfigVersion(mustParseConfig(t, test.path)) + if got != test.want { + t.Errorf("Wrong version: got %q, want %q", got, test.want) + } + }) + } +} + +func TestApplyFixes(t *testing.T) { + ctx := context.Background() + + t.Run("Unknown", func(t *testing.T) { + err := confix.ApplyFixes(ctx, mustParseConfig(t, "testdata/v31-config.toml")) + if err == nil || !strings.Contains(err.Error(), "cannot tell what Tendermint version") { + t.Error("ApplyFixes succeeded, but should have failed for an unknown version") + } + }) + t.Run("TooOld", func(t *testing.T) { + err := confix.ApplyFixes(ctx, mustParseConfig(t, "testdata/v33-config.toml")) + if err == nil || !strings.Contains(err.Error(), "unable to update version v0.33 config") { + t.Errorf("ApplyFixes: got %v, want version error", err) + } + }) + t.Run("OK", func(t *testing.T) { + doc := mustParseConfig(t, "testdata/v34-config.toml") + if err := confix.ApplyFixes(ctx, doc); err != nil { + t.Fatalf("ApplyFixes: unexpected error: %v", err) + } + + t.Run("Fixpoint", func(t *testing.T) { + // Verify that reapplying fixes to the same config succeeds, and does not + // make any additional changes. + var before bytes.Buffer + if err := tomledit.Format(&before, doc); err != nil { + t.Fatalf("Formatting document: %v", err) + } + if err := confix.CheckValid(before.Bytes()); err != nil { + t.Fatalf("Validating output: %v", err) + } + want := before.String() + + // Re-parse the output from the first round of transformations. + doc2, err := tomledit.Parse(&before) + if err != nil { + t.Fatalf("Parsing fixed output: %v", err) + } + if err := confix.ApplyFixes(ctx, doc2); err != nil { + t.Fatalf("ApplyFixes: unexpected error: %v", err) + } + + var after bytes.Buffer + if err := tomledit.Format(&after, doc2); err != nil { + t.Fatalf("Formatting document: %v", err) + } + got := after.String() + + if diff := cmp.Diff(want, got); diff != "" { + t.Errorf("Reapplied fixes changed something: (-want, +got)\n%s", diff) + } + }) + }) +} diff --git a/scripts/confix/testdata/non-config.toml b/scripts/confix/testdata/non-config.toml new file mode 100644 index 000000000..abfd48667 --- /dev/null +++ b/scripts/confix/testdata/non-config.toml @@ -0,0 +1,6 @@ +# This is not a Tendermint config file. + +[ test ] +key = 'value' + +# Nothing to see here, move along. diff --git a/scripts/confix/testdata/v31-config.toml b/scripts/confix/testdata/v31-config.toml new file mode 100644 index 000000000..247d2da2e --- /dev/null +++ b/scripts/confix/testdata/v31-config.toml @@ -0,0 +1,292 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +##### main base config options ##### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the Tendermint binary +proxy_app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +moniker = "localhost" + +# If this node is many blocks behind the tip of the chain, FastSync +# allows them to catchup quickly by downloading blocks in parallel +# and verifying their commits +fast_sync = true + +# Database backend: goleveldb | cleveldb | boltdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +db_backend = "goleveldb" + +# Database directory +db_dir = "data" + +# Output level for logging, including package level options +log_level = "main:info,state:info,*:error" + +# Output format: 'plain' (colored text) or 'json' +log_format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis_file = "config/genesis.json" + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +priv_validator_key_file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +priv_validator_state_file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +priv_validator_laddr = "" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node_key_file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# TCP or UNIX socket address for the profiling server to listen on +prof_laddr = "" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter_peers = false + +##### advanced configuration options ##### + +##### rpc server configuration options ##### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://0.0.0.0:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors_allowed_origins = [] + +# A list of methods the client is allowed to use with cross-domain requests +cors_allowed_methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +grpc_laddr = "" + +# Maximum number of simultaneous connections. +# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +grpc_max_open_connections = 900 + +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# Does not include gRPC connections. See grpc_max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max_open_connections = 900 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max_subscription_clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to +# the estimated # maximum number of broadcast_tx_commit calls per block. +max_subscriptions_per_client = 5 + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout_broadcast_tx_commit = "10s" + +# The name of a file containing certificate that is used to create the HTTPS server. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run. +tls_cert_file = "" + +# The name of a file containing matching private key that is used to create the HTTPS server. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run. +tls_key_file = "" + +##### peer to peer configuration options ##### +[p2p] + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial +# If empty, will use the same port as the laddr, +# and will introspect on the listener or use UPnP +# to figure out the address. +external_address = "" + +# Comma separated list of seed nodes to connect to +seeds = "" + +# Comma separated list of nodes to keep persistent connections to +persistent_peers = "" + +# UPNP port forwarding +upnp = false + +# Path to address book +addr_book_file = "config/addrbook.json" + +# Set true for strict address routability rules +# Set false for private or local networks +addr_book_strict = true + +# Maximum number of inbound peers +max_num_inbound_peers = 40 + +# Maximum number of outbound peers to connect to, excluding persistent peers +max_num_outbound_peers = 10 + +# Time to wait before flushing messages out on the connection +flush_throttle_timeout = "100ms" + +# Maximum size of a message packet payload, in bytes +max_packet_msg_payload_size = 1024 + +# Rate at which packets can be sent, in bytes/second +send_rate = 5120000 + +# Rate at which packets can be received, in bytes/second +recv_rate = 5120000 + +# Set true to enable the peer-exchange reactor +pex = true + +# Seed mode, in which node constantly crawls the network and looks for +# peers. If another node asks it for addresses, it responds and disconnects. +# +# Does not work if the peer-exchange reactor is disabled. +seed_mode = false + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +private_peer_ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow_duplicate_ip = false + +# Peer connection configuration. +handshake_timeout = "20s" +dial_timeout = "3s" + +##### mempool configuration options ##### +[mempool] + +recheck = true +broadcast = true +wal_dir = "" + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max_txs_bytes=5MB, mempool will only accept 5 transactions). +max_txs_bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache_size = 10000 + +##### consensus configuration options ##### +[consensus] + +wal_file = "data/cs.wal/wal" + +timeout_propose = "3s" +timeout_propose_delta = "500ms" +timeout_prevote = "1s" +timeout_prevote_delta = "500ms" +timeout_precommit = "1s" +timeout_precommit_delta = "500ms" +timeout_commit = "1s" + +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) +skip_timeout_commit = false + +# EmptyBlocks mode and possible interval between empty blocks +create_empty_blocks = true +create_empty_blocks_interval = "0s" + +# Reactor sleep duration parameters +peer_gossip_sleep_duration = "100ms" +peer_query_maj23_sleep_duration = "2s" + +##### transactions indexer configuration options ##### +[tx_index] + +# What indexer to use for transactions +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +indexer = "kv" + +# Comma-separated list of tags to index (by default the only tag is "tx.hash") +# +# You can also index transactions by height by adding "tx.height" tag here. +# +# It's recommended to index only a subset of tags due to possible memory +# bloat. This is, of course, depends on the indexer's DB and the volume of +# transactions. +index_tags = "" + +# When set to true, tells indexer to index all tags (predefined tags: +# "tx.hash", "tx.height" and all tags from DeliverTx responses). +# +# Note this may be not desirable (see the comment above). IndexTags has a +# precedence over IndexAllTags (i.e. when given both, IndexTags will be +# indexed). +index_all_tags = false + +##### instrumentation configuration options ##### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = false + +# Address to listen for Prometheus collector(s) connections +prometheus_listen_addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max_open_connections = 3 + +# Instrumentation namespace +namespace = "tendermint" diff --git a/scripts/confix/testdata/v32-config.toml b/scripts/confix/testdata/v32-config.toml new file mode 100644 index 000000000..e0b897525 --- /dev/null +++ b/scripts/confix/testdata/v32-config.toml @@ -0,0 +1,319 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or +# relative to the home directory (e.g. "data"). The home directory is +# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable +# or --home cmd flag. + +##### main base config options ##### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the Tendermint binary +proxy_app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +moniker = "localhost" + +# If this node is many blocks behind the tip of the chain, FastSync +# allows them to catchup quickly by downloading blocks in parallel +# and verifying their commits +fast_sync = true + +# Database backend: goleveldb | cleveldb | boltdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +db_backend = "goleveldb" + +# Database directory +db_dir = "data" + +# Output level for logging, including package level options +log_level = "main:info,state:info,*:error" + +# Output format: 'plain' (colored text) or 'json' +log_format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis_file = "config/genesis.json" + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +priv_validator_key_file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +priv_validator_state_file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +priv_validator_laddr = "" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node_key_file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# TCP or UNIX socket address for the profiling server to listen on +prof_laddr = "" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter_peers = false + +##### advanced configuration options ##### + +##### rpc server configuration options ##### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://127.0.0.1:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors_allowed_origins = [] + +# A list of methods the client is allowed to use with cross-domain requests +cors_allowed_methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +grpc_laddr = "" + +# Maximum number of simultaneous connections. +# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +grpc_max_open_connections = 900 + +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# Does not include gRPC connections. See grpc_max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max_open_connections = 900 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max_subscription_clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to +# the estimated # maximum number of broadcast_tx_commit calls per block. +max_subscriptions_per_client = 5 + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout_broadcast_tx_commit = "10s" + +# Maximum size of request body, in bytes +max_body_bytes = 1000000 + +# Maximum size of request header, in bytes +max_header_bytes = 1048576 + +# The path to a file containing certificate that is used to create the HTTPS server. +# Migth be either absolute path or path related to tendermint's config directory. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls_cert_file = "" + +# The path to a file containing matching private key that is used to create the HTTPS server. +# Migth be either absolute path or path related to tendermint's config directory. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls_key_file = "" + +##### peer to peer configuration options ##### +[p2p] + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial +# If empty, will use the same port as the laddr, +# and will introspect on the listener or use UPnP +# to figure out the address. +external_address = "" + +# Comma separated list of seed nodes to connect to +seeds = "" + +# Comma separated list of nodes to keep persistent connections to +persistent_peers = "" + +# UPNP port forwarding +upnp = false + +# Path to address book +addr_book_file = "config/addrbook.json" + +# Set true for strict address routability rules +# Set false for private or local networks +addr_book_strict = true + +# Maximum number of inbound peers +max_num_inbound_peers = 40 + +# Maximum number of outbound peers to connect to, excluding persistent peers +max_num_outbound_peers = 10 + +# Time to wait before flushing messages out on the connection +flush_throttle_timeout = "100ms" + +# Maximum size of a message packet payload, in bytes +max_packet_msg_payload_size = 1024 + +# Rate at which packets can be sent, in bytes/second +send_rate = 5120000 + +# Rate at which packets can be received, in bytes/second +recv_rate = 5120000 + +# Set true to enable the peer-exchange reactor +pex = true + +# Seed mode, in which node constantly crawls the network and looks for +# peers. If another node asks it for addresses, it responds and disconnects. +# +# Does not work if the peer-exchange reactor is disabled. +seed_mode = false + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +private_peer_ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow_duplicate_ip = false + +# Peer connection configuration. +handshake_timeout = "20s" +dial_timeout = "3s" + +##### mempool configuration options ##### +[mempool] + +recheck = true +broadcast = true +wal_dir = "" + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max_txs_bytes=5MB, mempool will only accept 5 transactions). +max_txs_bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache_size = 10000 + +# Maximum size of a single transaction. +# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes} + {amino overhead}. +max_tx_bytes = 1048576 + +##### fast sync configuration options ##### +[fastsync] + +# Fast Sync version to use: +# 1) "v0" (default) - the legacy fast sync implementation +# 2) "v1" - refactor of v0 version for better testability +version = "v0" + +##### consensus configuration options ##### +[consensus] + +wal_file = "data/cs.wal/wal" + +timeout_propose = "3s" +timeout_propose_delta = "500ms" +timeout_prevote = "1s" +timeout_prevote_delta = "500ms" +timeout_precommit = "1s" +timeout_precommit_delta = "500ms" +timeout_commit = "1s" + +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) +skip_timeout_commit = false + +# EmptyBlocks mode and possible interval between empty blocks +create_empty_blocks = true +create_empty_blocks_interval = "0s" + +# Reactor sleep duration parameters +peer_gossip_sleep_duration = "100ms" +peer_query_maj23_sleep_duration = "2s" + +##### transactions indexer configuration options ##### +[tx_index] + +# What indexer to use for transactions +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +indexer = "kv" + +# Comma-separated list of tags to index (by default the only tag is "tx.hash") +# +# You can also index transactions by height by adding "tx.height" tag here. +# +# It's recommended to index only a subset of tags due to possible memory +# bloat. This is, of course, depends on the indexer's DB and the volume of +# transactions. +index_tags = "" + +# When set to true, tells indexer to index all tags (predefined tags: +# "tx.hash", "tx.height" and all tags from DeliverTx responses). +# +# Note this may be not desirable (see the comment above). IndexTags has a +# precedence over IndexAllTags (i.e. when given both, IndexTags will be +# indexed). +index_all_tags = false + +##### instrumentation configuration options ##### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = false + +# Address to listen for Prometheus collector(s) connections +prometheus_listen_addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max_open_connections = 3 + +# Instrumentation namespace +namespace = "tendermint" diff --git a/scripts/confix/testdata/v33-config.toml b/scripts/confix/testdata/v33-config.toml new file mode 100644 index 000000000..b728f08a1 --- /dev/null +++ b/scripts/confix/testdata/v33-config.toml @@ -0,0 +1,335 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or +# relative to the home directory (e.g. "data"). The home directory is +# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable +# or --home cmd flag. + +##### main base config options ##### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the Tendermint binary +proxy_app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +moniker = "localhost" + +# If this node is many blocks behind the tip of the chain, FastSync +# allows them to catchup quickly by downloading blocks in parallel +# and verifying their commits +fast_sync = true + +# Database backend: goleveldb | cleveldb | boltdb | rocksdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +# * rocksdb (uses github.com/tecbot/gorocksdb) +# - EXPERIMENTAL +# - requires gcc +# - use rocksdb build tag (go build -tags rocksdb) +db_backend = "goleveldb" + +# Database directory +db_dir = "data" + +# Output level for logging, including package level options +log_level = "main:info,state:info,*:error" + +# Output format: 'plain' (colored text) or 'json' +log_format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis_file = "config/genesis.json" + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +priv_validator_key_file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +priv_validator_state_file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +priv_validator_laddr = "" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node_key_file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# TCP or UNIX socket address for the profiling server to listen on +prof_laddr = "" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter_peers = false + +##### advanced configuration options ##### + +##### rpc server configuration options ##### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://127.0.0.1:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors_allowed_origins = [] + +# A list of methods the client is allowed to use with cross-domain requests +cors_allowed_methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +grpc_laddr = "" + +# Maximum number of simultaneous connections. +# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +grpc_max_open_connections = 900 + +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# Does not include gRPC connections. See grpc_max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max_open_connections = 900 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max_subscription_clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to +# the estimated # maximum number of broadcast_tx_commit calls per block. +max_subscriptions_per_client = 5 + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout_broadcast_tx_commit = "10s" + +# Maximum size of request body, in bytes +max_body_bytes = 1000000 + +# Maximum size of request header, in bytes +max_header_bytes = 1048576 + +# The path to a file containing certificate that is used to create the HTTPS server. +# Migth be either absolute path or path related to tendermint's config directory. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls_cert_file = "" + +# The path to a file containing matching private key that is used to create the HTTPS server. +# Migth be either absolute path or path related to tendermint's config directory. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls_key_file = "" + +##### peer to peer configuration options ##### +[p2p] + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial +# If empty, will use the same port as the laddr, +# and will introspect on the listener or use UPnP +# to figure out the address. +external_address = "" + +# Comma separated list of seed nodes to connect to +seeds = "" + +# Comma separated list of nodes to keep persistent connections to +persistent_peers = "" + +# UPNP port forwarding +upnp = false + +# Path to address book +addr_book_file = "config/addrbook.json" + +# Set true for strict address routability rules +# Set false for private or local networks +addr_book_strict = true + +# Maximum number of inbound peers +max_num_inbound_peers = 40 + +# Maximum number of outbound peers to connect to, excluding persistent peers +max_num_outbound_peers = 10 + +# List of node IDs, to which a connection will be (re)established ignoring any existing limits +unconditional_peer_ids = "" + +# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) +persistent_peers_max_dial_period = "0s" + +# Time to wait before flushing messages out on the connection +flush_throttle_timeout = "100ms" + +# Maximum size of a message packet payload, in bytes +max_packet_msg_payload_size = 1024 + +# Rate at which packets can be sent, in bytes/second +send_rate = 5120000 + +# Rate at which packets can be received, in bytes/second +recv_rate = 5120000 + +# Set true to enable the peer-exchange reactor +pex = true + +# Seed mode, in which node constantly crawls the network and looks for +# peers. If another node asks it for addresses, it responds and disconnects. +# +# Does not work if the peer-exchange reactor is disabled. +seed_mode = false + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +private_peer_ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow_duplicate_ip = false + +# Peer connection configuration. +handshake_timeout = "20s" +dial_timeout = "3s" + +##### mempool configuration options ##### +[mempool] + +recheck = true +broadcast = true +wal_dir = "" + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max_txs_bytes=5MB, mempool will only accept 5 transactions). +max_txs_bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache_size = 10000 + +# Maximum size of a single transaction. +# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes} + {amino overhead}. +max_tx_bytes = 1048576 + +##### fast sync configuration options ##### +[fastsync] + +# Fast Sync version to use: +# 1) "v0" (default) - the legacy fast sync implementation +# 2) "v1" - refactor of v0 version for better testability +# 3) "v2" - refactor of v1 version for better usability +version = "v0" + +##### consensus configuration options ##### +[consensus] + +wal_file = "data/cs.wal/wal" + +timeout_propose = "3s" +timeout_propose_delta = "500ms" +timeout_prevote = "1s" +timeout_prevote_delta = "500ms" +timeout_precommit = "1s" +timeout_precommit_delta = "500ms" +timeout_commit = "1s" + +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) +skip_timeout_commit = false + +# EmptyBlocks mode and possible interval between empty blocks +create_empty_blocks = true +create_empty_blocks_interval = "0s" + +# Reactor sleep duration parameters +peer_gossip_sleep_duration = "100ms" +peer_query_maj23_sleep_duration = "2s" + +##### transactions indexer configuration options ##### +[tx_index] + +# What indexer to use for transactions +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +indexer = "kv" + +# Comma-separated list of compositeKeys to index (by default the only key is "tx.hash") +# Remember that Event has the following structure: type.key +# type: [ +# key: value, +# ... +# ] +# +# You can also index transactions by height by adding "tx.height" key here. +# +# It's recommended to index only a subset of keys due to possible memory +# bloat. This is, of course, depends on the indexer's DB and the volume of +# transactions. +index_keys = "" + +# When set to true, tells indexer to index all compositeKeys (predefined keys: +# "tx.hash", "tx.height" and all keys from DeliverTx responses). +# +# Note this may be not desirable (see the comment above). IndexKeys has a +# precedence over IndexAllKeys (i.e. when given both, IndexKeys will be +# indexed). +index_all_keys = false + +##### instrumentation configuration options ##### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = false + +# Address to listen for Prometheus collector(s) connections +prometheus_listen_addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max_open_connections = 3 + +# Instrumentation namespace +namespace = "tendermint" diff --git a/scripts/confix/testdata/v34-config.toml b/scripts/confix/testdata/v34-config.toml new file mode 100644 index 000000000..0ef8b25eb --- /dev/null +++ b/scripts/confix/testdata/v34-config.toml @@ -0,0 +1,428 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or +# relative to the home directory (e.g. "data"). The home directory is +# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable +# or --home cmd flag. + +####################################################################### +### Main Base Config Options ### +####################################################################### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the Tendermint binary +proxy_app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +moniker = "localhost" + +# If this node is many blocks behind the tip of the chain, FastSync +# allows them to catchup quickly by downloading blocks in parallel +# and verifying their commits +fast_sync = true + +# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +# * rocksdb (uses github.com/tecbot/gorocksdb) +# - EXPERIMENTAL +# - requires gcc +# - use rocksdb build tag (go build -tags rocksdb) +# * badgerdb (uses github.com/dgraph-io/badger) +# - EXPERIMENTAL +# - use badgerdb build tag (go build -tags badgerdb) +db_backend = "goleveldb" + +# Database directory +db_dir = "data" + +# Output level for logging, including package level options +log_level = "info" + +# Output format: 'plain' (colored text) or 'json' +log_format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis_file = "config/genesis.json" + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +priv_validator_key_file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +priv_validator_state_file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +priv_validator_laddr = "" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node_key_file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter_peers = false + + +####################################################################### +### Advanced Configuration Options ### +####################################################################### + +####################################################### +### RPC Server Configuration Options ### +####################################################### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://127.0.0.1:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors_allowed_origins = [] + +# A list of methods the client is allowed to use with cross-domain requests +cors_allowed_methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +grpc_laddr = "" + +# Maximum number of simultaneous connections. +# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +grpc_max_open_connections = 900 + +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# Does not include gRPC connections. See grpc_max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max_open_connections = 900 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max_subscription_clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to +# the estimated # maximum number of broadcast_tx_commit calls per block. +max_subscriptions_per_client = 5 + +# Experimental parameter to specify the maximum number of events a node will +# buffer, per subscription, before returning an error and closing the +# subscription. Must be set to at least 100, but higher values will accommodate +# higher event throughput rates (and will use more memory). +experimental_subscription_buffer_size = 200 + +# Experimental parameter to specify the maximum number of RPC responses that +# can be buffered per WebSocket client. If clients cannot read from the +# WebSocket endpoint fast enough, they will be disconnected, so increasing this +# parameter may reduce the chances of them being disconnected (but will cause +# the node to use more memory). +# +# Must be at least the same as "experimental_subscription_buffer_size", +# otherwise connections could be dropped unnecessarily. This value should +# ideally be somewhat higher than "experimental_subscription_buffer_size" to +# accommodate non-subscription-related RPC responses. +experimental_websocket_write_buffer_size = 200 + +# If a WebSocket client cannot read fast enough, at present we may +# silently drop events instead of generating an error or disconnecting the +# client. +# +# Enabling this experimental parameter will cause the WebSocket connection to +# be closed instead if it cannot read fast enough, allowing for greater +# predictability in subscription behaviour. +experimental_close_on_slow_client = false + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout_broadcast_tx_commit = "10s" + +# Maximum size of request body, in bytes +max_body_bytes = 1000000 + +# Maximum size of request header, in bytes +max_header_bytes = 1048576 + +# The path to a file containing certificate that is used to create the HTTPS server. +# Might be either absolute path or path related to Tendermint's config directory. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls_cert_file = "" + +# The path to a file containing matching private key that is used to create the HTTPS server. +# Might be either absolute path or path related to Tendermint's config directory. +# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls_key_file = "" + +# pprof listen address (https://golang.org/pkg/net/http/pprof) +pprof_laddr = "" + +####################################################### +### P2P Configuration Options ### +####################################################### +[p2p] + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial +# If empty, will use the same port as the laddr, +# and will introspect on the listener or use UPnP +# to figure out the address. ip and port are required +# example: 159.89.10.97:26656 +external_address = "" + +# Comma separated list of seed nodes to connect to +seeds = "" + +# Comma separated list of nodes to keep persistent connections to +persistent_peers = "" + +# UPNP port forwarding +upnp = false + +# Path to address book +addr_book_file = "config/addrbook.json" + +# Set true for strict address routability rules +# Set false for private or local networks +addr_book_strict = true + +# Maximum number of inbound peers +max_num_inbound_peers = 40 + +# Maximum number of outbound peers to connect to, excluding persistent peers +max_num_outbound_peers = 10 + +# List of node IDs, to which a connection will be (re)established ignoring any existing limits +unconditional_peer_ids = "" + +# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) +persistent_peers_max_dial_period = "0s" + +# Time to wait before flushing messages out on the connection +flush_throttle_timeout = "100ms" + +# Maximum size of a message packet payload, in bytes +max_packet_msg_payload_size = 1024 + +# Rate at which packets can be sent, in bytes/second +send_rate = 5120000 + +# Rate at which packets can be received, in bytes/second +recv_rate = 5120000 + +# Set true to enable the peer-exchange reactor +pex = true + +# Seed mode, in which node constantly crawls the network and looks for +# peers. If another node asks it for addresses, it responds and disconnects. +# +# Does not work if the peer-exchange reactor is disabled. +seed_mode = false + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +private_peer_ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow_duplicate_ip = false + +# Peer connection configuration. +handshake_timeout = "20s" +dial_timeout = "3s" + +####################################################### +### Mempool Configuration Option ### +####################################################### +[mempool] + +recheck = true +broadcast = true +wal_dir = "" + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max_txs_bytes=5MB, mempool will only accept 5 transactions). +max_txs_bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache_size = 10000 + +# Do not remove invalid transactions from the cache (default: false) +# Set to true if it's not possible for any invalid transaction to become valid +# again in the future. +keep-invalid-txs-in-cache = false + +# Maximum size of a single transaction. +# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. +max_tx_bytes = 1048576 + +# Maximum size of a batch of transactions to send to a peer +# Including space needed by encoding (one varint per transaction). +# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 +max_batch_bytes = 0 + +####################################################### +### State Sync Configuration Options ### +####################################################### +[statesync] +# State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine +# snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in +# the network to take and serve state machine snapshots. State sync is not attempted if the node +# has any local state (LastBlockHeight > 0). The node will have a truncated block history, +# starting from the height of the snapshot. +enable = false + +# RPC servers (comma-separated) for light client verification of the synced state machine and +# retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding +# header hash obtained from a trusted source, and a period during which validators can be trusted. +# +# For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 +# weeks) during which they can be financially punished (slashed) for misbehavior. +rpc_servers = "" +trust_height = 0 +trust_hash = "" +trust_period = "168h0m0s" + +# Time to spend discovering snapshots before initiating a restore. +discovery_time = "15s" + +# Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). +# Will create a new, randomly named directory within, and remove it when done. +temp_dir = "" + +# The timeout duration before re-requesting a chunk, possibly from a different +# peer (default: 1 minute). +chunk_request_timeout = "10s" + +# The number of concurrent chunk fetchers to run (default: 1). +chunk_fetchers = "4" + +####################################################### +### Fast Sync Configuration Connections ### +####################################################### +[fastsync] + +# Fast Sync version to use: +# 1) "v0" (default) - the legacy fast sync implementation +# 2) "v1" - refactor of v0 version for better testability +# 2) "v2" - complete redesign of v0, optimized for testability & readability +version = "v0" + +####################################################### +### Consensus Configuration Options ### +####################################################### +[consensus] + +wal_file = "data/cs.wal/wal" + +# How long we wait for a proposal block before prevoting nil +timeout_propose = "3s" +# How much timeout_propose increases with each round +timeout_propose_delta = "500ms" +# How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) +timeout_prevote = "1s" +# How much the timeout_prevote increases with each round +timeout_prevote_delta = "500ms" +# How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) +timeout_precommit = "1s" +# How much the timeout_precommit increases with each round +timeout_precommit_delta = "500ms" +# How long we wait after committing a block, before starting on the new +# height (this gives us a chance to receive some more precommits, even +# though we already have +2/3). +timeout_commit = "1s" + +# How many blocks to look back to check existence of the node's consensus votes before joining consensus +# When non-zero, the node will panic upon restart +# if the same consensus key was used to sign {double_sign_check_height} last blocks. +# So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. +double_sign_check_height = 0 + +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) +skip_timeout_commit = false + +# EmptyBlocks mode and possible interval between empty blocks +create_empty_blocks = true +create_empty_blocks_interval = "0s" + +# Reactor sleep duration parameters +peer_gossip_sleep_duration = "100ms" +peer_query_maj23_sleep_duration = "2s" + +####################################################### +### Transaction Indexer Configuration Options ### +####################################################### +[tx_index] + +# What indexer to use for transactions +# +# The application will set which txs to index. In some cases a node operator will be able +# to decide which txs to index based on configuration set in the application. +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. +indexer = "kv" + +####################################################### +### Instrumentation Configuration Options ### +####################################################### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = false + +# Address to listen for Prometheus collector(s) connections +prometheus_listen_addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max_open_connections = 3 + +# Instrumentation namespace +namespace = "tendermint" diff --git a/scripts/confix/testdata/v35-config.toml b/scripts/confix/testdata/v35-config.toml new file mode 100644 index 000000000..79616d6cd --- /dev/null +++ b/scripts/confix/testdata/v35-config.toml @@ -0,0 +1,527 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or +# relative to the home directory (e.g. "data"). The home directory is +# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable +# or --home cmd flag. + +####################################################################### +### Main Base Config Options ### +####################################################################### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the Tendermint binary +proxy-app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +moniker = "localhost" + +# Mode of Node: full | validator | seed +# * validator node +# - all reactors +# - with priv_validator_key.json, priv_validator_state.json +# * full node +# - all reactors +# - No priv_validator_key.json, priv_validator_state.json +# * seed node +# - only P2P, PEX Reactor +# - No priv_validator_key.json, priv_validator_state.json +mode = "validator" + +# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +# * rocksdb (uses github.com/tecbot/gorocksdb) +# - EXPERIMENTAL +# - requires gcc +# - use rocksdb build tag (go build -tags rocksdb) +# * badgerdb (uses github.com/dgraph-io/badger) +# - EXPERIMENTAL +# - use badgerdb build tag (go build -tags badgerdb) +db-backend = "goleveldb" + +# Database directory +db-dir = "data" + +# Output level for logging, including package level options +log-level = "info" + +# Output format: 'plain' (colored text) or 'json' +log-format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis-file = "config/genesis.json" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node-key-file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter-peers = false + + +####################################################### +### Priv Validator Configuration ### +####################################################### +[priv-validator] + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +key-file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +state-file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +# when the listenAddr is prefixed with grpc instead of tcp it will use the gRPC Client +laddr = "" + +# Path to the client certificate generated while creating needed files for secure connection. +# If a remote validator address is provided but no certificate, the connection will be insecure +client-certificate-file = "" + +# Client key generated while creating certificates for secure connection +client-key-file = "" + +# Path to the Root Certificate Authority used to sign both client and server certificates +root-ca-file = "" + + +####################################################################### +### Advanced Configuration Options ### +####################################################################### + +####################################################### +### RPC Server Configuration Options ### +####################################################### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://127.0.0.1:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors-allowed-origins = [] + +# A list of methods the client is allowed to use with cross-domain requests +cors-allowed-methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors-allowed-headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +# Deprecated gRPC in the RPC layer of Tendermint will be deprecated in 0.36. +grpc-laddr = "" + +# Maximum number of simultaneous connections. +# Does not include RPC (HTTP&WebSocket) connections. See max-open-connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +# Deprecated gRPC in the RPC layer of Tendermint will be deprecated in 0.36. +grpc-max-open-connections = 900 + +# Activate unsafe RPC commands like /dial-seeds and /unsafe-flush-mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# Does not include gRPC connections. See grpc-max-open-connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max-open-connections = 900 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max-subscription-clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to +# the estimated # maximum number of broadcast_tx_commit calls per block. +max-subscriptions-per-client = 5 + +# Experimental parameter to specify the maximum number of events a node will +# buffer, per subscription, before returning an error and closing the +# subscription. Must be set to at least 100, but higher values will accommodate +# higher event throughput rates (and will use more memory). +experimental-subscription-buffer-size = 200 + +# Experimental parameter to specify the maximum number of RPC responses that +# can be buffered per WebSocket client. If clients cannot read from the +# WebSocket endpoint fast enough, they will be disconnected, so increasing this +# parameter may reduce the chances of them being disconnected (but will cause +# the node to use more memory). +# +# Must be at least the same as "experimental-subscription-buffer-size", +# otherwise connections could be dropped unnecessarily. This value should +# ideally be somewhat higher than "experimental-subscription-buffer-size" to +# accommodate non-subscription-related RPC responses. +experimental-websocket-write-buffer-size = 200 + +# If a WebSocket client cannot read fast enough, at present we may +# silently drop events instead of generating an error or disconnecting the +# client. +# +# Enabling this experimental parameter will cause the WebSocket connection to +# be closed instead if it cannot read fast enough, allowing for greater +# predictability in subscription behavior. +experimental-close-on-slow-client = false + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout-broadcast-tx-commit = "10s" + +# Maximum size of request body, in bytes +max-body-bytes = 1000000 + +# Maximum size of request header, in bytes +max-header-bytes = 1048576 + +# The path to a file containing certificate that is used to create the HTTPS server. +# Might be either absolute path or path related to Tendermint's config directory. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls-cert-file = "" + +# The path to a file containing matching private key that is used to create the HTTPS server. +# Might be either absolute path or path related to Tendermint's config directory. +# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls-key-file = "" + +# pprof listen address (https://golang.org/pkg/net/http/pprof) +pprof-laddr = "" + +####################################################### +### P2P Configuration Options ### +####################################################### +[p2p] + +# Enable the legacy p2p layer. +use-legacy = false + +# Select the p2p internal queue +queue-type = "priority" + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial +# If empty, will use the same port as the laddr, +# and will introspect on the listener or use UPnP +# to figure out the address. ip and port are required +# example: 159.89.10.97:26656 +external-address = "" + +# Comma separated list of seed nodes to connect to +# We only use these if we can’t connect to peers in the addrbook +# NOTE: not used by the new PEX reactor. Please use BootstrapPeers instead. +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +seeds = "" + +# Comma separated list of peers to be added to the peer store +# on startup. Either BootstrapPeers or PersistentPeers are +# needed for peer discovery +bootstrap-peers = "" + +# Comma separated list of nodes to keep persistent connections to +persistent-peers = "" + +# UPNP port forwarding +upnp = false + +# Path to address book +# TODO: Remove once p2p refactor is complete in favor of peer store. +addr-book-file = "config/addrbook.json" + +# Set true for strict address routability rules +# Set false for private or local networks +addr-book-strict = true + +# Maximum number of inbound peers +# +# TODO: Remove once p2p refactor is complete in favor of MaxConnections. +# ref: https://github.com/tendermint/tendermint/issues/5670 +max-num-inbound-peers = 40 + +# Maximum number of outbound peers to connect to, excluding persistent peers +# +# TODO: Remove once p2p refactor is complete in favor of MaxConnections. +# ref: https://github.com/tendermint/tendermint/issues/5670 +max-num-outbound-peers = 10 + +# Maximum number of connections (inbound and outbound). +max-connections = 64 + +# Rate limits the number of incoming connection attempts per IP address. +max-incoming-connection-attempts = 100 + +# List of node IDs, to which a connection will be (re)established ignoring any existing limits +# TODO: Remove once p2p refactor is complete. +# ref: https://github.com/tendermint/tendermint/issues/5670 +unconditional-peer-ids = "" + +# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +persistent-peers-max-dial-period = "0s" + +# Time to wait before flushing messages out on the connection +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +flush-throttle-timeout = "100ms" + +# Maximum size of a message packet payload, in bytes +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +max-packet-msg-payload-size = 1400 + +# Rate at which packets can be sent, in bytes/second +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +send-rate = 5120000 + +# Rate at which packets can be received, in bytes/second +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +recv-rate = 5120000 + +# Set true to enable the peer-exchange reactor +pex = true + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +# Warning: IPs will be exposed at /net_info, for more information https://github.com/tendermint/tendermint/issues/3055 +private-peer-ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow-duplicate-ip = false + +# Peer connection configuration. +handshake-timeout = "20s" +dial-timeout = "3s" + +####################################################### +### Mempool Configuration Option ### +####################################################### +[mempool] + +# Mempool version to use: +# 1) "v0" - The legacy non-prioritized mempool reactor. +# 2) "v1" (default) - The prioritized mempool reactor. +version = "v1" + +recheck = true +broadcast = true + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max-txs-bytes=5MB, mempool will only accept 5 transactions). +max-txs-bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache-size = 10000 + +# Do not remove invalid transactions from the cache (default: false) +# Set to true if it's not possible for any invalid transaction to become valid +# again in the future. +keep-invalid-txs-in-cache = false + +# Maximum size of a single transaction. +# NOTE: the max size of a tx transmitted over the network is {max-tx-bytes}. +max-tx-bytes = 1048576 + +# Maximum size of a batch of transactions to send to a peer +# Including space needed by encoding (one varint per transaction). +# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 +max-batch-bytes = 0 + +# ttl-duration, if non-zero, defines the maximum amount of time a transaction +# can exist for in the mempool. +# +# Note, if ttl-num-blocks is also defined, a transaction will be removed if it +# has existed in the mempool at least ttl-num-blocks number of blocks or if it's +# insertion time into the mempool is beyond ttl-duration. +ttl-duration = "0s" + +# ttl-num-blocks, if non-zero, defines the maximum number of blocks a transaction +# can exist for in the mempool. +# +# Note, if ttl-duration is also defined, a transaction will be removed if it +# has existed in the mempool at least ttl-num-blocks number of blocks or if +# it's insertion time into the mempool is beyond ttl-duration. +ttl-num-blocks = 0 + +####################################################### +### State Sync Configuration Options ### +####################################################### +[statesync] +# State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine +# snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in +# the network to take and serve state machine snapshots. State sync is not attempted if the node +# has any local state (LastBlockHeight > 0). The node will have a truncated block history, +# starting from the height of the snapshot. +enable = false + +# State sync uses light client verification to verify state. This can be done either through the +# P2P layer or RPC layer. Set this to true to use the P2P layer. If false (default), RPC layer +# will be used. +use-p2p = false + +# If using RPC, at least two addresses need to be provided. They should be compatible with net.Dial, +# for example: "host.example.com:2125" +rpc-servers = "" + +# The hash and height of a trusted block. Must be within the trust-period. +trust-height = 0 +trust-hash = "" + +# The trust period should be set so that Tendermint can detect and gossip misbehavior before +# it is considered expired. For chains based on the Cosmos SDK, one day less than the unbonding +# period should suffice. +trust-period = "168h0m0s" + +# Time to spend discovering snapshots before initiating a restore. +discovery-time = "15s" + +# Temporary directory for state sync snapshot chunks, defaults to os.TempDir(). +# The synchronizer will create a new, randomly named directory within this directory +# and remove it when the sync is complete. +temp-dir = "" + +# The timeout duration before re-requesting a chunk, possibly from a different +# peer (default: 15 seconds). +chunk-request-timeout = "15s" + +# The number of concurrent chunk and block fetchers to run (default: 4). +fetchers = "4" + +####################################################### +### Block Sync Configuration Connections ### +####################################################### +[blocksync] + +# If this node is many blocks behind the tip of the chain, BlockSync +# allows them to catchup quickly by downloading blocks in parallel +# and verifying their commits +enable = true + +# Block Sync version to use: +# 1) "v0" (default) - the standard Block Sync implementation +# 2) "v2" - DEPRECATED, please use v0 +version = "v0" + +####################################################### +### Consensus Configuration Options ### +####################################################### +[consensus] + +wal-file = "data/cs.wal/wal" + +# How long we wait for a proposal block before prevoting nil +timeout-propose = "3s" +# How much timeout-propose increases with each round +timeout-propose-delta = "500ms" +# How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) +timeout-prevote = "1s" +# How much the timeout-prevote increases with each round +timeout-prevote-delta = "500ms" +# How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) +timeout-precommit = "1s" +# How much the timeout-precommit increases with each round +timeout-precommit-delta = "500ms" +# How long we wait after committing a block, before starting on the new +# height (this gives us a chance to receive some more precommits, even +# though we already have +2/3). +timeout-commit = "1s" + +# How many blocks to look back to check existence of the node's consensus votes before joining consensus +# When non-zero, the node will panic upon restart +# if the same consensus key was used to sign {double-sign-check-height} last blocks. +# So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. +double-sign-check-height = 0 + +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) +skip-timeout-commit = false + +# EmptyBlocks mode and possible interval between empty blocks +create-empty-blocks = true +create-empty-blocks-interval = "0s" + +# Reactor sleep duration parameters +peer-gossip-sleep-duration = "100ms" +peer-query-maj23-sleep-duration = "2s" + +####################################################### +### Transaction Indexer Configuration Options ### +####################################################### +[tx-index] + +# The backend database list to back the indexer. +# If list contains "null" or "", meaning no indexer service will be used. +# +# The application will set which txs to index. In some cases a node operator will be able +# to decide which txs to index based on configuration set in the application. +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +# 3) "psql" - the indexer services backed by PostgreSQL. +# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. +indexer = ["kv"] + +# The PostgreSQL connection configuration, the connection format: +# postgresql://:@:/? +psql-conn = "" + +####################################################### +### Instrumentation Configuration Options ### +####################################################### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = false + +# Address to listen for Prometheus collector(s) connections +prometheus-listen-addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max-open-connections = 3 + +# Instrumentation namespace +namespace = "tendermint" diff --git a/scripts/confix/testdata/v36-config.toml b/scripts/confix/testdata/v36-config.toml new file mode 100644 index 000000000..e49b97d89 --- /dev/null +++ b/scripts/confix/testdata/v36-config.toml @@ -0,0 +1,479 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or +# relative to the home directory (e.g. "data"). The home directory is +# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable +# or --home cmd flag. + +####################################################################### +### Main Base Config Options ### +####################################################################### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the Tendermint binary +proxy-app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +moniker = "localhost" + +# Mode of Node: full | validator | seed +# * validator node +# - all reactors +# - with priv_validator_key.json, priv_validator_state.json +# * full node +# - all reactors +# - No priv_validator_key.json, priv_validator_state.json +# * seed node +# - only P2P, PEX Reactor +# - No priv_validator_key.json, priv_validator_state.json +mode = "validator" + +# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +# * rocksdb (uses github.com/tecbot/gorocksdb) +# - EXPERIMENTAL +# - requires gcc +# - use rocksdb build tag (go build -tags rocksdb) +# * badgerdb (uses github.com/dgraph-io/badger) +# - EXPERIMENTAL +# - use badgerdb build tag (go build -tags badgerdb) +db-backend = "goleveldb" + +# Database directory +db-dir = "data" + +# Output level for logging, including package level options +log-level = "info" + +# Output format: 'plain' (colored text) or 'json' +log-format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis-file = "config/genesis.json" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node-key-file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter-peers = false + + +####################################################### +### Priv Validator Configuration ### +####################################################### +[priv-validator] + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +key-file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +state-file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +# when the listenAddr is prefixed with grpc instead of tcp it will use the gRPC Client +laddr = "" + +# Path to the client certificate generated while creating needed files for secure connection. +# If a remote validator address is provided but no certificate, the connection will be insecure +client-certificate-file = "" + +# Client key generated while creating certificates for secure connection +client-key-file = "" + +# Path to the Root Certificate Authority used to sign both client and server certificates +root-ca-file = "" + + +####################################################################### +### Advanced Configuration Options ### +####################################################################### + +####################################################### +### RPC Server Configuration Options ### +####################################################### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://127.0.0.1:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors-allowed-origins = [] + +# A list of methods the client is allowed to use with cross-domain requests +cors-allowed-methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors-allowed-headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# Activate unsafe RPC commands like /dial-seeds and /unsafe-flush-mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max-open-connections = 900 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max-subscription-clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using a Local RPC client and /broadcast_tx_commit, set this +# to the estimated maximum number of broadcast_tx_commit calls per block. +max-subscriptions-per-client = 5 + +# If true, disable the websocket interface to the RPC service. This has +# the effect of disabling the /subscribe, /unsubscribe, and /unsubscribe_all +# methods for event subscription. +# +# EXPERIMENTAL: This setting will be removed in Tendermint v0.37. +experimental-disable-websocket = false + +# The time window size for the event log. All events up to this long before +# the latest (up to EventLogMaxItems) will be available for subscribers to +# fetch via the /events method. If 0 (the default) the event log and the +# /events RPC method are disabled. +event-log-window-size = "0s" + +# The maxiumum number of events that may be retained by the event log. If +# this value is 0, no upper limit is set. Otherwise, items in excess of +# this number will be discarded from the event log. +# +# Warning: This setting is a safety valve. Setting it too low may cause +# subscribers to miss events. Try to choose a value higher than the +# maximum worst-case expected event load within the chosen window size in +# ordinary operation. +# +# For example, if the window size is 10 minutes and the node typically +# averages 1000 events per ten minutes, but with occasional known spikes of +# up to 2000, choose a value > 2000. +event-log-max-items = 0 + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout-broadcast-tx-commit = "10s" + +# Maximum size of request body, in bytes +max-body-bytes = 1000000 + +# Maximum size of request header, in bytes +max-header-bytes = 1048576 + +# The path to a file containing certificate that is used to create the HTTPS server. +# Might be either absolute path or path related to Tendermint's config directory. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls-cert-file = "" + +# The path to a file containing matching private key that is used to create the HTTPS server. +# Might be either absolute path or path related to Tendermint's config directory. +# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls-key-file = "" + +# pprof listen address (https://golang.org/pkg/net/http/pprof) +pprof-laddr = "" + +####################################################### +### P2P Configuration Options ### +####################################################### +[p2p] + +# Select the p2p internal queue +queue-type = "priority" + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial +# If empty, will use the same port as the laddr, +# and will introspect on the listener or use UPnP +# to figure out the address. ip and port are required +# example: 159.89.10.97:26656 +external-address = "" + +# Comma separated list of seed nodes to connect to +# We only use these if we can’t connect to peers in the addrbook +# NOTE: not used by the new PEX reactor. Please use BootstrapPeers instead. +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +seeds = "" + +# Comma separated list of peers to be added to the peer store +# on startup. Either BootstrapPeers or PersistentPeers are +# needed for peer discovery +bootstrap-peers = "" + +# Comma separated list of nodes to keep persistent connections to +persistent-peers = "" + +# UPNP port forwarding +upnp = false + +# Maximum number of connections (inbound and outbound). +max-connections = 64 + +# Rate limits the number of incoming connection attempts per IP address. +max-incoming-connection-attempts = 100 + +# Set true to enable the peer-exchange reactor +pex = true + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +# Warning: IPs will be exposed at /net_info, for more information https://github.com/tendermint/tendermint/issues/3055 +private-peer-ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow-duplicate-ip = false + +# Peer connection configuration. +handshake-timeout = "20s" +dial-timeout = "3s" + +# Time to wait before flushing messages out on the connection +# TODO: Remove once MConnConnection is removed. +flush-throttle-timeout = "100ms" + +# Maximum size of a message packet payload, in bytes +# TODO: Remove once MConnConnection is removed. +max-packet-msg-payload-size = 1400 + +# Rate at which packets can be sent, in bytes/second +# TODO: Remove once MConnConnection is removed. +send-rate = 5120000 + +# Rate at which packets can be received, in bytes/second +# TODO: Remove once MConnConnection is removed. +recv-rate = 5120000 + + +####################################################### +### Mempool Configuration Option ### +####################################################### +[mempool] + +recheck = true +broadcast = true + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max-txs-bytes=5MB, mempool will only accept 5 transactions). +max-txs-bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache-size = 10000 + +# Do not remove invalid transactions from the cache (default: false) +# Set to true if it's not possible for any invalid transaction to become valid +# again in the future. +keep-invalid-txs-in-cache = false + +# Maximum size of a single transaction. +# NOTE: the max size of a tx transmitted over the network is {max-tx-bytes}. +max-tx-bytes = 1048576 + +# Maximum size of a batch of transactions to send to a peer +# Including space needed by encoding (one varint per transaction). +# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 +max-batch-bytes = 0 + +# ttl-duration, if non-zero, defines the maximum amount of time a transaction +# can exist for in the mempool. +# +# Note, if ttl-num-blocks is also defined, a transaction will be removed if it +# has existed in the mempool at least ttl-num-blocks number of blocks or if it's +# insertion time into the mempool is beyond ttl-duration. +ttl-duration = "0s" + +# ttl-num-blocks, if non-zero, defines the maximum number of blocks a transaction +# can exist for in the mempool. +# +# Note, if ttl-duration is also defined, a transaction will be removed if it +# has existed in the mempool at least ttl-num-blocks number of blocks or if +# it's insertion time into the mempool is beyond ttl-duration. +ttl-num-blocks = 0 + +####################################################### +### State Sync Configuration Options ### +####################################################### +[statesync] +# State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine +# snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in +# the network to take and serve state machine snapshots. State sync is not attempted if the node +# has any local state (LastBlockHeight > 0). The node will have a truncated block history, +# starting from the height of the snapshot. +enable = false + +# State sync uses light client verification to verify state. This can be done either through the +# P2P layer or RPC layer. Set this to true to use the P2P layer. If false (default), RPC layer +# will be used. +use-p2p = false + +# If using RPC, at least two addresses need to be provided. They should be compatible with net.Dial, +# for example: "host.example.com:2125" +rpc-servers = "" + +# The hash and height of a trusted block. Must be within the trust-period. +trust-height = 0 +trust-hash = "" + +# The trust period should be set so that Tendermint can detect and gossip misbehavior before +# it is considered expired. For chains based on the Cosmos SDK, one day less than the unbonding +# period should suffice. +trust-period = "168h0m0s" + +# Time to spend discovering snapshots before initiating a restore. +discovery-time = "15s" + +# Temporary directory for state sync snapshot chunks, defaults to os.TempDir(). +# The synchronizer will create a new, randomly named directory within this directory +# and remove it when the sync is complete. +temp-dir = "" + +# The timeout duration before re-requesting a chunk, possibly from a different +# peer (default: 15 seconds). +chunk-request-timeout = "15s" + +# The number of concurrent chunk and block fetchers to run (default: 4). +fetchers = "4" + +####################################################### +### Consensus Configuration Options ### +####################################################### +[consensus] + +wal-file = "data/cs.wal/wal" + +# How many blocks to look back to check existence of the node's consensus votes before joining consensus +# When non-zero, the node will panic upon restart +# if the same consensus key was used to sign {double-sign-check-height} last blocks. +# So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. +double-sign-check-height = 0 + +# EmptyBlocks mode and possible interval between empty blocks +create-empty-blocks = true +create-empty-blocks-interval = "0s" + +# Reactor sleep duration parameters +peer-gossip-sleep-duration = "100ms" +peer-query-maj23-sleep-duration = "2s" + +### Unsafe Timeout Overrides ### + +# These fields provide temporary overrides for the Timeout consensus parameters. +# Use of these parameters is strongly discouraged. Using these parameters may have serious +# liveness implications for the validator and for the chain. +# +# These fields will be removed from the configuration file in the v0.37 release of Tendermint. +# For additional information, see ADR-74: +# https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-074-timeout-params.md + +# This field provides an unsafe override of the Propose timeout consensus parameter. +# This field configures how long the consensus engine will wait for a proposal block before prevoting nil. +# If this field is set to a value greater than 0, it will take effect. +# unsafe-propose-timeout-override = 0s + +# This field provides an unsafe override of the ProposeDelta timeout consensus parameter. +# This field configures how much the propose timeout increases with each round. +# If this field is set to a value greater than 0, it will take effect. +# unsafe-propose-timeout-delta-override = 0s + +# This field provides an unsafe override of the Vote timeout consensus parameter. +# This field configures how long the consensus engine will wait after +# receiving +2/3 votes in a round. +# If this field is set to a value greater than 0, it will take effect. +# unsafe-vote-timeout-override = 0s + +# This field provides an unsafe override of the VoteDelta timeout consensus parameter. +# This field configures how much the vote timeout increases with each round. +# If this field is set to a value greater than 0, it will take effect. +# unsafe-vote-timeout-delta-override = 0s + +# This field provides an unsafe override of the Commit timeout consensus parameter. +# This field configures how long the consensus engine will wait after receiving +# +2/3 precommits before beginning the next height. +# If this field is set to a value greater than 0, it will take effect. +# unsafe-commit-timeout-override = 0s + +# This field provides an unsafe override of the BypassCommitTimeout consensus parameter. +# This field configures if the consensus engine will wait for the full Commit timeout +# before proceeding to the next height. +# If this field is set to true, the consensus engine will proceed to the next height +# as soon as the node has gathered votes from all of the validators on the network. +# unsafe-bypass-commit-timeout-override = + +####################################################### +### Transaction Indexer Configuration Options ### +####################################################### +[tx-index] + +# The backend database list to back the indexer. +# If list contains "null" or "", meaning no indexer service will be used. +# +# The application will set which txs to index. In some cases a node operator will be able +# to decide which txs to index based on configuration set in the application. +# +# Options: +# 1) "null" (default) - no indexer services. +# 2) "kv" - a simple indexer backed by key-value storage (see DBBackend) +# 3) "psql" - the indexer services backed by PostgreSQL. +# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. +indexer = ["null"] + +# The PostgreSQL connection configuration, the connection format: +# postgresql://:@:/? +psql-conn = "" + +####################################################### +### Instrumentation Configuration Options ### +####################################################### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = false + +# Address to listen for Prometheus collector(s) connections +prometheus-listen-addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max-open-connections = 3 + +# Instrumentation namespace +namespace = "tendermint" From 322bb460dd3fb0469dc33da8ab419a366878e5fd Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Sat, 9 Apr 2022 07:20:08 -0700 Subject: [PATCH 02/27] keymigrate: fix decoding of block-hash row keys (#8294) --- CHANGELOG_PENDING.md | 1 + scripts/keymigrate/migrate.go | 8 ++++++-- scripts/keymigrate/migrate_test.go | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 0d070d304..4f3ddc142 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -83,3 +83,4 @@ Special thanks to external contributors on this release: - [light] \#7641 Light Client: fix querying against the latest height (@ashcherbakov) - [cli] [#7837](https://github.com/tendermint/tendermint/pull/7837) fix app hash in state rollback. (@yihuang) - [cli] \#8276 scmigrate: ensure target key is correctly renamed. (@creachadair) +- [cli] \#8294 keymigrate: ensure block hash keys are correctly translated. (@creachadair) diff --git a/scripts/keymigrate/migrate.go b/scripts/keymigrate/migrate.go index b53c5e98f..738e982a2 100644 --- a/scripts/keymigrate/migrate.go +++ b/scripts/keymigrate/migrate.go @@ -138,12 +138,16 @@ func migrateKey(key keyID) (keyID, error) { return orderedcode.Append(nil, int64(3), int64(val)) case bytes.HasPrefix(key, keyID("BH:")): - val, err := strconv.Atoi(string(key[3:])) + hash := string(key[3:]) + if len(hash)%2 == 1 { + hash = "0" + hash + } + val, err := hex.DecodeString(hash) if err != nil { return nil, err } - return orderedcode.Append(nil, int64(4), int64(val)) + return orderedcode.Append(nil, int64(4), string(val)) case bytes.HasPrefix(key, keyID("validatorsKey:")): val, err := strconv.Atoi(string(key[14:])) if err != nil { diff --git a/scripts/keymigrate/migrate_test.go b/scripts/keymigrate/migrate_test.go index 8f6f30808..8fb9c282b 100644 --- a/scripts/keymigrate/migrate_test.go +++ b/scripts/keymigrate/migrate_test.go @@ -27,7 +27,7 @@ func getLegacyPrefixKeys(val int) map[string][]byte { "BlockPartTwo": []byte(fmt.Sprintf("P:%d:%d", val+2, val+val)), "BlockCommit": []byte(fmt.Sprintf("C:%d", val)), "SeenCommit": []byte(fmt.Sprintf("SC:%d", val)), - "BlockHeight": []byte(fmt.Sprintf("BH:%d", val)), + "BlockHeight": []byte(fmt.Sprintf("BH:%x", val)), "Validators": []byte(fmt.Sprintf("validatorsKey:%d", val)), "ConsensusParams": []byte(fmt.Sprintf("consensusParamsKey:%d", val)), "ABCIResponse": []byte(fmt.Sprintf("abciResponsesKey:%d", val)), From b91501cecf32057d7d09e468fe21c5468a28ec0b Mon Sep 17 00:00:00 2001 From: elias-orijtech <103319121+elias-orijtech@users.noreply.github.com> Date: Sat, 9 Apr 2022 17:07:40 +0200 Subject: [PATCH 03/27] test/fuzz: update oss-fuzz build script to match reality (#8296) p2p/pex and p2p/addrbook were deleted in 03ad7d6f20d9fd8fe83d31db168f433480552e94, secret_connection was renamed to secretconnection in dd97ac6e1c8810a115e53a61c9a91dd40275b3fe. --- test/fuzz/oss-fuzz-build.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/fuzz/oss-fuzz-build.sh b/test/fuzz/oss-fuzz-build.sh index 8eb30f510..ef2052614 100755 --- a/test/fuzz/oss-fuzz-build.sh +++ b/test/fuzz/oss-fuzz-build.sh @@ -2,12 +2,8 @@ export FUZZ_ROOT="github.com/tendermint/tendermint" -(cd test/fuzz/p2p/addrbook; go run ./init-corpus/main.go) -compile_go_fuzzer "$FUZZ_ROOT"/test/fuzz/p2p/addrbook Fuzz fuzz_p2p_addrbook fuzz -(cd test/fuzz/p2p/pex; go run ./init-corpus/main.go) -compile_go_fuzzer "$FUZZ_ROOT"/test/fuzz/p2p/pex Fuzz fuzz_p2p_pex fuzz -(cd test/fuzz/p2p/secret_connection; go run ./init-corpus/main.go) -compile_go_fuzzer "$FUZZ_ROOT"/test/fuzz/p2p/secret_connection Fuzz fuzz_p2p_secret_connection fuzz +(cd test/fuzz/p2p/secretconnection; go run ./init-corpus/main.go) +compile_go_fuzzer "$FUZZ_ROOT"/test/fuzz/p2p/secretconnection Fuzz fuzz_p2p_secretconnection fuzz compile_go_fuzzer "$FUZZ_ROOT"/test/fuzz/mempool Fuzz fuzz_mempool fuzz From c53b71821c0bd53929736ed5073426353f2dc069 Mon Sep 17 00:00:00 2001 From: Chill Validation <92176880+chillyvee@users.noreply.github.com> Date: Sun, 10 Apr 2022 03:42:47 +0900 Subject: [PATCH 04/27] Fix a spelling error (#8297) --- spec/consensus/evidence.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/consensus/evidence.md b/spec/consensus/evidence.md index 84d51a01b..edf9e53ff 100644 --- a/spec/consensus/evidence.md +++ b/spec/consensus/evidence.md @@ -1,7 +1,7 @@ # Evidence Evidence is an important component of Tendermint's security model. Whilst the core -consensus protocol provides correctness gaurantees for state machine replication +consensus protocol provides correctness guarantees for state machine replication that can tolerate less than 1/3 failures, the evidence system looks to detect and gossip byzantine faults whose combined power is greater than or equal to 1/3. It is worth noting that the evidence system is designed purely to detect possible attacks, gossip them, From f504089273263ca39e20917d0e6f1f44c0d67e32 Mon Sep 17 00:00:00 2001 From: John Adler Date: Sat, 9 Apr 2022 23:15:07 -0400 Subject: [PATCH 05/27] build: use go install instead of go get. (#8299) --- .github/workflows/fuzz-nightly.yml | 2 +- Makefile | 2 +- docs/nodes/remote-signer.md | 2 +- docs/tools/terraform-and-ansible.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fuzz-nightly.yml b/.github/workflows/fuzz-nightly.yml index 569442362..ea998929f 100644 --- a/.github/workflows/fuzz-nightly.yml +++ b/.github/workflows/fuzz-nightly.yml @@ -21,7 +21,7 @@ jobs: - name: Install go-fuzz working-directory: test/fuzz - run: go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build + run: go install github.com/dvyukov/go-fuzz/go-fuzz@latest github.com/dvyukov/go-fuzz/go-fuzz-build@latest - name: Fuzz mempool working-directory: test/fuzz diff --git a/Makefile b/Makefile index 85cd3202d..ba8850164 100644 --- a/Makefile +++ b/Makefile @@ -178,7 +178,7 @@ go.sum: go.mod draw_deps: @# requires brew install graphviz or apt-get install graphviz - go get github.com/RobotsAndPencils/goviz + go install github.com/RobotsAndPencils/goviz@latest @goviz -i github.com/tendermint/tendermint/cmd/tendermint -d 3 | dot -Tpng -o dependency-graph.png .PHONY: draw_deps diff --git a/docs/nodes/remote-signer.md b/docs/nodes/remote-signer.md index e7dfccacd..39a38e1b7 100644 --- a/docs/nodes/remote-signer.md +++ b/docs/nodes/remote-signer.md @@ -37,7 +37,7 @@ There are two ways to generate certificates, [openssl](https://www.openssl.org/) - Install `Certstrap`: ```sh - go get github.com/square/certstrap@v1.2.0 + go install github.com/square/certstrap@v1.2.0 ``` - Create certificate authority for self signing. diff --git a/docs/tools/terraform-and-ansible.md b/docs/tools/terraform-and-ansible.md index 6efbf3751..78e45652c 100644 --- a/docs/tools/terraform-and-ansible.md +++ b/docs/tools/terraform-and-ansible.md @@ -164,7 +164,7 @@ page](https://app.logz.io/#/dashboard/data-sources/Filebeat), then: yum install systemd-devel || echo "This will only work on RHEL-based systems." apt-get install libsystemd-dev || echo "This will only work on Debian-based systems." -go get github.com/mheese/journalbeat +go install github.com/mheese/journalbeat@latest ansible-playbook -i inventory/digital_ocean.py -l sentrynet logzio.yml -e LOGZIO_TOKEN=ABCDEFGHIJKLMNOPQRSTUVWXYZ012345 ``` From 4743a7ad0d62aadb2eeafe4359b398e771620b0e Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Sun, 10 Apr 2022 19:37:54 -0700 Subject: [PATCH 06/27] confix: clean up and document transformations (#8301) Right now the confix tool works up to v0.35. This change is preparation for extending the tool to handle additional changes in v0.36. Mostly this is adding documentation. The one functional change is to fix the name of the moved "fast-sync" parameter, which was renamed "enable". - Document the origin of each transformation step. - Update fast-sync target name. --- go.mod | 3 +-- go.sum | 4 ++-- scripts/confix/confix.go | 12 +++++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 91895c36e..0b05266bd 100644 --- a/go.mod +++ b/go.mod @@ -73,8 +73,7 @@ require ( github.com/charithe/durationcheck v0.0.9 // indirect github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect github.com/containerd/continuity v0.2.1 // indirect - github.com/creachadair/taskgroup v0.3.2 - github.com/creachadair/tomledit v0.0.5 + github.com/creachadair/tomledit v0.0.11 github.com/daixiang0/gci v0.3.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect diff --git a/go.sum b/go.sum index 2351806cf..ea3befa2f 100644 --- a/go.sum +++ b/go.sum @@ -225,8 +225,8 @@ github.com/creachadair/atomicfile v0.2.4 h1:GRjpQLmz/78I4+nBQpGMFrRa9yrL157AUTrA github.com/creachadair/atomicfile v0.2.4/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2fzVzf28JxrIkBc= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= -github.com/creachadair/tomledit v0.0.5 h1:ILJt2EO93fr8w2UAUA5FPNThk1Pq5m4KX2qUZ1Xz4Xs= -github.com/creachadair/tomledit v0.0.5/go.mod h1:gvtfnSZLa+YNQD28vaPq0Nk12bRxEhmUdBzAWn+EGF4= +github.com/creachadair/tomledit v0.0.11 h1:6fHNLdCa5pNudF+5Sb+3M+hPHz/q1fMoAm+MI6TWIR4= +github.com/creachadair/tomledit v0.0.11/go.mod h1:gvtfnSZLa+YNQD28vaPq0Nk12bRxEhmUdBzAWn+EGF4= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= diff --git a/scripts/confix/confix.go b/scripts/confix/confix.go index aa73897a5..b958060fe 100644 --- a/scripts/confix/confix.go +++ b/scripts/confix/confix.go @@ -80,24 +80,28 @@ func main() { var plan = transform.Plan{ { + // Since https://github.com/tendermint/tendermint/pull/5777. Desc: "Rename everything from snake_case to kebab-case", T: transform.SnakeToKebab(), }, { + // Since https://github.com/tendermint/tendermint/pull/6896. Desc: "Rename [fastsync] to [blocksync]", T: transform.Rename(parser.Key{"fastsync"}, parser.Key{"blocksync"}), ErrorOK: true, }, { - Desc: "Move top-level fast_sync key under [blocksync]", + // Since https://github.com/tendermint/tendermint/pull/7159. + Desc: "Move top-level fast_sync key to blocksync.enable", T: transform.MoveKey( parser.Key{"fast-sync"}, parser.Key{"blocksync"}, - parser.Key{"fast-sync"}, + parser.Key{"enable"}, ), ErrorOK: true, }, { + // Since https://github.com/tendermint/tendermint/pull/6462. Desc: "Move priv-validator settings under [priv-validator]", T: transform.Func(func(_ context.Context, doc *tomledit.Document) error { const pvPrefix = "priv-validator-" @@ -144,6 +148,8 @@ var plan = transform.Plan{ }), }, { + // v1 removed: https://github.com/tendermint/tendermint/pull/5728 + // v2 deprecated: https://github.com/tendermint/tendermint/pull/6730 Desc: `Set blocksync.version to "v0"`, T: transform.Func(func(_ context.Context, doc *tomledit.Document) error { v := doc.First("blocksync", "version") @@ -166,7 +172,7 @@ func ApplyFixes(ctx context.Context, doc *tomledit.Document) error { tmVersion := GuessConfigVersion(doc) if tmVersion == vUnknown { return errors.New("cannot tell what Tendermint version created this config") - } else if tmVersion < v34 { + } else if tmVersion < v34 || tmVersion > v36 { // TODO(creachadair): Add in rewrites for older versions. This will // require some digging to discover what the changes were. The upgrade // instructions do not give specifics. From 5235913e127d9db48987f46e0aa8499ea1a7e3ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 12:02:43 +0000 Subject: [PATCH 07/27] build(deps): Bump codecov/codecov-action from 2.1.0 to 3.0.0 (#8306) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.1.0 to 3.0.0.
Release notes

Sourced from codecov/codecov-action's releases.

v3.0.0

Breaking Changes

  • #689 Bump to node16 and small fixes

Features

  • #688 Incorporate gcov arguments for the Codecov uploader

Dependencies

  • #548 build(deps-dev): bump jest-junit from 12.2.0 to 13.0.0
  • #603 [Snyk] Upgrade @​actions/core from 1.5.0 to 1.6.0
  • #628 build(deps): bump node-fetch from 2.6.1 to 3.1.1
  • #634 build(deps): bump node-fetch from 3.1.1 to 3.2.0
  • #636 build(deps): bump openpgp from 5.0.1 to 5.1.0
  • #652 build(deps-dev): bump @​vercel/ncc from 0.30.0 to 0.33.3
  • #653 build(deps-dev): bump @​types/node from 16.11.21 to 17.0.18
  • #659 build(deps-dev): bump @​types/jest from 27.4.0 to 27.4.1
  • #667 build(deps): bump actions/checkout from 2 to 3
  • #673 build(deps): bump node-fetch from 3.2.0 to 3.2.3
  • #683 build(deps): bump minimist from 1.2.5 to 1.2.6
  • #685 build(deps): bump @​actions/github from 5.0.0 to 5.0.1
  • #681 build(deps-dev): bump @​types/node from 17.0.18 to 17.0.23
  • #682 build(deps-dev): bump typescript from 4.5.5 to 4.6.3
  • #676 build(deps): bump @​actions/exec from 1.1.0 to 1.1.1
  • #675 build(deps): bump openpgp from 5.1.0 to 5.2.1
Changelog

Sourced from codecov/codecov-action's changelog.

3.0.0

Breaking Changes

  • #689 Bump to node16 and small fixes

Features

  • #688 Incorporate gcov arguments for the Codecov uploader

Dependencies

  • #548 build(deps-dev): bump jest-junit from 12.2.0 to 13.0.0
  • #603 [Snyk] Upgrade @​actions/core from 1.5.0 to 1.6.0
  • #628 build(deps): bump node-fetch from 2.6.1 to 3.1.1
  • #634 build(deps): bump node-fetch from 3.1.1 to 3.2.0
  • #636 build(deps): bump openpgp from 5.0.1 to 5.1.0
  • #652 build(deps-dev): bump @​vercel/ncc from 0.30.0 to 0.33.3
  • #653 build(deps-dev): bump @​types/node from 16.11.21 to 17.0.18
  • #659 build(deps-dev): bump @​types/jest from 27.4.0 to 27.4.1
  • #667 build(deps): bump actions/checkout from 2 to 3
  • #673 build(deps): bump node-fetch from 3.2.0 to 3.2.3
  • #683 build(deps): bump minimist from 1.2.5 to 1.2.6
  • #685 build(deps): bump @​actions/github from 5.0.0 to 5.0.1
  • #681 build(deps-dev): bump @​types/node from 17.0.18 to 17.0.23
  • #682 build(deps-dev): bump typescript from 4.5.5 to 4.6.3
  • #676 build(deps): bump @​actions/exec from 1.1.0 to 1.1.1
  • #675 build(deps): bump openpgp from 5.1.0 to 5.2.1
Commits
  • e3c5604 Merge pull request #689 from codecov/feat/gcov
  • 174efc5 Update package-lock.json
  • 6243a75 bump to 3.0.0
  • 0d6466f Bump to node16
  • d4729ee fetch.default
  • 351baf6 fix: bash
  • d8cf680 Merge pull request #675 from codecov/dependabot/npm_and_yarn/openpgp-5.2.1
  • b775e90 Merge pull request #676 from codecov/dependabot/npm_and_yarn/actions/exec-1.1.1
  • 2ebc2f0 Merge pull request #682 from codecov/dependabot/npm_and_yarn/typescript-4.6.3
  • 8e2ef2b Merge pull request #681 from codecov/dependabot/npm_and_yarn/types/node-17.0.23
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=codecov/codecov-action&package-manager=github_actions&previous-version=2.1.0&new-version=3.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b0736dabe..feac96603 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -69,7 +69,7 @@ jobs: - run: | cat ./*profile.out | grep -v "mode: set" >> coverage.txt if: env.GIT_DIFF - - uses: codecov/codecov-action@v2.1.0 + - uses: codecov/codecov-action@v3.0.0 with: file: ./coverage.txt if: env.GIT_DIFF From ce3b48febd39287edcebd49ac200a605214dfc53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 12:04:17 +0000 Subject: [PATCH 08/27] build(deps): Bump actions/setup-go from 2 to 3 (#8305) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
Release notes

Sourced from actions/setup-go's releases.

v3.0.0

What's Changed

Breaking Changes

With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.

This new major release removes the stable input, so there is no need to specify additional input to use pre-release versions. This release also corrects the pre-release versions syntax to satisfy the SemVer notation (1.18.0-beta1 -> 1.18.0-beta.1, 1.18.0-rc1 -> 1.18.0-rc.1).

steps:
  - uses: actions/checkout@v2
  - uses: actions/setup-go@v3
    with:
      go-version: '1.18.0-rc.1'
  - run: go version

Add check-latest input

In scope of this release we add the check-latest input. If check-latest is set to true, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a Go version will then be downloaded from go-versions repository. By default check-latest is set to false. Example of usage:

steps:
  - uses: actions/checkout@v2
  - uses: actions/setup-go@v2
    with:
      go-version: '1.16'
      check-latest: true
  - run: go version

Moreover, we updated @actions/core from 1.2.6 to 1.6.0

v2.1.5

In scope of this release we updated matchers.json to improve the problem matcher pattern. For more information please refer to this pull request

v2.1.4

What's Changed

New Contributors

Full Changelog: https://github.com/actions/setup-go/compare/v2.1.3...v2.1.4

v2.1.3

  • Updated communication with runner to use environment files rather then workflow commands

v2.1.2

This release includes vendored licenses for this action's npm dependencies.

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-go&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/build.yml | 6 +++--- .github/workflows/e2e-manual.yml | 2 +- .github/workflows/e2e-nightly-34x.yml | 2 +- .github/workflows/e2e-nightly-35x.yml | 2 +- .github/workflows/e2e-nightly-master.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/fuzz-nightly.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8bd44fe8a..c871571be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: goos: ["linux"] timeout-minutes: 5 steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: "1.17" - uses: actions/checkout@v3 @@ -41,7 +41,7 @@ jobs: needs: build timeout-minutes: 5 steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: "1.17" - uses: actions/checkout@v3 @@ -63,7 +63,7 @@ jobs: needs: build timeout-minutes: 5 steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: "1.17" - uses: actions/checkout@v3 diff --git a/.github/workflows/e2e-manual.yml b/.github/workflows/e2e-manual.yml index d80415340..bab3fcf62 100644 --- a/.github/workflows/e2e-manual.yml +++ b/.github/workflows/e2e-manual.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: '1.17' diff --git a/.github/workflows/e2e-nightly-34x.yml b/.github/workflows/e2e-nightly-34x.yml index 7febc491b..d7af7b347 100644 --- a/.github/workflows/e2e-nightly-34x.yml +++ b/.github/workflows/e2e-nightly-34x.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: '1.17' diff --git a/.github/workflows/e2e-nightly-35x.yml b/.github/workflows/e2e-nightly-35x.yml index 1914f9e57..c397ead9c 100644 --- a/.github/workflows/e2e-nightly-35x.yml +++ b/.github/workflows/e2e-nightly-35x.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: '1.17' diff --git a/.github/workflows/e2e-nightly-master.yml b/.github/workflows/e2e-nightly-master.yml index 19cf5cce8..fc1fff104 100644 --- a/.github/workflows/e2e-nightly-master.yml +++ b/.github/workflows/e2e-nightly-master.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: '1.17' diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index b5d8df0af..124d06f5a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: '1.17' - uses: actions/checkout@v3 diff --git a/.github/workflows/fuzz-nightly.yml b/.github/workflows/fuzz-nightly.yml index ea998929f..f199e29d5 100644 --- a/.github/workflows/fuzz-nightly.yml +++ b/.github/workflows/fuzz-nightly.yml @@ -13,7 +13,7 @@ jobs: fuzz-nightly-test: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: '1.17' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fa8f153f1..332f55705 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: timeout-minutes: 8 steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: '^1.17' - uses: technote-space/get-diff-action@v6.0.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 862ef598a..ec4fa810b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: '1.17' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index feac96603..6eb373e73 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: matrix: part: ["00", "01", "02", "03", "04", "05"] steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: "1.17" - uses: actions/checkout@v3 From fa531d3da9c92a6b771cdd1231dd79071eee79cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 12:27:21 +0000 Subject: [PATCH 09/27] build(deps): Bump actions/stale from 4 to 5 (#8304) Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
Release notes

Sourced from actions/stale's releases.

v5.0.0

Features

v4.1.0

Features

Changelog

Sourced from actions/stale's changelog.

Changelog

Commits
  • 3cc1237 Merge pull request #670 from actions/thboop/node16upgrade
  • 76e9fbc update node version
  • 6467b96 Update default runtime to node16
  • 8af6051 build(deps-dev): bump jest-circus from 27.2.0 to 27.4.6 (#665)
  • 7a7efca Fix per issue operation count (#662)
  • 04a1828 build(deps-dev): bump ts-jest from 27.0.5 to 27.1.2 (#641)
  • 65ca395 build(deps-dev): bump eslint-plugin-jest from 24.4.2 to 25.3.2 (#639)
  • eee276c build(deps-dev): bump prettier from 2.4.1 to 2.5.1 (#628)
  • 6c2f9f3 Merge pull request #640 from dmitry-shibanov/v-dmshib/fix-check-dist
  • 37323f1 fix check-dist.yml
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/stale&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1109f09c1..4089abfbc 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,7 +7,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v4 + - uses: actions/stale@v5 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: "This pull request has been automatically marked as stale because it has not had From 8c4e98261638d517ced8209dc505a972d26410d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 12:29:42 +0000 Subject: [PATCH 10/27] build(deps): Bump actions/download-artifact from 2 to 3 (#8302) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
Release notes

Sourced from actions/download-artifact's releases.

v3.0.0

What's Changed

Breaking Changes

With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.

v2.1.0 Download Artifact

  • Improved output & logging
  • Fixed issue where downloading all artifacts could cause display percentages to be over 100%
  • Various small bug fixes & improvements

v2.0.10

  • Retry on HTTP 500 responses from the service

v2.0.9

  • Fixes to proxy related issues

v2.0.8

  • Improvements to retryability if an error is encountered during artifact download

v2.0.7 download-artifact

  • Improved download retry-ability if a partial download is encountered

v2.0.6

Update actions/core NPM package that is used internally

v2.0.5

  • Add Third Party License Information

v2.0.4

  • Use the latest version of the @actions/artifact NPM package

v2.0.3

  • Misc improvements

v2.0.2

  • Support for tilde expansion

v2.0.1

  • Download path output
  • Improved logging
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/download-artifact&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6eb373e73..b1c2225a5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,19 +50,19 @@ jobs: go.mod go.sum Makefile - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-00-coverage" if: env.GIT_DIFF - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-01-coverage" if: env.GIT_DIFF - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-02-coverage" if: env.GIT_DIFF - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-03-coverage" if: env.GIT_DIFF From 9a46f575f5b546c8e7ffdedd9b28e2d4b2e43842 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 12:33:01 +0000 Subject: [PATCH 11/27] build(deps): Bump actions/upload-artifact from 2 to 3 (#8303) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
Release notes

Sourced from actions/upload-artifact's releases.

v3.0.0

What's Changed

  • Update default runtime to node16 (#293)
  • Update package-lock.json file version to 2 (#302)

Breaking Changes

With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.

v2.3.1

Fix for empty fails on Windows failing on upload #281

v2.3.0 Upload Artifact

  • Optimizations for faster uploads of larger files that are already compressed
  • Significantly improved logging when there are chunked uploads
  • Clarifications in logs around the upload size and prohibited characters that aren't allowed in the artifact name or any uploaded files
  • Various other small bugfixes & optimizations

v2.2.4

  • Retry on HTTP 500 responses from the service

v2.2.3

  • Fixes for proxy related issues

v2.2.2

  • Improved retryability and error handling

v2.2.1

  • Update used actions/core package to the latest version

v2.2.0

  • Support for artifact retention

v2.1.4

  • Add Third Party License Information

v2.1.3

  • Use updated version of the @action/artifact NPM package

v2.1.2

  • Increase upload chunk size from 4MB to 8MB
  • Detect case insensitive file uploads

v2.1.1

  • Fix for certain symlinks not correctly being identified as directories before starting uploads

v2.1.0

  • Support for uploading artifacts with multiple paths
  • Support for using exclude paths
  • Updates to dependencies

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/fuzz-nightly.yml | 4 ++-- .github/workflows/jepsen.yml | 2 +- .github/workflows/tests.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fuzz-nightly.yml b/.github/workflows/fuzz-nightly.yml index f199e29d5..0fcab9ae5 100644 --- a/.github/workflows/fuzz-nightly.yml +++ b/.github/workflows/fuzz-nightly.yml @@ -39,14 +39,14 @@ jobs: continue-on-error: true - name: Archive crashers - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: crashers path: test/fuzz/**/crashers retention-days: 3 - name: Archive suppressions - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: suppressions path: test/fuzz/**/suppressions diff --git a/.github/workflows/jepsen.yml b/.github/workflows/jepsen.yml index 8ffb29e8c..04e599564 100644 --- a/.github/workflows/jepsen.yml +++ b/.github/workflows/jepsen.yml @@ -58,7 +58,7 @@ jobs: run: docker exec -i jepsen-control bash -c 'source /root/.bashrc; cd /jepsen/tendermint; lein run test --nemesis ${{ github.event.inputs.nemesis }} --workload ${{ github.event.inputs.workload }} --concurrency ${{ github.event.inputs.concurrency }} --tendermint-url ${{ github.event.inputs.tendermintUrl }} --merkleeyes-url ${{ github.event.inputs.merkleeyesUrl }} --time-limit ${{ github.event.inputs.timeLimit }} ${{ github.event.inputs.dupOrSuperByzValidators }}' - name: Archive results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: results path: tendermint/store/latest diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b1c2225a5..1ef5759e5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,7 +32,7 @@ jobs: run: | make test-group-${{ matrix.part }} NUM_SPLIT=6 if: env.GIT_DIFF - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}-coverage" path: ./build/${{ matrix.part }}.profile.out From 0ab2f312391edf8e2781b62fcacc0de4e4f5eb46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 12:47:05 +0000 Subject: [PATCH 12/27] build(deps): Bump github.com/creachadair/tomledit from 0.0.11 to 0.0.13 (#8307) Bumps [github.com/creachadair/tomledit](https://github.com/creachadair/tomledit) from 0.0.11 to 0.0.13.
Commits
  • baee445 Release v0.0.13.
  • 8dfcc1b Exercise insertion before comments.
  • 97f4e85 When inserting a key, push it before block comments.
  • 029089e Release v0.0.12.
  • d226405 Test finding the global table.
  • 34b7aad Let FindTable return the global table with an empty name.
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/creachadair/tomledit&package-manager=go_modules&previous-version=0.0.11&new-version=0.0.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0b05266bd..60960e3bb 100644 --- a/go.mod +++ b/go.mod @@ -73,7 +73,7 @@ require ( github.com/charithe/durationcheck v0.0.9 // indirect github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect github.com/containerd/continuity v0.2.1 // indirect - github.com/creachadair/tomledit v0.0.11 + github.com/creachadair/tomledit v0.0.13 github.com/daixiang0/gci v0.3.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect diff --git a/go.sum b/go.sum index ea3befa2f..d1eb27611 100644 --- a/go.sum +++ b/go.sum @@ -225,8 +225,8 @@ github.com/creachadair/atomicfile v0.2.4 h1:GRjpQLmz/78I4+nBQpGMFrRa9yrL157AUTrA github.com/creachadair/atomicfile v0.2.4/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2fzVzf28JxrIkBc= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= -github.com/creachadair/tomledit v0.0.11 h1:6fHNLdCa5pNudF+5Sb+3M+hPHz/q1fMoAm+MI6TWIR4= -github.com/creachadair/tomledit v0.0.11/go.mod h1:gvtfnSZLa+YNQD28vaPq0Nk12bRxEhmUdBzAWn+EGF4= +github.com/creachadair/tomledit v0.0.13 h1:UKsFVZbCKH/8vIh50cDEtRu2KuBync5v1WXMYb+HSJ0= +github.com/creachadair/tomledit v0.0.13/go.mod h1:gvtfnSZLa+YNQD28vaPq0Nk12bRxEhmUdBzAWn+EGF4= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= From b7e87eef05fa02a35778e8771df33587f86cc13e Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Tue, 12 Apr 2022 01:20:43 +1200 Subject: [PATCH 13/27] cli: add graceful catches to SIGINT (#8308) --- cmd/tendermint/commands/light.go | 2 +- cmd/tendermint/commands/run_node.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/tendermint/commands/light.go b/cmd/tendermint/commands/light.go index fbb6e00db..8e39d7900 100644 --- a/cmd/tendermint/commands/light.go +++ b/cmd/tendermint/commands/light.go @@ -180,7 +180,7 @@ for applications built w/ Cosmos SDK). return err } - ctx, cancel := signal.NotifyContext(cmd.Context(), syscall.SIGTERM) + ctx, cancel := signal.NotifyContext(cmd.Context(), os.Interrupt, syscall.SIGTERM) defer cancel() go func() { diff --git a/cmd/tendermint/commands/run_node.go b/cmd/tendermint/commands/run_node.go index 5f39fb21e..347a04034 100644 --- a/cmd/tendermint/commands/run_node.go +++ b/cmd/tendermint/commands/run_node.go @@ -105,7 +105,7 @@ func NewRunNodeCmd(nodeProvider cfg.ServiceProvider, conf *cfg.Config, logger lo return err } - ctx, cancel := signal.NotifyContext(cmd.Context(), syscall.SIGTERM) + ctx, cancel := signal.NotifyContext(cmd.Context(), os.Interrupt, syscall.SIGTERM) defer cancel() n, err := nodeProvider(ctx, conf, logger) From 0e32ad9e5ccc4a71d9304747b53b7f5fdf0d68c2 Mon Sep 17 00:00:00 2001 From: Ismail Khoffi Date: Mon, 11 Apr 2022 16:06:57 +0200 Subject: [PATCH 14/27] Update outdated doc comment (#8309) SetEventBus was deleted, same with the NopEventBus --- internal/state/execution.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/state/execution.go b/internal/state/execution.go index b28288f49..ebad71fd3 100644 --- a/internal/state/execution.go +++ b/internal/state/execution.go @@ -48,8 +48,7 @@ type BlockExecutor struct { cache map[string]struct{} } -// NewBlockExecutor returns a new BlockExecutor with a NopEventBus. -// Call SetEventBus to provide one. +// NewBlockExecutor returns a new BlockExecutor with the passed-in EventBus. func NewBlockExecutor( stateStore Store, logger log.Logger, From 9ec30ecc0c28b263cc4305d08dda7c3204dbc8f1 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Mon, 11 Apr 2022 12:41:27 -0700 Subject: [PATCH 15/27] Add configuration diff tool. (#8298) * Add diff outputs as testdata. * Normalize all samples to kebabs. --- go.mod | 2 +- go.sum | 4 +- scripts/confix/condiff/condiff.go | 152 +++++++++++++++++++++++++ scripts/confix/testdata/diff-31-32.txt | 5 + scripts/confix/testdata/diff-32-33.txt | 6 + scripts/confix/testdata/diff-33-34.txt | 20 ++++ scripts/confix/testdata/diff-34-35.txt | 31 +++++ scripts/confix/testdata/diff-35-36.txt | 27 +++++ 8 files changed, 244 insertions(+), 3 deletions(-) create mode 100644 scripts/confix/condiff/condiff.go create mode 100644 scripts/confix/testdata/diff-31-32.txt create mode 100644 scripts/confix/testdata/diff-32-33.txt create mode 100644 scripts/confix/testdata/diff-33-34.txt create mode 100644 scripts/confix/testdata/diff-34-35.txt create mode 100644 scripts/confix/testdata/diff-35-36.txt diff --git a/go.mod b/go.mod index 60960e3bb..3101f26ad 100644 --- a/go.mod +++ b/go.mod @@ -73,7 +73,7 @@ require ( github.com/charithe/durationcheck v0.0.9 // indirect github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect github.com/containerd/continuity v0.2.1 // indirect - github.com/creachadair/tomledit v0.0.13 + github.com/creachadair/tomledit v0.0.15 github.com/daixiang0/gci v0.3.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect diff --git a/go.sum b/go.sum index d1eb27611..0da80e4d6 100644 --- a/go.sum +++ b/go.sum @@ -225,8 +225,8 @@ github.com/creachadair/atomicfile v0.2.4 h1:GRjpQLmz/78I4+nBQpGMFrRa9yrL157AUTrA github.com/creachadair/atomicfile v0.2.4/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2fzVzf28JxrIkBc= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= -github.com/creachadair/tomledit v0.0.13 h1:UKsFVZbCKH/8vIh50cDEtRu2KuBync5v1WXMYb+HSJ0= -github.com/creachadair/tomledit v0.0.13/go.mod h1:gvtfnSZLa+YNQD28vaPq0Nk12bRxEhmUdBzAWn+EGF4= +github.com/creachadair/tomledit v0.0.15 h1:g/qlpwSFIXEngyz8gcTEGZtvdGBLHODwV+Z0BFILVxw= +github.com/creachadair/tomledit v0.0.15/go.mod h1:gvtfnSZLa+YNQD28vaPq0Nk12bRxEhmUdBzAWn+EGF4= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= diff --git a/scripts/confix/condiff/condiff.go b/scripts/confix/condiff/condiff.go new file mode 100644 index 000000000..6b11e4e2c --- /dev/null +++ b/scripts/confix/condiff/condiff.go @@ -0,0 +1,152 @@ +// Program condiff performs a keyspace diff on two TOML documents. +package main + +import ( + "context" + "flag" + "fmt" + "io" + "log" + "os" + "path/filepath" + "sort" + "strings" + + "github.com/creachadair/tomledit" + "github.com/creachadair/tomledit/parser" + "github.com/creachadair/tomledit/transform" +) + +var ( + doDesnake = flag.Bool("desnake", false, "Convert snake_case to kebab-case before comparing") +) + +func init() { + flag.Usage = func() { + fmt.Fprintf(os.Stderr, `Usage: %[1]s [options] f1 f2 + +Diff the keyspaces of the TOML documents in files f1 and f2. +The output prints one line per key that differs: + + -S name -- section exists in f1 but not f2 + +S name -- section exists in f2 but not f1 + -M name -- mapping exists in f1 but not f2 + +M name -- mapping exists in f2 but not f1 + +Comments, order, and values are ignored for comparison purposes. + +Options: +`, filepath.Base(os.Args[0])) + flag.PrintDefaults() + } +} + +func main() { + flag.Parse() + + if flag.NArg() != 2 { + log.Fatalf("Usage: %[1]s ", filepath.Base(os.Args[0])) + } + lhs := mustParse(flag.Arg(0)) + rhs := mustParse(flag.Arg(1)) + if *doDesnake { + log.Printf("Converting all names from snake_case to kebab-case") + fix := transform.SnakeToKebab() + _ = fix(context.Background(), lhs) + _ = fix(context.Background(), rhs) + } + diffDocs(os.Stdout, lhs, rhs) +} + +func mustParse(path string) *tomledit.Document { + f, err := os.Open(path) + if err != nil { + log.Fatalf("Opening TOML input: %v", err) + } + defer f.Close() + doc, err := tomledit.Parse(f) + if err != nil { + log.Fatalf("Parsing %q: %v", path, err) + } + return doc +} + +func allKeys(s *tomledit.Section) []string { + var keys []string + s.Scan(func(key parser.Key, _ *tomledit.Entry) bool { + keys = append(keys, key.String()) + return true + }) + return keys +} + +const ( + delSection = "-S" + delMapping = "-M" + addSection = "+S" + addMapping = "+M" + + delMapSep = "\n" + delMapping + " " + addMapSep = "\n" + addMapping + " " +) + +func diffDocs(w io.Writer, lhs, rhs *tomledit.Document) { + diffSections(w, lhs.Global, rhs.Global) + lsec, rsec := lhs.Sections, rhs.Sections + transform.SortSectionsByName(lsec) + transform.SortSectionsByName(rsec) + + i, j := 0, 0 + for i < len(lsec) && j < len(rsec) { + if lsec[i].Name.Before(rsec[j].Name) { + fmt.Fprintln(w, delSection, lsec[i].Name) + fmt.Fprintln(w, delMapping, strings.Join(allKeys(lsec[i]), delMapSep)) + i++ + } else if rsec[j].Name.Before(lsec[i].Name) { + fmt.Fprintln(w, addSection, rsec[j].Name) + fmt.Fprintln(w, addMapping, strings.Join(allKeys(rsec[j]), addMapSep)) + j++ + } else { + diffSections(w, lsec[i], rsec[j]) + i++ + j++ + } + } + for ; i < len(lsec); i++ { + fmt.Fprintln(w, delSection, lsec[i].Name) + fmt.Fprintln(w, delMapping, strings.Join(allKeys(lsec[i]), delMapSep)) + } + for ; j < len(rsec); j++ { + fmt.Fprintln(w, addSection, rsec[j].Name) + fmt.Fprintln(w, addMapping, strings.Join(allKeys(rsec[j]), addMapSep)) + } +} + +func diffSections(w io.Writer, lhs, rhs *tomledit.Section) { + diffKeys(w, allKeys(lhs), allKeys(rhs)) +} + +func diffKeys(w io.Writer, lhs, rhs []string) { + sort.Strings(lhs) + sort.Strings(rhs) + + i, j := 0, 0 + for i < len(lhs) && j < len(rhs) { + if lhs[i] < rhs[j] { + fmt.Fprintln(w, delMapping, lhs[i]) + i++ + } else if lhs[i] > rhs[j] { + fmt.Fprintln(w, addMapping, rhs[j]) + j++ + } else { + i++ + j++ + } + } + for ; i < len(lhs); i++ { + fmt.Fprintln(w, delMapping, lhs[i]) + } + for ; j < len(rhs); j++ { + fmt.Fprintln(w, addMapping, rhs[j]) + } +} diff --git a/scripts/confix/testdata/diff-31-32.txt b/scripts/confix/testdata/diff-31-32.txt new file mode 100644 index 000000000..98855bade --- /dev/null +++ b/scripts/confix/testdata/diff-31-32.txt @@ -0,0 +1,5 @@ ++S fastsync ++M fastsync.version ++M mempool.max-tx-bytes ++M rpc.max-body-bytes ++M rpc.max-header-bytes diff --git a/scripts/confix/testdata/diff-32-33.txt b/scripts/confix/testdata/diff-32-33.txt new file mode 100644 index 000000000..7aa61856a --- /dev/null +++ b/scripts/confix/testdata/diff-32-33.txt @@ -0,0 +1,6 @@ ++M p2p.persistent-peers-max-dial-period ++M p2p.unconditional-peer-ids ++M tx-index.index-all-keys +-M tx-index.index-all-tags ++M tx-index.index-keys +-M tx-index.index-tags diff --git a/scripts/confix/testdata/diff-33-34.txt b/scripts/confix/testdata/diff-33-34.txt new file mode 100644 index 000000000..a0ac7a98d --- /dev/null +++ b/scripts/confix/testdata/diff-33-34.txt @@ -0,0 +1,20 @@ +-M prof-laddr ++M consensus.double-sign-check-height ++M mempool.keep-invalid-txs-in-cache ++M mempool.max-batch-bytes ++M rpc.experimental-close-on-slow-client ++M rpc.experimental-subscription-buffer-size ++M rpc.experimental-websocket-write-buffer-size ++M rpc.pprof-laddr ++S statesync ++M statesync.enable ++M statesync.rpc-servers ++M statesync.trust-height ++M statesync.trust-hash ++M statesync.trust-period ++M statesync.discovery-time ++M statesync.temp-dir ++M statesync.chunk-request-timeout ++M statesync.chunk-fetchers +-M tx-index.index-all-keys +-M tx-index.index-keys diff --git a/scripts/confix/testdata/diff-34-35.txt b/scripts/confix/testdata/diff-34-35.txt new file mode 100644 index 000000000..13a4432a0 --- /dev/null +++ b/scripts/confix/testdata/diff-34-35.txt @@ -0,0 +1,31 @@ +-M fast-sync ++M mode +-M priv-validator-key-file +-M priv-validator-laddr +-M priv-validator-state-file ++S blocksync ++M blocksync.enable ++M blocksync.version +-S fastsync +-M fastsync.version ++M mempool.ttl-duration ++M mempool.ttl-num-blocks ++M mempool.version +-M mempool.wal-dir ++M p2p.bootstrap-peers ++M p2p.max-connections ++M p2p.max-incoming-connection-attempts ++M p2p.queue-type +-M p2p.seed-mode ++M p2p.use-legacy ++S priv-validator ++M priv-validator.key-file ++M priv-validator.state-file ++M priv-validator.laddr ++M priv-validator.client-certificate-file ++M priv-validator.client-key-file ++M priv-validator.root-ca-file +-M statesync.chunk-fetchers ++M statesync.fetchers ++M statesync.use-p2p ++M tx-index.psql-conn diff --git a/scripts/confix/testdata/diff-35-36.txt b/scripts/confix/testdata/diff-35-36.txt new file mode 100644 index 000000000..13fd268af --- /dev/null +++ b/scripts/confix/testdata/diff-35-36.txt @@ -0,0 +1,27 @@ +-S blocksync +-M blocksync.enable +-M blocksync.version +-M consensus.skip-timeout-commit +-M consensus.timeout-commit +-M consensus.timeout-precommit +-M consensus.timeout-precommit-delta +-M consensus.timeout-prevote +-M consensus.timeout-prevote-delta +-M consensus.timeout-propose +-M consensus.timeout-propose-delta +-M mempool.version +-M p2p.addr-book-file +-M p2p.addr-book-strict +-M p2p.max-num-inbound-peers +-M p2p.max-num-outbound-peers +-M p2p.persistent-peers-max-dial-period +-M p2p.unconditional-peer-ids +-M p2p.use-legacy ++M rpc.event-log-max-items ++M rpc.event-log-window-size +-M rpc.experimental-close-on-slow-client ++M rpc.experimental-disable-websocket +-M rpc.experimental-subscription-buffer-size +-M rpc.experimental-websocket-write-buffer-size +-M rpc.grpc-laddr +-M rpc.grpc-max-open-connections From 969690d81cd429797988f4a53c2cb266fa25f062 Mon Sep 17 00:00:00 2001 From: William Banfield <4561443+williambanfield@users.noreply.github.com> Date: Mon, 11 Apr 2022 16:27:50 -0400 Subject: [PATCH 16/27] abci++: only include meaningful header fields in data passed-through to application (#8216) closes: #7950 --- abci/example/kvstore/kvstore.go | 2 +- abci/example/kvstore/kvstore_test.go | 12 +- abci/types/types.pb.go | 1563 ++++++++++------- internal/state/execution.go | 23 +- internal/state/execution_test.go | 15 +- internal/state/helpers_test.go | 2 +- internal/state/validation_test.go | 2 +- proto/tendermint/abci/types.proto | 67 +- .../tendermint/abci/types.proto.intermediate | 55 +- proto/tendermint/privval/service.proto | 2 +- spec/abci++/abci++_methods_002_draft.md | 74 +- test/e2e/app/app.go | 4 +- types/evidence.go | 34 +- 13 files changed, 1128 insertions(+), 727 deletions(-) diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index 0563cd7e6..045e872d4 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -175,7 +175,7 @@ func (app *Application) FinalizeBlock(req types.RequestFinalizeBlock) types.Resp // Punish validators who committed equivocation. for _, ev := range req.ByzantineValidators { - if ev.Type == types.EvidenceType_DUPLICATE_VOTE { + if ev.Type == types.MisbehaviorType_DUPLICATE_VOTE { addr := string(ev.Validator.Address) if pubKey, ok := app.valAddrToPubKeyMap[addr]; ok { app.updateValidator(types.ValidatorUpdate{ diff --git a/abci/example/kvstore/kvstore_test.go b/abci/example/kvstore/kvstore_test.go index 002c1cb41..0b62bbc61 100644 --- a/abci/example/kvstore/kvstore_test.go +++ b/abci/example/kvstore/kvstore_test.go @@ -16,7 +16,6 @@ import ( "github.com/tendermint/tendermint/abci/example/code" abciserver "github.com/tendermint/tendermint/abci/server" "github.com/tendermint/tendermint/abci/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) const ( @@ -104,10 +103,7 @@ func TestPersistentKVStoreInfo(t *testing.T) { // make and apply block height = int64(1) hash := []byte("foo") - header := tmproto.Header{ - Height: height, - } - kvstore.FinalizeBlock(types.RequestFinalizeBlock{Hash: hash, Header: header}) + kvstore.FinalizeBlock(types.RequestFinalizeBlock{Hash: hash, Height: height}) kvstore.Commit() resInfo = kvstore.Info(types.RequestInfo{}) @@ -189,13 +185,9 @@ func makeApplyBlock( // make and apply block height := int64(heightInt) hash := []byte("foo") - header := tmproto.Header{ - Height: height, - } - resFinalizeBlock := kvstore.FinalizeBlock(types.RequestFinalizeBlock{ Hash: hash, - Header: header, + Height: height, Txs: txs, }) diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index cd3ced31f..9e7955462 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -58,31 +58,31 @@ func (CheckTxType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_252557cfdd89a31a, []int{0} } -type EvidenceType int32 +type MisbehaviorType int32 const ( - EvidenceType_UNKNOWN EvidenceType = 0 - EvidenceType_DUPLICATE_VOTE EvidenceType = 1 - EvidenceType_LIGHT_CLIENT_ATTACK EvidenceType = 2 + MisbehaviorType_UNKNOWN MisbehaviorType = 0 + MisbehaviorType_DUPLICATE_VOTE MisbehaviorType = 1 + MisbehaviorType_LIGHT_CLIENT_ATTACK MisbehaviorType = 2 ) -var EvidenceType_name = map[int32]string{ +var MisbehaviorType_name = map[int32]string{ 0: "UNKNOWN", 1: "DUPLICATE_VOTE", 2: "LIGHT_CLIENT_ATTACK", } -var EvidenceType_value = map[string]int32{ +var MisbehaviorType_value = map[string]int32{ "UNKNOWN": 0, "DUPLICATE_VOTE": 1, "LIGHT_CLIENT_ATTACK": 2, } -func (x EvidenceType) String() string { - return proto.EnumName(EvidenceType_name, int32(x)) +func (x MisbehaviorType) String() string { + return proto.EnumName(MisbehaviorType_name, int32(x)) } -func (EvidenceType) EnumDescriptor() ([]byte, []int) { +func (MisbehaviorType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_252557cfdd89a31a, []int{1} } @@ -861,7 +861,7 @@ type RequestBeginBlock struct { Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` LastCommitInfo CommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"` - ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` + ByzantineValidators []Misbehavior `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` } func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} } @@ -918,7 +918,7 @@ func (m *RequestBeginBlock) GetLastCommitInfo() CommitInfo { return CommitInfo{} } -func (m *RequestBeginBlock) GetByzantineValidators() []Evidence { +func (m *RequestBeginBlock) GetByzantineValidators() []Misbehavior { if m != nil { return m.ByzantineValidators } @@ -1314,15 +1314,18 @@ func (m *RequestApplySnapshotChunk) GetSender() string { } type RequestPrepareProposal struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` + // the modified transactions cannot exceed this size. + MaxTxBytes int64 `protobuf:"varint,1,opt,name=max_tx_bytes,json=maxTxBytes,proto3" json:"max_tx_bytes,omitempty"` // txs is an array of transactions that will be included in a block, // sent to the app for possible modifications. - Txs [][]byte `protobuf:"bytes,3,rep,name=txs,proto3" json:"txs,omitempty"` - LocalLastCommit ExtendedCommitInfo `protobuf:"bytes,4,opt,name=local_last_commit,json=localLastCommit,proto3" json:"local_last_commit"` - ByzantineValidators []Evidence `protobuf:"bytes,5,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` - // the modified transactions cannot exceed this size. - MaxTxBytes int64 `protobuf:"varint,6,opt,name=max_tx_bytes,json=maxTxBytes,proto3" json:"max_tx_bytes,omitempty"` + Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` + LocalLastCommit ExtendedCommitInfo `protobuf:"bytes,3,opt,name=local_last_commit,json=localLastCommit,proto3" json:"local_last_commit"` + ByzantineValidators []Misbehavior `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` + Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` + Time time.Time `protobuf:"bytes,6,opt,name=time,proto3,stdtime" json:"time"` + NextValidatorsHash []byte `protobuf:"bytes,7,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` + // address of the public key of the validator proposing the block. + ProposerAddress []byte `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` } func (m *RequestPrepareProposal) Reset() { *m = RequestPrepareProposal{} } @@ -1358,18 +1361,11 @@ func (m *RequestPrepareProposal) XXX_DiscardUnknown() { var xxx_messageInfo_RequestPrepareProposal proto.InternalMessageInfo -func (m *RequestPrepareProposal) GetHash() []byte { +func (m *RequestPrepareProposal) GetMaxTxBytes() int64 { if m != nil { - return m.Hash + return m.MaxTxBytes } - return nil -} - -func (m *RequestPrepareProposal) GetHeader() types1.Header { - if m != nil { - return m.Header - } - return types1.Header{} + return 0 } func (m *RequestPrepareProposal) GetTxs() [][]byte { @@ -1386,26 +1382,52 @@ func (m *RequestPrepareProposal) GetLocalLastCommit() ExtendedCommitInfo { return ExtendedCommitInfo{} } -func (m *RequestPrepareProposal) GetByzantineValidators() []Evidence { +func (m *RequestPrepareProposal) GetByzantineValidators() []Misbehavior { if m != nil { return m.ByzantineValidators } return nil } -func (m *RequestPrepareProposal) GetMaxTxBytes() int64 { +func (m *RequestPrepareProposal) GetHeight() int64 { if m != nil { - return m.MaxTxBytes + return m.Height } return 0 } +func (m *RequestPrepareProposal) GetTime() time.Time { + if m != nil { + return m.Time + } + return time.Time{} +} + +func (m *RequestPrepareProposal) GetNextValidatorsHash() []byte { + if m != nil { + return m.NextValidatorsHash + } + return nil +} + +func (m *RequestPrepareProposal) GetProposerAddress() []byte { + if m != nil { + return m.ProposerAddress + } + return nil +} + type RequestProcessProposal struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` - Txs [][]byte `protobuf:"bytes,3,rep,name=txs,proto3" json:"txs,omitempty"` - ProposedLastCommit CommitInfo `protobuf:"bytes,4,opt,name=proposed_last_commit,json=proposedLastCommit,proto3" json:"proposed_last_commit"` - ByzantineValidators []Evidence `protobuf:"bytes,5,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` + Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` + ProposedLastCommit CommitInfo `protobuf:"bytes,2,opt,name=proposed_last_commit,json=proposedLastCommit,proto3" json:"proposed_last_commit"` + ByzantineValidators []Misbehavior `protobuf:"bytes,3,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` + // hash is the merkle root hash of the fields of the proposed block. + Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` + Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` + Time time.Time `protobuf:"bytes,6,opt,name=time,proto3,stdtime" json:"time"` + NextValidatorsHash []byte `protobuf:"bytes,7,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` + // address of the public key of the original proposer of the block. + ProposerAddress []byte `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` } func (m *RequestProcessProposal) Reset() { *m = RequestProcessProposal{} } @@ -1441,20 +1463,6 @@ func (m *RequestProcessProposal) XXX_DiscardUnknown() { var xxx_messageInfo_RequestProcessProposal proto.InternalMessageInfo -func (m *RequestProcessProposal) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *RequestProcessProposal) GetHeader() types1.Header { - if m != nil { - return m.Header - } - return types1.Header{} -} - func (m *RequestProcessProposal) GetTxs() [][]byte { if m != nil { return m.Txs @@ -1469,13 +1477,48 @@ func (m *RequestProcessProposal) GetProposedLastCommit() CommitInfo { return CommitInfo{} } -func (m *RequestProcessProposal) GetByzantineValidators() []Evidence { +func (m *RequestProcessProposal) GetByzantineValidators() []Misbehavior { if m != nil { return m.ByzantineValidators } return nil } +func (m *RequestProcessProposal) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *RequestProcessProposal) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *RequestProcessProposal) GetTime() time.Time { + if m != nil { + return m.Time + } + return time.Time{} +} + +func (m *RequestProcessProposal) GetNextValidatorsHash() []byte { + if m != nil { + return m.NextValidatorsHash + } + return nil +} + +func (m *RequestProcessProposal) GetProposerAddress() []byte { + if m != nil { + return m.ProposerAddress + } + return nil +} + // Extends a vote with application-side injection type RequestExtendVote struct { Vote *types1.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` @@ -1567,11 +1610,16 @@ func (m *RequestVerifyVoteExtension) GetVote() *types1.Vote { } type RequestFinalizeBlock struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` - Txs [][]byte `protobuf:"bytes,3,rep,name=txs,proto3" json:"txs,omitempty"` - DecidedLastCommit CommitInfo `protobuf:"bytes,4,opt,name=decided_last_commit,json=decidedLastCommit,proto3" json:"decided_last_commit"` - ByzantineValidators []Evidence `protobuf:"bytes,5,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` + Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` + DecidedLastCommit CommitInfo `protobuf:"bytes,2,opt,name=decided_last_commit,json=decidedLastCommit,proto3" json:"decided_last_commit"` + ByzantineValidators []Misbehavior `protobuf:"bytes,3,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` + // hash is the merkle root hash of the fields of the proposed block. + Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` + Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` + Time time.Time `protobuf:"bytes,6,opt,name=time,proto3,stdtime" json:"time"` + NextValidatorsHash []byte `protobuf:"bytes,7,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` + // proposer_address is the address of the public key of the original proposer of the block. + ProposerAddress []byte `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` } func (m *RequestFinalizeBlock) Reset() { *m = RequestFinalizeBlock{} } @@ -1607,20 +1655,6 @@ func (m *RequestFinalizeBlock) XXX_DiscardUnknown() { var xxx_messageInfo_RequestFinalizeBlock proto.InternalMessageInfo -func (m *RequestFinalizeBlock) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *RequestFinalizeBlock) GetHeader() types1.Header { - if m != nil { - return m.Header - } - return types1.Header{} -} - func (m *RequestFinalizeBlock) GetTxs() [][]byte { if m != nil { return m.Txs @@ -1635,13 +1669,48 @@ func (m *RequestFinalizeBlock) GetDecidedLastCommit() CommitInfo { return CommitInfo{} } -func (m *RequestFinalizeBlock) GetByzantineValidators() []Evidence { +func (m *RequestFinalizeBlock) GetByzantineValidators() []Misbehavior { if m != nil { return m.ByzantineValidators } return nil } +func (m *RequestFinalizeBlock) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *RequestFinalizeBlock) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *RequestFinalizeBlock) GetTime() time.Time { + if m != nil { + return m.Time + } + return time.Time{} +} + +func (m *RequestFinalizeBlock) GetNextValidatorsHash() []byte { + if m != nil { + return m.NextValidatorsHash + } + return nil +} + +func (m *RequestFinalizeBlock) GetProposerAddress() []byte { + if m != nil { + return m.ProposerAddress + } + return nil +} + type Response struct { // Types that are valid to be assigned to Value: // *Response_Exception @@ -3899,8 +3968,8 @@ func (m *ExtendedVoteInfo) GetVoteExtension() []byte { return nil } -type Evidence struct { - Type EvidenceType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.EvidenceType" json:"type,omitempty"` +type Misbehavior struct { + Type MisbehaviorType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.MisbehaviorType" json:"type,omitempty"` // The offending validator Validator Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator"` // The height when the offense occurred @@ -3913,18 +3982,18 @@ type Evidence struct { TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` } -func (m *Evidence) Reset() { *m = Evidence{} } -func (m *Evidence) String() string { return proto.CompactTextString(m) } -func (*Evidence) ProtoMessage() {} -func (*Evidence) Descriptor() ([]byte, []int) { +func (m *Misbehavior) Reset() { *m = Misbehavior{} } +func (m *Misbehavior) String() string { return proto.CompactTextString(m) } +func (*Misbehavior) ProtoMessage() {} +func (*Misbehavior) Descriptor() ([]byte, []int) { return fileDescriptor_252557cfdd89a31a, []int{52} } -func (m *Evidence) XXX_Unmarshal(b []byte) error { +func (m *Misbehavior) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Misbehavior) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Evidence.Marshal(b, m, deterministic) + return xxx_messageInfo_Misbehavior.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -3934,47 +4003,47 @@ func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Evidence) XXX_Merge(src proto.Message) { - xxx_messageInfo_Evidence.Merge(m, src) +func (m *Misbehavior) XXX_Merge(src proto.Message) { + xxx_messageInfo_Misbehavior.Merge(m, src) } -func (m *Evidence) XXX_Size() int { +func (m *Misbehavior) XXX_Size() int { return m.Size() } -func (m *Evidence) XXX_DiscardUnknown() { - xxx_messageInfo_Evidence.DiscardUnknown(m) +func (m *Misbehavior) XXX_DiscardUnknown() { + xxx_messageInfo_Misbehavior.DiscardUnknown(m) } -var xxx_messageInfo_Evidence proto.InternalMessageInfo +var xxx_messageInfo_Misbehavior proto.InternalMessageInfo -func (m *Evidence) GetType() EvidenceType { +func (m *Misbehavior) GetType() MisbehaviorType { if m != nil { return m.Type } - return EvidenceType_UNKNOWN + return MisbehaviorType_UNKNOWN } -func (m *Evidence) GetValidator() Validator { +func (m *Misbehavior) GetValidator() Validator { if m != nil { return m.Validator } return Validator{} } -func (m *Evidence) GetHeight() int64 { +func (m *Misbehavior) GetHeight() int64 { if m != nil { return m.Height } return 0 } -func (m *Evidence) GetTime() time.Time { +func (m *Misbehavior) GetTime() time.Time { if m != nil { return m.Time } return time.Time{} } -func (m *Evidence) GetTotalVotingPower() int64 { +func (m *Misbehavior) GetTotalVotingPower() int64 { if m != nil { return m.TotalVotingPower } @@ -4059,7 +4128,7 @@ func (m *Snapshot) GetMetadata() []byte { func init() { proto.RegisterEnum("tendermint.abci.CheckTxType", CheckTxType_name, CheckTxType_value) - proto.RegisterEnum("tendermint.abci.EvidenceType", EvidenceType_name, EvidenceType_value) + proto.RegisterEnum("tendermint.abci.MisbehaviorType", MisbehaviorType_name, MisbehaviorType_value) proto.RegisterEnum("tendermint.abci.ResponseOfferSnapshot_Result", ResponseOfferSnapshot_Result_name, ResponseOfferSnapshot_Result_value) proto.RegisterEnum("tendermint.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value) proto.RegisterEnum("tendermint.abci.ResponseProcessProposal_ProposalStatus", ResponseProcessProposal_ProposalStatus_name, ResponseProcessProposal_ProposalStatus_value) @@ -4117,226 +4186,230 @@ func init() { proto.RegisterType((*ValidatorUpdate)(nil), "tendermint.abci.ValidatorUpdate") proto.RegisterType((*VoteInfo)(nil), "tendermint.abci.VoteInfo") proto.RegisterType((*ExtendedVoteInfo)(nil), "tendermint.abci.ExtendedVoteInfo") - proto.RegisterType((*Evidence)(nil), "tendermint.abci.Evidence") + proto.RegisterType((*Misbehavior)(nil), "tendermint.abci.Misbehavior") proto.RegisterType((*Snapshot)(nil), "tendermint.abci.Snapshot") } func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) } var fileDescriptor_252557cfdd89a31a = []byte{ - // 3386 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcd, 0x73, 0x1c, 0xd5, - 0x11, 0xdf, 0xef, 0x8f, 0xde, 0x4f, 0x3d, 0x09, 0xb3, 0x5e, 0x6c, 0xc9, 0x8c, 0x0b, 0x30, 0x06, - 0xe4, 0x60, 0x97, 0xc1, 0x04, 0x08, 0x25, 0xad, 0x56, 0xac, 0x6c, 0x59, 0x12, 0xa3, 0x95, 0x28, - 0x12, 0xe2, 0x61, 0xb4, 0xf3, 0xa4, 0x1d, 0xbc, 0x3b, 0x33, 0xcc, 0xcc, 0x8a, 0x15, 0xa7, 0x54, - 0xaa, 0xb8, 0x50, 0xa9, 0x0a, 0xb7, 0xa4, 0x2a, 0x45, 0xe5, 0x92, 0x54, 0xe5, 0x4f, 0xc8, 0x29, - 0x97, 0xe4, 0xc0, 0x21, 0x07, 0x4e, 0x49, 0x2a, 0x07, 0x92, 0x82, 0x5b, 0xfe, 0x81, 0x9c, 0xf2, - 0x51, 0xef, 0x63, 0x3e, 0x77, 0x67, 0x3f, 0xb0, 0xcd, 0x25, 0xb9, 0xcd, 0xeb, 0xed, 0xee, 0x99, - 0xd7, 0xaf, 0x5f, 0x77, 0xff, 0xfa, 0xbd, 0x85, 0x27, 0x6c, 0xac, 0x29, 0xd8, 0xec, 0x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7, 0x62, 0x62, 0xa9, 0xe7, 0x27, 0x10, - 0x7d, 0xfa, 0xf1, 0x31, 0x36, 0x5d, 0x85, 0xb5, 0xe2, 0x64, 0x7d, 0xbb, 0x84, 0xdb, 0x91, 0x27, - 0xfa, 0x74, 0x3f, 0x01, 0xfd, 0x00, 0x16, 0x7b, 0xba, 0xac, 0xb8, 0xea, 0xa4, 0x4e, 0x77, 0xa0, - 0xdd, 0xaf, 0x95, 0xa8, 0xd2, 0x67, 0x23, 0x3f, 0x52, 0x97, 0x15, 0x47, 0x45, 0x83, 0x08, 0xb4, - 0x62, 0xe2, 0x42, 0x2f, 0x4c, 0x44, 0xf7, 0x60, 0x49, 0x36, 0x8c, 0xde, 0x59, 0x58, 0x7b, 0x99, - 0x6a, 0xbf, 0x1a, 0xa5, 0x7d, 0x8d, 0xc8, 0x84, 0xd5, 0x23, 0x79, 0x84, 0x8a, 0xda, 0x50, 0x35, - 0x4c, 0x6c, 0xc8, 0x26, 0x96, 0x0c, 0x53, 0x37, 0x74, 0x4b, 0xee, 0xd5, 0x2a, 0x54, 0xf7, 0x33, - 0x51, 0xba, 0xf7, 0x18, 0xff, 0x1e, 0x67, 0x6f, 0xc5, 0xc4, 0x8a, 0x11, 0x24, 0x31, 0xad, 0x7a, - 0x07, 0x5b, 0x96, 0xa7, 0xb5, 0x3a, 0x4d, 0x2b, 0xe5, 0x0f, 0x6a, 0x0d, 0x90, 0x50, 0x13, 0x0a, - 0x78, 0x48, 0xc4, 0xa5, 0x53, 0xdd, 0xc6, 0xb5, 0x85, 0xc9, 0x1b, 0xab, 0x49, 0x59, 0x0f, 0x75, - 0x1b, 0x93, 0x4d, 0x85, 0xdd, 0x11, 0x92, 0xe1, 0xb1, 0x53, 0x6c, 0xaa, 0xc7, 0x67, 0x54, 0x8d, - 0x44, 0x7f, 0xb1, 0x54, 0x5d, 0xab, 0x21, 0xaa, 0xf0, 0xb9, 0x28, 0x85, 0x87, 0x54, 0x88, 0xa8, - 0x68, 0x3a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xda, 0x86, 0x6a, 0x47, 0xd7, 0x2c, 0xac, 0x59, - 0x03, 0x4b, 0x62, 0x89, 0x90, 0x27, 0x93, 0x40, 0x38, 0x64, 0xe9, 0xb5, 0xe1, 0x70, 0xee, 0x51, - 0x46, 0xb1, 0xd2, 0x09, 0x12, 0x48, 0x58, 0x3d, 0x95, 0x7b, 0xaa, 0x22, 0xdb, 0xba, 0x69, 0xd5, - 0x52, 0x97, 0x92, 0x63, 0xe3, 0xe1, 0xa1, 0xc3, 0x72, 0x60, 0x28, 0xb2, 0x8d, 0xd7, 0x53, 0xe4, - 0x73, 0x45, 0x9f, 0x24, 0x7a, 0x1a, 0x2a, 0xb2, 0x61, 0x48, 0x96, 0x2d, 0xdb, 0x58, 0x3a, 0x3a, - 0xb3, 0xb1, 0x45, 0x13, 0x4d, 0x51, 0x2c, 0xc9, 0x86, 0xb1, 0x4f, 0xa8, 0xeb, 0x84, 0x88, 0x9e, - 0x82, 0x32, 0xc9, 0x49, 0xaa, 0xdc, 0x93, 0xba, 0x58, 0x3d, 0xe9, 0xda, 0x34, 0xa5, 0x24, 0xc5, - 0x12, 0xa7, 0xb6, 0x28, 0x51, 0x50, 0xdc, 0x15, 0xa7, 0xf9, 0x08, 0x21, 0x48, 0x29, 0xb2, 0x2d, - 0x53, 0x4b, 0x16, 0x45, 0xfa, 0x4c, 0x68, 0x86, 0x6c, 0x77, 0xb9, 0x7d, 0xe8, 0x33, 0x3a, 0x07, - 0x19, 0xae, 0x36, 0x49, 0xd5, 0xf2, 0x11, 0x5a, 0x82, 0xb4, 0x61, 0xea, 0xa7, 0x98, 0x2e, 0x5d, - 0x4e, 0x64, 0x03, 0xe1, 0x47, 0x09, 0x58, 0x18, 0xc9, 0x5c, 0x44, 0x6f, 0x57, 0xb6, 0xba, 0xce, - 0xbb, 0xc8, 0x33, 0x7a, 0x89, 0xe8, 0x95, 0x15, 0x6c, 0xf2, 0x6c, 0x5f, 0x1b, 0x35, 0x75, 0x8b, - 0xfe, 0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0x78, - 0xa9, 0xde, 0x82, 0x45, 0x05, 0x77, 0x54, 0xe5, 0x9b, 0xae, 0xd4, 0x02, 0x97, 0x7e, 0xc4, 0x0b, - 0xf5, 0xe7, 0x02, 0xe4, 0x44, 0x6c, 0x19, 0xa4, 0x40, 0x40, 0xeb, 0x90, 0xc7, 0xc3, 0x0e, 0x36, - 0x6c, 0xa7, 0xa6, 0x1a, 0x5f, 0x9b, 0x32, 0xee, 0xa6, 0xc3, 0x49, 0x90, 0x96, 0x2b, 0x86, 0x6e, - 0x70, 0x50, 0x1d, 0x8d, 0x8f, 0xb9, 0xb8, 0x1f, 0x55, 0xbf, 0xe4, 0xa0, 0xea, 0x64, 0x24, 0xb0, - 0x62, 0x52, 0x21, 0x58, 0x7d, 0x83, 0xc3, 0xea, 0xd4, 0x94, 0x97, 0x05, 0x70, 0x75, 0x23, 0x80, - 0xab, 0xd3, 0x53, 0xa6, 0x19, 0x01, 0xac, 0x5f, 0x72, 0x80, 0x75, 0x66, 0xca, 0x17, 0x87, 0x90, - 0xf5, 0xed, 0x20, 0xb2, 0xce, 0x46, 0x44, 0x40, 0x47, 0x7a, 0x22, 0xb4, 0x7e, 0xdd, 0x07, 0xad, - 0x73, 0x91, 0x98, 0x96, 0x29, 0x1a, 0x83, 0xad, 0xdf, 0x0c, 0x60, 0xeb, 0xfc, 0x14, 0x3b, 0x4c, - 0x00, 0xd7, 0x1b, 0x7e, 0x70, 0x0d, 0x91, 0x18, 0x9d, 0xaf, 0x7b, 0x14, 0xba, 0x7e, 0xc5, 0x45, - 0xd7, 0x85, 0xc8, 0x36, 0x01, 0x9f, 0x4b, 0x18, 0x5e, 0xef, 0x8e, 0xc0, 0x6b, 0x06, 0x87, 0x9f, - 0x8e, 0x54, 0x31, 0x05, 0x5f, 0xef, 0x8e, 0xe0, 0xeb, 0xd2, 0x14, 0x85, 0x53, 0x00, 0xf6, 0xbb, - 0xe3, 0x01, 0x76, 0x34, 0x04, 0xe6, 0x9f, 0x39, 0x1b, 0xc2, 0x96, 0x22, 0x10, 0x76, 0x25, 0x12, - 0x0d, 0x32, 0xf5, 0x33, 0x43, 0xec, 0x83, 0x31, 0x10, 0x9b, 0x81, 0xe1, 0x2b, 0x91, 0xca, 0x67, - 0xc0, 0xd8, 0x07, 0x63, 0x30, 0xf6, 0xc2, 0x54, 0xb5, 0x53, 0x41, 0xf6, 0x66, 0x10, 0x64, 0xa3, - 0x29, 0x7b, 0x2c, 0x12, 0x65, 0x1f, 0x45, 0xa1, 0x6c, 0x86, 0x84, 0x9f, 0x8f, 0xd4, 0x38, 0x07, - 0xcc, 0xde, 0x1d, 0x81, 0xd9, 0x4b, 0x53, 0x3c, 0x6d, 0x56, 0x9c, 0xfd, 0x2c, 0x49, 0xc1, 0xa1, - 0x50, 0x4d, 0xaa, 0x45, 0x6c, 0x9a, 0xba, 0xc9, 0x11, 0x33, 0x1b, 0x08, 0x57, 0x08, 0xee, 0xf2, - 0xc2, 0xf2, 0x04, 0x4c, 0x4e, 0xab, 0x72, 0x5f, 0x28, 0x16, 0x7e, 0x1b, 0xf7, 0x64, 0x29, 0x5c, - 0xf1, 0x63, 0xb6, 0x3c, 0xc7, 0x6c, 0x3e, 0xa4, 0x9e, 0x08, 0x22, 0xf5, 0x15, 0x28, 0x90, 0x6a, - 0x3b, 0x04, 0xc2, 0x65, 0xc3, 0x05, 0xe1, 0x57, 0x61, 0x81, 0xa6, 0x4f, 0x86, 0xe7, 0x79, 0x89, - 0x9d, 0xa2, 0x15, 0x59, 0x85, 0xfc, 0xc0, 0xac, 0xc0, 0x6a, 0xed, 0x17, 0x60, 0xd1, 0xc7, 0xeb, - 0x56, 0xf1, 0x0c, 0x91, 0x56, 0x5d, 0xee, 0x35, 0x5e, 0xce, 0xff, 0x21, 0xee, 0x59, 0xc8, 0x43, - 0xef, 0xe3, 0x80, 0x76, 0xfc, 0x21, 0x01, 0xed, 0xc4, 0x37, 0x06, 0xda, 0x7e, 0x54, 0x92, 0x0c, - 0xa2, 0x92,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e, 0x52, 0x08, 0x36, 0x18, 0x1f, - 0x5a, 0x25, 0x1a, 0x72, 0xc4, 0xc4, 0x9c, 0x8e, 0x38, 0xb6, 0x9a, 0x48, 0x3e, 0xba, 0x6a, 0x22, - 0xf5, 0x80, 0xd5, 0x84, 0x7f, 0x47, 0xa6, 0x83, 0x3b, 0x72, 0x24, 0xf1, 0x67, 0xc6, 0x24, 0xfe, - 0x77, 0x00, 0x7c, 0xe7, 0x67, 0x4b, 0x90, 0x36, 0xf5, 0x81, 0xa6, 0x50, 0x37, 0x49, 0x8b, 0x6c, - 0x80, 0x6e, 0x42, 0x9a, 0xb8, 0x9b, 0x63, 0xcc, 0xd1, 0xd0, 0x4c, 0xdc, 0xc5, 0xd7, 0x8e, 0x65, - 0xdc, 0x82, 0x0a, 0x68, 0xf4, 0x70, 0x22, 0xe2, 0x15, 0xaf, 0x07, 0x5f, 0xf1, 0x64, 0xe4, 0x31, - 0xc7, 0xf8, 0x57, 0x7d, 0x04, 0x69, 0xea, 0x1e, 0xa4, 0x00, 0xa2, 0x47, 0x71, 0x1c, 0x51, 0x93, - 0x67, 0xf4, 0x43, 0x00, 0xd9, 0xb6, 0x4d, 0xf5, 0x68, 0xe0, 0xbd, 0x60, 0x65, 0xbc, 0x7b, 0xad, - 0x39, 0x7c, 0xeb, 0x17, 0xb8, 0x9f, 0x2d, 0x79, 0xa2, 0x3e, 0x5f, 0xf3, 0x29, 0x14, 0x76, 0xa0, - 0x1c, 0x94, 0x75, 0x30, 0x20, 0xfb, 0x86, 0x20, 0x06, 0x64, 0x90, 0x9e, 0x63, 0x40, 0x17, 0x41, - 0x26, 0xd9, 0x91, 0x2b, 0x1d, 0x08, 0xff, 0x8e, 0x43, 0xd1, 0xef, 0x9d, 0xff, 0x6b, 0x30, 0x4a, - 0xf8, 0x38, 0x0e, 0x39, 0x77, 0xf2, 0x11, 0x47, 0x9e, 0x9e, 0xed, 0x12, 0xfe, 0x03, 0x3e, 0x76, - 0x86, 0x9a, 0x74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 0x68, 0x1f, 0x65, 0xf6, 0xfb, 0xb2, 0xf5, 0x39, 0x4e, 0xfe, 0x50, 0x1f, 0xd0, 0x98, 0xfe, - 0xcb, 0x1c, 0xd7, 0x67, 0xeb, 0xf3, 0x1c, 0x04, 0x22, 0x05, 0x2a, 0xe1, 0x9e, 0xc6, 0xac, 0xd7, - 0x69, 0xeb, 0x33, 0x1f, 0x0a, 0xb2, 0xb7, 0x04, 0x01, 0xfe, 0xac, 0xd7, 0x6b, 0xeb, 0x33, 0x9f, - 0x11, 0xa2, 0x03, 0x00, 0x1f, 0x40, 0x9d, 0xe1, 0xba, 0x6d, 0x7d, 0x96, 0xd3, 0x42, 0x64, 0xc0, - 0xe2, 0x38, 0x60, 0x3a, 0xcf, 0xed, 0xdb, 0xfa, 0x5c, 0x87, 0x88, 0xc4, 0x9f, 0x83, 0x10, 0x73, - 0xb6, 0xdb, 0xb8, 0xf5, 0x19, 0x4f, 0x13, 0xd7, 0x9b, 0x9f, 0x7f, 0xb5, 0x1c, 0xff, 0xe2, 0xab, - 0xe5, 0xf8, 0xdf, 0xbf, 0x5a, 0x8e, 0x7f, 0xfa, 0xf5, 0x72, 0xec, 0x8b, 0xaf, 0x97, 0x63, 0x7f, - 0xf9, 0x7a, 0x39, 0xf6, 0xfd, 0xe7, 0x4e, 0x54, 0xbb, 0x3b, 0x38, 0x5a, 0xed, 0xe8, 0xfd, 0x6b, - 0xfe, 0x3f, 0x66, 0x8c, 0xfb, 0xb3, 0xc8, 0x51, 0x86, 0x66, 0xd3, 0x1b, 0xff, 0x0d, 0x00, 0x00, - 0xff, 0xff, 0x07, 0x27, 0x03, 0x70, 0x4c, 0x32, 0x00, 0x00, + // 3451 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x4b, 0x73, 0x23, 0xd5, + 0xf5, 0xd7, 0xfb, 0x71, 0x64, 0x3d, 0x7c, 0x6d,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48, 0x58, 0x23, 0x3e, 0xff, 0x84, + 0x35, 0x42, 0xcf, 0x41, 0x8a, 0xcc, 0x91, 0xce, 0xbd, 0x34, 0xe1, 0x45, 0x5c, 0xae, 0x75, 0xa6, + 0x63, 0x91, 0x72, 0x0a, 0x82, 0x73, 0x1a, 0x9c, 0x50, 0x1c, 0xd4, 0x2a, 0x5c, 0x85, 0x72, 0x20, + 0xce, 0x7a, 0xb6, 0x2f, 0xee, 0xdd, 0x3e, 0xa1, 0x0c, 0x45, 0x5f, 0x40, 0x15, 0xce, 0xc1, 0xf2, + 0xa4, 0xf8, 0x28, 0x74, 0x1d, 0xba, 0x2f, 0xce, 0xa1, 0x5b, 0x90, 0x73, 0x02, 0x24, 0x3b, 0x8d, + 0xe7, 0xc7, 0x66, 0x61, 0x33, 0x8b, 0x0e, 0x2b, 0x39, 0x86, 0xc4, 0xaa, 0xa9, 0x39, 0x24, 0xe8, + 0x87, 0x67, 0x65, 0x5d, 0x6f, 0xca, 0x66, 0x57, 0x78, 0x1b, 0xaa, 0x61, 0xc1, 0x2f, 0x30, 0x8d, + 0x94, 0x63, 0x85, 0xe7, 0x20, 0x73, 0xac, 0x19, 0x7d, 0xd9, 0xa2, 0xca, 0x8a, 0x22, 0x1f, 0x11, + 0xeb, 0x64, 0x81, 0x30, 0x49, 0xc9, 0x6c, 0x20, 0x48, 0x70, 0x3e, 0x34, 0x00, 0x12, 0x11, 0x75, + 0xa0, 0x60, 0xb6, 0x9e, 0x45, 0x91, 0x0d, 0x5c, 0x45, 0xec, 0x63, 0xd9, 0x80, 0xbc, 0xd6, 0xa4, + 0x73, 0xa5, 0xfa, 0xf3, 0x22, 0x1f, 0x09, 0xbf, 0x4d, 0xc2, 0xb9, 0xc9, 0x61, 0x10, 0x5d, 0x82, + 0x85, 0xbe, 0x3c, 0x92, 0xac, 0x11, 0x3f, 0xcb, 0x6c, 0x3b, 0xa0, 0x2f, 0x8f, 0x5a, 0x23, 0x76, + 0x90, 0x2b, 0x90, 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 0xf0, 0xcf, 0x8c, 0x06, 0x5f, 0x48, 0x21, 0xf0, 0x45, 0x39, 0xb4, 0xd4, 0x66, 0xea, 0x23, 0xe3, + 0x17, 0x87, 0x13, 0xf0, 0x0b, 0x86, 0x34, 0x5c, 0x09, 0x55, 0x1e, 0x01, 0xc0, 0x38, 0x9c, 0x00, + 0x60, 0x2c, 0xce, 0x54, 0x3b, 0x13, 0xc1, 0xd8, 0xf2, 0x23, 0x18, 0x68, 0xc6, 0x19, 0x0b, 0x85, + 0x30, 0xda, 0x61, 0x10, 0x06, 0x83, 0x19, 0x9e, 0x09, 0xd5, 0x38, 0x07, 0x86, 0xb1, 0x37, 0x86, + 0x61, 0x2c, 0xcf, 0xb0, 0xb4, 0xa8, 0x20, 0xc6, 0x55, 0x12, 0xfc, 0x03, 0xae, 0x9a, 0xe4, 0xe1, + 0xd8, 0x30, 0x34, 0x83, 0xc3, 0x11, 0x6c, 0x20, 0x5c, 0x21, 0x45, 0xad, 0xeb, 0x96, 0xa7, 0x00, + 0x1e, 0xb4, 0xde, 0xf1, 0xb8, 0x62, 0xe1, 0x77, 0x71, 0x57, 0x96, 0xd6, 0x82, 0xde, 0x82, 0x38, + 0xcf, 0x0b, 0x62, 0x0f, 0x0c, 0x92, 0xf0, 0xc3, 0x20, 0xab, 0x50, 0x20, 0x75, 0x4c, 0x00, 0xe1, + 0x90, 0x75, 0x07, 0xe1, 0xb8, 0x06, 0x8b, 0x34, 0x09, 0x60, 0x60, 0x09, 0x8f, 0xac, 0x29, 0x1a, + 0x59, 0xcb, 0xe4, 0x01, 0x5b, 0x05, 0x16, 0x62, 0x9f, 0x85, 0x25, 0x0f, 0xaf, 0x53, 0x1f, 0xb1, + 0x72, 0xbf, 0xe2, 0x70, 0xaf, 0xf3, 0x42, 0xe9, 0x0f, 0x71, 0x77, 0x85, 0x5c, 0x68, 0x64, 0x12, + 0x8a, 0x11, 0xff, 0x9a, 0x50, 0x8c, 0xc4, 0x57, 0x46, 0x31, 0xbc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 0xea, 0x14, 0xd0, 0xcd, 0xe5, 0x15, 0x7e, 0x1f, 0x77, 0x55, + 0xfa, 0x61, 0xbc, 0x06, 0x64, 0x0c, 0x6c, 0x0e, 0x7b, 0x0c, 0x58, 0x2b, 0xdd, 0x78, 0x36, 0x5a, + 0xa2, 0x48, 0xa8, 0xc3, 0x9e, 0x25, 0x72, 0x61, 0xe1, 0x3e, 0x64, 0x18, 0x05, 0x15, 0x20, 0x7b, + 0xb8, 0x7b, 0x77, 0x77, 0xef, 0x8d, 0xdd, 0x4a, 0x0c, 0x01, 0x64, 0xd6, 0xeb, 0xf5, 0xc6, 0x7e, + 0xab, 0x12, 0x47, 0x79, 0x48, 0xaf, 0x6f, 0xec, 0x89, 0xad, 0x4a, 0x82, 0x90, 0xc5, 0xc6, 0x9d, + 0x46, 0xbd, 0x55, 0x49, 0xa2, 0x45, 0x28, 0xb2, 0xdf, 0xd2, 0xd6, 0x9e, 0x78, 0x6f, 0xbd, 0x55, + 0x49, 0x79, 0x48, 0x07, 0x8d, 0xdd, 0xcd, 0x86, 0x58, 0x49, 0x0b, 0xff, 0x07, 0xe7, 0x43, 0x53, + 0x4b, 0x17, 0xa3, 0x8b, 0x7b, 0x30, 0x3a, 0xe1, 0x17, 0x09, 0xa8, 0x85, 0xe7, 0x8b, 0xe8, 0x4e, + 0x60, 0xe2, 0x37, 0xe6, 0x48, 0x36, 0x03, 0xb3, 0x47, 0x4f, 0x40, 0xc9, 0xc0, 0xc7, 0xd8, 0xea, + 0x74, 0x59, 0xfe, 0xca, 0x02, 0x66, 0x51, 0x2c, 0x72, 0x2a, 0x15, 0x32, 0x19, 0xdb, 0x3b, 0xb8, + 0x63, 0x49, 0xcc, 0x17, 0x31, 0xa3, 0xcb, 0x13, 0x36, 0x42, 0x3d, 0x60, 0x44, 0xe1, 0xed, 0xb9, + 0xd6, 0x32, 0x0f, 0x69, 0xb1, 0xd1, 0x12, 0xdf, 0xac, 0x24, 0x11, 0x82, 0x12, 0xfd, 0x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, 0xb4, 0x00, 0x51, 0x1f, + 0xd0, 0x04, 0x20, 0x66, 0x8e, 0x4b, 0xca, 0xb5, 0x79, 0x3a, 0x82, 0x48, 0x81, 0x72, 0x10, 0xdc, + 0x88, 0x7a, 0x69, 0xb9, 0x16, 0xb9, 0x3b, 0xc8, 0xde, 0xe2, 0xaf, 0xf4, 0xa3, 0x5e, 0x62, 0xae, + 0x45, 0x6e, 0x16, 0xa2, 0x43, 0x00, 0x4f, 0xa5, 0x1a, 0xe1, 0x52, 0x73, 0x2d, 0x4a, 0xdb, 0x10, + 0xe9, 0xb0, 0x34, 0xa9, 0x42, 0x9d, 0xe7, 0x8e, 0x73, 0x6d, 0xae, 0x6e, 0x22, 0xb1, 0x67, 0x7f, + 0xad, 0x19, 0xed, 0xce, 0x73, 0x2d, 0x62, 0x5b, 0x71, 0xa3, 0xf1, 0xe9, 0x17, 0x2b, 0xf1, 0xcf, + 0xbe, 0x58, 0x89, 0xff, 0xfd, 0x8b, 0x95, 0xf8, 0xc7, 0x5f, 0xae, 0xc4, 0x3e, 0xfb, 0x72, 0x25, + 0xf6, 0x97, 0x2f, 0x57, 0x62, 0x3f, 0x78, 0xfa, 0x44, 0xb5, 0xba, 0xc3, 0xf6, 0x5a, 0x47, 0xeb, + 0x5f, 0xf7, 0xfe, 0xfd, 0x65, 0xd2, 0x5f, 0x72, 0xda, 0x19, 0x1a, 0x50, 0x6f, 0xfe, 0x27, 0x00, + 0x00, 0xff, 0xff, 0xc7, 0x45, 0xe7, 0x5f, 0xb2, 0x33, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5971,10 +6044,32 @@ func (m *RequestPrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.MaxTxBytes != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.MaxTxBytes)) + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x42 + } + if len(m.NextValidatorsHash) > 0 { + i -= len(m.NextValidatorsHash) + copy(dAtA[i:], m.NextValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) + i-- + dAtA[i] = 0x3a + } + n25, err25 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err25 != nil { + return 0, err25 + } + i -= n25 + i = encodeVarintTypes(dAtA, i, uint64(n25)) + i-- + dAtA[i] = 0x32 + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x28 } if len(m.ByzantineValidators) > 0 { for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- { @@ -5987,7 +6082,7 @@ func (m *RequestPrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } } { @@ -5999,32 +6094,20 @@ func (m *RequestPrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a if len(m.Txs) > 0 { for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Txs[iNdEx]) copy(dAtA[i:], m.Txs[iNdEx]) i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + if m.MaxTxBytes != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.MaxTxBytes)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -6049,6 +6132,40 @@ func (m *RequestProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x42 + } + if len(m.NextValidatorsHash) > 0 { + i -= len(m.NextValidatorsHash) + copy(dAtA[i:], m.NextValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) + i-- + dAtA[i] = 0x3a + } + n27, err27 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err27 != nil { + return 0, err27 + } + i -= n27 + i = encodeVarintTypes(dAtA, i, uint64(n27)) + i-- + dAtA[i] = 0x32 + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x28 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x22 + } if len(m.ByzantineValidators) > 0 { for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- { { @@ -6060,7 +6177,7 @@ func (m *RequestProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x1a } } { @@ -6072,33 +6189,16 @@ func (m *RequestProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 if len(m.Txs) > 0 { for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Txs[iNdEx]) copy(dAtA[i:], m.Txs[iNdEx]) i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0xa } } - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -6192,6 +6292,40 @@ func (m *RequestFinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x42 + } + if len(m.NextValidatorsHash) > 0 { + i -= len(m.NextValidatorsHash) + copy(dAtA[i:], m.NextValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) + i-- + dAtA[i] = 0x3a + } + n31, err31 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err31 != nil { + return 0, err31 + } + i -= n31 + i = encodeVarintTypes(dAtA, i, uint64(n31)) + i-- + dAtA[i] = 0x32 + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x28 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x22 + } if len(m.ByzantineValidators) > 0 { for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- { { @@ -6203,7 +6337,7 @@ func (m *RequestFinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x1a } } { @@ -6215,33 +6349,16 @@ func (m *RequestFinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 if len(m.Txs) > 0 { for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Txs[iNdEx]) copy(dAtA[i:], m.Txs[iNdEx]) i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0xa } } - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -8266,7 +8383,7 @@ func (m *ExtendedVoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Evidence) Marshal() (dAtA []byte, err error) { +func (m *Misbehavior) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -8276,12 +8393,12 @@ func (m *Evidence) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { +func (m *Misbehavior) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Misbehavior) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -8868,12 +8985,9 @@ func (m *RequestPrepareProposal) Size() (n int) { } var l int _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + if m.MaxTxBytes != 0 { + n += 1 + sovTypes(uint64(m.MaxTxBytes)) } - l = m.Header.Size() - n += 1 + l + sovTypes(uint64(l)) if len(m.Txs) > 0 { for _, b := range m.Txs { l = len(b) @@ -8888,8 +9002,18 @@ func (m *RequestPrepareProposal) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } - if m.MaxTxBytes != 0 { - n += 1 + sovTypes(uint64(m.MaxTxBytes)) + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + n += 1 + l + sovTypes(uint64(l)) + l = len(m.NextValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } return n } @@ -8900,12 +9024,6 @@ func (m *RequestProcessProposal) Size() (n int) { } var l int _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = m.Header.Size() - n += 1 + l + sovTypes(uint64(l)) if len(m.Txs) > 0 { for _, b := range m.Txs { l = len(b) @@ -8920,6 +9038,23 @@ func (m *RequestProcessProposal) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + n += 1 + l + sovTypes(uint64(l)) + l = len(m.NextValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -8955,12 +9090,6 @@ func (m *RequestFinalizeBlock) Size() (n int) { } var l int _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = m.Header.Size() - n += 1 + l + sovTypes(uint64(l)) if len(m.Txs) > 0 { for _, b := range m.Txs { l = len(b) @@ -8975,6 +9104,23 @@ func (m *RequestFinalizeBlock) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + n += 1 + l + sovTypes(uint64(l)) + l = len(m.NextValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -9913,7 +10059,7 @@ func (m *ExtendedVoteInfo) Size() (n int) { return n } -func (m *Evidence) Size() (n int) { +func (m *Misbehavior) Size() (n int) { if m == nil { return 0 } @@ -11517,7 +11663,7 @@ func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ByzantineValidators = append(m.ByzantineValidators, Evidence{}) + m.ByzantineValidators = append(m.ByzantineValidators, Misbehavior{}) if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -12291,10 +12437,10 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxTxBytes", wireType) } - var byteLen int + m.MaxTxBytes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -12304,60 +12450,12 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + m.MaxTxBytes |= int64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) } @@ -12389,7 +12487,7 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LocalLastCommit", wireType) } @@ -12422,7 +12520,7 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType) } @@ -12451,16 +12549,16 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ByzantineValidators = append(m.ByzantineValidators, Evidence{}) + m.ByzantineValidators = append(m.ByzantineValidators, Misbehavior{}) if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxTxBytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } - m.MaxTxBytes = 0 + m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -12470,11 +12568,112 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxTxBytes |= int64(b&0x7F) << shift + m.Height |= int64(b&0x7F) << shift if b < 0x80 { break } } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.NextValidatorsHash == nil { + m.NextValidatorsHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -12526,73 +12725,6 @@ func (m *RequestProcessProposal) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) } @@ -12624,7 +12756,7 @@ func (m *RequestProcessProposal) Unmarshal(dAtA []byte) error { m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProposedLastCommit", wireType) } @@ -12657,7 +12789,7 @@ func (m *RequestProcessProposal) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType) } @@ -12686,11 +12818,165 @@ func (m *RequestProcessProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ByzantineValidators = append(m.ByzantineValidators, Evidence{}) + m.ByzantineValidators = append(m.ByzantineValidators, Misbehavior{}) if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.NextValidatorsHash == nil { + m.NextValidatorsHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -12914,73 +13200,6 @@ func (m *RequestFinalizeBlock) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) } @@ -13012,7 +13231,7 @@ func (m *RequestFinalizeBlock) Unmarshal(dAtA []byte) error { m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DecidedLastCommit", wireType) } @@ -13045,7 +13264,7 @@ func (m *RequestFinalizeBlock) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType) } @@ -13074,11 +13293,165 @@ func (m *RequestFinalizeBlock) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ByzantineValidators = append(m.ByzantineValidators, Evidence{}) + m.ByzantineValidators = append(m.ByzantineValidators, Misbehavior{}) if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.NextValidatorsHash == nil { + m.NextValidatorsHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -18346,7 +18719,7 @@ func (m *ExtendedVoteInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *Evidence) Unmarshal(dAtA []byte) error { +func (m *Misbehavior) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18369,10 +18742,10 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Evidence: wiretype end group for non-group") + return fmt.Errorf("proto: Misbehavior: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Misbehavior: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -18389,7 +18762,7 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= EvidenceType(b&0x7F) << shift + m.Type |= MisbehaviorType(b&0x7F) << shift if b < 0x80 { break } diff --git a/internal/state/execution.go b/internal/state/execution.go index ebad71fd3..145251428 100644 --- a/internal/state/execution.go +++ b/internal/state/execution.go @@ -106,12 +106,14 @@ func (blockExec *BlockExecutor) CreateProposalBlock( rpp, err := blockExec.appClient.PrepareProposal( ctx, abci.RequestPrepareProposal{ - Hash: block.Hash(), - Header: *block.Header.ToProto(), + MaxTxBytes: maxDataBytes, Txs: block.Txs.ToSliceOfBytes(), LocalLastCommit: extendedCommitInfo(localLastCommit, votes), ByzantineValidators: block.Evidence.ToABCI(), - MaxTxBytes: maxDataBytes, + Height: block.Height, + Time: block.Time, + NextValidatorsHash: block.NextValidatorsHash, + ProposerAddress: block.ProposerAddress, }, ) if err != nil { @@ -147,10 +149,13 @@ func (blockExec *BlockExecutor) ProcessProposal( ) (bool, error) { req := abci.RequestProcessProposal{ Hash: block.Header.Hash(), - Header: *block.Header.ToProto(), + Height: block.Header.Height, + Time: block.Header.Time, Txs: block.Data.Txs.ToSliceOfBytes(), ProposedLastCommit: buildLastCommitInfo(block, blockExec.store, state.InitialHeight), ByzantineValidators: block.Evidence.ToABCI(), + ProposerAddress: block.ProposerAddress, + NextValidatorsHash: block.NextValidatorsHash, } resp, err := blockExec.appClient.ProcessProposal(ctx, req) @@ -203,15 +208,17 @@ func (blockExec *BlockExecutor) ApplyBlock( return state, ErrInvalidBlock(err) } startTime := time.Now().UnixNano() - pbh := block.Header.ToProto() finalizeBlockResponse, err := blockExec.appClient.FinalizeBlock( ctx, abci.RequestFinalizeBlock{ Hash: block.Hash(), - Header: *pbh, + Height: block.Header.Height, + Time: block.Header.Time, Txs: block.Txs.ToSliceOfBytes(), DecidedLastCommit: buildLastCommitInfo(block, blockExec.store, state.InitialHeight), ByzantineValidators: block.Evidence.ToABCI(), + ProposerAddress: block.ProposerAddress, + NextValidatorsHash: block.NextValidatorsHash, }, ) endTime := time.Now().UnixNano() @@ -600,12 +607,12 @@ func ExecCommitBlock( initialHeight int64, s State, ) ([]byte, error) { - pbh := block.Header.ToProto() finalizeBlockResponse, err := appConn.FinalizeBlock( ctx, abci.RequestFinalizeBlock{ Hash: block.Hash(), - Header: *pbh, + Height: block.Height, + Time: block.Time, Txs: block.Txs.ToSliceOfBytes(), DecidedLastCommit: buildLastCommitInfo(block, store, initialHeight), ByzantineValidators: block.Evidence.ToABCI(), diff --git a/internal/state/execution_test.go b/internal/state/execution_test.go index 3093e2c53..c70286e28 100644 --- a/internal/state/execution_test.go +++ b/internal/state/execution_test.go @@ -216,16 +216,16 @@ func TestFinalizeBlockByzantineValidators(t *testing.T) { ev := []types.Evidence{dve, lcae} - abciEv := []abci.Evidence{ + abciMb := []abci.Misbehavior{ { - Type: abci.EvidenceType_DUPLICATE_VOTE, + Type: abci.MisbehaviorType_DUPLICATE_VOTE, Height: 3, Time: defaultEvidenceTime, Validator: types.TM2PB.Validator(state.Validators.Validators[0]), TotalVotingPower: 10, }, { - Type: abci.EvidenceType_LIGHT_CLIENT_ATTACK, + Type: abci.MisbehaviorType_LIGHT_CLIENT_ATTACK, Height: 8, Time: defaultEvidenceTime, Validator: types.TM2PB.Validator(state.Validators.Validators[0]), @@ -268,7 +268,7 @@ func TestFinalizeBlockByzantineValidators(t *testing.T) { require.NoError(t, err) // TODO check state and mempool - assert.Equal(t, abciEv, app.ByzantineValidators) + assert.Equal(t, abciMb, app.ByzantineValidators) } func TestProcessProposal(t *testing.T) { @@ -330,14 +330,17 @@ func TestProcessProposal(t *testing.T) { block1.Txs = txs expectedRpp := abci.RequestProcessProposal{ - Hash: block1.Hash(), - Header: *block1.Header.ToProto(), Txs: block1.Txs.ToSliceOfBytes(), + Hash: block1.Hash(), + Height: block1.Header.Height, + Time: block1.Header.Time, ByzantineValidators: block1.Evidence.ToABCI(), ProposedLastCommit: abci.CommitInfo{ Round: 0, Votes: voteInfos, }, + NextValidatorsHash: block1.NextValidatorsHash, + ProposerAddress: block1.ProposerAddress, } app.On("ProcessProposal", mock.Anything).Return(abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}) diff --git a/internal/state/helpers_test.go b/internal/state/helpers_test.go index 6e97abccb..1a926a91f 100644 --- a/internal/state/helpers_test.go +++ b/internal/state/helpers_test.go @@ -270,7 +270,7 @@ type testApp struct { abci.BaseApplication CommitVotes []abci.VoteInfo - ByzantineValidators []abci.Evidence + ByzantineValidators []abci.Misbehavior ValidatorUpdates []abci.ValidatorUpdate } diff --git a/internal/state/validation_test.go b/internal/state/validation_test.go index 5e164f447..4fd0b49bd 100644 --- a/internal/state/validation_test.go +++ b/internal/state/validation_test.go @@ -292,7 +292,7 @@ func TestValidateBlockEvidence(t *testing.T) { evpool.On("CheckEvidence", ctx, mock.AnythingOfType("types.EvidenceList")).Return(nil) evpool.On("Update", ctx, mock.AnythingOfType("state.State"), mock.AnythingOfType("types.EvidenceList")).Return() evpool.On("ABCIEvidence", mock.AnythingOfType("int64"), mock.AnythingOfType("[]types.Evidence")).Return( - []abci.Evidence{}) + []abci.Misbehavior{}) eventBus := eventbus.NewDefault(logger) require.NoError(t, eventBus.Start(ctx)) diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 03bf9a9e8..f9fc73b48 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -76,7 +76,7 @@ message RequestBeginBlock { bytes hash = 1; tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; CommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; + repeated Misbehavior byzantine_validators = 4 [(gogoproto.nullable) = false]; } enum CheckTxType { @@ -123,23 +123,31 @@ message RequestApplySnapshotChunk { } message RequestPrepareProposal { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; + // the modified transactions cannot exceed this size. + int64 max_tx_bytes = 1; // txs is an array of transactions that will be included in a block, // sent to the app for possible modifications. - repeated bytes txs = 3; - ExtendedCommitInfo local_last_commit = 4 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false]; - // the modified transactions cannot exceed this size. - int64 max_tx_bytes = 6; + repeated bytes txs = 2; + ExtendedCommitInfo local_last_commit = 3 [(gogoproto.nullable) = false]; + repeated Misbehavior byzantine_validators = 4 [(gogoproto.nullable) = false]; + int64 height = 5; + google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes next_validators_hash = 7; + // address of the public key of the validator proposing the block. + bytes proposer_address = 8; } message RequestProcessProposal { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - repeated bytes txs = 3; - CommitInfo proposed_last_commit = 4 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false]; + repeated bytes txs = 1; + CommitInfo proposed_last_commit = 2 [(gogoproto.nullable) = false]; + repeated Misbehavior byzantine_validators = 3 [(gogoproto.nullable) = false]; + // hash is the merkle root hash of the fields of the proposed block. + bytes hash = 4; + int64 height = 5; + google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes next_validators_hash = 7; + // address of the public key of the original proposer of the block. + bytes proposer_address = 8; } // Extends a vote with application-side injection @@ -157,11 +165,16 @@ message RequestVerifyVoteExtension { } message RequestFinalizeBlock { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - repeated bytes txs = 3; - CommitInfo decided_last_commit = 4 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false]; + repeated bytes txs = 1; + CommitInfo decided_last_commit = 2 [(gogoproto.nullable) = false]; + repeated Misbehavior byzantine_validators = 3 [(gogoproto.nullable) = false]; + // hash is the merkle root hash of the fields of the proposed block. + bytes hash = 4; + int64 height = 5; + google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes next_validators_hash = 7; + // proposer_address is the address of the public key of the original proposer of the block. + bytes proposer_address = 8; } //---------------------------------------- @@ -341,6 +354,7 @@ message ResponseExtendVote { bytes vote_extension = 1; } + message ResponseVerifyVoteExtension { VerifyStatus status = 1; @@ -355,7 +369,7 @@ message ResponseFinalizeBlock { repeated Event events = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; repeated ExecTxResult tx_results = 2; - repeated ValidatorUpdate validator_updates = 3; + repeated ValidatorUpdate validator_updates = 3 [(gogoproto.nullable) = false]; tendermint.types.ConsensusParams consensus_param_updates = 4; bytes app_hash = 5; int64 retain_height = 6; @@ -408,10 +422,10 @@ message ExecTxResult { // // One usage is indexing transaction results. message TxResult { - int64 height = 1; - uint32 index = 2; - bytes tx = 3; - ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; + int64 height = 1; + uint32 index = 2; + bytes tx = 3; + ExecTxResult result = 4 [(gogoproto.nullable) = false]; } message TxRecord { @@ -466,14 +480,15 @@ message CanonicalVoteExtension { bytes address = 5; } -enum EvidenceType { + +enum MisbehaviorType { UNKNOWN = 0; DUPLICATE_VOTE = 1; LIGHT_CLIENT_ATTACK = 2; } -message Evidence { - EvidenceType type = 1; +message Misbehavior { + MisbehaviorType type = 1; // The offending validator Validator validator = 2 [(gogoproto.nullable) = false]; // The height when the offense occurred diff --git a/proto/tendermint/abci/types.proto.intermediate b/proto/tendermint/abci/types.proto.intermediate index 226cb21fc..c752cd87b 100644 --- a/proto/tendermint/abci/types.proto.intermediate +++ b/proto/tendermint/abci/types.proto.intermediate @@ -77,7 +77,7 @@ message RequestBeginBlock { bytes hash = 1; tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; CommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; + repeated Misbehavior byzantine_validators = 4 [(gogoproto.nullable) = false]; } enum CheckTxType { @@ -124,23 +124,31 @@ message RequestApplySnapshotChunk { } message RequestPrepareProposal { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; + // the modified transactions cannot exceed this size. + int64 max_tx_bytes = 1; // txs is an array of transactions that will be included in a block, // sent to the app for possible modifications. - repeated bytes txs = 3; - ExtendedCommitInfo local_last_commit = 4 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false]; - // the modified transactions cannot exceed this size. - int64 max_tx_bytes = 6; + repeated bytes txs = 2; + ExtendedCommitInfo local_last_commit = 3 [(gogoproto.nullable) = false]; + repeated Misbehavior byzantine_validators = 4 [(gogoproto.nullable) = false]; + int64 height = 5; + google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes next_validators_hash = 7; + // address of the public key of the validator proposing the block. + bytes proposer_address = 8; } message RequestProcessProposal { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - repeated bytes txs = 3; - CommitInfo proposed_last_commit = 4 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false]; + repeated bytes txs = 1; + CommitInfo proposed_last_commit = 2 [(gogoproto.nullable) = false]; + repeated Misbehavior byzantine_validators = 3 [(gogoproto.nullable) = false]; + // hash is the merkle root hash of the fields of the proposed block. + bytes hash = 4; + int64 height = 5; + google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes next_validators_hash = 7; + // address of the public key of the original proposer of the block. + bytes proposer_address = 8; } // Extends a vote with application-side injection @@ -154,11 +162,16 @@ message RequestVerifyVoteExtension { } message RequestFinalizeBlock { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - repeated bytes txs = 3; - CommitInfo decided_last_commit = 4 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false]; + repeated bytes txs = 1; + CommitInfo decided_last_commit = 2 [(gogoproto.nullable) = false]; + repeated Misbehavior byzantine_validators = 3 [(gogoproto.nullable) = false]; + // hash is the merkle root hash of the fields of the proposed block. + bytes hash = 4; + int64 height = 5; + google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes next_validators_hash = 7; + // proposer_address is the address of the public key of the original proposer of the block. + bytes proposer_address = 8; } //---------------------------------------- @@ -454,14 +467,14 @@ message ExtendedVoteInfo { bytes vote_extension = 3; } -enum EvidenceType { +enum MisbehaviorType { UNKNOWN = 0; DUPLICATE_VOTE = 1; LIGHT_CLIENT_ATTACK = 2; } -message Evidence { - EvidenceType type = 1; +message Misbehavior { + MisbehaviorType type = 1; // The offending validator Validator validator = 2 [(gogoproto.nullable) = false]; // The height when the offense occurred diff --git a/proto/tendermint/privval/service.proto b/proto/tendermint/privval/service.proto index 63e9afca7..2c699e1cd 100644 --- a/proto/tendermint/privval/service.proto +++ b/proto/tendermint/privval/service.proto @@ -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"; diff --git a/spec/abci++/abci++_methods_002_draft.md b/spec/abci++/abci++_methods_002_draft.md index 2799e789b..d1782bbdc 100644 --- a/spec/abci++/abci++_methods_002_draft.md +++ b/spec/abci++/abci++_methods_002_draft.md @@ -287,12 +287,14 @@ title: Methods | Name | Type | Description | Field Number | |-------------------------|---------------------------------------------|------------------------------------------------------------------------------------------------------------------|--------------| - | hash | bytes | The block header's hash of the block to propose. Present for convenience (can be derived from the block header). | 1 | - | header | [Header](../core/data_structures.md#header) | The header of the block to propose. | 2 | - | txs | repeated bytes | Preliminary list of transactions that have been picked as part of the block to propose. | 3 | - | local_last_commit | [ExtendedCommitInfo](#extendedcommitinfo) | Info about the last commit, obtained locally from Tendermint's data structures. | 4 | - | byzantine_validators | repeated [Evidence](#evidence) | List of evidence of validators that acted maliciously. | 5 | - | max_tx_bytes | int64 | Currently configured maximum size in bytes taken by the modified transactions. | 6 | + | max_tx_bytes | int64 | Currently configured maximum size in bytes taken by the modified transactions. | 1 | + | txs | repeated bytes | Preliminary list of transactions that have been picked as part of the block to propose. | 2 | + | local_last_commit | [ExtendedCommitInfo](#extendedcommitinfo) | Info about the last commit, obtained locally from Tendermint's data structures. | 3 | + | byzantine_validators | repeated [Misbehavior](#misbehavior) | List of information about validators that acted incorrectly. | 4 | + | height | int64 | The height of the block that will be proposed. | 5 | + | time | [google.protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp) | Timestamp of the block that that will be proposed. | 6 | + | next_validators_hash | bytes | Merkle root of the next validator set. | 7 | + | proposer_address | bytes | [Address](../core/data_structures.md#address) of the validator that is creating the proposal. | 8 | * **Response**: @@ -305,10 +307,9 @@ title: Methods | consensus_param_updates | [ConsensusParams](#consensusparams) | Changes to consensus-critical gas, size, and other parameters. | 6 | * **Usage**: - * The first five parameters of `RequestPrepareProposal` are the same as `RequestProcessProposal` + * The first six parameters of `RequestPrepareProposal` are the same as `RequestProcessProposal` and `RequestFinalizeBlock`. - * The header contains the height, timestamp, and more - it exactly matches the - Tendermint block header. + * The height and time values match the values from the header of the proposed block. * `RequestPrepareProposal` contains a preliminary set of transactions `txs` that Tendermint considers to be a good block proposal, called _raw proposal_. The Application can modify this set via `ResponsePrepareProposal.tx_records` (see [TxRecord](#txrecord)). * The Application _can_ reorder, remove or add transactions to the raw proposal. Let `tx` be a transaction in `txs`: * If the Application considers that `tx` should not be proposed in this block, e.g., there are other transactions with higher priority, then it should not include it in `tx_records`. In this case, Tendermint won't remove `tx` from the mempool. The Application should be extra-careful, as abusing this feature may cause transactions to stay forever in the mempool. @@ -369,7 +370,7 @@ and _p_'s _validValue_ is `nil`: * _p_'s Tendermint creates a block header. 2. _p_'s Tendermint calls `RequestPrepareProposal` with the newly generated block. The call is synchronous: Tendermint's execution will block until the Application returns from the call. -3. The Application checks the block (header, transactions, commit info, evidences). Besides, +3. The Application checks the block (hashes, transactions, commit info, misbehavior). Besides, * in same-block execution mode, the Application can (and should) provide `ResponsePrepareProposal.app_hash`, `ResponsePrepareProposal.validator_updates`, or `ResponsePrepareProposal.consensus_param_updates`. @@ -398,11 +399,14 @@ Note that, if _p_ has a non-`nil` _validValue_, Tendermint will use it as propos | Name | Type | Description | Field Number | |----------------------|---------------------------------------------|----------------------------------------------------------------------------------------------------------------|--------------| - | hash | bytes | The block header's hash of the proposed block. Present for convenience (can be derived from the block header). | 1 | - | header | [Header](../core/data_structures.md#header) | The proposed block's header. | 2 | - | txs | repeated bytes | List of transactions that have been picked as part of the proposed block. | 3 | - | proposed_last_commit | [CommitInfo](#commitinfo) | Info about the last commit, obtained from the information in the proposed block. | 4 | - | byzantine_validators | repeated [Evidence](#evidence) | List of evidence of validators that acted maliciously. | 5 | + | txs | repeated bytes | List of transactions that have been picked as part of the proposed block. | 1 | + | proposed_last_commit | [CommitInfo](#commitinfo) | Info about the last commit, obtained from the information in the proposed block. | 2 | + | byzantine_validators | repeated [Misbehavior](#misbehavior) | List of information about validators that acted incorrectly. | 3 | + | hash | bytes | The block header's hash of the proposed block. | 4 | + | height | int64 | The height of the proposed block. | 5 | + | time | [google.protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp) | Timestamp included in the proposed block. | 6 | + | next_validators_hash | bytes | Merkle root of the next validator set. | 7 | + | proposer_address | bytes | [Address](../core/data_structures.md#address) of the validator that created the proposal. | 8 | * **Response**: @@ -415,20 +419,11 @@ Note that, if _p_ has a non-`nil` _validValue_, Tendermint will use it as propos | consensus_param_updates | [ConsensusParams](#consensusparams) | Changes to consensus-critical gas, size, and other parameters. | 5 | * **Usage**: - * Contains a full proposed block. - * The parameters and types of `RequestProcessProposal` are the same as `RequestPrepareProposal` - and `RequestFinalizeBlock`. + * Contains fields from the proposed block. * The Application may fully execute the block as though it was handling `RequestFinalizeBlock`. However, any resulting state changes must be kept as _candidate state_, and the Application should be ready to backtrack/discard it in case the decided block is different. - * The header exactly matches the Tendermint header of the proposed block. - * In next-block execution mode, the header hashes _AppHash_, _LastResultHash_, _ValidatorHash_, - and _ConsensusHash_ refer to the **last committed block** (data was provided by the last call to - `ResponseFinalizeBlock`). - * In same-block execution mode, the header hashes _AppHash_, _LastResultHash_, _ValidatorHash_, - and _ConsensusHash_ refer to the **same** block being passed in the `Request*` call to this - method (data was provided by the call to `ResponsePrepareProposal` at the current height that - resulted in the block being passed in the `Request*` call to this method) + * The height and timestamp values match the values from the header of the proposed block. * If `ResponseProcessProposal.status` is `REJECT`, Tendermint assumes the proposal received is not valid. * In same-block execution mode, the Application is required to fully execute the block and provide values @@ -573,17 +568,20 @@ from this condition, but not sure), and _p_ receives a Precommit message for rou | Name | Type | Description | Field Number | |----------------------|---------------------------------------------|------------------------------------------------------------------------------------------|--------------| - | hash | bytes | The block header's hash. Present for convenience (can be derived from the block header). | 1 | - | header | [Header](../core/data_structures.md#header) | The block header. | 2 | - | txs | repeated bytes | List of transactions committed as part of the block. | 3 | - | decided_last_commit | [CommitInfo](#commitinfo) | Info about the last commit, obtained from the block that was just decided. | 4 | - | byzantine_validators | repeated [Evidence](#evidence) | List of evidence of validators that acted maliciously. | 5 | + | txs | repeated bytes | List of transactions committed as part of the block. | 1 | + | decided_last_commit | [CommitInfo](#commitinfo) | Info about the last commit, obtained from the block that was just decided. | 2 | + | byzantine_validators | repeated [Misbehavior](#misbehavior) | List of information about validators that acted incorrectly. | 3 | + | hash | bytes | The block header's hash. Present for convenience (can be derived from the block header). | 4 | + | height | int64 | The height of the finalized block. | 5 | + | time | [google.protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp) | Timestamp included in the finalized block. | 6 | + | next_validators_hash | bytes | Merkle root of the next validator set. | 7 | + | proposer_address | bytes | [Address](../core/data_structures.md#address) of the validator that created the proposal.| 8 | * **Response**: | Name | Type | Description | Field Number | |-------------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------|--------------| - | events | repeated [Event](abci++_basic_concepts_002_draft.md#events) | Type & Key-Value events for indexing | 1 | + | events | repeated [Event](abci++_basic_concepts_002_draft.md#events) | Type & Key-Value events for indexing | 1 | | tx_results | repeated [ExecTxResult](#txresult) | List of structures containing the data resulting from executing the transactions | 2 | | validator_updates | repeated [ValidatorUpdate](#validatorupdate) | Changes to validator set (set voting power to 0 to remove). | 3 | | consensus_param_updates | [ConsensusParams](#consensusparams) | Changes to consensus-critical gas, size, and other parameters. | 4 | @@ -591,10 +589,10 @@ from this condition, but not sure), and _p_ receives a Precommit message for rou | retain_height | int64 | Blocks below this height may be removed. Defaults to `0` (retain all). | 6 | * **Usage**: - * Contains a newly decided block. + * Contains the fields of the newly decided block. * This method is equivalent to the call sequence `BeginBlock`, [`DeliverTx`], `EndBlock`, `Commit` in the previous version of ABCI. - * The header exactly matches the Tendermint header of the proposed block. + * The height and timestamp values match the values from the header of the proposed block. * The Application can use `RequestFinalizeBlock.decided_last_commit` and `RequestFinalizeBlock.byzantine_validators` to determine rewards and punishments for the validators. * The application must execute the transactions in full, in the order they appear in `RequestFinalizeBlock.txs`, @@ -696,23 +694,23 @@ Most of the data structures used in ABCI are shared [common data structures](../ * Validator identified by PubKey * Used to tell Tendermint to update the validator set -### Evidence +### Misbehavior * **Fields**: | Name | Type | Description | Field Number | |--------------------|--------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|--------------| - | type | [EvidenceType](#evidencetype) | Type of the evidence. An enum of possible evidence's. | 1 | + | type | [MisbehaviorType](#misbehaviortype) | Type of the misbehavior. An enum of possible misbehaviors. | 1 | | validator | [Validator](#validator) | The offending validator | 2 | | height | int64 | Height when the offense occurred | 3 | | time | [google.protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp) | Time of the block that was committed at the height that the offense occurred | 4 | | total_voting_power | int64 | Total voting power of the validator set at height `Height` | 5 | -#### EvidenceType +#### MisbehaviorType * **Fields** - EvidenceType is an enum with the listed fields: + MisbehaviorType is an enum with the listed fields: | Name | Field Number | |---------------------|--------------| diff --git a/test/e2e/app/app.go b/test/e2e/app/app.go index 051a1ddbb..2736dad04 100644 --- a/test/e2e/app/app.go +++ b/test/e2e/app/app.go @@ -175,7 +175,7 @@ func (app *Application) FinalizeBlock(req abci.RequestFinalizeBlock) abci.Respon txs[i] = &abci.ExecTxResult{Code: code.CodeTypeOK} } - valUpdates, err := app.validatorUpdates(uint64(req.Header.Height)) + valUpdates, err := app.validatorUpdates(uint64(req.Height)) if err != nil { panic(err) } @@ -193,7 +193,7 @@ func (app *Application) FinalizeBlock(req abci.RequestFinalizeBlock) abci.Respon }, { Key: "height", - Value: strconv.Itoa(int(req.Header.Height)), + Value: strconv.Itoa(int(req.Height)), }, }, }, diff --git a/types/evidence.go b/types/evidence.go index 1ea53d9b5..c8ea967cf 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -23,13 +23,13 @@ import ( // Evidence represents any provable malicious activity by a validator. // Verification logic for each evidence is part of the evidence module. type Evidence interface { - ABCI() []abci.Evidence // forms individual evidence to be sent to the application - Bytes() []byte // bytes which comprise the evidence - Hash() []byte // hash of the evidence - Height() int64 // height of the infraction - String() string // string format of the evidence - Time() time.Time // time of the infraction - ValidateBasic() error // basic consistency check + ABCI() []abci.Misbehavior // forms individual evidence to be sent to the application + Bytes() []byte // bytes which comprise the evidence + Hash() []byte // hash of the evidence + Height() int64 // height of the infraction + String() string // string format of the evidence + Time() time.Time // time of the infraction + ValidateBasic() error // basic consistency check // Implementations must support tagged encoding in JSON. jsontypes.Tagged @@ -87,9 +87,9 @@ func NewDuplicateVoteEvidence(vote1, vote2 *Vote, blockTime time.Time, valSet *V } // ABCI returns the application relevant representation of the evidence -func (dve *DuplicateVoteEvidence) ABCI() []abci.Evidence { - return []abci.Evidence{{ - Type: abci.EvidenceType_DUPLICATE_VOTE, +func (dve *DuplicateVoteEvidence) ABCI() []abci.Misbehavior { + return []abci.Misbehavior{{ + Type: abci.MisbehaviorType_DUPLICATE_VOTE, Validator: abci.Validator{ Address: dve.VoteA.ValidatorAddress, Power: dve.ValidatorPower, @@ -257,12 +257,12 @@ func (*LightClientAttackEvidence) TypeTag() string { return "tendermint/LightCli var _ Evidence = &LightClientAttackEvidence{} -// ABCI forms an array of abci evidence for each byzantine validator -func (l *LightClientAttackEvidence) ABCI() []abci.Evidence { - abciEv := make([]abci.Evidence, len(l.ByzantineValidators)) +// ABCI forms an array of abci.Misbehavior for each byzantine validator +func (l *LightClientAttackEvidence) ABCI() []abci.Misbehavior { + abciEv := make([]abci.Misbehavior, len(l.ByzantineValidators)) for idx, val := range l.ByzantineValidators { - abciEv[idx] = abci.Evidence{ - Type: abci.EvidenceType_LIGHT_CLIENT_ATTACK, + abciEv[idx] = abci.Misbehavior{ + Type: abci.MisbehaviorType_LIGHT_CLIENT_ATTACK, Validator: TM2PB.Validator(val), Height: l.Height(), Time: l.Timestamp, @@ -683,8 +683,8 @@ func (evl EvidenceList) Has(evidence Evidence) bool { // ToABCI converts the evidence list to a slice of the ABCI protobuf messages // for use when communicating the evidence to an application. -func (evl EvidenceList) ToABCI() []abci.Evidence { - var el []abci.Evidence +func (evl EvidenceList) ToABCI() []abci.Misbehavior { + var el []abci.Misbehavior for _, e := range evl { el = append(el, e.ABCI()...) } From cf337cc3f2f2e278c8e8a28df21c8a47e99b8a38 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Mon, 11 Apr 2022 14:49:17 -0700 Subject: [PATCH 17/27] Add configuration updates for Tendermint v0.36. (#8310) * v36: remove [fastsync] and [blocksync] config sections * v36: remove [blocksync], consolidate rename * v36: remove gRPC options from [rpc] * v36: add top-level mode setting * v36: remove deprecated per-node consensus timeouts * v36: remove vestigial mempool.wal-dir setting * v36: add queue-type setting * v36: add p2p connection limits * v36: add or update statsync.fetchers * v36: add statesync.use-p2p setting --- scripts/confix/confix.go | 154 ++++++++++++++++++++++++++++++++------- 1 file changed, 126 insertions(+), 28 deletions(-) diff --git a/scripts/confix/confix.go b/scripts/confix/confix.go index b958060fe..a3e6d57bb 100644 --- a/scripts/confix/confix.go +++ b/scripts/confix/confix.go @@ -85,21 +85,138 @@ var plan = transform.Plan{ T: transform.SnakeToKebab(), }, { - // Since https://github.com/tendermint/tendermint/pull/6896. - Desc: "Rename [fastsync] to [blocksync]", - T: transform.Rename(parser.Key{"fastsync"}, parser.Key{"blocksync"}), + // [fastsync] renamed in https://github.com/tendermint/tendermint/pull/6896. + // [blocksync] removed in https://github.com/tendermint/tendermint/pull/7159. + Desc: "Remove [fastsync] and [blocksync] sections", + T: transform.Func(func(_ context.Context, doc *tomledit.Document) error { + doc.First("fast-sync").Remove() + transform.FindTable(doc, "fastsync").Remove() + transform.FindTable(doc, "blocksync").Remove() + return nil + }), ErrorOK: true, }, { - // Since https://github.com/tendermint/tendermint/pull/7159. - Desc: "Move top-level fast_sync key to blocksync.enable", - T: transform.MoveKey( - parser.Key{"fast-sync"}, - parser.Key{"blocksync"}, - parser.Key{"enable"}, + // Since https://github.com/tendermint/tendermint/pull/6241. + // + // TODO(creachadair): backport into v0.35.x. + Desc: `Add top-level mode setting (default "full")`, + T: transform.EnsureKey(nil, &parser.KeyValue{ + Block: parser.Comments{"Mode of Node: full | validator | seed"}, + Name: parser.Key{"mode"}, + Value: parser.MustValue(`"full"`), + }), + ErrorOK: true, + }, + { + // Since https://github.com/tendermint/tendermint/pull/7121. + Desc: "Remove gRPC settings from the [rpc] section", + T: transform.Func(func(_ context.Context, doc *tomledit.Document) error { + doc.First("rpc", "grpc-laddr").Remove() + doc.First("rpc", "grpc-max-open-connections").Remove() + return nil + }), + }, + { + // Since https://github.com/tendermint/tendermint/pull/8217. + Desc: "Remove per-node consensus timeouts (converted to consensus parameters)", + T: transform.Remove( + parser.Key{"consensus", "skip-timeout-commit"}, + parser.Key{"consensus", "timeout-commit"}, + parser.Key{"consensus", "timeout-precommit"}, + parser.Key{"consensus", "timeout-precommit-delta"}, + parser.Key{"consensus", "timeout-prevote"}, + parser.Key{"consensus", "timeout-prevote-delta"}, + parser.Key{"consensus", "timeout-propose"}, + parser.Key{"consensus", "timeout-propose-delta"}, ), ErrorOK: true, }, + { + // Since https://github.com/tendermint/tendermint/pull/6396. + // + // TODO(creachadair): backport into v0.35.x. + Desc: "Remove vestigial mempool.wal-dir setting", + T: transform.Remove(parser.Key{"mempool", "wal-dir"}), + ErrorOK: true, + }, + { + // Since https://github.com/tendermint/tendermint/pull/6323. + // + // TODO(creachadair): backport into v0.35.x. + Desc: "Add new [p2p] queue-type setting", + T: transform.EnsureKey(parser.Key{"p2p"}, &parser.KeyValue{ + Block: parser.Comments{"Select the p2p internal queue"}, + Name: parser.Key{"queue-type"}, + Value: parser.MustValue(`"priority"`), + }), + ErrorOK: true, + }, + { + // Since https://github.com/tendermint/tendermint/pull/6353. + // + // TODO(creachadair): backport into v0.35.x. + Desc: "Add [p2p] connection count and rate limit settings", + T: transform.Func(func(_ context.Context, doc *tomledit.Document) error { + tab := transform.FindTable(doc, "p2p") + if tab == nil { + return errors.New("p2p table not found") + } + transform.InsertMapping(tab.Section, &parser.KeyValue{ + Block: parser.Comments{"Maximum number of connections (inbound and outbound)."}, + Name: parser.Key{"max-connections"}, + Value: parser.MustValue("64"), + }, false) + transform.InsertMapping(tab.Section, &parser.KeyValue{ + Block: parser.Comments{ + "Rate limits the number of incoming connection attempts per IP address.", + }, + Name: parser.Key{"max-incoming-connection-attempts"}, + Value: parser.MustValue("100"), + }, false) + return nil + }), + }, + { + // Added "chunk-fetchers" https://github.com/tendermint/tendermint/pull/6566. + // This value was backported into v0.34.11 (modulo casing). + // Renamed to "fetchers" https://github.com/tendermint/tendermint/pull/6587. + // + // TODO(creachadair): backport into v0.35.x. + Desc: "Rename statesync.chunk-fetchers to statesync.fetchers", + T: transform.Func(func(ctx context.Context, doc *tomledit.Document) error { + // If the key already exists, rename it preserving its value. + if found := doc.First("statesync", "chunk-fetchers"); found != nil { + found.KeyValue.Name = parser.Key{"fetchers"} + return nil + } + + // Otherwise, add it. + return transform.EnsureKey(parser.Key{"statesync"}, &parser.KeyValue{ + Block: parser.Comments{ + "The number of concurrent chunk and block fetchers to run (default: 4).", + }, + Name: parser.Key{"fetchers"}, + Value: parser.MustValue("4"), + })(ctx, doc) + }), + }, + { + // Since https://github.com/tendermint/tendermint/pull/6807. + // Backported into v0.34.13 (modulo casing). + // + // TODO(creachadair): backport into v0.35.x. + Desc: "Add statesync.use-p2p setting", + T: transform.EnsureKey(parser.Key{"statesync"}, &parser.KeyValue{ + Block: parser.Comments{ + "# State sync uses light client verification to verify state. This can be done either through the", + "# P2P layer or RPC layer. Set this to true to use the P2P layer. If false (default), RPC layer", + "# will be used.", + }, + Name: parser.Key{"use-p2p"}, + Value: parser.MustValue("false"), + }), + }, { // Since https://github.com/tendermint/tendermint/pull/6462. Desc: "Move priv-validator settings under [priv-validator]", @@ -147,22 +264,6 @@ var plan = transform.Plan{ return nil }), }, - { - // v1 removed: https://github.com/tendermint/tendermint/pull/5728 - // v2 deprecated: https://github.com/tendermint/tendermint/pull/6730 - Desc: `Set blocksync.version to "v0"`, - T: transform.Func(func(_ context.Context, doc *tomledit.Document) error { - v := doc.First("blocksync", "version") - if v == nil { - return nil // nothing to do - } else if !v.IsMapping() { - // This shouldn't happen, but is easier to debug than a panic. - return fmt.Errorf("blocksync.version is weird: %v", v) - } - v.Value.X = parser.MustValue(`"v0"`).X - return nil - }), - }, } // ApplyFixes transforms doc and reports whether it succeeded. @@ -248,8 +349,5 @@ func CheckValid(data []byte) error { return fmt.Errorf("decoding config: %w", err) } - // Stub in required value not stored in the config file, so that validation - // will not fail spuriously. - cfg.Mode = config.ModeValidator return cfg.ValidateBasic() } From 571d26fbb0533450a56d8bd7d91cb64a88b124cf Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Tue, 12 Apr 2022 14:58:14 -0400 Subject: [PATCH 18/27] events: remove unused event code (#8313) --- internal/consensus/state.go | 2 +- libs/events/events.go | 95 ++++--------------------------------- libs/events/events_test.go | 20 ++------ 3 files changed, 14 insertions(+), 103 deletions(-) diff --git a/internal/consensus/state.go b/internal/consensus/state.go index 6ddc968ff..2f27afc81 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -220,7 +220,7 @@ func NewState( doWALCatchup: true, wal: nilWAL{}, evpool: evpool, - evsw: tmevents.NewEventSwitch(logger), + evsw: tmevents.NewEventSwitch(), metrics: NopMetrics(), onStopCh: make(chan *cstypes.RoundState), } diff --git a/libs/events/events.go b/libs/events/events.go index d96afd7bd..5ad1170a9 100644 --- a/libs/events/events.go +++ b/libs/events/events.go @@ -3,22 +3,9 @@ package events import ( "context" - "fmt" "sync" - - "github.com/tendermint/tendermint/libs/log" ) -// ErrListenerWasRemoved is returned by AddEvent if the listener was removed. -type ErrListenerWasRemoved struct { - listenerID string -} - -// Error implements the error interface. -func (e ErrListenerWasRemoved) Error() string { - return fmt.Sprintf("listener #%s was removed", e.listenerID) -} - // EventData is a generic event data can be typed and registered with // tendermint/go-amino via concrete implementation of this interface. type EventData interface{} @@ -51,13 +38,11 @@ type EventSwitch interface { type eventSwitch struct { mtx sync.RWMutex eventCells map[string]*eventCell - listeners map[string]*eventListener } -func NewEventSwitch(logger log.Logger) EventSwitch { +func NewEventSwitch() EventSwitch { evsw := &eventSwitch{ eventCells: make(map[string]*eventCell), - listeners: make(map[string]*eventListener), } return evsw } @@ -71,20 +56,9 @@ func (evsw *eventSwitch) AddListenerForEvent(listenerID, eventValue string, cb E eventCell = newEventCell() evsw.eventCells[eventValue] = eventCell } - - listener := evsw.listeners[listenerID] - if listener == nil { - listener = newEventListener(listenerID) - evsw.listeners[listenerID] = listener - } - evsw.mtx.Unlock() - if err := listener.AddEvent(eventValue); err != nil { - return err - } - - eventCell.AddListener(listenerID, cb) + eventCell.addListener(listenerID, cb) return nil } @@ -99,11 +73,13 @@ func (evsw *eventSwitch) FireEvent(ctx context.Context, event string, data Event } // Fire event for all listeners in eventCell - eventCell.FireEvent(ctx, data) + eventCell.fireEvent(ctx, data) } //----------------------------------------------------------------------------- +type EventCallback func(ctx context.Context, data EventData) error + // eventCell handles keeping track of listener callbacks for a given event. type eventCell struct { mtx sync.RWMutex @@ -116,21 +92,13 @@ func newEventCell() *eventCell { } } -func (cell *eventCell) AddListener(listenerID string, cb EventCallback) { +func (cell *eventCell) addListener(listenerID string, cb EventCallback) { cell.mtx.Lock() + defer cell.mtx.Unlock() cell.listeners[listenerID] = cb - cell.mtx.Unlock() } -func (cell *eventCell) RemoveListener(listenerID string) int { - cell.mtx.Lock() - delete(cell.listeners, listenerID) - numListeners := len(cell.listeners) - cell.mtx.Unlock() - return numListeners -} - -func (cell *eventCell) FireEvent(ctx context.Context, data EventData) { +func (cell *eventCell) fireEvent(ctx context.Context, data EventData) { cell.mtx.RLock() eventCallbacks := make([]EventCallback, 0, len(cell.listeners)) for _, cb := range cell.listeners { @@ -145,50 +113,3 @@ func (cell *eventCell) FireEvent(ctx context.Context, data EventData) { } } } - -//----------------------------------------------------------------------------- - -type EventCallback func(ctx context.Context, data EventData) error - -type eventListener struct { - id string - - mtx sync.RWMutex - removed bool - events []string -} - -func newEventListener(id string) *eventListener { - return &eventListener{ - id: id, - removed: false, - events: nil, - } -} - -func (evl *eventListener) AddEvent(event string) error { - evl.mtx.Lock() - - if evl.removed { - evl.mtx.Unlock() - return ErrListenerWasRemoved{listenerID: evl.id} - } - - evl.events = append(evl.events, event) - evl.mtx.Unlock() - return nil -} - -func (evl *eventListener) GetEvents() []string { - evl.mtx.RLock() - events := make([]string, len(evl.events)) - copy(events, evl.events) - evl.mtx.RUnlock() - return events -} - -func (evl *eventListener) SetRemoved() { - evl.mtx.Lock() - evl.removed = true - evl.mtx.Unlock() -} diff --git a/libs/events/events_test.go b/libs/events/events_test.go index 55e0103da..fba2feba8 100644 --- a/libs/events/events_test.go +++ b/libs/events/events_test.go @@ -8,8 +8,6 @@ import ( "time" "github.com/stretchr/testify/require" - - "github.com/tendermint/tendermint/libs/log" ) // TestAddListenerForEventFireOnce sets up an EventSwitch, subscribes a single @@ -18,9 +16,7 @@ func TestAddListenerForEventFireOnce(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - logger := log.NewTestingLogger(t) - - evsw := NewEventSwitch(logger) + evsw := NewEventSwitch() messages := make(chan EventData) require.NoError(t, evsw.AddListenerForEvent("listener", "event", @@ -45,9 +41,7 @@ func TestAddListenerForEventFireMany(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - logger := log.NewTestingLogger(t) - - evsw := NewEventSwitch(logger) + evsw := NewEventSwitch() doneSum := make(chan uint64) doneSending := make(chan uint64) @@ -81,9 +75,7 @@ func TestAddListenerForDifferentEvents(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - logger := log.NewTestingLogger(t) - - evsw := NewEventSwitch(logger) + evsw := NewEventSwitch() doneSum := make(chan uint64) doneSending1 := make(chan uint64) @@ -143,8 +135,7 @@ func TestAddDifferentListenerForDifferentEvents(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - logger := log.NewTestingLogger(t) - evsw := NewEventSwitch(logger) + evsw := NewEventSwitch() doneSum1 := make(chan uint64) doneSum2 := make(chan uint64) @@ -235,9 +226,8 @@ func TestAddDifferentListenerForDifferentEvents(t *testing.T) { func TestManageListenersAsync(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - logger := log.NewTestingLogger(t) - evsw := NewEventSwitch(logger) + evsw := NewEventSwitch() doneSum1 := make(chan uint64) doneSum2 := make(chan uint64) From 5d4d01b4e4ca30e6f7a131c0f4416f62bc411073 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Tue, 12 Apr 2022 17:11:21 -0400 Subject: [PATCH 19/27] service: minor cleanup of comments (#8314) --- libs/service/service.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/libs/service/service.go b/libs/service/service.go index 6221c7d92..3ce08e7da 100644 --- a/libs/service/service.go +++ b/libs/service/service.go @@ -12,11 +12,8 @@ var ( // errAlreadyStopped is returned when somebody tries to stop an already // stopped service (without resetting it). errAlreadyStopped = errors.New("already stopped") -) -var ( _ Service = (*BaseService)(nil) - _ Service = (*NopService)(nil) ) // Service defines a service that can be started, stopped, and reset. @@ -75,8 +72,7 @@ Typical usage: } func (fs *FooService) OnStop() { - // close/destroy private fields - // stop subroutines, etc. + // close/destroy private fields and releases resources } */ type BaseService struct { @@ -90,12 +86,6 @@ type BaseService struct { impl Implementation } -type NopService struct{} - -func (NopService) Start(_ context.Context) error { return nil } -func (NopService) IsRunning() bool { return true } -func (NopService) Wait() {} - // NewBaseService creates a new BaseService. func NewBaseService(logger log.Logger, name string, impl Implementation) *BaseService { return &BaseService{ @@ -206,5 +196,5 @@ func (bs *BaseService) getWait() <-chan struct{} { // Wait blocks until the service is stopped. func (bs *BaseService) Wait() { <-bs.getWait() } -// String implements Service by returning a string representation of the service. +// String provides a human-friendly representation of the service. func (bs *BaseService) String() string { return bs.name } From 80b8c0057b6abf48af6c0a22a555b6e7dbd9b459 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Tue, 12 Apr 2022 17:14:00 -0400 Subject: [PATCH 20/27] state: remove unused weighted time (#8315) --- internal/state/time.go | 46 ----------------------------- internal/state/time_test.go | 58 ------------------------------------- 2 files changed, 104 deletions(-) delete mode 100644 internal/state/time.go delete mode 100644 internal/state/time_test.go diff --git a/internal/state/time.go b/internal/state/time.go deleted file mode 100644 index c0770b3af..000000000 --- a/internal/state/time.go +++ /dev/null @@ -1,46 +0,0 @@ -package state - -import ( - "sort" - "time" -) - -// weightedTime for computing a median. -type weightedTime struct { - Time time.Time - Weight int64 -} - -// newWeightedTime with time and weight. -func newWeightedTime(time time.Time, weight int64) *weightedTime { - return &weightedTime{ - Time: time, - Weight: weight, - } -} - -// weightedMedian computes weighted median time for a given array of WeightedTime and the total voting power. -func weightedMedian(weightedTimes []*weightedTime, totalVotingPower int64) (res time.Time) { - median := totalVotingPower / 2 - - sort.Slice(weightedTimes, func(i, j int) bool { - if weightedTimes[i] == nil { - return false - } - if weightedTimes[j] == nil { - return true - } - return weightedTimes[i].Time.UnixNano() < weightedTimes[j].Time.UnixNano() - }) - - for _, weightedTime := range weightedTimes { - if weightedTime != nil { - if median <= weightedTime.Weight { - res = weightedTime.Time - break - } - median -= weightedTime.Weight - } - } - return -} diff --git a/internal/state/time_test.go b/internal/state/time_test.go deleted file mode 100644 index 5da97e819..000000000 --- a/internal/state/time_test.go +++ /dev/null @@ -1,58 +0,0 @@ -package state - -import ( - "testing" - "time" - - "github.com/stretchr/testify/assert" - - tmtime "github.com/tendermint/tendermint/libs/time" -) - -func TestWeightedMedian(t *testing.T) { - m := make([]*weightedTime, 3) - - t1 := tmtime.Now() - t2 := t1.Add(5 * time.Second) - t3 := t1.Add(10 * time.Second) - - m[2] = newWeightedTime(t1, 33) // faulty processes - m[0] = newWeightedTime(t2, 40) // correct processes - m[1] = newWeightedTime(t3, 27) // correct processes - totalVotingPower := int64(100) - - median := weightedMedian(m, totalVotingPower) - assert.Equal(t, t2, median) - // median always returns value between values of correct processes - assert.Equal(t, true, (median.After(t1) || median.Equal(t1)) && - (median.Before(t3) || median.Equal(t3))) - - m[1] = newWeightedTime(t1, 40) // correct processes - m[2] = newWeightedTime(t2, 27) // correct processes - m[0] = newWeightedTime(t3, 33) // faulty processes - totalVotingPower = int64(100) - - median = weightedMedian(m, totalVotingPower) - assert.Equal(t, t2, median) - // median always returns value between values of correct processes - assert.Equal(t, true, (median.After(t1) || median.Equal(t1)) && - (median.Before(t2) || median.Equal(t2))) - - m = make([]*weightedTime, 8) - t4 := t1.Add(15 * time.Second) - t5 := t1.Add(60 * time.Second) - - m[3] = newWeightedTime(t1, 10) // correct processes - m[1] = newWeightedTime(t2, 10) // correct processes - m[5] = newWeightedTime(t2, 10) // correct processes - m[4] = newWeightedTime(t3, 23) // faulty processes - m[0] = newWeightedTime(t4, 20) // correct processes - m[7] = newWeightedTime(t5, 10) // faulty processes - totalVotingPower = int64(83) - - median = weightedMedian(m, totalVotingPower) - assert.Equal(t, t3, median) - // median always returns value between values of correct processes - assert.Equal(t, true, (median.After(t1) || median.Equal(t1)) && - (median.Before(t4) || median.Equal(t4))) -} From 29ad4dcb3b260ea7762bb307ae397833e1bd360a Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Tue, 12 Apr 2022 21:44:16 -0700 Subject: [PATCH 21/27] Remove resolved TODO comments. (#8325) Resolved by merge of #8300. --- scripts/confix/confix.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/scripts/confix/confix.go b/scripts/confix/confix.go index a3e6d57bb..d77950e7f 100644 --- a/scripts/confix/confix.go +++ b/scripts/confix/confix.go @@ -98,8 +98,6 @@ var plan = transform.Plan{ }, { // Since https://github.com/tendermint/tendermint/pull/6241. - // - // TODO(creachadair): backport into v0.35.x. Desc: `Add top-level mode setting (default "full")`, T: transform.EnsureKey(nil, &parser.KeyValue{ Block: parser.Comments{"Mode of Node: full | validator | seed"}, @@ -134,16 +132,12 @@ var plan = transform.Plan{ }, { // Since https://github.com/tendermint/tendermint/pull/6396. - // - // TODO(creachadair): backport into v0.35.x. Desc: "Remove vestigial mempool.wal-dir setting", T: transform.Remove(parser.Key{"mempool", "wal-dir"}), ErrorOK: true, }, { // Since https://github.com/tendermint/tendermint/pull/6323. - // - // TODO(creachadair): backport into v0.35.x. Desc: "Add new [p2p] queue-type setting", T: transform.EnsureKey(parser.Key{"p2p"}, &parser.KeyValue{ Block: parser.Comments{"Select the p2p internal queue"}, @@ -154,8 +148,6 @@ var plan = transform.Plan{ }, { // Since https://github.com/tendermint/tendermint/pull/6353. - // - // TODO(creachadair): backport into v0.35.x. Desc: "Add [p2p] connection count and rate limit settings", T: transform.Func(func(_ context.Context, doc *tomledit.Document) error { tab := transform.FindTable(doc, "p2p") @@ -181,8 +173,6 @@ var plan = transform.Plan{ // Added "chunk-fetchers" https://github.com/tendermint/tendermint/pull/6566. // This value was backported into v0.34.11 (modulo casing). // Renamed to "fetchers" https://github.com/tendermint/tendermint/pull/6587. - // - // TODO(creachadair): backport into v0.35.x. Desc: "Rename statesync.chunk-fetchers to statesync.fetchers", T: transform.Func(func(ctx context.Context, doc *tomledit.Document) error { // If the key already exists, rename it preserving its value. @@ -204,8 +194,6 @@ var plan = transform.Plan{ { // Since https://github.com/tendermint/tendermint/pull/6807. // Backported into v0.34.13 (modulo casing). - // - // TODO(creachadair): backport into v0.35.x. Desc: "Add statesync.use-p2p setting", T: transform.EnsureKey(parser.Key{"statesync"}, &parser.KeyValue{ Block: parser.Comments{ From c45367e22c8fad4c46c5cd4026df0ab805887461 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Wed, 13 Apr 2022 14:09:49 -0400 Subject: [PATCH 22/27] rpc: avoid leaking threads (#8328) --- internal/rpc/core/mempool.go | 122 ++++++++++++++++++++--------------- 1 file changed, 70 insertions(+), 52 deletions(-) diff --git a/internal/rpc/core/mempool.go b/internal/rpc/core/mempool.go index c2a9084db..a852aeb1d 100644 --- a/internal/rpc/core/mempool.go +++ b/internal/rpc/core/mempool.go @@ -38,23 +38,32 @@ func (env *Environment) BroadcastTxSync(ctx context.Context, tx types.Tx) (*core err := env.Mempool.CheckTx( ctx, tx, - func(res *abci.ResponseCheckTx) { resCh <- res }, + func(res *abci.ResponseCheckTx) { + select { + case <-ctx.Done(): + case resCh <- res: + } + }, mempool.TxInfo{}, ) if err != nil { return nil, err } - r := <-resCh + select { + case <-ctx.Done(): + return nil, fmt.Errorf("broadcast confirmation not received: %w", ctx.Err()) + case r := <-resCh: + return &coretypes.ResultBroadcastTx{ + Code: r.Code, + Data: r.Data, + Log: r.Log, + Codespace: r.Codespace, + MempoolError: r.MempoolError, + Hash: tx.Hash(), + }, nil + } - return &coretypes.ResultBroadcastTx{ - Code: r.Code, - Data: r.Data, - Log: r.Log, - Codespace: r.Codespace, - MempoolError: r.MempoolError, - Hash: tx.Hash(), - }, nil } // BroadcastTxCommit returns with the responses from CheckTx and DeliverTx. @@ -64,61 +73,70 @@ func (env *Environment) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*co err := env.Mempool.CheckTx( ctx, tx, - func(res *abci.ResponseCheckTx) { resCh <- res }, + func(res *abci.ResponseCheckTx) { + select { + case <-ctx.Done(): + case resCh <- res: + } + }, mempool.TxInfo{}, ) if err != nil { return nil, err } - r := <-resCh - if r.Code != abci.CodeTypeOK { - return &coretypes.ResultBroadcastTxCommit{ - CheckTx: *r, - Hash: tx.Hash(), - }, fmt.Errorf("transaction encountered error (%s)", r.MempoolError) - } - - if !indexer.KVSinkEnabled(env.EventSinks) { - return &coretypes.ResultBroadcastTxCommit{ + select { + case <-ctx.Done(): + return nil, fmt.Errorf("broadcast confirmation not received: %w", ctx.Err()) + case r := <-resCh: + if r.Code != abci.CodeTypeOK { + return &coretypes.ResultBroadcastTxCommit{ CheckTx: *r, Hash: tx.Hash(), - }, - errors.New("cannot confirm transaction because kvEventSink is not enabled") - } + }, fmt.Errorf("transaction encountered error (%s)", r.MempoolError) + } - startAt := time.Now() - timer := time.NewTimer(0) - defer timer.Stop() - - count := 0 - for { - count++ - select { - case <-ctx.Done(): - env.Logger.Error("error on broadcastTxCommit", - "duration", time.Since(startAt), - "err", err) + if !indexer.KVSinkEnabled(env.EventSinks) { return &coretypes.ResultBroadcastTxCommit{ CheckTx: *r, Hash: tx.Hash(), - }, fmt.Errorf("timeout waiting for commit of tx %s (%s)", - tx.Hash(), time.Since(startAt)) - case <-timer.C: - txres, err := env.Tx(ctx, tx.Hash(), false) - if err != nil { - jitter := 100*time.Millisecond + time.Duration(rand.Int63n(int64(time.Second))) // nolint: gosec - backoff := 100 * time.Duration(count) * time.Millisecond - timer.Reset(jitter + backoff) - continue - } + }, + errors.New("cannot confirm transaction because kvEventSink is not enabled") + } - return &coretypes.ResultBroadcastTxCommit{ - CheckTx: *r, - TxResult: txres.TxResult, - Hash: tx.Hash(), - Height: txres.Height, - }, nil + startAt := time.Now() + timer := time.NewTimer(0) + defer timer.Stop() + + count := 0 + for { + count++ + select { + case <-ctx.Done(): + env.Logger.Error("error on broadcastTxCommit", + "duration", time.Since(startAt), + "err", err) + return &coretypes.ResultBroadcastTxCommit{ + CheckTx: *r, + Hash: tx.Hash(), + }, fmt.Errorf("timeout waiting for commit of tx %s (%s)", + tx.Hash(), time.Since(startAt)) + case <-timer.C: + txres, err := env.Tx(ctx, tx.Hash(), false) + if err != nil { + jitter := 100*time.Millisecond + time.Duration(rand.Int63n(int64(time.Second))) // nolint: gosec + backoff := 100 * time.Duration(count) * time.Millisecond + timer.Reset(jitter + backoff) + continue + } + + return &coretypes.ResultBroadcastTxCommit{ + CheckTx: *r, + TxResult: txres.TxResult, + Hash: tx.Hash(), + Height: txres.Height, + }, nil + } } } } From 0e4b18806e91f82acfaa533adcb5c876ce82789d Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Wed, 13 Apr 2022 15:20:56 -0400 Subject: [PATCH 23/27] pubsub: [minor] remove unused stub method (#8316) OnReset was removed from the service interface and we missed deleting this. --- internal/pubsub/pubsub.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/internal/pubsub/pubsub.go b/internal/pubsub/pubsub.go index df2dd90e3..3e887226b 100644 --- a/internal/pubsub/pubsub.go +++ b/internal/pubsub/pubsub.go @@ -309,9 +309,6 @@ func (s *Server) Wait() { <-s.exited; s.BaseService.Wait() } // OnStart implements Service.OnStart by starting the server. func (s *Server) OnStart(ctx context.Context) error { s.run(ctx); return nil } -// OnReset implements Service.OnReset. It has no effect for this service. -func (s *Server) OnReset() error { return nil } - func (s *Server) publish(ctx context.Context, data types.EventData, events []abci.Event) error { s.pubs.RLock() defer s.pubs.RUnlock() From 6dc15b2f502189e45ece4c9055d4c8f7a4fd47a1 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Wed, 13 Apr 2022 13:13:59 -0700 Subject: [PATCH 24/27] Only run the markdown linter if markdown was touched. (#8337) --- .github/workflows/markdown-links.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/markdown-links.yml b/.github/workflows/markdown-links.yml index 503af7b0e..634072404 100644 --- a/.github/workflows/markdown-links.yml +++ b/.github/workflows/markdown-links.yml @@ -12,7 +12,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: technote-space/get-diff-action@v6.0.1 + with: + PATTERNS: | + **/**.md - uses: gaurav-nelson/github-action-markdown-link-check@1.0.14 with: check-modified-files-only: 'yes' config-file: '.md-link-check.json' + if: env.GIT_DIFF From 929671743341200062d633b07e568ad648b6b4b3 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Wed, 13 Apr 2022 13:25:59 -0700 Subject: [PATCH 25/27] Update RFC ToC for RFC-015. (#8338) --- docs/rfc/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/rfc/README.md b/docs/rfc/README.md index 8905c0160..b5c42ea85 100644 --- a/docs/rfc/README.md +++ b/docs/rfc/README.md @@ -52,5 +52,6 @@ sections. - [RFC-012: Event Indexing Revisited](./rfc-012-custom-indexing.md) - [RFC-013: ABCI++](./rfc-013-abci++.md) - [RFC-014: Semantic Versioning](./rfc-014-semantic-versioning.md) +- [RFC-015: ABCI++ Tx Mutation](./rfc-015-abci++-tx-mutation.md) From 024f6117ee473a34396e70d99a937e6bbca6fa46 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Wed, 13 Apr 2022 13:41:35 -0700 Subject: [PATCH 26/27] confix: remove mempool.version in v0.36 (#8334) --- go.mod | 2 +- go.sum | 4 ++-- scripts/confix/confix.go | 10 +++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 3101f26ad..1232f180b 100644 --- a/go.mod +++ b/go.mod @@ -73,7 +73,7 @@ require ( github.com/charithe/durationcheck v0.0.9 // indirect github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect github.com/containerd/continuity v0.2.1 // indirect - github.com/creachadair/tomledit v0.0.15 + github.com/creachadair/tomledit v0.0.16 github.com/daixiang0/gci v0.3.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect diff --git a/go.sum b/go.sum index 0da80e4d6..251be8a4b 100644 --- a/go.sum +++ b/go.sum @@ -225,8 +225,8 @@ github.com/creachadair/atomicfile v0.2.4 h1:GRjpQLmz/78I4+nBQpGMFrRa9yrL157AUTrA github.com/creachadair/atomicfile v0.2.4/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2fzVzf28JxrIkBc= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= -github.com/creachadair/tomledit v0.0.15 h1:g/qlpwSFIXEngyz8gcTEGZtvdGBLHODwV+Z0BFILVxw= -github.com/creachadair/tomledit v0.0.15/go.mod h1:gvtfnSZLa+YNQD28vaPq0Nk12bRxEhmUdBzAWn+EGF4= +github.com/creachadair/tomledit v0.0.16 h1:PDNxgDjeeiNk1cyFfliIVQmagh1jPbDMabOw9yfSKLk= +github.com/creachadair/tomledit v0.0.16/go.mod h1:gvtfnSZLa+YNQD28vaPq0Nk12bRxEhmUdBzAWn+EGF4= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= diff --git a/scripts/confix/confix.go b/scripts/confix/confix.go index d77950e7f..7a1f22670 100644 --- a/scripts/confix/confix.go +++ b/scripts/confix/confix.go @@ -131,9 +131,13 @@ var plan = transform.Plan{ ErrorOK: true, }, { - // Since https://github.com/tendermint/tendermint/pull/6396. - Desc: "Remove vestigial mempool.wal-dir setting", - T: transform.Remove(parser.Key{"mempool", "wal-dir"}), + // Removed wal-dir: https://github.com/tendermint/tendermint/pull/6396. + // Removed version: https://github.com/tendermint/tendermint/pull/7171. + Desc: "Remove vestigial mempool.wal-dir settings", + T: transform.Remove( + parser.Key{"mempool", "wal-dir"}, + parser.Key{"mempool", "version"}, + ), ErrorOK: true, }, { From 6bbf5b6d0fa90c5fa5574827c7bf34bf20e260e8 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Wed, 13 Apr 2022 16:01:39 -0700 Subject: [PATCH 27/27] Work around markdown-link-check issues. (#8339) Work around two issues causing the markdown link check to fail in CI. 1. https://github.com/actions/checkout/pull/760. A git permissions issue, apparently triggered by a combination of a git change and the behaviour of actions/checkout. 2. https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/129. Merging an updated version of the underlying package that fixes a bug in the handling of local #anchors. The workaround is a temporary patched fork of the link-checker action. This should be removed once the upstream issues are addressed. --- .github/workflows/markdown-links.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/markdown-links.yml b/.github/workflows/markdown-links.yml index 634072404..356eb3f31 100644 --- a/.github/workflows/markdown-links.yml +++ b/.github/workflows/markdown-links.yml @@ -16,7 +16,7 @@ jobs: with: PATTERNS: | **/**.md - - uses: gaurav-nelson/github-action-markdown-link-check@1.0.14 + - uses: creachadair/github-action-markdown-link-check@master with: check-modified-files-only: 'yes' config-file: '.md-link-check.json'