github.com/Oyster-zx/tendermint@v0.34.24-fork/UPGRADING.md (about) 1 # Upgrading Tendermint Core 2 3 This guide provides instructions for upgrading to specific versions of 4 Tendermint Core. 5 6 ## v0.34.24 7 8 Note that in [\#9724](https://github.com/tendermint/tendermint/pull/9724) we 9 un-prettified the JSON output (i.e. removed all indentation) of the HTTP and 10 WebSocket RPC for performance and subscription stability reasons. We recommend 11 using a tool such as [jq](https://github.com/stedolan/jq) to obtain prettified 12 output if you rely on that prettified output in some way. 13 14 ## v0.34.20 15 16 ### Feature: Priority Mempool 17 18 This release backports an implementation of the Priority Mempool from the v0.35 19 branch. This implementation of the mempool permits the application to set a 20 priority on each transaction during CheckTx, and during block selection the 21 highest-priority transactions are chosen (subject to the constraints on size 22 and gas cost). 23 24 Operators can enable the priority mempool by setting `mempool.version` to 25 `"v1"` in the `config.toml`. For more technical details about the priority 26 mempool, see [ADR 067: Mempool 27 Refactor](https://github.com/tendermint/tendermint/blob/main/docs/architecture/adr-067-mempool-refactor.md). 28 29 ## v0.34.0 30 31 **Upgrading to Tendermint 0.34 requires a blockchain restart.** 32 This release is not compatible with previous blockchains due to changes to 33 the encoding format (see "Protocol Buffers," below) and the block header (see "Blockchain Protocol"). 34 35 Note also that Tendermint 0.34 also requires Go 1.16 or higher. 36 37 ### ABCI Changes 38 39 * The `ABCIVersion` is now `0.17.0`. 40 41 * New ABCI methods (`ListSnapshots`, `LoadSnapshotChunk`, `OfferSnapshot`, and `ApplySnapshotChunk`) 42 were added to support the new State Sync feature. 43 Previously, syncing a new node to a preexisting network could take days; but with State Sync, 44 new nodes are able to join a network in a matter of seconds. 45 Read [the spec](https://github.com/tendermint/tendermint/blob/v0.34.x/spec/abci/apps.md#state-sync) 46 if you want to learn more about State Sync, or if you'd like your application to use it. 47 (If you don't want to support State Sync in your application, you can just implement these new 48 ABCI methods as no-ops, leaving them empty.) 49 50 * `KV.Pair` has been replaced with `abci.EventAttribute`. The `EventAttribute.Index` field 51 allows ABCI applications to dictate which events should be indexed. 52 53 * The blockchain can now start from an arbitrary initial height, 54 provided to the application via `RequestInitChain.InitialHeight`. 55 56 * ABCI evidence type is now an enum with two recognized types of evidence: 57 `DUPLICATE_VOTE` and `LIGHT_CLIENT_ATTACK`. 58 Applications should be able to handle these evidence types 59 (i.e., through slashing or other accountability measures). 60 61 * The [`PublicKey` type](https://github.com/tendermint/tendermint/blob/v0.34.x/proto/tendermint/crypto/keys.proto#L13-L15) 62 (used in ABCI as part of `ValidatorUpdate`) now uses a `oneof` protobuf type. 63 Note that since Tendermint only supports ed25519 validator keys, there's only one 64 option in the `oneof`. For more, see "Protocol Buffers," below. 65 66 * The field `Proof`, on the ABCI type `ResponseQuery`, is now named `ProofOps`. 67 For more, see "Crypto," below. 68 69 ### P2P Protocol 70 71 The default codec is now proto3, not amino. The schema files can be found in the `/proto` 72 directory. For more, see "Protobuf," below. 73 74 ### Blockchain Protocol 75 76 * `Header#LastResultsHash`, which is the root hash of a Merkle tree built from 77 `ResponseDeliverTx(Code, Data)` as of v0.34 also includes `GasWanted` and `GasUsed` 78 fields. 79 80 * Merkle hashes of empty trees previously returned nothing, but now return the hash of an empty input, 81 to conform with [RFC-6962](https://tools.ietf.org/html/rfc6962). 82 This mainly affects `Header#DataHash`, `Header#LastResultsHash`, and 83 `Header#EvidenceHash`, which are often empty. Non-empty hashes can also be affected, e.g. if their 84 inputs depend on other (empty) Merkle hashes, giving different results. 85 86 ### Transaction Indexing 87 88 Tendermint now relies on the application to tell it which transactions to index. This means that 89 in the `config.toml`, generated by Tendermint, there is no longer a way to specify which 90 transactions to index. `tx.height` and `tx.hash` will always be indexed when using the `kv` indexer. 91 92 Applications must now choose to either a) enable indexing for all transactions, or 93 b) allow node operators to decide which transactions to index. 94 Applications can notify Tendermint to index a specific transaction by setting 95 `Index: bool` to `true` in the Event Attribute: 96 97 ```go 98 []types.Event{ 99 { 100 Type: "app", 101 Attributes: []types.EventAttribute{ 102 {Key: []byte("creator"), Value: []byte("Cosmoshi Netowoko"), Index: true}, 103 }, 104 }, 105 } 106 ``` 107 108 ### Protocol Buffers 109 110 Tendermint 0.34 replaces Amino with Protocol Buffers for encoding. 111 This migration is extensive and results in a number of changes, however, 112 Tendermint only uses the types generated from Protocol Buffers for disk and 113 wire serialization. 114 **This means that these changes should not affect you as a Tendermint user.** 115 116 However, Tendermint users and contributors may note the following changes: 117 118 * Directory layout changes: All proto files have been moved under one directory, `/proto`. 119 This is in line with the recommended file layout by [Buf](https://buf.build). 120 For more, see the [Buf documentation](https://buf.build/docs/lint-checkers#file_layout). 121 * ABCI Changes: As noted in the "ABCI Changes" section above, the `PublicKey` type now uses 122 a `oneof` type. 123 124 For more on the Protobuf changes, please see our [blog post on this migration](https://medium.com/tendermint/tendermint-0-34-protocol-buffers-and-you-8c40558939ae). 125 126 ### Consensus Parameters 127 128 Tendermint 0.34 includes new and updated consensus parameters. 129 130 #### Version Parameters (New) 131 132 * `AppVersion`, which is the version of the ABCI application. 133 134 #### Evidence Parameters 135 136 * `MaxBytes`, which caps the total amount of evidence. The default is 1048576 (1 MB). 137 138 ### Crypto 139 140 #### Keys 141 142 * Keys no longer include a type prefix. For example, ed25519 pubkeys have been renamed from 143 `PubKeyEd25519` to `PubKey`. This reduces stutter (e.g., `ed25519.PubKey`). 144 * Keys are now byte slices (`[]byte`) instead of byte arrays (`[<size>]byte`). 145 * The multisig functionality that was previously in Tendermint now has 146 a new home within the Cosmos SDK: 147 [`cosmos/cosmos-sdk/types/multisig`](https://github.com/cosmos/cosmos-sdk/blob/master/crypto/types/multisig/multisignature.go). 148 149 #### `merkle` Package 150 151 * `SimpleHashFromMap()` and `SimpleProofsFromMap()` were removed. 152 * The prefix `Simple` has been removed. (For example, `SimpleProof` is now called `Proof`.) 153 * All protobuf messages have been moved to the `/proto` directory. 154 * The protobuf message `Proof` that contained multiple ProofOp's has been renamed to `ProofOps`. 155 As noted above, this affects the ABCI type `ResponseQuery`: 156 The field that was named Proof is now named `ProofOps`. 157 * `HashFromByteSlices` and `ProofsFromByteSlices` now return a hash for empty inputs, to conform with 158 [RFC-6962](https://tools.ietf.org/html/rfc6962). 159 160 ### `libs` Package 161 162 The `bech32` package has moved to the Cosmos SDK: 163 [`cosmos/cosmos-sdk/types/bech32`](https://github.com/cosmos/cosmos-sdk/tree/4173ea5ebad906dd9b45325bed69b9c655504867/types/bech32). 164 165 ### CLI 166 167 The `tendermint lite` command has been renamed to `tendermint light` and has a slightly different API. 168 See [the docs](https://docs.tendermint.com/v0.33/tendermint-core/light-client-protocol.html#http-proxy) for details. 169 170 ### Light Client 171 172 We have a new, rewritten light client! You can 173 [read more](https://medium.com/tendermint/everything-you-need-to-know-about-the-tendermint-light-client-f80d03856f98) 174 about the justifications and details behind this change. 175 176 Other user-relevant changes include: 177 178 * The old `lite` package was removed; the new light client uses the `light` package. 179 * The `Verifier` was broken up into two pieces: 180 * Core verification logic (pure `VerifyX` functions) 181 * `Client` object, which represents the complete light client 182 * The new light client stores headers and validator sets as `LightBlock`s 183 * The RPC client can be found in the `/rpc` directory. 184 * The HTTP(S) proxy is located in the `/proxy` directory. 185 186 ### `state` Package 187 188 * A new field `State.InitialHeight` has been added to record the initial chain height, which must be `1` 189 (not `0`) if starting from height `1`. This can be configured via the genesis field `initial_height`. 190 * The `state` package now has a `Store` interface. All functions in 191 [state/store.go](https://github.com/tendermint/tendermint/blob/56911ee35298191c95ef1c7d3d5ec508237aaff4/state/store.go#L42-L42) 192 are now part of the interface. The interface returns errors on all methods and can be used by calling `state.NewStore(dbm.DB)`. 193 194 ### `privval` Package 195 196 All requests are now accompanied by the chain ID from the network. 197 This is a optional field and can be ignored by key management systems; 198 however, if you are using the same key management system for multiple different 199 blockchains, we recommend that you check the chain ID. 200 201 202 ### RPC 203 204 * `/unsafe_start_cpu_profiler`, `/unsafe_stop_cpu_profiler` and 205 `/unsafe_write_heap_profile` were removed. 206 For profiling, please use the pprof server, which can 207 be enabled through `--rpc.pprof_laddr=X` flag or `pprof_laddr=X` config setting 208 in the rpc section. 209 * The `Content-Type` header returned on RPC calls is now (correctly) set as `application/json`. 210 211 ### Version 212 213 Version is now set through Go linker flags `ld_flags`. Applications that are using tendermint as a library should set this at compile time. 214 215 Example: 216 217 ```sh 218 go install -mod=readonly -ldflags "-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(go list -m github.com/tendermint/tendermint | sed 's/ /\@/g') -s -w " -trimpath ./cmd 219 ``` 220 221 Additionally, the exported constant `version.Version` is now `version.TMCoreSemVer`. 222 223 ## v0.33.4 224 225 ### Go API 226 227 * `rpc/client` HTTP and local clients have been moved into `http` and `local` 228 subpackages, and their constructors have been renamed to `New()`. 229 230 ### Protobuf Changes 231 232 When upgrading to version 0.33.4 you will have to fetch the `third_party` 233 directory along with the updated proto files. 234 235 ### Block Retention 236 237 ResponseCommit added a field for block retention. The application can provide information to Tendermint on how to prune blocks. 238 If an application would like to not prune any blocks pass a `0` in this field. 239 240 ```proto 241 message ResponseCommit { 242 // reserve 1 243 bytes data = 2; // the Merkle root hash 244 ++ uint64 retain_height = 3; // the oldest block height to retain ++ 245 } 246 ``` 247 248 ## v0.33.0 249 250 This release is not compatible with previous blockchains due to commit becoming 251 signatures only and fields in the header have been removed. 252 253 ### Blockchain Protocol 254 255 `TotalTxs` and `NumTxs` were removed from the header. `Commit` now consists 256 mostly of just signatures. 257 258 ```go 259 type Commit struct { 260 Height int64 261 Round int 262 BlockID BlockID 263 Signatures []CommitSig 264 } 265 ``` 266 267 ```go 268 type BlockIDFlag byte 269 270 const ( 271 // BlockIDFlagAbsent - no vote was received from a validator. 272 BlockIDFlagAbsent BlockIDFlag = 0x01 273 // BlockIDFlagCommit - voted for the Commit.BlockID. 274 BlockIDFlagCommit = 0x02 275 // BlockIDFlagNil - voted for nil. 276 BlockIDFlagNil = 0x03 277 ) 278 279 type CommitSig struct { 280 BlockIDFlag BlockIDFlag 281 ValidatorAddress Address 282 Timestamp time.Time 283 Signature []byte 284 } 285 ``` 286 287 See [\#63](https://github.com/tendermint/spec/pull/63) for the complete spec 288 change. 289 290 ### P2P Protocol 291 292 The secret connection now includes a transcript hashing. If you want to 293 implement a handshake (or otherwise have an existing implementation), you'll 294 need to make the same changes that were made 295 [here](https://github.com/tendermint/tendermint/pull/3668). 296 297 ### Config Changes 298 299 You will need to generate a new config if you have used a prior version of tendermint. 300 301 Tags have been entirely renamed throughout the codebase to events and there 302 keys are called 303 [compositeKeys](https://github.com/tendermint/tendermint/blob/6d05c531f7efef6f0619155cf10ae8557dd7832f/docs/app-dev/indexing-transactions.md). 304 305 Evidence Params has been changed to include duration. 306 307 * `consensus_params.evidence.max_age_duration`. 308 * Renamed `consensus_params.evidence.max_age` to `max_age_num_blocks`. 309 310 ### Go API 311 312 * `libs/common` has been removed in favor of specific pkgs. 313 * `async` 314 * `service` 315 * `rand` 316 * `net` 317 * `strings` 318 * `cmap` 319 * removal of `errors` pkg 320 321 ### RPC Changes 322 323 * `/validators` is now paginated (default: 30 vals per page) 324 * `/block_results` response format updated [see RPC docs for details](https://docs.tendermint.com/v0.33/rpc/#/Info/block_results) 325 * Event suffix has been removed from the ID in event responses 326 * IDs are now integers not `json-client-XYZ` 327 328 ## v0.32.0 329 330 This release is compatible with previous blockchains, 331 however the new ABCI Events mechanism may create some complexity 332 for nodes wishing to continue operation with v0.32 from a previous version. 333 There are some minor breaking changes to the RPC. 334 335 ### Config Changes 336 337 If you have `db_backend` set to `leveldb` in your config file, please change it 338 to `goleveldb` or `cleveldb`. 339 340 ### RPC Changes 341 342 The default listen address for the RPC is now `127.0.0.1`. If you want to expose 343 it publicly, you have to explicitly configure it. Note exposing the RPC to the 344 public internet may not be safe - endpoints which return a lot of data may 345 enable resource exhaustion attacks on your node, causing the process to crash. 346 347 Any consumers of `/block_results` need to be mindful of the change in all field 348 names from CamelCase to Snake case, eg. `results.DeliverTx` is now `results.deliver_tx`. 349 This is a fix, but it's breaking. 350 351 ### ABCI Changes 352 353 ABCI responses which previously had a `Tags` field now have an `Events` field 354 instead. The original `Tags` field was simply a list of key-value pairs, where 355 each key effectively represented some attribute of an event occuring in the 356 blockchain, like `sender`, `receiver`, or `amount`. However, it was difficult to 357 represent the occurence of multiple events (for instance, multiple transfers) in a single list. 358 The new `Events` field contains a list of `Event`, where each `Event` is itself a list 359 of key-value pairs, allowing for more natural expression of multiple events in 360 eg. a single DeliverTx or EndBlock. Note each `Event` also includes a `Type`, which is meant to categorize the 361 event. 362 363 For transaction indexing, the index key is 364 prefixed with the event type: `{eventType}.{attributeKey}`. 365 If the same event type and attribute key appear multiple times, the values are 366 appended in a list. 367 368 To make queries, include the event type as a prefix. For instance if you 369 previously queried for `recipient = 'XYZ'`, and after the upgrade you name your event `transfer`, 370 the new query would be for `transfer.recipient = 'XYZ'`. 371 372 Note that transactions indexed on a node before upgrading to v0.32 will still be indexed 373 using the old scheme. For instance, if a node upgraded at height 100, 374 transactions before 100 would be queried with `recipient = 'XYZ'` and 375 transactions after 100 would be queried with `transfer.recipient = 'XYZ'`. 376 While this presents additional complexity to clients, it avoids the need to 377 reindex. Of course, you can reset the node and sync from scratch to re-index 378 entirely using the new scheme. 379 380 We illustrate further with a more complete example. 381 382 Prior to the update, suppose your `ResponseDeliverTx` look like: 383 384 ```go 385 abci.ResponseDeliverTx{ 386 Tags: []kv.Pair{ 387 {Key: []byte("sender"), Value: []byte("foo")}, 388 {Key: []byte("recipient"), Value: []byte("bar")}, 389 {Key: []byte("amount"), Value: []byte("35")}, 390 } 391 } 392 ``` 393 394 The following queries would match this transaction: 395 396 ```go 397 query.MustParse("tm.event = 'Tx' AND sender = 'foo'") 398 query.MustParse("tm.event = 'Tx' AND recipient = 'bar'") 399 query.MustParse("tm.event = 'Tx' AND sender = 'foo' AND recipient = 'bar'") 400 ``` 401 402 Following the upgrade, your `ResponseDeliverTx` would look something like: 403 the following `Events`: 404 405 ```go 406 abci.ResponseDeliverTx{ 407 Events: []abci.Event{ 408 { 409 Type: "transfer", 410 Attributes: kv.Pairs{ 411 {Key: []byte("sender"), Value: []byte("foo")}, 412 {Key: []byte("recipient"), Value: []byte("bar")}, 413 {Key: []byte("amount"), Value: []byte("35")}, 414 }, 415 } 416 } 417 ``` 418 419 Now the following queries would match this transaction: 420 421 ```go 422 query.MustParse("tm.event = 'Tx' AND transfer.sender = 'foo'") 423 query.MustParse("tm.event = 'Tx' AND transfer.recipient = 'bar'") 424 query.MustParse("tm.event = 'Tx' AND transfer.sender = 'foo' AND transfer.recipient = 'bar'") 425 ``` 426 427 For further documentation on `Events`, see the [docs](https://github.com/tendermint/tendermint/blob/60827f75623b92eff132dc0eff5b49d2025c591e/docs/spec/abci/abci.md#events). 428 429 ### Go Applications 430 431 The ABCI Application interface changed slightly so the CheckTx and DeliverTx 432 methods now take Request structs. The contents of these structs are just the raw 433 tx bytes, which were previously passed in as the argument. 434 435 ## v0.31.6 436 437 There are no breaking changes in this release except Go API of p2p and 438 mempool packages. Hovewer, if you're using cleveldb, you'll need to change 439 the compilation tag: 440 441 Use `cleveldb` tag instead of `gcc` to compile Tendermint with CLevelDB or 442 use `make build_c` / `make install_c` (full instructions can be found at 443 <https://docs.tendermint.com/v0.33/introduction/install.html#compile-with-cleveldb-support>) 444 445 ## v0.31.0 446 447 This release contains a breaking change to the behavior of the pubsub system. 448 It also contains some minor breaking changes in the Go API and ABCI. 449 There are no changes to the block or p2p protocols, so v0.31.0 should work fine 450 with blockchains created from the v0.30 series. 451 452 ### RPC 453 454 The pubsub no longer blocks on publishing. This may cause some WebSocket (WS) clients to stop working as expected. 455 If your WS client is not consuming events fast enough, Tendermint can terminate the subscription. 456 In this case, the WS client will receive an error with description: 457 458 ```json 459 { 460 "jsonrpc": "2.0", 461 "id": "{ID}#event", 462 "error": { 463 "code": -32000, 464 "msg": "Server error", 465 "data": "subscription was canceled (reason: client is not pulling messages fast enough)" // or "subscription was canceled (reason: Tendermint exited)" 466 } 467 } 468 469 Additionally, there are now limits on the number of subscribers and 470 subscriptions that can be active at once. See the new 471 `rpc.max_subscription_clients` and `rpc.max_subscriptions_per_client` values to 472 configure this. 473 ``` 474 475 ### Applications 476 477 Simple rename of `ConsensusParams.BlockSize` to `ConsensusParams.Block`. 478 479 The `ConsensusParams.Block.TimeIotaMS` field was also removed. It's configured 480 in the ConsensusParsm in genesis. 481 482 ### Go API 483 484 See the [CHANGELOG](CHANGELOG.md). These are relatively straight forward. 485 486 ## v0.30.0 487 488 This release contains a breaking change to both the block and p2p protocols, 489 however it may be compatible with blockchains created with v0.29.0 depending on 490 the chain history. If your blockchain has not included any pieces of evidence, 491 or no piece of evidence has been included in more than one block, 492 and if your application has never returned multiple updates 493 for the same validator in a single block, then v0.30.0 will work fine with 494 blockchains created with v0.29.0. 495 496 The p2p protocol change is to fix the proposer selection algorithm again. 497 Note that proposer selection is purely a p2p concern right 498 now since the algorithm is only relevant during real time consensus. 499 This change is thus compatible with v0.29.0, but 500 all nodes must be upgraded to avoid disagreements on the proposer. 501 502 ### Applications 503 504 Applications must ensure they do not return duplicates in 505 `ResponseEndBlock.ValidatorUpdates`. A pubkey must only appear once per set of 506 updates. Duplicates will cause irrecoverable failure. If you have a very good 507 reason why we shouldn't do this, please open an issue. 508 509 ## v0.29.0 510 511 This release contains some breaking changes to the block and p2p protocols, 512 and will not be compatible with any previous versions of the software, primarily 513 due to changes in how various data structures are hashed. 514 515 Any implementations of Tendermint blockchain verification, including lite clients, 516 will need to be updated. For specific details: 517 518 * [Merkle tree](https://github.com/tendermint/tendermint/blob/v0.34.x/spec/blockchain/encoding.md#merkle-trees) 519 * [ConsensusParams](https://github.com/tendermint/tendermint/blob/v0.34.x/spec/blockchain/state.md#consensusparams) 520 521 There was also a small change to field ordering in the vote struct. Any 522 implementations of an out-of-process validator (like a Key-Management Server) 523 will need to be updated. For specific details: 524 525 * [Vote](https://github.com/tendermint/tendermint/blob/v0.34.x/spec/consensus/signing.md#votes) 526 527 Finally, the proposer selection algorithm continues to evolve. See the 528 [work-in-progress 529 specification](https://github.com/tendermint/tendermint/pull/3140). 530 531 For everything else, please see the [CHANGELOG](./CHANGELOG.md#v0.29.0). 532 533 ## v0.28.0 534 535 This release breaks the format for the `priv_validator.json` file 536 and the protocol used for the external validator process. 537 It is compatible with v0.27.0 blockchains (neither the BlockProtocol nor the 538 P2PProtocol have changed). 539 540 Please read carefully for details about upgrading. 541 542 **Note:** Backup your `config/priv_validator.json` 543 before proceeding. 544 545 ### `priv_validator.json` 546 547 The `config/priv_validator.json` is now two files: 548 `config/priv_validator_key.json` and `data/priv_validator_state.json`. 549 The former contains the key material, the later contains the details on the last 550 message signed. 551 552 When running v0.28.0 for the first time, it will back up any pre-existing 553 `priv_validator.json` file and proceed to split it into the two new files. 554 Upgrading should happen automatically without problem. 555 556 To upgrade manually, use the provided `privValUpgrade.go` script, with exact paths for the old 557 `priv_validator.json` and the locations for the two new files. It's recomended 558 to use the default paths, of `config/priv_validator_key.json` and 559 `data/priv_validator_state.json`, respectively: 560 561 ```sh 562 go run scripts/privValUpgrade.go <old-path> <new-key-path> <new-state-path> 563 ``` 564 565 ### External validator signers 566 567 The Unix and TCP implementations of the remote signing validator 568 have been consolidated into a single implementation. 569 Thus in both cases, the external process is expected to dial 570 Tendermint. This is different from how Unix sockets used to work, where 571 Tendermint dialed the external process. 572 573 The `PubKeyMsg` was also split into separate `Request` and `Response` types 574 for consistency with other messages. 575 576 Note that the TCP sockets don't yet use a persistent key, 577 so while they're encrypted, they can't yet be properly authenticated. 578 See [#3105](https://github.com/tendermint/tendermint/issues/3105). 579 Note the Unix socket has neither encryption nor authentication, but will 580 add a shared-secret in [#3099](https://github.com/tendermint/tendermint/issues/3099). 581 582 ## v0.27.0 583 584 This release contains some breaking changes to the block and p2p protocols, 585 but does not change any core data structures, so it should be compatible with 586 existing blockchains from the v0.26 series that only used Ed25519 validator keys. 587 Blockchains using Secp256k1 for validators will not be compatible. This is due 588 to the fact that we now enforce which key types validators can use as a 589 consensus param. The default is Ed25519, and Secp256k1 must be activated 590 explicitly. 591 592 It is recommended to upgrade all nodes at once to avoid incompatibilities at the 593 peer layer - namely, the heartbeat consensus message has been removed (only 594 relevant if `create_empty_blocks=false` or `create_empty_blocks_interval > 0`), 595 and the proposer selection algorithm has changed. Since proposer information is 596 never included in the blockchain, this change only affects the peer layer. 597 598 ### Go API Changes 599 600 #### libs/db 601 602 The ReverseIterator API has changed the meaning of `start` and `end`. 603 Before, iteration was from `start` to `end`, where 604 `start > end`. Now, iteration is from `end` to `start`, where `start < end`. 605 The iterator also excludes `end`. This change allows a simplified and more 606 intuitive logic, aligning the semantic meaning of `start` and `end` in the 607 `Iterator` and `ReverseIterator`. 608 609 ### Applications 610 611 This release enforces a new consensus parameter, the 612 ValidatorParams.PubKeyTypes. Applications must ensure that they only return 613 validator updates with the allowed PubKeyTypes. If a validator update includes a 614 pubkey type that is not included in the ConsensusParams.Validator.PubKeyTypes, 615 block execution will fail and the consensus will halt. 616 617 By default, only Ed25519 pubkeys may be used for validators. Enabling 618 Secp256k1 requires explicit modification of the ConsensusParams. 619 Please update your application accordingly (ie. restrict validators to only be 620 able to use Ed25519 keys, or explicitly add additional key types to the genesis 621 file). 622 623 ## v0.26.0 624 625 This release contains a lot of changes to core data types and protocols. It is not 626 compatible to the old versions and there is no straight forward way to update 627 old data to be compatible with the new version. 628 629 To reset the state do: 630 631 ```sh 632 tendermint unsafe_reset_all 633 ``` 634 635 Here we summarize some other notable changes to be mindful of. 636 637 ### Config Changes 638 639 All timeouts must be changed from integers to strings with their duration, for 640 instance `flush_throttle_timeout = 100` would be changed to 641 `flush_throttle_timeout = "100ms"` and `timeout_propose = 3000` would be changed 642 to `timeout_propose = "3s"`. 643 644 ### RPC Changes 645 646 The default behavior of `/abci_query` has been changed to not return a proof, 647 and the name of the parameter that controls this has been changed from `trusted` 648 to `prove`. To get proofs with your queries, ensure you set `prove=true`. 649 650 Various version fields like `amino_version`, `p2p_version`, `consensus_version`, 651 and `rpc_version` have been removed from the `node_info.other` and are 652 consolidated under the tendermint semantic version (ie. `node_info.version`) and 653 the new `block` and `p2p` protocol versions under `node_info.protocol_version`. 654 655 ### ABCI Changes 656 657 Field numbers were bumped in the `Header` and `ResponseInfo` messages to make 658 room for new `version` fields. It should be straight forward to recompile the 659 protobuf file for these changes. 660 661 #### Proofs 662 663 The `ResponseQuery.Proof` field is now structured as a `[]ProofOp` to support 664 generalized Merkle tree constructions where the leaves of one Merkle tree are 665 the root of another. If you don't need this functionality, and you used to 666 return `<proof bytes>` here, you should instead return a single `ProofOp` with 667 just the `Data` field set: 668 669 ```go 670 []ProofOp{ 671 ProofOp{ 672 Data: <proof bytes>, 673 } 674 } 675 ``` 676 677 For more information, see: 678 679 * [ADR-026](https://github.com/tendermint/tendermint/blob/30519e8361c19f4bf320ef4d26288ebc621ad725/docs/architecture/adr-026-general-merkle-proof.md) 680 * [Relevant ABCI 681 documentation](https://github.com/tendermint/tendermint/blob/30519e8361c19f4bf320ef4d26288ebc621ad725/docs/spec/abci/apps.md#query-proofs) 682 * [Description of 683 keys](https://github.com/tendermint/tendermint/blob/30519e8361c19f4bf320ef4d26288ebc621ad725/crypto/merkle/proof_key_path.go#L14) 684 685 ### Go API Changes 686 687 #### crypto/merkle 688 689 The `merkle.Hasher` interface was removed. Functions which used to take `Hasher` 690 now simply take `[]byte`. This means that any objects being Merklized should be 691 serialized before they are passed in. 692 693 #### node 694 695 The `node.RunForever` function was removed. Signal handling and running forever 696 should instead be explicitly configured by the caller. See how we do it 697 [here](https://github.com/tendermint/tendermint/blob/30519e8361c19f4bf320ef4d26288ebc621ad725/cmd/tendermint/commands/run_node.go#L60). 698 699 ### Other 700 701 All hashes, except for public key addresses, are now 32-bytes. 702 703 ## v0.25.0 704 705 This release has minimal impact. 706 707 If you use GasWanted in ABCI and want to enforce it, set the MaxGas in the genesis file (default is no max). 708 709 ## v0.24.0 710 711 New 0.24.0 release contains a lot of changes to the state and types. It's not 712 compatible to the old versions and there is no straight forward way to update 713 old data to be compatible with the new version. 714 715 To reset the state do: 716 717 ```sh 718 tendermint unsafe_reset_all 719 ``` 720 721 Here we summarize some other notable changes to be mindful of. 722 723 ### Config changes 724 725 `p2p.max_num_peers` was removed in favor of `p2p.max_num_inbound_peers` and 726 `p2p.max_num_outbound_peers`. 727 728 ```toml 729 # Maximum number of inbound peers 730 max_num_inbound_peers = 40 731 732 # Maximum number of outbound peers to connect to, excluding persistent peers 733 max_num_outbound_peers = 10 734 ``` 735 736 As you can see, the default ratio of inbound/outbound peers is 4/1. The reason 737 is we want it to be easier for new nodes to connect to the network. You can 738 tweak these parameters to alter the network topology. 739 740 ### RPC Changes 741 742 The result of `/commit` used to contain `header` and `commit` fields at the top level. These are now contained under the `signed_header` field. 743 744 ### ABCI Changes 745 746 The header has been upgraded and contains new fields, but none of the existing 747 fields were changed, except their order. 748 749 The `Validator` type was split into two, one containing an `Address` and one 750 containing a `PubKey`. When processing `RequestBeginBlock`, use the `Validator` 751 type, which contains just the `Address`. When returning `ResponseEndBlock`, use 752 the `ValidatorUpdate` type, which contains just the `PubKey`. 753 754 ### Validator Set Updates 755 756 Validator set updates returned in ResponseEndBlock for height `H` used to take 757 effect immediately at height `H+1`. Now they will be delayed one block, to take 758 effect at height `H+2`. Note this means that the change will be seen by the ABCI 759 app in the `RequestBeginBlock.LastCommitInfo` at block `H+3`. Apps were already 760 required to maintain a map from validator addresses to pubkeys since v0.23 (when 761 pubkeys were removed from RequestBeginBlock), but now they may need to track 762 multiple validator sets at once to accomodate this delay. 763 764 ### Block Size 765 766 The `ConsensusParams.BlockSize.MaxTxs` was removed in favour of 767 `ConsensusParams.BlockSize.MaxBytes`, which is now enforced. This means blocks 768 are limitted only by byte-size, not by number of transactions.