You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
8.3 KiB

add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
  1. ## v0.33.6
  2. \*\*
  3. Special thanks to external contributors on this release:
  4. Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermint).
  5. ### BREAKING CHANGES:
  6. - CLI/RPC/Config
  7. - [consensus] \#4582 RoundState: `Round`, `LockedRound` & `CommitRound` are now int32
  8. - [consensus] \#4582 HeightVoteSet: `round` is now int32
  9. - [evidence] \#4725 Remove `Pubkey` from DuplicateVoteEvidence
  10. - [evidence] \#4959 Add json tags to `DuplicateVoteEvidence`
  11. - [crypto] \#4940 All keys have become `[]byte` instead of `[<size>]byte`. The byte method no longer returns the marshaled value but just the `[]byte` form of the data.
  12. - [crypto] \4988 Removal of key type multisig
  13. - The key has been moved to the Cosmos-SDK (https://github.com/cosmos/cosmos-sdk/blob/master/crypto/types/multisig/multisignature.go)
  14. - [crypto] \#4989 Remove `Simple` prefixes from `SimpleProof`, `SimpleValueOp` & `SimpleProofNode`.
  15. - `merkle.Proof` has been renamed to `ProofOps`.
  16. - Protobuf messages `Proof` & `ProofOp` has been moved to `proto/crypto/merkle`
  17. - `SimpleHashFromByteSlices` has been renamed to `HashFromByteSlices`
  18. - `SimpleHashFromByteSlicesIterative` has been renamed to `HashFromByteSlicesIterative`
  19. - `SimpleProofsFromByteSlices` has been renamed to `ProofsFromByteSlices`
  20. - [crypto] \#4941 Remove suffixes from all keys.
  21. - ed25519: type `PrivKeyEd25519` is now `PrivKey`
  22. - ed25519: type `PubKeyEd25519` is now `PubKey`
  23. - secp256k1: type`PrivKeySecp256k1` is now `PrivKey`
  24. - secp256k1: type`PubKeySecp256k1` is now `PubKey`
  25. - sr25519: type `PrivKeySr25519` is now `PrivKey`
  26. - sr25519: type `PubKeySr25519` is now `PubKey`
  27. - multisig: type `PubKeyMultisigThreshold` is now `PubKey`
  28. - [light] \#4946 Rename `lite2` pkg to `light`, the lite cmd has also been renamed to `light`. Remove `lite` implementation.
  29. - [rpc] [\#4792](https://github.com/tendermint/tendermint/pull/4792) `/validators` are now sorted by voting power (@melekes)
  30. - [rpc] \#4937 Return an error when `page` pagination param is 0 in `/validators`, `tx_search` (@melekes)
  31. - [rpc] \#4968 JSON encoding is now handled by `libs/json`, not Amino
  32. - [privval] \#4582 `round` in private_validator_state.json is no longer a string in json it is now a number.
  33. - [proto] \#5025 All proto files have been moved to `/proto` directory.
  34. - Using the recommended the file layout from buf, [see here for more info](https://buf.build/docs/lint-checkers#file_layout)
  35. - [state] \#4679 `TxResult` is a Protobuf type defined in `abci` types directory
  36. - [types] \#4939 `SignedMsgType` has moved to a Protobuf enum types
  37. - [types] \#4939 `Total` in `Parts` & `PartSetHeader` has been changed from a `int` to a `uint32`
  38. - [types] \#4939 Vote: `ValidatorIndex` & `Round` are now int32
  39. - [types] \#4939 Proposal: `POLRound` & `Round` are now int32
  40. - [types] \#4939 Block: `Round` is now int32
  41. - [types] \#4962 `ConsensusParams`, `BlockParams`, `EvidenceParams`, `ValidatorParams` & `HashedParams` are now Protobuf types
  42. - [types] \#4852 Vote & Proposal `SignBytes` is now func `VoteSignBytes` & `ProposalSignBytes`
  43. - [types] \#5029 Rename all values from `PartsHeader` to `PartSetHeader` to have consistency
  44. - Apps
  45. - [abci] [\#4704](https://github.com/tendermint/tendermint/pull/4704) Add ABCI methods `ListSnapshots`, `LoadSnapshotChunk`, `OfferSnapshot`, and `ApplySnapshotChunk` for state sync snapshots. `ABCIVersion` bumped to 0.17.0.
  46. - [abci] \#4989 `Proof` within `ResponseQuery` has been renamed to `ProofOps`
  47. - P2P Protocol
  48. - Go API
  49. - [crypto] [\#4721](https://github.com/tendermint/tendermint/pull/4721) Remove `SimpleHashFromMap()` and `SimpleProofsFromMap()` (@erikgrinaker)
  50. - [libs] \#4831 Remove `Bech32` pkg from Tendermint. This pkg now lives in the [cosmos-sdk](https://github.com/cosmos/cosmos-sdk/tree/4173ea5ebad906dd9b45325bed69b9c655504867/types/bech32)
  51. - [rpc/client] \#4947 `Validators`, `TxSearch` `page`/`per_page` params become pointers (@melekes)
  52. `UnconfirmedTxs` `limit` param is a pointer
  53. - [types] \#4798 Simplify `VerifyCommitTrusting` func + remove extra validation (@melekes)
  54. - [types] \#4845 Remove `ABCIResult`
  55. - Blockchain Protocol
  56. - [blockchain] \#4637 Migrate blockchain reactor(s) to Protobuf encoding
  57. - [evidence] [\#4780](https://github.com/tendermint/tendermint/pull/4780) Cap evidence to an absolute number (@cmwaters)
  58. Add `max_num` to consensus evidence parameters (default: 50 items).
  59. - [evidence] \#4949 Migrate evidence reactor to Protobuf encoding
  60. - [mempool] \#4940 Migrate mempool from to Protobuf encoding
  61. - [light] \#4964 Migrate light reactor migration to Protobuf encoding
  62. - [p2p/pex] \#4973 Migrate `p2p/pex` reactor to Protobuf encoding
  63. - [privval] \#4985 Migrate `privval` reactor to Protobuf encoding
  64. - [statesync] \#4943 Migrate statesync reactor to Protobuf encoding
  65. - [state] \#4845 Include BeginBlock#Events, EndBlock#Events, DeliverTx#Events, GasWanted and GasUsed into `LastResultsHash` (@melekes)
  66. - [state] \#4679 Migrate state reactor to Protobuf encoding
  67. - `BlockStoreStateJSON` is now `BlockStoreState` and is encoded as binary in the database
  68. - [store] \#4778 Migrate store module to Protobuf encoding
  69. - [types] [\#4792](https://github.com/tendermint/tendermint/pull/4792) Sort validators by voting power to enable faster commit verification (@melekes)
  70. ### FEATURES:
  71. - [abci] \#5031 Add `AppVersion` to consensus parameters (@james-ray)
  72. ... making it possible to update your ABCI application version via `EndBlock` response
  73. - [evidence] [\#4532](https://github.com/tendermint/tendermint/pull/4532) Handle evidence from light clients (@melekes)
  74. - [evidence] [#4821](https://github.com/tendermint/tendermint/pull/4821) Amnesia evidence can be detected, verified and committed (@cmwaters)
  75. - [light] [\#4532](https://github.com/tendermint/tendermint/pull/4532) Submit conflicting headers, if any, to a full node & all witnesses (@melekes)
  76. - [p2p] \#4981 Expose `SaveAs` func on NodeKey (@melekes)
  77. - [rpc] [\#4532](https://github.com/tendermint/tendermint/pull/4923) Support `BlockByHash` query (@fedekunze)
  78. - [rpc] \#4979 Support EXISTS operator in `/tx_search` query (@melekes)
  79. - [rpc] \#5017 Add `/check_tx` endpoint to check transactions without executing them or adding them to the mempool (@melekes)
  80. - [statesync] Add state sync support, where a new node can be rapidly bootstrapped by fetching state snapshots from peers instead of replaying blocks. See the `[statesync]` config section.
  81. ### IMPROVEMENTS:
  82. - [consensus] [\#4578](https://github.com/tendermint/tendermint/issues/4578) Attempt to repair the consensus WAL file (`data/cs.wal/wal`) automatically in case of corruption (@alessio)
  83. - [evidence] [\#4722](https://github.com/tendermint/tendermint/pull/4722) Improved evidence db (@cmwaters)
  84. - [evidence] [\#4839](https://github.com/tendermint/tendermint/pull/4839) Reject duplicate evidence from being proposed (@cmwaters)
  85. - [evidence] [\#4892](https://github.com/tendermint/tendermint/pull/4892) Remove redundant header from phantom validator evidence (@cmwaters)
  86. - [light] [\#4935](https://github.com/tendermint/tendermint/pull/4935) Fetch and compare a new header with witnesses in parallel (@melekes)
  87. - [light] [\#4929](https://github.com/tendermint/tendermint/pull/4929) compare header w/ witnesses only when doing bisection (@melekes)
  88. - [light] [\#4916](https://github.com/tendermint/tendermint/pull/4916) validate basic for inbound validator sets and headers before further processing them (@cmwaters)
  89. - [p2p/conn] \#4795 Return err on `signChallenge()` instead of panic
  90. - [state] [\#4781](https://github.com/tendermint/tendermint/pull/4781) Export `InitStateVersion` for the initial state version (@erikgrinaker)
  91. - [txindex] [\#4466](https://github.com/tendermint/tendermint/pull/4466) Allow to index an event at runtime (@favadi)
  92. - `abci.EventAttribute` replaces `KV.Pair`
  93. - [types] [\#4905](https://github.com/tendermint/tendermint/pull/4905) Add ValidateBasic to validator and validator set (@cmwaters)
  94. The original WAL file will be backed up to `data/cs.wal/wal.CORRUPTED`.
  95. ### BUG FIXES:
  96. - [blockchain/v2] Correctly set block store base in status responses (@erikgrinaker)
  97. - [consensus] [\#4895](https://github.com/tendermint/tendermint/pull/4895) Cache the address of the validator to reduce querying a remote KMS (@joe-bowman)
  98. - [consensus] \#4970 Stricter on `LastCommitRound` check (@cuonglm)