diff --git a/.changelog/config.toml b/.changelog/config.toml index de0fee50c2..7d52c95188 100644 --- a/.changelog/config.toml +++ b/.changelog/config.toml @@ -1 +1,17 @@ -project_url = 'https://github.com/cometbft/cometbft' +project_url = 'https://github.com/cometbft/cometbft' + +sort_releases_by = [ + "date", + "version" +] +release_date_formats = [ + # "*December 1, 2023* + "*%B %d, %Y*", + # "*Dec 1, 2023* + "*%b %d, %Y*", + # "2023-12-01" (ISO format) + "%F", +] + +[change_set_sections] +sort_entries_by = "entry-text" diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1010-mempool-interface.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1010-mempool-interface.md new file mode 100644 index 0000000000..a81edaef56 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1010-mempool-interface.md @@ -0,0 +1,4 @@ +`[mempool]` Change the signature of `CheckTx` in the `Mempool` interface to +`CheckTx(tx types.Tx) (*abcicli.ReqRes, error)`. Also, add new method +`SetTxRemovedCallback`. +([\#1010](https://github.com/cometbft/cometbft/issues/1010)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1096-state-store-adr101-methods.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1096-state-store-adr101-methods.md new file mode 100644 index 0000000000..2c1d317b77 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1096-state-store-adr101-methods.md @@ -0,0 +1,3 @@ +- `[state]` The `state.Store` interface has been expanded + to accommodate the data pull companion API of ADR 101 + ([\#1096](https://github.com/cometbft/cometbft/issues/1096)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1141-abci-advanced-proxy.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1141-abci-advanced-proxy.md new file mode 100644 index 0000000000..659094e507 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1141-abci-advanced-proxy.md @@ -0,0 +1,3 @@ +- `[proxy]` Expand `ClientCreator` interface to allow + for per-"connection" control of client creation + ([\#1141](https://github.com/cometbft/cometbft/pull/1141)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1146-mempool-remove-ids.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1146-mempool-remove-ids.md new file mode 100644 index 0000000000..647536c21d --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1146-mempool-remove-ids.md @@ -0,0 +1,3 @@ +- `[mempool]` Remove `mempoolIDs` for internally storing peer ids as `p2p.ID` + instead of `uint16`. + ([\#1146](https://github.com/cometbft/cometbft/pull/1146)) diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1170-rm-replay-cmds.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1170-rm-replay-cmds.md new file mode 100644 index 0000000000..9a3082fca6 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1170-rm-replay-cmds.md @@ -0,0 +1,4 @@ +- `[cmd]` Remove `replay` and `replay-console` subcommands + and corresponding consensus file replay code, such as + `consensus.RunReplayFile`, and `consensus.State.ReplayFile` + ([\#1170](https://github.com/cometbft/cometbft/pull/1170)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1176-blockindexer-pruning.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1176-blockindexer-pruning.md new file mode 100644 index 0000000000..d245622942 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1176-blockindexer-pruning.md @@ -0,0 +1,2 @@ +- `[state/indexer/block]` BlockIndexer now has additional method `Prune`, `GetRetainHeight`, `SetRetainHeight` ([\#1176](https://github.com/cometbft/cometbft/pull/1176)) +- `[state/txindex]` TxIndexer now has additional methods: `Prune`, `GetRetainHeight`, `SetRetainHeight` ([\#1176](https://github.com/cometbft/cometbft/pull/1176)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1287-genesis-doc-hash-from-file.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1287-genesis-doc-hash-from-file.md new file mode 100644 index 0000000000..10900495ea --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1287-genesis-doc-hash-from-file.md @@ -0,0 +1,3 @@ +- `[node]` Change the signature of `GenesisDocProvider` to + return the checksum of JSON content alongside the parsed genesis data + ([\#1287](https://github.com/cometbft/cometbft/issues/1287)). diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1324-load-state-from-gen-file-api.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1324-load-state-from-gen-file-api.md new file mode 100644 index 0000000000..568142971c --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1324-load-state-from-gen-file-api.md @@ -0,0 +1,3 @@ +- `[node]` Go-API breaking: Change the signature of `LoadStateFromDBOrGenesisDocProvider` + to accept an optional operator provided hash of the genesis file + ([\#1324](https://github.com/cometbft/cometbft/pull/1324)). diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1411-bump-p2p-version.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1411-bump-p2p-version.md new file mode 100644 index 0000000000..9569c50a83 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1411-bump-p2p-version.md @@ -0,0 +1,2 @@ +- `[version]` Bumped the P2P version from 8 to 9, as this release contains new P2P messages. + ([\#1411](https://github.com/cometbft/cometbft/pull/1411)) diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1412-rpc-hardcode-websocket.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1412-rpc-hardcode-websocket.md new file mode 100644 index 0000000000..038f750ede --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1412-rpc-hardcode-websocket.md @@ -0,0 +1,3 @@ +- `[rpc/client]` Hard-code the `/websocket` endpoint path such that it is + no longer configurable, removing the related client constructor parameter + ([\#1412](https://github.com/cometbft/cometbft/pull/1412)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-blocksync-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-blocksync-internalize.md new file mode 100644 index 0000000000..a169fac233 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-blocksync-internalize.md @@ -0,0 +1,2 @@ +- `[blocksync]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-consensus-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-consensus-internalize.md new file mode 100644 index 0000000000..2739ee8807 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-consensus-internalize.md @@ -0,0 +1,2 @@ +- `[consensus]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-evidence-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-evidence-internalize.md new file mode 100644 index 0000000000..067496e1cb --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-evidence-internalize.md @@ -0,0 +1,2 @@ +- `[evidence]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-inspect-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-inspect-internalize.md new file mode 100644 index 0000000000..8766b33758 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-inspect-internalize.md @@ -0,0 +1,2 @@ +- `[inspect]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-autofile-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-autofile-internalize.md new file mode 100644 index 0000000000..3fabffd6ca --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-autofile-internalize.md @@ -0,0 +1,2 @@ +- `[libs/autofile]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-bits-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-bits-internalize.md new file mode 100644 index 0000000000..4eb86f8a2a --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-bits-internalize.md @@ -0,0 +1,2 @@ +- `[libs/bits]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-clist-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-clist-internalize.md new file mode 100644 index 0000000000..1fa31ff739 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-clist-internalize.md @@ -0,0 +1,2 @@ +- `[libs/clist]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-cmap-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-cmap-internalize.md new file mode 100644 index 0000000000..6b4533b3a7 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-cmap-internalize.md @@ -0,0 +1,2 @@ +- `[libs/cmap]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-events-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-events-internalize.md new file mode 100644 index 0000000000..378d64198b --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-events-internalize.md @@ -0,0 +1,2 @@ +- `[libs/events]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-fail-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-fail-internalize.md new file mode 100644 index 0000000000..7684f8007b --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-fail-internalize.md @@ -0,0 +1,2 @@ +- `[libs/fail]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-flowrate-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-flowrate-internalize.md new file mode 100644 index 0000000000..a6f6d2701c --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-flowrate-internalize.md @@ -0,0 +1,2 @@ +- `[libs/flowrate]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-net-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-net-internalize.md new file mode 100644 index 0000000000..5dd0922bb1 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-net-internalize.md @@ -0,0 +1,2 @@ +- `[libs/net]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-os-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-os-internalize.md new file mode 100644 index 0000000000..2f3f7adc9b --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-os-internalize.md @@ -0,0 +1,2 @@ +- `[libs/os]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-progressbar-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-progressbar-internalize.md new file mode 100644 index 0000000000..5b28d72807 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-progressbar-internalize.md @@ -0,0 +1,2 @@ +- `[libs/progressbar]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-protoio-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-protoio-internalize.md new file mode 100644 index 0000000000..a45c852dca --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-protoio-internalize.md @@ -0,0 +1,2 @@ +- `[libs/protoio]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-pubsub-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-pubsub-internalize.md new file mode 100644 index 0000000000..27ed0ea0d2 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-pubsub-internalize.md @@ -0,0 +1,2 @@ +- `[libs/pubsub]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-rand-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-rand-internalize.md new file mode 100644 index 0000000000..0eb7fa5e95 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-rand-internalize.md @@ -0,0 +1,2 @@ +- `[libs/rand]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-service-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-service-internalize.md new file mode 100644 index 0000000000..1173388471 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-service-internalize.md @@ -0,0 +1,2 @@ +- `[libs/service]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-strings-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-strings-internalize.md new file mode 100644 index 0000000000..93e8409df2 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-strings-internalize.md @@ -0,0 +1,2 @@ +- `[libs/strings]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-sync-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-sync-internalize.md new file mode 100644 index 0000000000..fe6497de0c --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-sync-internalize.md @@ -0,0 +1,2 @@ +- `[libs/sync]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-tempfile-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-tempfile-internalize.md new file mode 100644 index 0000000000..7d36a9d2e1 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-tempfile-internalize.md @@ -0,0 +1,2 @@ +- `[libs/tempfile]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-timer-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-timer-internalize.md new file mode 100644 index 0000000000..1cdaae8c7f --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libs-timer-internalize.md @@ -0,0 +1,2 @@ +- `[libs/timer]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libsasync-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libsasync-internalize.md new file mode 100644 index 0000000000..460bea8879 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-libsasync-internalize.md @@ -0,0 +1,2 @@ +- `[libs/async]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-state-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-state-internalize.md new file mode 100644 index 0000000000..7c03d56efa --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-state-internalize.md @@ -0,0 +1,2 @@ +- `[state]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-statesync-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-statesync-internalize.md new file mode 100644 index 0000000000..a599b88f4e --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-statesync-internalize.md @@ -0,0 +1,2 @@ +- `[statesync]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1485-store-internalize.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-store-internalize.md new file mode 100644 index 0000000000..c343840e55 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1485-store-internalize.md @@ -0,0 +1,2 @@ +- `[store]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1533-proto-renames-fix-buf-lints.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1533-proto-renames-fix-buf-lints.md new file mode 100644 index 0000000000..af5d622ef7 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1533-proto-renames-fix-buf-lints.md @@ -0,0 +1,10 @@ +- `[abci]` Renamed the alias types for gRPC requests, responses, and service + instances to follow the naming changes in the proto-derived + `api/cometbft/abci/v1` package + ([\#1533](https://github.com/cometbft/cometbft/pull/1533)): + * The prefixed naming pattern `RequestFoo`, `ReponseFoo` changed to + suffixed `FooRequest`, `FooResponse`. + * Each method gets its own unique request and response type to allow for + independent evolution with backward compatibility. + * `ABCIClient` renamed to `ABCIServiceClient`. + * `ABCIServer` renamed to `ABCIServiceServer`. diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1556-return-meta-with-load-block.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1556-return-meta-with-load-block.md new file mode 100644 index 0000000000..a21aaeec1d --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1556-return-meta-with-load-block.md @@ -0,0 +1,2 @@ +- `[store]` Make the `LoadBlock` method also return block metadata + ([\#1556](https://github.com/cometbft/cometbft/issues/1556)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1561-standalone-api-go-mod.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1561-standalone-api-go-mod.md new file mode 100644 index 0000000000..eff21a95cb --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1561-standalone-api-go-mod.md @@ -0,0 +1,2 @@ +- Made `/api` a standalone Go module with its own `go.mod` + ([\#1561](https://github.com/cometbft/cometbft/issues/1561)) diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/1621-rename-version-variables.md b/.changelog/v1.0.0-alpha.1/breaking-changes/1621-rename-version-variables.md new file mode 100644 index 0000000000..15bba521c3 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/1621-rename-version-variables.md @@ -0,0 +1,2 @@ +- `[comet]` Version variables, in `version/version.go`, have been renamed to reflect the CometBFT rebranding. + ([cometbft/cometbft\#1621](https://github.com/cometbft/cometbft/pull/1621)) diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/495-proto-version-packages.md b/.changelog/v1.0.0-alpha.1/breaking-changes/495-proto-version-packages.md new file mode 100644 index 0000000000..7697f09370 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/495-proto-version-packages.md @@ -0,0 +1,10 @@ +- `[proto]` Renamed the packages from `tendermint.*` to `cometbft.*` + and introduced versioned packages to distinguish between proto definitions + released in 0.34.x, 0.37.x, 0.38.x, and 1.0.x versions. + Prior to the 1.0 release, the versioned packages are suffixed with + `.v1beta1`, `.v1beta2`, and so on; all definitions describing the protocols + as per the 1.0.0 release are in packages suffixed with `.v1`. + Relocated generated Go code into a new `api` folder and changed the import + paths accordingly. + ([\#495](https://github.com/cometbft/cometbft/pull/495) + [\#1504](https://github.com/cometbft/cometbft/issues/1504)) diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/558-tm10011-B.md b/.changelog/v1.0.0-alpha.1/breaking-changes/558-tm10011-B.md new file mode 100644 index 0000000000..be3c8802c5 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/558-tm10011-B.md @@ -0,0 +1,2 @@ +- `[crypto/merkle]` The public `Proof.ComputeRootHash` function has been deleted. + ([\#558](https://github.com/cometbft/cometbft/issues/558)) diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/650-rm-grpc-broadcast-api.md b/.changelog/v1.0.0-alpha.1/breaking-changes/650-rm-grpc-broadcast-api.md new file mode 100644 index 0000000000..f1465a6909 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/650-rm-grpc-broadcast-api.md @@ -0,0 +1,2 @@ +- `[rpc/grpc]` Remove the deprecated gRPC broadcast API + ([\#650](https://github.com/cometbft/cometbft/issues/650)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/736-proto-enum-rename.md b/.changelog/v1.0.0-alpha.1/breaking-changes/736-proto-enum-rename.md new file mode 100644 index 0000000000..892902110b --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/736-proto-enum-rename.md @@ -0,0 +1,7 @@ +- `[abci]` Changed the proto-derived enum type and constant aliases to the + buf-recommended naming conventions adopted in the `abci/v1` proto package. + For example, `ResponseProcessProposal_ACCEPT` is renamed to `PROCESS_PROPOSAL_STATUS_ACCEPT` + ([\#736](https://github.com/cometbft/cometbft/issues/736)). +- `[abci]` The `Type` enum field is now required to be set to a value other + than the default `CHECK_TX_TYPE_UNKNOWN` for a valid `CheckTxRequest` + ([\#736](https://github.com/cometbft/cometbft/issues/736)). diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/785-reject-incoming-txs-while-catching-up.md b/.changelog/v1.0.0-alpha.1/breaking-changes/785-reject-incoming-txs-while-catching-up.md new file mode 100644 index 0000000000..e545f97c70 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/785-reject-incoming-txs-while-catching-up.md @@ -0,0 +1,7 @@ +- `[rpc]` The endpoints `broadcast_tx_*` now return an error when the node is + performing block sync or state sync. + ([\#785](https://github.com/cometbft/cometbft/issues/785)) +- `[mempool]` When the node is performing block sync or state sync, the mempool + reactor now discards incoming transactions from peers, and does not propagate + transactions to peers. + ([\#785](https://github.com/cometbft/cometbft/issues/785)) diff --git a/.changelog/v1.0.0-alpha.1/breaking-changes/857-handshake-api-ctx.md b/.changelog/v1.0.0-alpha.1/breaking-changes/857-handshake-api-ctx.md new file mode 100644 index 0000000000..6fe0155850 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/breaking-changes/857-handshake-api-ctx.md @@ -0,0 +1,2 @@ +- `[consensus]` `Handshaker.Handshake` now requires `context.Context` ([cometbft/cometbft\#857](https://github.com/cometbft/cometbft/pull/857)) +- `[node]` `NewNode` now requires `context.Context` as the first parameter ([cometbft/cometbft\#857](https://github.com/cometbft/cometbft/pull/857)) diff --git a/.changelog/v1.0.0-alpha.1/bug-fixes/1175-consensus-prevote-improve-logic.md b/.changelog/v1.0.0-alpha.1/bug-fixes/1175-consensus-prevote-improve-logic.md new file mode 100644 index 0000000000..67afa08dee --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/bug-fixes/1175-consensus-prevote-improve-logic.md @@ -0,0 +1,3 @@ +- `[consensus]` Consensus now prevotes `nil` when the proposed value does not + match the value the local validator has locked on + ([\#1203](https://github.com/cometbft/cometbft/pull/1203)) diff --git a/.changelog/v1.0.0-alpha.1/bug-fixes/1175-consensus-remove-unlock-behavior.md b/.changelog/v1.0.0-alpha.1/bug-fixes/1175-consensus-remove-unlock-behavior.md new file mode 100644 index 0000000000..644fa34ee3 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/bug-fixes/1175-consensus-remove-unlock-behavior.md @@ -0,0 +1,2 @@ +- `[consensus]` Remove logic to unlock block on +2/3 prevote for nil + ([\#1175](https://github.com/cometbft/cometbft/pull/1175): @BrendanChou) diff --git a/.changelog/v1.0.0-alpha.1/bug-fixes/1529-indexer-respect-height-params-on-query.md b/.changelog/v1.0.0-alpha.1/bug-fixes/1529-indexer-respect-height-params-on-query.md new file mode 100644 index 0000000000..d12f3eda53 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/bug-fixes/1529-indexer-respect-height-params-on-query.md @@ -0,0 +1,2 @@ +- `[state/indexer]` Respect both height params while querying for events + ([\#1529](https://github.com/cometbft/cometbft/pull/1529)) diff --git a/.changelog/v1.0.0-alpha.1/bug-fixes/1616-pruning-dont-prune-state-when-no-blocks-pruned.md b/.changelog/v1.0.0-alpha.1/bug-fixes/1616-pruning-dont-prune-state-when-no-blocks-pruned.md new file mode 100644 index 0000000000..81de0a48e6 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/bug-fixes/1616-pruning-dont-prune-state-when-no-blocks-pruned.md @@ -0,0 +1,2 @@ +- `[state/pruning]` When no blocks are pruned, do not attempt to prune statestore + ([\#1616](https://github.com/cometbft/cometbft/pull/1616)) diff --git a/.changelog/unreleased/dependencies/1725-cometbft-db.md b/.changelog/v1.0.0-alpha.1/dependencies/1725-cometbft-db.md similarity index 100% rename from .changelog/unreleased/dependencies/1725-cometbft-db.md rename to .changelog/v1.0.0-alpha.1/dependencies/1725-cometbft-db.md diff --git a/.changelog/v1.0.0-alpha.1/features/1094-grpc-block-service-cfg.md b/.changelog/v1.0.0-alpha.1/features/1094-grpc-block-service-cfg.md new file mode 100644 index 0000000000..f0892b3a14 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/1094-grpc-block-service-cfg.md @@ -0,0 +1,2 @@ +- `[config]` Add `[grpc.block_service]` section to configure gRPC `BlockService` + ([\#1094](https://github.com/cometbft/cometbft/issues/1094)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/features/1094-grpc-block-service.md b/.changelog/v1.0.0-alpha.1/features/1094-grpc-block-service.md new file mode 100644 index 0000000000..543e1d6d1e --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/1094-grpc-block-service.md @@ -0,0 +1,3 @@ +- `[grpc]` Add `BlockService` with client to facilitate fetching of blocks and + streaming of the latest committed block height + ([\#1094](https://github.com/cometbft/cometbft/issues/1094)) diff --git a/.changelog/v1.0.0-alpha.1/features/1095-grpc-block-results-service-cfg.md b/.changelog/v1.0.0-alpha.1/features/1095-grpc-block-results-service-cfg.md new file mode 100644 index 0000000000..bc3d18f3e0 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/1095-grpc-block-results-service-cfg.md @@ -0,0 +1,2 @@ +- `[config]` Add `[grpc.block_results_service]` gRPC configuration `BlockResultsService` + ([\#1095](https://github.com/cometbft/cometbft/issues/1095)) diff --git a/.changelog/v1.0.0-alpha.1/features/1095-grpc-block-results-service.md b/.changelog/v1.0.0-alpha.1/features/1095-grpc-block-results-service.md new file mode 100644 index 0000000000..51c6713ebf --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/1095-grpc-block-results-service.md @@ -0,0 +1,3 @@ +- `[grpc]` Add `BlockResultsService` with client to fetch BlockResults + for a given height, or latest. + ([\#1095](https://github.com/cometbft/cometbft/issues/1095)) diff --git a/.changelog/v1.0.0-alpha.1/features/1097-pruning-service.md b/.changelog/v1.0.0-alpha.1/features/1097-pruning-service.md new file mode 100644 index 0000000000..47882ff8b2 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/1097-pruning-service.md @@ -0,0 +1,23 @@ +- `[proto]` Add definitions and generated code for + [ADR-101](./docs/architecture/adr-101-data-companion-pull-api.md) + `PruningService` in the `cometbft.services.pruning.v1` proto package + ([\#1097](https://github.com/cometbft/cometbft/issues/1097)). +- `[rpc/grpc]` Add privileged gRPC server and client facilities, in + `server/privileged` and `client/privileged` packages respectively, to + enable a separate API server within the node which serves trusted clients + without authentication and should never be exposed to public internet + ([\#1097](https://github.com/cometbft/cometbft/issues/1097)). +- `[rpc/grpc]` Add a pruning service adding on the privileged gRPC server API to + give an [ADR-101](./docs/architecture/adr-101-data-companion-pull-api.md) data + companion control over block data retained by the node. The + `WithPruningService` option method in `server/privileged` is provided to + configure the pruning service + ([\#1097](https://github.com/cometbft/cometbft/issues/1097)). +- `[rpc/grpc]` Add `PruningServiceClient` interface + for the gRPC client in `client/privileged` along with a configuration option + to enable it + ([\#1097](https://github.com/cometbft/cometbft/issues/1097)). +- `[config]` Add `[grpc.privileged]` section to configure the privileged + gRPC server for the node, and `[grpc.privileged.pruning_service]` section + to control the pruning service + ([\#1097](https://github.com/cometbft/cometbft/issues/1097)). diff --git a/.changelog/v1.0.0-alpha.1/features/1234-pruning-metrics.md b/.changelog/v1.0.0-alpha.1/features/1234-pruning-metrics.md new file mode 100644 index 0000000000..d7d9b8952e --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/1234-pruning-metrics.md @@ -0,0 +1,2 @@ +- `[metrics]` Add metrics to monitor pruning and current available data in stores: `PruningServiceBlockRetainHeight`, `PruningServiceBlockResultsRetainHeight`, `ApplicationBlockRetainHeight`, `BlockStoreBaseHeight`, `ABCIResultsBaseHeight`. + ([\#1234](https://github.com/cometbft/cometbft/pull/1234)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/features/1327-grpc-pruning-indexer.md b/.changelog/v1.0.0-alpha.1/features/1327-grpc-pruning-indexer.md new file mode 100644 index 0000000000..c07d7bafb3 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/1327-grpc-pruning-indexer.md @@ -0,0 +1,2 @@ +`[rpc/grpc]` Add gRPC endpoint for pruning the block and transaction indexes +([\#1327](https://github.com/cometbft/cometbft/pull/1327)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/features/1334-metrics-for-index-pruning.md b/.changelog/v1.0.0-alpha.1/features/1334-metrics-for-index-pruning.md new file mode 100644 index 0000000000..92129c1ba6 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/1334-metrics-for-index-pruning.md @@ -0,0 +1,2 @@ +- `[state]` Add TxIndexer and BlockIndexer pruning metrics + ([\#1334](https://github.com/cometbft/cometbft/issues/1334)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/features/1512-metric-mempool-size-bytes.md b/.changelog/v1.0.0-alpha.1/features/1512-metric-mempool-size-bytes.md new file mode 100644 index 0000000000..b935dc4084 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/1512-metric-mempool-size-bytes.md @@ -0,0 +1,2 @@ +- `[metrics]` Add metric for mempool size in bytes `SizeBytes`. + ([\#1512](https://github.com/cometbft/cometbft/pull/1512)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/features/1643-nop-mempool.md b/.changelog/v1.0.0-alpha.1/features/1643-nop-mempool.md new file mode 100644 index 0000000000..e12ec43fc1 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/1643-nop-mempool.md @@ -0,0 +1,17 @@ +- `[mempool]` Add `nop` mempool ([\#1643](https://github.com/cometbft/cometbft/pull/1643)) + + If you want to use it, change mempool's `type` to `nop`: + + ```toml + [mempool] + + # The type of mempool for this node to use. + # + # Possible types: + # - "flood" : concurrent linked list mempool with flooding gossip protocol + # (default) + # - "nop" : nop-mempool (short for no operation; the ABCI app is responsible + # for storing, disseminating and proposing txs). "create_empty_blocks=false" + # is not supported. + type = "nop" + ``` \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/features/816-grpc-client.md b/.changelog/v1.0.0-alpha.1/features/816-grpc-client.md new file mode 100644 index 0000000000..e1511882bf --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/816-grpc-client.md @@ -0,0 +1,2 @@ +- `[rpc/grpc]` Add gRPC client with support for version service + ([\#816](https://github.com/cometbft/cometbft/issues/816)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/features/816-grpc-server.md b/.changelog/v1.0.0-alpha.1/features/816-grpc-server.md new file mode 100644 index 0000000000..eba1d7fccd --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/816-grpc-server.md @@ -0,0 +1,3 @@ +- `[rpc/grpc]` Add gRPC server to the node, configurable + via a new `[grpc]` section in the configuration file + ([\#816](https://github.com/cometbft/cometbft/issues/816)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/features/816-grpc-version-service.md b/.changelog/v1.0.0-alpha.1/features/816-grpc-version-service.md new file mode 100644 index 0000000000..0d3ca50c6f --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/features/816-grpc-version-service.md @@ -0,0 +1,3 @@ +- `[rpc/grpc]` Add gRPC version service to allow clients to + establish the software and protocol versions of the node + ([\#816](https://github.com/cometbft/cometbft/issues/816)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/1017-remove-genesis-persistence-in-state-db.md b/.changelog/v1.0.0-alpha.1/improvements/1017-remove-genesis-persistence-in-state-db.md new file mode 100644 index 0000000000..1391782508 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1017-remove-genesis-persistence-in-state-db.md @@ -0,0 +1,3 @@ +- `[node]` Remove genesis persistence in state db, replaced by a hash + ([cometbft/cometbft\#1017](https://github.com/cometbft/cometbft/pull/1017), + [cometbft/cometbft\#1295](https://github.com/cometbft/cometbft/pull/1295)) diff --git a/.changelog/v1.0.0-alpha.1/improvements/1022-log-invalid-vote-extension.md b/.changelog/v1.0.0-alpha.1/improvements/1022-log-invalid-vote-extension.md new file mode 100644 index 0000000000..8e015ae41f --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1022-log-invalid-vote-extension.md @@ -0,0 +1,2 @@ +- `[consensus]` Log vote validation failures at info level + ([\#1022](https://github.com/cometbft/cometbft/pull/1022)) diff --git a/.changelog/v1.0.0-alpha.1/improvements/1096-config-pruner.md b/.changelog/v1.0.0-alpha.1/improvements/1096-config-pruner.md new file mode 100644 index 0000000000..045a436499 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1096-config-pruner.md @@ -0,0 +1,3 @@ +- `[config]` Added `[storage.pruning]` and `[storage.pruning.data_companion]` + sections to facilitate background pruning and data companion (ADR 101) + operations ([\#1096](https://github.com/cometbft/cometbft/issues/1096)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/1096-node-pruner.md b/.changelog/v1.0.0-alpha.1/improvements/1096-node-pruner.md new file mode 100644 index 0000000000..ba9f412fc9 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1096-node-pruner.md @@ -0,0 +1,3 @@ +- `[node]` The `node.Node` struct now manages a + `state.Pruner` service to facilitate background pruning + ([\#1096](https://github.com/cometbft/cometbft/issues/1096)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/1096-state-abcires-pruning.md b/.changelog/v1.0.0-alpha.1/improvements/1096-state-abcires-pruning.md new file mode 100644 index 0000000000..efb451b1df --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1096-state-abcires-pruning.md @@ -0,0 +1,2 @@ +- `[state]` ABCI response pruning has been added for use by the data companion + ([\#1096](https://github.com/cometbft/cometbft/issues/1096)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/1096-state-background-pruning.md b/.changelog/v1.0.0-alpha.1/improvements/1096-state-background-pruning.md new file mode 100644 index 0000000000..7c6fd66214 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1096-state-background-pruning.md @@ -0,0 +1,2 @@ +- `[state]` Block pruning has been moved from the block executor into a + background process ([\#1096](https://github.com/cometbft/cometbft/issues/1096)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/1141-abci-consensus-syncd-proxy.md b/.changelog/v1.0.0-alpha.1/improvements/1141-abci-consensus-syncd-proxy.md new file mode 100644 index 0000000000..a2e8c09ce6 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1141-abci-consensus-syncd-proxy.md @@ -0,0 +1,4 @@ +- `[abci/client]` Add consensus-synchronized local client creator, + which only imposes a mutex on the consensus "connection", leaving + the concurrency of all other "connections" up to the application + ([\#1141](https://github.com/cometbft/cometbft/pull/1141)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/1141-abci-unsync-proxy.md b/.changelog/v1.0.0-alpha.1/improvements/1141-abci-unsync-proxy.md new file mode 100644 index 0000000000..4937c2f9c1 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1141-abci-unsync-proxy.md @@ -0,0 +1,3 @@ +- `[abci/client]` Add fully unsynchronized local client creator, which + imposes no mutexes on the application, leaving all handling of concurrency up + to the application ([\#1141](https://github.com/cometbft/cometbft/pull/1141)) diff --git a/.changelog/v1.0.0-alpha.1/improvements/1230-consensus-process-proposal-once.md b/.changelog/v1.0.0-alpha.1/improvements/1230-consensus-process-proposal-once.md new file mode 100644 index 0000000000..a06acfc27b --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1230-consensus-process-proposal-once.md @@ -0,0 +1,3 @@ +- `[consensus]` When prevoting, avoid calling PropocessProposal when we know the + proposal was already validated by correct nodes. + ([\#1230](https://github.com/cometbft/cometbft/pull/1230)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/1297-remove-genesis-from-db-upgrade.md b/.changelog/v1.0.0-alpha.1/improvements/1297-remove-genesis-from-db-upgrade.md new file mode 100644 index 0000000000..e7772829b3 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1297-remove-genesis-from-db-upgrade.md @@ -0,0 +1,2 @@ +- `[node]` On upgrade, after [\#1296](https://github.com/cometbft/cometbft/pull/1296), delete the genesis file existing in the DB. + ([cometbft/cometbft\#1297](https://github.com/cometbft/cometbft/pull/1297) diff --git a/.changelog/v1.0.0-alpha.1/improvements/1324-cli-genesis-hash-checked-on-load.md b/.changelog/v1.0.0-alpha.1/improvements/1324-cli-genesis-hash-checked-on-load.md new file mode 100644 index 0000000000..729c5252fe --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1324-cli-genesis-hash-checked-on-load.md @@ -0,0 +1,3 @@ +- `[cli/node]` The genesis hash provided with the `--genesis-hash` is now + forwarded to the node, instead of reading the file. + ([\#1324](https://github.com/cometbft/cometbft/pull/1324)). \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/1412-rpc-versioning.md b/.changelog/v1.0.0-alpha.1/improvements/1412-rpc-versioning.md new file mode 100644 index 0000000000..e809d20ea4 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1412-rpc-versioning.md @@ -0,0 +1,3 @@ +- `[rpc]` The RPC API is now versioned, with all existing endpoints accessible + via `/v1/*` as well as `/*` + ([\#1412](https://github.com/cometbft/cometbft/pull/1412)) diff --git a/.changelog/v1.0.0-alpha.1/improvements/1518-reduce-default-maxbytes_increase_maxgas b/.changelog/v1.0.0-alpha.1/improvements/1518-reduce-default-maxbytes_increase_maxgas new file mode 100644 index 0000000000..85b84c65cf --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1518-reduce-default-maxbytes_increase_maxgas @@ -0,0 +1,2 @@ +- `[consensus]` Reduce the default MaxBytes to 4MB and increase MaxGas to 10 million + ([\#1518](https://github.com/cometbft/cometbft/pull/1518)) diff --git a/.changelog/v1.0.0-alpha.1/improvements/1558-experimental-gossip-limiting.md b/.changelog/v1.0.0-alpha.1/improvements/1558-experimental-gossip-limiting.md new file mode 100644 index 0000000000..6931cef827 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1558-experimental-gossip-limiting.md @@ -0,0 +1,9 @@ +- `[mempool]` Add experimental feature to limit the number of persistent peers and non-persistent + peers to which the node gossip transactions. + ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) + ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) +- `[config]` Add mempool parameters `experimental_max_gossip_connections_to_persistent_peers` and + `experimental_max_gossip_connections_to_non_persistent_peers` for limiting the number of peers to + which the node gossip transactions. + ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) + ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) diff --git a/.changelog/v1.0.0-alpha.1/improvements/1560-e2e-latency-emulation.md b/.changelog/v1.0.0-alpha.1/improvements/1560-e2e-latency-emulation.md new file mode 100644 index 0000000000..77dc608db3 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1560-e2e-latency-emulation.md @@ -0,0 +1,2 @@ +- `[e2e]` Allow latency emulation between nodes. + ([\#1560](https://github.com/cometbft/cometbft/pull/1560)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/1579-e2e-disable-pex-reactor.md b/.changelog/v1.0.0-alpha.1/improvements/1579-e2e-disable-pex-reactor.md new file mode 100644 index 0000000000..069026a41e --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1579-e2e-disable-pex-reactor.md @@ -0,0 +1,2 @@ +- `[e2e]` Allow disabling the PEX reactor on all nodes in the testnet + ([\#1579](https://github.com/cometbft/cometbft/pull/1579)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/1594-export-makehttpdialer.md b/.changelog/v1.0.0-alpha.1/improvements/1594-export-makehttpdialer.md new file mode 100644 index 0000000000..dfd1cd8102 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/1594-export-makehttpdialer.md @@ -0,0 +1,2 @@ +- `[rpc]` Export `MakeHTTPDialer` to allow HTTP client constructors more flexibility. + ([\#1594](https://github.com/cometbft/cometbft/pull/1594)) diff --git a/.changelog/v1.0.0-alpha.1/improvements/169-tx_index-pruning.md b/.changelog/v1.0.0-alpha.1/improvements/169-tx_index-pruning.md new file mode 100644 index 0000000000..957462f688 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/169-tx_index-pruning.md @@ -0,0 +1,2 @@ +- `[state/indexer]` Add transaction and block index pruning + ([\#1176](https://github.com/cometbft/cometbft/pull/1176)) \ No newline at end of file diff --git a/.changelog/unreleased/improvements/1715-validate-validator-address b/.changelog/v1.0.0-alpha.1/improvements/1715-validate-validator-address.md similarity index 100% rename from .changelog/unreleased/improvements/1715-validate-validator-address rename to .changelog/v1.0.0-alpha.1/improvements/1715-validate-validator-address.md diff --git a/.changelog/v1.0.0-alpha.1/improvements/634-mempool-metric-times-tx-was-received.md b/.changelog/v1.0.0-alpha.1/improvements/634-mempool-metric-times-tx-was-received.md new file mode 100644 index 0000000000..0de610b5ea --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/634-mempool-metric-times-tx-was-received.md @@ -0,0 +1,2 @@ +- `[mempool]` Add a metric (a counter) to measure whether a tx was received more than once. + ([\#634](https://github.com/cometbft/cometbft/pull/634)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/736+-proto-renaming.md b/.changelog/v1.0.0-alpha.1/improvements/736+-proto-renaming.md new file mode 100644 index 0000000000..782acf6ebe --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/736+-proto-renaming.md @@ -0,0 +1,28 @@ +- `[proto]` The names in the `cometbft.abci.v1` versioned proto package + are changed to satisfy the + [buf guidelines](https://buf.build/docs/best-practices/style-guide/) + ([#736](https://github.com/cometbft/cometbft/issues/736), + [#1504](https://github.com/cometbft/cometbft/issues/1504), + [#1530](https://github.com/cometbft/cometbft/issues/1530)): + * Names of request and response types used in gRPC changed by making + `Request`/`Response` the suffix instead of the prefix, e.g. + `RequestCheckTx` ⭢ `CheckTxRequest`. + * The `Request` and `Response` multiplex messages are redefined accordingly. + * `CheckTxType` values renamed with the `CHECK_TX_TYPE_` prefix. + * `MisbehaviorType` values renamed with the `MISBEHAVIOR_TYPE_` prefix. + * `Result` enum formerly nested in `ResponseOfferSnapshot` replaced with the package-level + `OfferSnapshotResult`, its values named with the + `OFFER_SNAPSHOT_RESULT_` prefix. + * `Result` enum formerly nested in `ResponseApplyShapshotChunk` replaced with the package-level + `ApplySnapshotChunkResult`, its values named with the + `APPLY_SNAPSHOT_CHUNK_RESULT_` prefix. + * `Status` enum formerly nested in `ResponseProcessProposal` replaced with the package-level + `ProcessProposalStatus`, its values named with the + `PROCESS_PROPOSAL_STATUS_` prefix. + * `Status` enum formerly nested in `ResponseVerifyVoteExtension` replaced with the package-level + `VerifyVoteExtensionStatus`, its values named with the + `VERIFY_VOTE_EXTENSION_STATUS_` prefix. + * New definition of `Misbehavior` using the changed `MisbehaviorType`. + * The gRPC service is renamed `ABCIService` and defined using the types listed above. +- `[proto]` In the `cometbft.state.v1` package, the definition for `ABCIResponsesInfo` + is changed, renaming `response_finalize_block` field to `finalize_block`. diff --git a/.changelog/v1.0.0-alpha.1/improvements/896-consensus-metric-duplicates.md b/.changelog/v1.0.0-alpha.1/improvements/896-consensus-metric-duplicates.md new file mode 100644 index 0000000000..5661da834a --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/896-consensus-metric-duplicates.md @@ -0,0 +1,2 @@ +- `[consensus]` New metrics (counters) to track duplicate votes and block parts. + ([\#896](https://github.com/cometbft/cometbft/pull/896)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/904-gossip-sleep-had-block-part.md b/.changelog/v1.0.0-alpha.1/improvements/904-gossip-sleep-had-block-part.md new file mode 100644 index 0000000000..2374ea82fd --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/904-gossip-sleep-had-block-part.md @@ -0,0 +1,6 @@ +- `[consensus]` Optimize vote and block part gossip with new message `HasProposalBlockPartMessage`, + which is similar to `HasVoteMessage`; and random sleep in the loop broadcasting those messages. + The sleep can be configured with new config `peer_gossip_intraloop_sleep_duration`, which is set to 0 + by default as this is experimental. + Our scale tests show substantial bandwidth improvement with a value of 50 ms. + ([\#904](https://github.com/cometbft/cometbft/pull/904)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/improvements/955-lightclient-spec.md b/.changelog/v1.0.0-alpha.1/improvements/955-lightclient-spec.md new file mode 100644 index 0000000000..24680c39dc --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/improvements/955-lightclient-spec.md @@ -0,0 +1 @@ +- Update Apalache type annotations in the light client spec ([#955](https://github.com/cometbft/cometbft/pull/955)) diff --git a/.changelog/v1.0.0-alpha.1/minimum-go-version/1244-bump-go-version.md b/.changelog/v1.0.0-alpha.1/minimum-go-version/1244-bump-go-version.md new file mode 100644 index 0000000000..e04bb31d4e --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/minimum-go-version/1244-bump-go-version.md @@ -0,0 +1,2 @@ +- Bump minimum Go version to v1.21 + ([\#1244](https://github.com/cometbft/cometbft/pull/1244)) \ No newline at end of file diff --git a/.changelog/v1.0.0-alpha.1/summary.md b/.changelog/v1.0.0-alpha.1/summary.md new file mode 100644 index 0000000000..fc51739ab7 --- /dev/null +++ b/.changelog/v1.0.0-alpha.1/summary.md @@ -0,0 +1,46 @@ +*December 4, 2023* + +This is a major release of CometBFT that includes several substantial changes +that aim to reduce bandwidth consumption, enable modularity, improve +integrators' experience and increase the velocity of the CometBFT development +team, including: + +1. Validators now proactively communicate the block parts they already have so + others do not resend them, reducing amplification in the network and reducing + bandwidth consumption. +2. An experimental feature in the mempool that allows limiting the number of + peers to which transactions are forwarded, allowing operators to optimize + gossip-related bandwidth consumption further. +3. An opt-in `nop` mempool, which allows application developers to turn off all + mempool-related functionality in Comet such that they can build their own + transaction dissemination mechanism, for example a standalone mempool-like + process that can be scaled independently of the consensus engine/application. + This requires application developers to implement their own gossip/networking + mechanisms. See [ADR 111](./docs/architecture/adr-111-nop-mempool.md) for + details. +4. The first officially supported release of the [data companion + API](./docs/architecture/adr-101-data-companion-pull-api.md). +5. Versioning of both the Protobuf definitions _and_ RPC. By versioning our + APIs, we aim to provide a level of commitment to API stability while + simultaneously affording ourselves the ability to roll out substantial + changes in non-breaking releases of CometBFT. See [ADR + 103](./docs/architecture/adr-103-proto-versioning.md) and [ADR + 107](./docs/architecture/adr-107-betaize-proto-versions.md). +6. Moving many Go packages that are currently publicly accessible into the + `internal` directory such that the team can roll out substantial changes in + future without needing to worry about causing breakages in users' codebases. + The massive surface area of previous versions has in the past significantly + hampered the team's ability to roll out impactful new changes to users, as + previously such changes required a new breaking release (which currently + takes 6 to 12 months to reach production use for many users). See [ADR + 109](./docs/architecture/adr-109-reduce-go-api-surface.md) for more details. + +None of these changes are state machine-breaking for CometBFT-based networks, +but could be breaking for some users who depend on the Protobuf definitions type +URLs. See the [upgrading guidelines](./UPGRADING.md) and specific changes below +for more details. + +**NB: This version is still an alpha-series release, which means that +API-breaking changes might still be introduced until such time that a _release +candidate_ is cut.** See [RELEASES.md](./RELEASES.md) for more information on +the stability guarantees we provide for pre-releases. diff --git a/CHANGELOG.md b/CHANGELOG.md index cbb87a8da2..392b26168a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,214 @@ # CHANGELOG -## v0.38.2 - -*November 27, 2023* +## v1.0.0-alpha.1 + +*December 4, 2023* + +This is a major release of CometBFT that includes several substantial changes +that aim to reduce bandwidth consumption, enable modularity, improve +integrators' experience and increase the velocity of the CometBFT development +team, including: + +1. Validators now proactively communicate the block parts they already have so + others do not resend them, reducing amplification in the network and reducing + bandwidth consumption. +2. An experimental feature in the mempool that allows limiting the number of + peers to which transactions are forwarded, allowing operators to optimize + gossip-related bandwidth consumption further. +3. An opt-in `nop` mempool, which allows application developers to turn off all + mempool-related functionality in Comet such that they can build their own + transaction dissemination mechanism, for example a standalone mempool-like + process that can be scaled independently of the consensus engine/application. + This requires application developers to implement their own gossip/networking + mechanisms. See [ADR 111](./docs/architecture/adr-111-nop-mempool.md) for + details. +4. The first officially supported release of the [data companion + API](./docs/architecture/adr-101-data-companion-pull-api.md). +5. Versioning of both the Protobuf definitions _and_ RPC. By versioning our + APIs, we aim to provide a level of commitment to API stability while + simultaneously affording ourselves the ability to roll out substantial + changes in non-breaking releases of CometBFT. See [ADR + 103](./docs/architecture/adr-103-proto-versioning.md) and [ADR + 107](./docs/architecture/adr-107-betaize-proto-versions.md). +6. Moving many Go packages that are currently publicly accessible into the + `internal` directory such that the team can roll out substantial changes in + future without needing to worry about causing breakages in users' codebases. + The massive surface area of previous versions has in the past significantly + hampered the team's ability to roll out impactful new changes to users, as + previously such changes required a new breaking release (which currently + takes 6 to 12 months to reach production use for many users). See [ADR + 109](./docs/architecture/adr-109-reduce-go-api-surface.md) for more details. + +None of these changes are state machine-breaking for CometBFT-based networks, +but could be breaking for some users who depend on the Protobuf definitions type +URLs. See the [upgrading guidelines](./UPGRADING.md) and specific changes below +for more details. + +**NB: This version is still an alpha-series release, which means that +API-breaking changes might still be introduced until such time that a _release +candidate_ is cut.** See [RELEASES.md](./RELEASES.md) for more information on +the stability guarantees we provide for pre-releases. -This release provides the **nop** mempool for applications that want to build their own mempool. -Using this mempool effectively disables all mempool functionality in CometBFT, including transaction dissemination and the `broadcast_tx_*` endpoints. +### BREAKING CHANGES -Also fixes a small bug in the mempool for an experimental feature. +- Made `/api` a standalone Go module with its own `go.mod` + ([\#1561](https://github.com/cometbft/cometbft/issues/1561)) +- `[abci]` Changed the proto-derived enum type and constant aliases to the + buf-recommended naming conventions adopted in the `abci/v1` proto package. + For example, `ResponseProcessProposal_ACCEPT` is renamed to `PROCESS_PROPOSAL_STATUS_ACCEPT` + ([\#736](https://github.com/cometbft/cometbft/issues/736)). +- `[abci]` The `Type` enum field is now required to be set to a value other + than the default `CHECK_TX_TYPE_UNKNOWN` for a valid `CheckTxRequest` + ([\#736](https://github.com/cometbft/cometbft/issues/736)). +- `[abci]` Renamed the alias types for gRPC requests, responses, and service + instances to follow the naming changes in the proto-derived + `api/cometbft/abci/v1` package + ([\#1533](https://github.com/cometbft/cometbft/pull/1533)): + * The prefixed naming pattern `RequestFoo`, `ReponseFoo` changed to + suffixed `FooRequest`, `FooResponse`. + * Each method gets its own unique request and response type to allow for + independent evolution with backward compatibility. + * `ABCIClient` renamed to `ABCIServiceClient`. + * `ABCIServer` renamed to `ABCIServiceServer`. +- `[blocksync]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[cmd]` Remove `replay` and `replay-console` subcommands + and corresponding consensus file replay code, such as + `consensus.RunReplayFile`, and `consensus.State.ReplayFile` + ([\#1170](https://github.com/cometbft/cometbft/pull/1170)) +- `[comet]` Version variables, in `version/version.go`, have been renamed to reflect the CometBFT rebranding. + ([cometbft/cometbft\#1621](https://github.com/cometbft/cometbft/pull/1621)) +- `[consensus]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[consensus]` `Handshaker.Handshake` now requires `context.Context` ([cometbft/cometbft\#857](https://github.com/cometbft/cometbft/pull/857)) +- `[node]` `NewNode` now requires `context.Context` as the first parameter ([cometbft/cometbft\#857](https://github.com/cometbft/cometbft/pull/857)) +- `[crypto/merkle]` The public `Proof.ComputeRootHash` function has been deleted. + ([\#558](https://github.com/cometbft/cometbft/issues/558)) +- `[evidence]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[inspect]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/async]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/autofile]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/bits]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/clist]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/cmap]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/events]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/fail]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/flowrate]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/net]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/os]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/progressbar]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/protoio]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/pubsub]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/rand]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/service]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/strings]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/sync]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/tempfile]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[libs/timer]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[mempool]` Remove `mempoolIDs` for internally storing peer ids as `p2p.ID` + instead of `uint16`. + ([\#1146](https://github.com/cometbft/cometbft/pull/1146)) +- `[node]` Change the signature of `GenesisDocProvider` to + return the checksum of JSON content alongside the parsed genesis data + ([\#1287](https://github.com/cometbft/cometbft/issues/1287)). +- `[node]` Go-API breaking: Change the signature of `LoadStateFromDBOrGenesisDocProvider` + to accept an optional operator provided hash of the genesis file + ([\#1324](https://github.com/cometbft/cometbft/pull/1324)). +- `[proto]` Renamed the packages from `tendermint.*` to `cometbft.*` + and introduced versioned packages to distinguish between proto definitions + released in 0.34.x, 0.37.x, 0.38.x, and 1.0.x versions. + Prior to the 1.0 release, the versioned packages are suffixed with + `.v1beta1`, `.v1beta2`, and so on; all definitions describing the protocols + as per the 1.0.0 release are in packages suffixed with `.v1`. + Relocated generated Go code into a new `api` folder and changed the import + paths accordingly. + ([\#495](https://github.com/cometbft/cometbft/pull/495) + [\#1504](https://github.com/cometbft/cometbft/issues/1504)) +- `[proxy]` Expand `ClientCreator` interface to allow + for per-"connection" control of client creation + ([\#1141](https://github.com/cometbft/cometbft/pull/1141)) +- `[rpc/client]` Hard-code the `/websocket` endpoint path such that it is + no longer configurable, removing the related client constructor parameter + ([\#1412](https://github.com/cometbft/cometbft/pull/1412)) +- `[rpc/grpc]` Remove the deprecated gRPC broadcast API + ([\#650](https://github.com/cometbft/cometbft/issues/650)) +- `[rpc]` The endpoints `broadcast_tx_*` now return an error when the node is + performing block sync or state sync. + ([\#785](https://github.com/cometbft/cometbft/issues/785)) +- `[mempool]` When the node is performing block sync or state sync, the mempool + reactor now discards incoming transactions from peers, and does not propagate + transactions to peers. + ([\#785](https://github.com/cometbft/cometbft/issues/785)) +- `[state/indexer/block]` BlockIndexer now has additional method `Prune`, `GetRetainHeight`, `SetRetainHeight` ([\#1176](https://github.com/cometbft/cometbft/pull/1176)) +- `[state/txindex]` TxIndexer now has additional methods: `Prune`, `GetRetainHeight`, `SetRetainHeight` ([\#1176](https://github.com/cometbft/cometbft/pull/1176)) +- `[state]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[state]` The `state.Store` interface has been expanded + to accommodate the data pull companion API of ADR 101 + ([\#1096](https://github.com/cometbft/cometbft/issues/1096)) +- `[statesync]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[store]` Make the `LoadBlock` method also return block metadata + ([\#1556](https://github.com/cometbft/cometbft/issues/1556)) +- `[store]` Move to `internal` + ([\#1485](https://github.com/cometbft/cometbft/pull/1485)) +- `[version]` Bumped the P2P version from 8 to 9, as this release contains new P2P messages. + ([\#1411](https://github.com/cometbft/cometbft/pull/1411)) +`[mempool]` Change the signature of `CheckTx` in the `Mempool` interface to +`CheckTx(tx types.Tx) (*abcicli.ReqRes, error)`. Also, add new method +`SetTxRemovedCallback`. +([\#1010](https://github.com/cometbft/cometbft/issues/1010)) ### BUG FIXES -- `[mempool]` Avoid infinite wait in transaction sending routine when - using experimental parameters to limiting transaction gossiping to peers - ([\#1654](https://github.com/cometbft/cometbft/pull/1654)) +- `[consensus]` Consensus now prevotes `nil` when the proposed value does not + match the value the local validator has locked on + ([\#1203](https://github.com/cometbft/cometbft/pull/1203)) +- `[consensus]` Remove logic to unlock block on +2/3 prevote for nil + ([\#1175](https://github.com/cometbft/cometbft/pull/1175): @BrendanChou) +- `[state/indexer]` Respect both height params while querying for events + ([\#1529](https://github.com/cometbft/cometbft/pull/1529)) +- `[state/pruning]` When no blocks are pruned, do not attempt to prune statestore + ([\#1616](https://github.com/cometbft/cometbft/pull/1616)) + +### DEPENDENCIES + +- Bump cometbft-db to v0.9.0, providing support for RocksDB v8 + ([\#1725](https://github.com/cometbft/cometbft/pull/1725)) ### FEATURES +- `[config]` Add `[grpc.block_results_service]` gRPC configuration `BlockResultsService` + ([\#1095](https://github.com/cometbft/cometbft/issues/1095)) +- `[config]` Add `[grpc.block_service]` section to configure gRPC `BlockService` + ([\#1094](https://github.com/cometbft/cometbft/issues/1094)) +- `[grpc]` Add `BlockResultsService` with client to fetch BlockResults + for a given height, or latest. + ([\#1095](https://github.com/cometbft/cometbft/issues/1095)) +- `[grpc]` Add `BlockService` with client to facilitate fetching of blocks and + streaming of the latest committed block height + ([\#1094](https://github.com/cometbft/cometbft/issues/1094)) - `[mempool]` Add `nop` mempool ([\#1643](https://github.com/cometbft/cometbft/pull/1643)) If you want to use it, change mempool's `type` to `nop`: @@ -34,27 +226,81 @@ Also fixes a small bug in the mempool for an experimental feature. # is not supported. type = "nop" ``` - -## v0.38.1 - -*November 17, 2023* - -This release contains, among other things, an opt-in, experimental feature to -help reduce the bandwidth consumption associated with the mempool's transaction -gossip. - -### BUG FIXES - -- `[state/indexer]` Respect both height params while querying for events - ([\#1529](https://github.com/cometbft/cometbft/pull/1529)) - -### FEATURES - - `[metrics]` Add metric for mempool size in bytes `SizeBytes`. ([\#1512](https://github.com/cometbft/cometbft/pull/1512)) +- `[metrics]` Add metrics to monitor pruning and current available data in stores: `PruningServiceBlockRetainHeight`, `PruningServiceBlockResultsRetainHeight`, `ApplicationBlockRetainHeight`, `BlockStoreBaseHeight`, `ABCIResultsBaseHeight`. + ([\#1234](https://github.com/cometbft/cometbft/pull/1234)) +- `[proto]` Add definitions and generated code for + [ADR-101](./docs/architecture/adr-101-data-companion-pull-api.md) + `PruningService` in the `cometbft.services.pruning.v1` proto package + ([\#1097](https://github.com/cometbft/cometbft/issues/1097)). +- `[rpc/grpc]` Add privileged gRPC server and client facilities, in + `server/privileged` and `client/privileged` packages respectively, to + enable a separate API server within the node which serves trusted clients + without authentication and should never be exposed to public internet + ([\#1097](https://github.com/cometbft/cometbft/issues/1097)). +- `[rpc/grpc]` Add a pruning service adding on the privileged gRPC server API to + give an [ADR-101](./docs/architecture/adr-101-data-companion-pull-api.md) data + companion control over block data retained by the node. The + `WithPruningService` option method in `server/privileged` is provided to + configure the pruning service + ([\#1097](https://github.com/cometbft/cometbft/issues/1097)). +- `[rpc/grpc]` Add `PruningServiceClient` interface + for the gRPC client in `client/privileged` along with a configuration option + to enable it + ([\#1097](https://github.com/cometbft/cometbft/issues/1097)). +- `[config]` Add `[grpc.privileged]` section to configure the privileged + gRPC server for the node, and `[grpc.privileged.pruning_service]` section + to control the pruning service + ([\#1097](https://github.com/cometbft/cometbft/issues/1097)). +- `[rpc/grpc]` Add gRPC client with support for version service + ([\#816](https://github.com/cometbft/cometbft/issues/816)) +- `[rpc/grpc]` Add gRPC server to the node, configurable + via a new `[grpc]` section in the configuration file + ([\#816](https://github.com/cometbft/cometbft/issues/816)) +- `[rpc/grpc]` Add gRPC version service to allow clients to + establish the software and protocol versions of the node + ([\#816](https://github.com/cometbft/cometbft/issues/816)) +- `[state]` Add TxIndexer and BlockIndexer pruning metrics + ([\#1334](https://github.com/cometbft/cometbft/issues/1334)) +`[rpc/grpc]` Add gRPC endpoint for pruning the block and transaction indexes +([\#1327](https://github.com/cometbft/cometbft/pull/1327)) ### IMPROVEMENTS +- Update Apalache type annotations in the light client spec ([#955](https://github.com/cometbft/cometbft/pull/955)) +- `[abci/client]` Add consensus-synchronized local client creator, + which only imposes a mutex on the consensus "connection", leaving + the concurrency of all other "connections" up to the application + ([\#1141](https://github.com/cometbft/cometbft/pull/1141)) +- `[abci/client]` Add fully unsynchronized local client creator, which + imposes no mutexes on the application, leaving all handling of concurrency up + to the application ([\#1141](https://github.com/cometbft/cometbft/pull/1141)) +- `[cli/node]` The genesis hash provided with the `--genesis-hash` is now + forwarded to the node, instead of reading the file. + ([\#1324](https://github.com/cometbft/cometbft/pull/1324)). +- `[config]` Added `[storage.pruning]` and `[storage.pruning.data_companion]` + sections to facilitate background pruning and data companion (ADR 101) + operations ([\#1096](https://github.com/cometbft/cometbft/issues/1096)) +- `[consensus]` Log vote validation failures at info level + ([\#1022](https://github.com/cometbft/cometbft/pull/1022)) +- `[consensus]` New metrics (counters) to track duplicate votes and block parts. + ([\#896](https://github.com/cometbft/cometbft/pull/896)) +- `[consensus]` Optimize vote and block part gossip with new message `HasProposalBlockPartMessage`, + which is similar to `HasVoteMessage`; and random sleep in the loop broadcasting those messages. + The sleep can be configured with new config `peer_gossip_intraloop_sleep_duration`, which is set to 0 + by default as this is experimental. + Our scale tests show substantial bandwidth improvement with a value of 50 ms. + ([\#904](https://github.com/cometbft/cometbft/pull/904)) +- `[consensus]` When prevoting, avoid calling PropocessProposal when we know the + proposal was already validated by correct nodes. + ([\#1230](https://github.com/cometbft/cometbft/pull/1230)) +- `[e2e]` Allow disabling the PEX reactor on all nodes in the testnet + ([\#1579](https://github.com/cometbft/cometbft/pull/1579)) +- `[e2e]` Allow latency emulation between nodes. + ([\#1560](https://github.com/cometbft/cometbft/pull/1560)) +- `[mempool]` Add a metric (a counter) to measure whether a tx was received more than once. + ([\#634](https://github.com/cometbft/cometbft/pull/634)) - `[mempool]` Add experimental feature to limit the number of persistent peers and non-persistent peers to which the node gossip transactions. ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) @@ -64,164 +310,94 @@ gossip. which the node gossip transactions. ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) +- `[node]` On upgrade, after [\#1296](https://github.com/cometbft/cometbft/pull/1296), delete the genesis file existing in the DB. + ([cometbft/cometbft\#1297](https://github.com/cometbft/cometbft/pull/1297) +- `[node]` Remove genesis persistence in state db, replaced by a hash + ([cometbft/cometbft\#1017](https://github.com/cometbft/cometbft/pull/1017), + [cometbft/cometbft\#1295](https://github.com/cometbft/cometbft/pull/1295)) +- `[node]` The `node.Node` struct now manages a + `state.Pruner` service to facilitate background pruning + ([\#1096](https://github.com/cometbft/cometbft/issues/1096)) +- `[proto]` The names in the `cometbft.abci.v1` versioned proto package + are changed to satisfy the + [buf guidelines](https://buf.build/docs/best-practices/style-guide/) + ([#736](https://github.com/cometbft/cometbft/issues/736), + [#1504](https://github.com/cometbft/cometbft/issues/1504), + [#1530](https://github.com/cometbft/cometbft/issues/1530)): + * Names of request and response types used in gRPC changed by making + `Request`/`Response` the suffix instead of the prefix, e.g. + `RequestCheckTx` ⭢ `CheckTxRequest`. + * The `Request` and `Response` multiplex messages are redefined accordingly. + * `CheckTxType` values renamed with the `CHECK_TX_TYPE_` prefix. + * `MisbehaviorType` values renamed with the `MISBEHAVIOR_TYPE_` prefix. + * `Result` enum formerly nested in `ResponseOfferSnapshot` replaced with the package-level + `OfferSnapshotResult`, its values named with the + `OFFER_SNAPSHOT_RESULT_` prefix. + * `Result` enum formerly nested in `ResponseApplyShapshotChunk` replaced with the package-level + `ApplySnapshotChunkResult`, its values named with the + `APPLY_SNAPSHOT_CHUNK_RESULT_` prefix. + * `Status` enum formerly nested in `ResponseProcessProposal` replaced with the package-level + `ProcessProposalStatus`, its values named with the + `PROCESS_PROPOSAL_STATUS_` prefix. + * `Status` enum formerly nested in `ResponseVerifyVoteExtension` replaced with the package-level + `VerifyVoteExtensionStatus`, its values named with the + `VERIFY_VOTE_EXTENSION_STATUS_` prefix. + * New definition of `Misbehavior` using the changed `MisbehaviorType`. + * The gRPC service is renamed `ABCIService` and defined using the types listed above. +- `[proto]` In the `cometbft.state.v1` package, the definition for `ABCIResponsesInfo` + is changed, renaming `response_finalize_block` field to `finalize_block`. +- `[rpc]` Export `MakeHTTPDialer` to allow HTTP client constructors more flexibility. + ([\#1594](https://github.com/cometbft/cometbft/pull/1594)) +- `[rpc]` The RPC API is now versioned, with all existing endpoints accessible + via `/v1/*` as well as `/*` + ([\#1412](https://github.com/cometbft/cometbft/pull/1412)) +- `[state/indexer]` Add transaction and block index pruning + ([\#1176](https://github.com/cometbft/cometbft/pull/1176)) +- `[state]` ABCI response pruning has been added for use by the data companion + ([\#1096](https://github.com/cometbft/cometbft/issues/1096)) +- `[state]` Block pruning has been moved from the block executor into a + background process ([\#1096](https://github.com/cometbft/cometbft/issues/1096)) +- `[types]` Validate `Validator#Address` in `ValidateBasic` ([\#1715](https://github.com/cometbft/cometbft/pull/1715)) + +### MINIMUM GO VERSION + +- Bump minimum Go version to v1.21 + ([\#1244](https://github.com/cometbft/cometbft/pull/1244)) -## v0.38.0 - -*September 12, 2023* +## v0.38.2 -This release includes the second part of ABCI++, called ABCI 2.0. -ABCI 2.0 introduces ABCI methods `ExtendVote` and `VerifyVoteExtension`. -These new methods allow the application to add data (opaque to CometBFT), -called _vote extensions_ to precommit votes sent by validators. -These vote extensions are made available to the proposer(s) of the next height. -Additionally, ABCI 2.0 coalesces `BeginBlock`, `DeliverTx`, and `EndBlock` -into one method, `FinalizeBlock`, whose `Request*` and `Response*` -data structures contain the sum of all data previously contained -in the respective `Request*` and `Response*` data structures in -`BeginBlock`, `DeliverTx`, and `EndBlock`. -See the [specification](./spec/abci/) for more details on ABCI 2.0. +*November 27, 2023* -### BREAKING CHANGES +This release provides the **nop** mempool for applications that want to build their own mempool. +Using this mempool effectively disables all mempool functionality in CometBFT, including transaction dissemination and the `broadcast_tx_*` endpoints. -- `[mempool]` Remove priority mempool. - ([\#260](https://github.com/cometbft/cometbft/issues/260)) -- `[config]` Remove `Version` field from `MempoolConfig`. - ([\#260](https://github.com/cometbft/cometbft/issues/260)) -- `[protobuf]` Remove fields `sender`, `priority`, and `mempool_error` from - `ResponseCheckTx`. ([\#260](https://github.com/cometbft/cometbft/issues/260)) -- `[crypto/merkle]` Do not allow verification of Merkle Proofs against empty trees (`nil` root). `Proof.ComputeRootHash` now panics when it encounters an error, but `Proof.Verify` does not panic - ([\#558](https://github.com/cometbft/cometbft/issues/558)) -- `[state/kvindexer]` Remove the function type from the event key stored in the database. This should be breaking only -for people who forked CometBFT and interact directly with the indexers kvstore. - ([\#774](https://github.com/cometbft/cometbft/pull/774)) -- `[rpc]` Removed `begin_block_events` and `end_block_events` from `BlockResultsResponse`. - The events are merged into one field called `finalize_block_events`. - ([\#9427](https://github.com/tendermint/tendermint/issues/9427)) -- `[pubsub]` Added support for big integers and big floats in the pubsub event query system. - Breaking changes: function `Number` in package `libs/pubsub/query/syntax` changed its return value. - ([\#797](https://github.com/cometbft/cometbft/pull/797)) -- `[kvindexer]` Added support for big integers and big floats in the kvindexer. - Breaking changes: function `Number` in package `libs/pubsub/query/syntax` changed its return value. - ([\#797](https://github.com/cometbft/cometbft/pull/797)) -- `[mempool]` Application can now set `ConsensusParams.Block.MaxBytes` to -1 - to have visibility on all transactions in the - mempool at `PrepareProposal` time. - This means that the total size of transactions sent via `RequestPrepareProposal` - might exceed `RequestPrepareProposal.max_tx_bytes`. - If that is the case, the application MUST make sure that the total size of transactions - returned in `ResponsePrepareProposal.txs` does not exceed `RequestPrepareProposal.max_tx_bytes`, - otherwise CometBFT will panic. - ([\#980](https://github.com/cometbft/cometbft/issues/980)) -- `[node/state]` Add Go API to bootstrap block store and state store to a height. Make sure block sync starts syncing from bootstrapped height. - ([\#1057](https://github.com/tendermint/tendermint/pull/#1057)) (@yihuang) -- `[state/store]` Added Go functions to save height at which offline state sync is performed. - ([\#1057](https://github.com/tendermint/tendermint/pull/#1057)) (@jmalicevic) -- `[p2p]` Remove UPnP functionality - ([\#1113](https://github.com/cometbft/cometbft/issues/1113)) -- `[node]` Removed `ConsensusState()` accessor from `Node` - struct - all access to consensus state should go via the reactor - ([\#1120](https://github.com/cometbft/cometbft/pull/1120)) -- `[state]` Signature of `ExtendVote` changed in `BlockExecutor`. - It now includes the block whose precommit will be extended, an the state object. - ([\#1270](https://github.com/cometbft/cometbft/pull/1270)) -- `[state]` Move pruneBlocks from node/state to state/execution. - ([\#6541](https://github.com/tendermint/tendermint/pull/6541)) -- `[abci]` Move `app_hash` parameter from `Commit` to `FinalizeBlock` - ([\#8664](https://github.com/tendermint/tendermint/pull/8664)) -- `[abci]` Introduce `FinalizeBlock` which condenses `BeginBlock`, `DeliverTx` - and `EndBlock` into a single method call - ([\#9468](https://github.com/tendermint/tendermint/pull/9468)) -- `[p2p]` Remove unused p2p/trust package - ([\#9625](https://github.com/tendermint/tendermint/pull/9625)) -- `[rpc]` Remove global environment and replace with constructor - ([\#9655](https://github.com/tendermint/tendermint/pull/9655)) -- `[node]` Move DBContext and DBProvider from the node package to the config - package. ([\#9655](https://github.com/tendermint/tendermint/pull/9655)) -- `[inspect]` Add a new `inspect` command for introspecting - the state and block store of a crashed tendermint node. - ([\#9655](https://github.com/tendermint/tendermint/pull/9655)) -- `[metrics]` Move state-syncing and block-syncing metrics to - their respective packages. Move labels from block_syncing - -> blocksync_syncing and state_syncing -> statesync_syncing - ([\#9682](https://github.com/tendermint/tendermint/pull/9682)) +Also fixes a small bug in the mempool for an experimental feature. ### BUG FIXES -- `[kvindexer]` Forward porting the fixes done to the kvindexer in 0.37 in PR \#77 - ([\#423](https://github.com/cometbft/cometbft/pull/423)) -- `[consensus]` Unexpected error conditions in `ApplyBlock` are non-recoverable, so ignoring the error and carrying on is a bug. We replaced a `return` that disregarded the error by a `panic`. - ([\#496](https://github.com/cometbft/cometbft/pull/496)) -- `[consensus]` Rename `(*PeerState).ToJSON` to `MarshalJSON` to fix a logging data race - ([\#524](https://github.com/cometbft/cometbft/pull/524)) -- `[light]` Fixed an edge case where a light client would panic when attempting - to query a node that (1) has started from a non-zero height and (2) does - not yet have any data. The light client will now, correctly, not panic - _and_ keep the node in its list of providers in the same way it would if - it queried a node starting from height zero that does not yet have data - ([\#575](https://github.com/cometbft/cometbft/issues/575)) -- `[abci]` Restore the snake_case naming in JSON serialization of - `ExecTxResult` ([\#855](https://github.com/cometbft/cometbft/issues/855)). -- `[consensus]` Avoid recursive call after rename to (*PeerState).MarshalJSON - ([\#863](https://github.com/cometbft/cometbft/pull/863)) -- `[mempool/clist_mempool]` Prevent a transaction to appear twice in the mempool - ([\#890](https://github.com/cometbft/cometbft/pull/890): @otrack) -- `[docker]` Ensure Docker image uses consistent version of Go. - ([\#9462](https://github.com/tendermint/tendermint/pull/9462)) -- `[abci-cli]` Fix broken abci-cli help command. - ([\#9717](https://github.com/tendermint/tendermint/pull/9717)) - -### DEPRECATIONS - -- `[rpc/grpc]` Mark the gRPC broadcast API as deprecated. - It will be superseded by a broader API as part of - [\#81](https://github.com/cometbft/cometbft/issues/81) - ([\#650](https://github.com/cometbft/cometbft/issues/650)) +- `[mempool]` Avoid infinite wait in transaction sending routine when + using experimental parameters to limiting transaction gossiping to peers + ([\#1654](https://github.com/cometbft/cometbft/pull/1654)) ### FEATURES -- `[node/state]` Add Go API to bootstrap block store and state store to a height - ([\#1057](https://github.com/tendermint/tendermint/pull/#1057)) (@yihuang) -- `[proxy]` Introduce `NewConnSyncLocalClientCreator`, which allows local ABCI - clients to have the same concurrency model as remote clients (i.e. one mutex - per client "connection", for each of the four ABCI "connections"). - ([tendermint/tendermint\#9830](https://github.com/tendermint/tendermint/pull/9830) - and [\#1145](https://github.com/cometbft/cometbft/pull/1145)) -- `[proxy]` Introduce `NewUnsyncLocalClientCreator`, which allows local ABCI - clients to have the same concurrency model as remote clients (i.e. one - mutex per client "connection", for each of the four ABCI "connections"). - ([\#9830](https://github.com/tendermint/tendermint/pull/9830)) -- `[abci]` New ABCI methods `VerifyVoteExtension` and `ExtendVote` allow validators to validate the vote extension data attached to a pre-commit message and allow applications to let their validators do more than just validate within consensus ([\#9836](https://github.com/tendermint/tendermint/pull/9836)) +- `[mempool]` Add `nop` mempool ([\#1643](https://github.com/cometbft/cometbft/pull/1643)) -### IMPROVEMENTS + If you want to use it, change mempool's `type` to `nop`: -- `[blocksync]` Generate new metrics during BlockSync - ([\#543](https://github.com/cometbft/cometbft/pull/543)) -- `[jsonrpc/client]` Improve the error message for client errors stemming from - bad HTTP responses. - ([cometbft/cometbft\#638](https://github.com/cometbft/cometbft/pull/638)) -- `[rpc]` Remove response data from response failure logs in order - to prevent large quantities of log data from being produced - ([\#654](https://github.com/cometbft/cometbft/issues/654)) -- `[pubsub/kvindexer]` Numeric query conditions and event values are represented as big floats with default precision of 125. - Integers are read as "big ints" and represented with as many bits as they need when converting to floats. - ([\#797](https://github.com/cometbft/cometbft/pull/797)) -- `[node]` Make handshake cancelable ([cometbft/cometbft\#857](https://github.com/cometbft/cometbft/pull/857)) -- `[mempool]` Application can now set `ConsensusParams.Block.MaxBytes` to -1 - to gain more control on the max size of transactions in a block. - It also allows the application to have visibility on all transactions in the - mempool at `PrepareProposal` time. - ([\#980](https://github.com/cometbft/cometbft/pull/980)) -- `[node]` Close evidence.db OnStop ([cometbft/cometbft\#1210](https://github.com/cometbft/cometbft/pull/1210): @chillyvee) -- `[state]` Make logging `block_app_hash` and `app_hash` consistent by logging them both as hex. - ([\#1264](https://github.com/cometbft/cometbft/pull/1264)) -- `[crypto/merkle]` Improve HashAlternatives performance - ([\#6443](https://github.com/tendermint/tendermint/pull/6443)) -- `[p2p/pex]` Improve addrBook.hash performance - ([\#6509](https://github.com/tendermint/tendermint/pull/6509)) -- `[crypto/merkle]` Improve HashAlternatives performance - ([\#6513](https://github.com/tendermint/tendermint/pull/6513)) -- `[pubsub]` Performance improvements for the event query API - ([\#7319](https://github.com/tendermint/tendermint/pull/7319)) + ```toml + [mempool] + + # The type of mempool for this node to use. + # + # Possible types: + # - "flood" : concurrent linked list mempool with flooding gossip protocol + # (default) + # - "nop" : nop-mempool (short for no operation; the ABCI app is responsible + # for storing, disseminating and proposing txs). "create_empty_blocks=false" + # is not supported. + type = "nop" + ``` ## v0.37.4 @@ -261,6 +437,48 @@ the change from v0.37.3 that bumped the minimum Go version to v1.21. type = "nop" ``` +## v0.34.31 + +*November 27, 2023* + +Fixes a small bug in the mempool for an experimental feature. + +### BUG FIXES + +- `[mempool]` Avoid infinite wait in transaction sending routine when + using experimental parameters to limiting transaction gossiping to peers + ([\#1654](https://github.com/cometbft/cometbft/pull/1654)) + +## v0.38.1 + +*November 17, 2023* + +This release contains, among other things, an opt-in, experimental feature to +help reduce the bandwidth consumption associated with the mempool's transaction +gossip. + +### BUG FIXES + +- `[state/indexer]` Respect both height params while querying for events + ([\#1529](https://github.com/cometbft/cometbft/pull/1529)) + +### FEATURES + +- `[metrics]` Add metric for mempool size in bytes `SizeBytes`. + ([\#1512](https://github.com/cometbft/cometbft/pull/1512)) + +### IMPROVEMENTS + +- `[mempool]` Add experimental feature to limit the number of persistent peers and non-persistent + peers to which the node gossip transactions. + ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) + ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) +- `[config]` Add mempool parameters `experimental_max_gossip_connections_to_persistent_peers` and + `experimental_max_gossip_connections_to_non_persistent_peers` for limiting the number of peers to + which the node gossip transactions. + ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) + ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) + ## v0.37.3 *November 17, 2023* @@ -281,16 +499,14 @@ gossip. ### FEATURES -- `[node/state]` Add Go API to bootstrap block store and state store to a height - ([\#1057](https://github.com/tendermint/tendermint/pull/#1057)) (@yihuang) - `[metrics]` Add metric for mempool size in bytes `SizeBytes`. ([\#1512](https://github.com/cometbft/cometbft/pull/1512)) +- `[node/state]` Add Go API to bootstrap block store and state store to a height + ([\#1057](https://github.com/tendermint/tendermint/pull/#1057)) (@yihuang) ### IMPROVEMENTS - `[crypto/sr25519]` Upgrade to go-schnorrkel@v1.0.0 ([\#475](https://github.com/cometbft/cometbft/issues/475)) -- `[node]` Make handshake cancelable ([cometbft/cometbft\#857](https://github.com/cometbft/cometbft/pull/857)) -- `[node]` Close evidence.db OnStop ([cometbft/cometbft\#1210](https://github.com/cometbft/cometbft/pull/1210): @chillyvee) - `[mempool]` Add experimental feature to limit the number of persistent peers and non-persistent peers to which the node gossip transactions (only for "v0" mempool). ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) @@ -300,260 +516,236 @@ gossip. which the node gossip transactions. ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) +- `[node]` Close evidence.db OnStop ([cometbft/cometbft\#1210](https://github.com/cometbft/cometbft/pull/1210): @chillyvee) +- `[node]` Make handshake cancelable ([cometbft/cometbft\#857](https://github.com/cometbft/cometbft/pull/857)) -## v0.37.2 +## v0.34.30 -*June 14, 2023* +*November 17, 2023* -Provides several minor bug fixes, as well as fixes for several low-severity -security issues. +This release contains, among other things, an opt-in, experimental feature to +help reduce the bandwidth consumption associated with the mempool's transaction +gossip. -### BUG FIXES +### BUILD -- `[state/kvindex]` Querying event attributes that are bigger than int64 is now - enabled. We are not supporting reading floats from the db into the indexer - nor parsing them into BigFloats to not introduce breaking changes in minor - releases. ([\#771](https://github.com/cometbft/cometbft/pull/771)) -- `[pubsub]` Pubsub queries are now able to parse big integers (larger than - int64). Very big floats are also properly parsed into very big integers - instead of being truncated to int64. - ([\#771](https://github.com/cometbft/cometbft/pull/771)) +- Bump Go version used to v1.20 since v1.19 has reached EOL + ([\#1351](https://github.com/cometbft/cometbft/pull/1351)) -### IMPROVEMENTS +### FEATURES -- `[rpc]` Remove response data from response failure logs in order - to prevent large quantities of log data from being produced - ([\#654](https://github.com/cometbft/cometbft/issues/654)) +- `[metrics]` Add metric for mempool size in bytes `SizeBytes`. + ([\#1512](https://github.com/cometbft/cometbft/pull/1512)) -### SECURITY FIXES +### IMPROVEMENTS -- `[rpc/jsonrpc/client]` **Low severity** - Prevent RPC - client credentials from being inadvertently dumped to logs - ([\#787](https://github.com/cometbft/cometbft/pull/787)) -- `[cmd/cometbft/commands/debug/kill]` **Low severity** - Fix unsafe int cast in - `debug kill` command ([\#793](https://github.com/cometbft/cometbft/pull/793)) -- `[consensus]` **Low severity** - Avoid recursive call after rename to - `(*PeerState).MarshalJSON` - ([\#863](https://github.com/cometbft/cometbft/pull/863)) -- `[mempool/clist_mempool]` **Low severity** - Prevent a transaction from - appearing twice in the mempool - ([\#890](https://github.com/cometbft/cometbft/pull/890): @otrack) +- `[mempool]` Add experimental feature to limit the number of persistent peers and non-persistent + peers to which the node gossip transactions (only for "v0" mempool). + ([\#1558](https://github.com/cometbft/cometbft/pull/1558), + ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) +- `[config]` Add mempool parameters `experimental_max_gossip_connections_to_persistent_peers` and + `experimental_max_gossip_connections_to_non_persistent_peers` for limiting the number of peers to + which the node gossip transactions. + ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) + ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) +- `[node]` Close evidence.db OnStop ([cometbft/cometbft\#1210](https://github.com/cometbft/cometbft/pull/1210): @chillyvee) +- `[node]` Make handshake cancelable ([cometbft/cometbft\#857](https://github.com/cometbft/cometbft/pull/857)) -## v0.37.1 +## v0.38.0 -*April 26, 2023* +*September 12, 2023* -This release fixes several bugs, and has had to introduce one small Go -API-breaking change in the `crypto/merkle` package in order to address what -could be a security issue for some users who directly and explicitly make use of -that code. +This release includes the second part of ABCI++, called ABCI 2.0. +ABCI 2.0 introduces ABCI methods `ExtendVote` and `VerifyVoteExtension`. +These new methods allow the application to add data (opaque to CometBFT), +called _vote extensions_ to precommit votes sent by validators. +These vote extensions are made available to the proposer(s) of the next height. +Additionally, ABCI 2.0 coalesces `BeginBlock`, `DeliverTx`, and `EndBlock` +into one method, `FinalizeBlock`, whose `Request*` and `Response*` +data structures contain the sum of all data previously contained +in the respective `Request*` and `Response*` data structures in +`BeginBlock`, `DeliverTx`, and `EndBlock`. +See the [specification](./spec/abci/) for more details on ABCI 2.0. ### BREAKING CHANGES +- `[abci]` Introduce `FinalizeBlock` which condenses `BeginBlock`, `DeliverTx` + and `EndBlock` into a single method call + ([\#9468](https://github.com/tendermint/tendermint/pull/9468)) +- `[abci]` Move `app_hash` parameter from `Commit` to `FinalizeBlock` + ([\#8664](https://github.com/tendermint/tendermint/pull/8664)) +- `[config]` Remove `Version` field from `MempoolConfig`. + ([\#260](https://github.com/cometbft/cometbft/issues/260)) - `[crypto/merkle]` Do not allow verification of Merkle Proofs against empty trees (`nil` root). `Proof.ComputeRootHash` now panics when it encounters an error, but `Proof.Verify` does not panic ([\#558](https://github.com/cometbft/cometbft/issues/558)) +- `[inspect]` Add a new `inspect` command for introspecting + the state and block store of a crashed tendermint node. + ([\#9655](https://github.com/tendermint/tendermint/pull/9655)) +- `[kvindexer]` Added support for big integers and big floats in the kvindexer. + Breaking changes: function `Number` in package `libs/pubsub/query/syntax` changed its return value. + ([\#797](https://github.com/cometbft/cometbft/pull/797)) +- `[mempool]` Application can now set `ConsensusParams.Block.MaxBytes` to -1 + to have visibility on all transactions in the + mempool at `PrepareProposal` time. + This means that the total size of transactions sent via `RequestPrepareProposal` + might exceed `RequestPrepareProposal.max_tx_bytes`. + If that is the case, the application MUST make sure that the total size of transactions + returned in `ResponsePrepareProposal.txs` does not exceed `RequestPrepareProposal.max_tx_bytes`, + otherwise CometBFT will panic. + ([\#980](https://github.com/cometbft/cometbft/issues/980)) +- `[mempool]` Remove priority mempool. + ([\#260](https://github.com/cometbft/cometbft/issues/260)) +- `[metrics]` Move state-syncing and block-syncing metrics to + their respective packages. Move labels from block_syncing + -> blocksync_syncing and state_syncing -> statesync_syncing + ([\#9682](https://github.com/tendermint/tendermint/pull/9682)) +- `[node/state]` Add Go API to bootstrap block store and state store to a height. Make sure block sync starts syncing from bootstrapped height. + ([\#1057](https://github.com/tendermint/tendermint/pull/#1057)) (@yihuang) +- `[state/store]` Added Go functions to save height at which offline state sync is performed. + ([\#1057](https://github.com/tendermint/tendermint/pull/#1057)) (@jmalicevic) +- `[node]` Move DBContext and DBProvider from the node package to the config + package. ([\#9655](https://github.com/tendermint/tendermint/pull/9655)) +- `[node]` Removed `ConsensusState()` accessor from `Node` + struct - all access to consensus state should go via the reactor + ([\#1120](https://github.com/cometbft/cometbft/pull/1120)) +- `[p2p]` Remove UPnP functionality + ([\#1113](https://github.com/cometbft/cometbft/issues/1113)) +- `[p2p]` Remove unused p2p/trust package + ([\#9625](https://github.com/tendermint/tendermint/pull/9625)) +- `[protobuf]` Remove fields `sender`, `priority`, and `mempool_error` from + `ResponseCheckTx`. ([\#260](https://github.com/cometbft/cometbft/issues/260)) +- `[pubsub]` Added support for big integers and big floats in the pubsub event query system. + Breaking changes: function `Number` in package `libs/pubsub/query/syntax` changed its return value. + ([\#797](https://github.com/cometbft/cometbft/pull/797)) +- `[rpc]` Remove global environment and replace with constructor + ([\#9655](https://github.com/tendermint/tendermint/pull/9655)) +- `[rpc]` Removed `begin_block_events` and `end_block_events` from `BlockResultsResponse`. + The events are merged into one field called `finalize_block_events`. + ([\#9427](https://github.com/tendermint/tendermint/issues/9427)) +- `[state/kvindexer]` Remove the function type from the event key stored in the database. This should be breaking only +for people who forked CometBFT and interact directly with the indexers kvstore. + ([\#774](https://github.com/cometbft/cometbft/pull/774)) +- `[state]` Move pruneBlocks from node/state to state/execution. + ([\#6541](https://github.com/tendermint/tendermint/pull/6541)) +- `[state]` Signature of `ExtendVote` changed in `BlockExecutor`. + It now includes the block whose precommit will be extended, an the state object. + ([\#1270](https://github.com/cometbft/cometbft/pull/1270)) ### BUG FIXES -- `[consensus]` Unexpected error conditions in `ApplyBlock` are non-recoverable, so ignoring the error and carrying on is a bug. We replaced a `return` that disregarded the error by a `panic`. - ([\#496](https://github.com/cometbft/cometbft/pull/496)) +- `[abci-cli]` Fix broken abci-cli help command. + ([\#9717](https://github.com/tendermint/tendermint/pull/9717)) +- `[abci]` Restore the snake_case naming in JSON serialization of + `ExecTxResult` ([\#855](https://github.com/cometbft/cometbft/issues/855)). +- `[consensus]` Avoid recursive call after rename to (*PeerState).MarshalJSON + ([\#863](https://github.com/cometbft/cometbft/pull/863)) - `[consensus]` Rename `(*PeerState).ToJSON` to `MarshalJSON` to fix a logging data race ([\#524](https://github.com/cometbft/cometbft/pull/524)) +- `[consensus]` Unexpected error conditions in `ApplyBlock` are non-recoverable, so ignoring the error and carrying on is a bug. We replaced a `return` that disregarded the error by a `panic`. + ([\#496](https://github.com/cometbft/cometbft/pull/496)) +- `[docker]` Ensure Docker image uses consistent version of Go. + ([\#9462](https://github.com/tendermint/tendermint/pull/9462)) +- `[kvindexer]` Forward porting the fixes done to the kvindexer in 0.37 in PR \#77 + ([\#423](https://github.com/cometbft/cometbft/pull/423)) - `[light]` Fixed an edge case where a light client would panic when attempting to query a node that (1) has started from a non-zero height and (2) does not yet have any data. The light client will now, correctly, not panic _and_ keep the node in its list of providers in the same way it would if it queried a node starting from height zero that does not yet have data ([\#575](https://github.com/cometbft/cometbft/issues/575)) +- `[mempool/clist_mempool]` Prevent a transaction to appear twice in the mempool + ([\#890](https://github.com/cometbft/cometbft/pull/890): @otrack) -### IMPROVEMENTS - -- `[jsonrpc/client]` Improve the error message for client errors stemming from - bad HTTP responses. - ([cometbft/cometbft\#638](https://github.com/cometbft/cometbft/pull/638)) - -## v0.37.0 - -*March 6, 2023* - -This is the first CometBFT release with ABCI 1.0, which introduces the -`PrepareProposal` and `ProcessProposal` methods, with the aim of expanding the -range of use cases that application developers can address. This is the first -change to ABCI towards ABCI++, and the full range of ABCI++ functionality will -only become available in the next major release with ABCI 2.0. See the -[specification](./spec/abci/) for more details. - -In the v0.34.27 release, the CometBFT Go module is still -`github.com/tendermint/tendermint` to facilitate ease of upgrading for users, -but in this release we have changed this to `github.com/cometbft/cometbft`. - -Please also see our [upgrading guidelines](./UPGRADING.md) for more details on -upgrading from the v0.34 release series. - -Also see our [QA results](https://docs.cometbft.com/v0.37/qa/v037/cometbft) for -the v0.37 release. - -We'd love your feedback on this release! Please reach out to us via one of our -communication channels, such as [GitHub -Discussions](https://github.com/cometbft/cometbft/discussions), with any of your -questions, comments and/or concerns. - -See below for more details. - -### BREAKING CHANGES - -- The `TMHOME` environment variable was renamed to `CMTHOME`, and all environment variables starting with `TM_` are instead prefixed with `CMT_` - ([\#211](https://github.com/cometbft/cometbft/issues/211)) -- `[p2p]` Reactor `Send`, `TrySend` and `Receive` renamed to `SendEnvelope`, - `TrySendEnvelope` and `ReceiveEnvelope` to allow metrics to be appended to - messages and measure bytes sent/received. - ([\#230](https://github.com/cometbft/cometbft/pull/230)) -- Bump minimum Go version to 1.20 - ([\#385](https://github.com/cometbft/cometbft/issues/385)) -- `[abci]` Make length delimiter encoding consistent - (`uint64`) between ABCI and P2P wire-level protocols - ([\#5783](https://github.com/tendermint/tendermint/pull/5783)) -- `[abci]` Change the `key` and `value` fields from - `[]byte` to `string` in the `EventAttribute` type. - ([\#6403](https://github.com/tendermint/tendermint/pull/6403)) -- `[abci/counter]` Delete counter example app - ([\#6684](https://github.com/tendermint/tendermint/pull/6684)) -- `[abci]` Renamed `EvidenceType` to `MisbehaviorType` and `Evidence` - to `Misbehavior` as a more accurate label of their contents. - ([\#8216](https://github.com/tendermint/tendermint/pull/8216)) -- `[abci]` Added cli commands for `PrepareProposal` and `ProcessProposal`. - ([\#8656](https://github.com/tendermint/tendermint/pull/8656)) -- `[abci]` Added cli commands for `PrepareProposal` and `ProcessProposal`. - ([\#8901](https://github.com/tendermint/tendermint/pull/8901)) -- `[abci]` Renamed `LastCommitInfo` to `CommitInfo` in preparation for vote - extensions. ([\#9122](https://github.com/tendermint/tendermint/pull/9122)) -- Change spelling from British English to American. Rename - `Subscription.Cancelled()` to `Subscription.Canceled()` in `libs/pubsub` - ([\#9144](https://github.com/tendermint/tendermint/pull/9144)) -- `[abci]` Removes unused Response/Request `SetOption` from ABCI - ([\#9145](https://github.com/tendermint/tendermint/pull/9145)) -- `[config]` Rename the fastsync section and the - fast\_sync key blocksync and block\_sync respectively - ([\#9259](https://github.com/tendermint/tendermint/pull/9259)) -- `[types]` Reduce the use of protobuf types in core logic. `ConsensusParams`, - `BlockParams`, `ValidatorParams`, `EvidenceParams`, `VersionParams` have - become native types. They still utilize protobuf when being sent over - the wire or written to disk. Moved `ValidateConsensusParams` inside - (now native type) `ConsensusParams`, and renamed it to `ValidateBasic`. - ([\#9287](https://github.com/tendermint/tendermint/pull/9287)) -- `[abci/params]` Deduplicate `ConsensusParams` and `BlockParams` so - only `types` proto definitions are use. Remove `TimeIotaMs` and use - a hard-coded 1 millisecond value to ensure monotonically increasing - block times. Rename `AppVersion` to `App` so as to not stutter. - ([\#9287](https://github.com/tendermint/tendermint/pull/9287)) -- `[abci]` New ABCI methods `PrepareProposal` and `ProcessProposal` which give - the app control over transactions proposed and allows for verification of - proposed blocks. ([\#9301](https://github.com/tendermint/tendermint/pull/9301)) - -### BUG FIXES +### DEPRECATIONS -- `[consensus]` Fixed a busy loop that happened when sending of a block part failed by sleeping in case of error. - ([\#4](https://github.com/informalsystems/tendermint/pull/4)) -- `[state/kvindexer]` Fixed the default behaviour of the kvindexer to index and - query attributes by events in which they occur. In 0.34.25 this was mitigated - by a separated RPC flag. @jmalicevic - ([\#77](https://github.com/cometbft/cometbft/pull/77)) -- `[state/kvindexer]` Resolved crashes when event values contained slashes, - introduced after adding event sequences in - [\#77](https://github.com/cometbft/cometbft/pull/77). @jmalicevic - ([\#382](https://github.com/cometbft/cometbft/pull/382)) -- `[consensus]` ([\#386](https://github.com/cometbft/cometbft/pull/386)) Short-term fix for the case when `needProofBlock` cannot find previous block meta by defaulting to the creation of a new proof block. (@adizere) - - Special thanks to the [Vega.xyz](https://vega.xyz/) team, and in particular to Zohar (@ze97286), for reporting the problem and working with us to get to a fix. -- `[docker]` enable cross platform build using docker buildx - ([\#9073](https://github.com/tendermint/tendermint/pull/9073)) -- `[consensus]` fix round number of `enterPropose` - when handling `RoundStepNewRound` timeout. - ([\#9229](https://github.com/tendermint/tendermint/pull/9229)) -- `[docker]` ensure Docker image uses consistent version of Go - ([\#9462](https://github.com/tendermint/tendermint/pull/9462)) -- `[p2p]` prevent peers who have errored from being added to `peer_set` - ([\#9500](https://github.com/tendermint/tendermint/pull/9500)) -- `[blocksync]` handle the case when the sending - queue is full: retry block request after a timeout - ([\#9518](https://github.com/tendermint/tendermint/pull/9518)) +- `[rpc/grpc]` Mark the gRPC broadcast API as deprecated. + It will be superseded by a broader API as part of + [\#81](https://github.com/cometbft/cometbft/issues/81) + ([\#650](https://github.com/cometbft/cometbft/issues/650)) ### FEATURES -- `[abci]` New ABCI methods `PrepareProposal` and `ProcessProposal` which give - the app control over transactions proposed and allows for verification of - proposed blocks. ([\#9301](https://github.com/tendermint/tendermint/pull/9301)) +- `[abci]` New ABCI methods `VerifyVoteExtension` and `ExtendVote` allow validators to validate the vote extension data attached to a pre-commit message and allow applications to let their validators do more than just validate within consensus ([\#9836](https://github.com/tendermint/tendermint/pull/9836)) +- `[node/state]` Add Go API to bootstrap block store and state store to a height + ([\#1057](https://github.com/tendermint/tendermint/pull/#1057)) (@yihuang) +- `[proxy]` Introduce `NewConnSyncLocalClientCreator`, which allows local ABCI + clients to have the same concurrency model as remote clients (i.e. one mutex + per client "connection", for each of the four ABCI "connections"). + ([tendermint/tendermint\#9830](https://github.com/tendermint/tendermint/pull/9830) + and [\#1145](https://github.com/cometbft/cometbft/pull/1145)) +- `[proxy]` Introduce `NewUnsyncLocalClientCreator`, which allows local ABCI + clients to have the same concurrency model as remote clients (i.e. one + mutex per client "connection", for each of the four ABCI "connections"). + ([\#9830](https://github.com/tendermint/tendermint/pull/9830)) ### IMPROVEMENTS -- `[e2e]` Add functionality for uncoordinated (minor) upgrades - ([\#56](https://github.com/tendermint/tendermint/pull/56)) -- `[tools/tm-signer-harness]` Remove the folder as it is unused - ([\#136](https://github.com/cometbft/cometbft/issues/136)) -- `[p2p]` Reactor `Send`, `TrySend` and `Receive` renamed to `SendEnvelope`, - `TrySendEnvelope` and `ReceiveEnvelope` to allow metrics to be appended to - messages and measure bytes sent/received. - ([\#230](https://github.com/cometbft/cometbft/pull/230)) -- `[abci]` Added `AbciVersion` to `RequestInfo` allowing - applications to check ABCI version when connecting to CometBFT. - ([\#5706](https://github.com/tendermint/tendermint/pull/5706)) -- `[cli]` add `--hard` flag to rollback command (and a boolean to the `RollbackState` method). This will rollback - state and remove the last block. This command can be triggered multiple times. The application must also rollback - state to the same height. - ([\#9171](https://github.com/tendermint/tendermint/pull/9171)) -- `[crypto]` Update to use btcec v2 and the latest btcutil. - ([\#9250](https://github.com/tendermint/tendermint/pull/9250)) -- `[rpc]` Added `header` and `header_by_hash` queries to the RPC client - ([\#9276](https://github.com/tendermint/tendermint/pull/9276)) -- `[proto]` Migrate from `gogo/protobuf` to `cosmos/gogoproto` - ([\#9356](https://github.com/tendermint/tendermint/pull/9356)) -- `[rpc]` Enable caching of RPC responses - ([\#9650](https://github.com/tendermint/tendermint/pull/9650)) -- `[consensus]` Save peer LastCommit correctly to achieve 50% reduction in gossiped precommits. - ([\#9760](https://github.com/tendermint/tendermint/pull/9760)) +- `[blocksync]` Generate new metrics during BlockSync + ([\#543](https://github.com/cometbft/cometbft/pull/543)) +- `[crypto/merkle]` Improve HashAlternatives performance + ([\#6443](https://github.com/tendermint/tendermint/pull/6443)) +- `[crypto/merkle]` Improve HashAlternatives performance + ([\#6513](https://github.com/tendermint/tendermint/pull/6513)) +- `[jsonrpc/client]` Improve the error message for client errors stemming from + bad HTTP responses. + ([cometbft/cometbft\#638](https://github.com/cometbft/cometbft/pull/638)) +- `[mempool]` Application can now set `ConsensusParams.Block.MaxBytes` to -1 + to gain more control on the max size of transactions in a block. + It also allows the application to have visibility on all transactions in the + mempool at `PrepareProposal` time. + ([\#980](https://github.com/cometbft/cometbft/pull/980)) +- `[node]` Close evidence.db OnStop ([cometbft/cometbft\#1210](https://github.com/cometbft/cometbft/pull/1210): @chillyvee) +- `[node]` Make handshake cancelable ([cometbft/cometbft\#857](https://github.com/cometbft/cometbft/pull/857)) +- `[p2p/pex]` Improve addrBook.hash performance + ([\#6509](https://github.com/tendermint/tendermint/pull/6509)) +- `[pubsub/kvindexer]` Numeric query conditions and event values are represented as big floats with default precision of 125. + Integers are read as "big ints" and represented with as many bits as they need when converting to floats. + ([\#797](https://github.com/cometbft/cometbft/pull/797)) +- `[pubsub]` Performance improvements for the event query API + ([\#7319](https://github.com/tendermint/tendermint/pull/7319)) +- `[rpc]` Remove response data from response failure logs in order + to prevent large quantities of log data from being produced + ([\#654](https://github.com/cometbft/cometbft/issues/654)) +- `[state]` Make logging `block_app_hash` and `app_hash` consistent by logging them both as hex. + ([\#1264](https://github.com/cometbft/cometbft/pull/1264)) -## v0.34.31 +## v0.37.2 -*November 27, 2023* +*June 14, 2023* -Fixes a small bug in the mempool for an experimental feature. +Provides several minor bug fixes, as well as fixes for several low-severity +security issues. ### BUG FIXES -- `[mempool]` Avoid infinite wait in transaction sending routine when - using experimental parameters to limiting transaction gossiping to peers - ([\#1654](https://github.com/cometbft/cometbft/pull/1654)) - -## v0.34.30 - -*November 17, 2023* - -This release contains, among other things, an opt-in, experimental feature to -help reduce the bandwidth consumption associated with the mempool's transaction -gossip. - -### BUILD - -- Bump Go version used to v1.20 since v1.19 has reached EOL - ([\#1351](https://github.com/cometbft/cometbft/pull/1351)) +- `[pubsub]` Pubsub queries are now able to parse big integers (larger than + int64). Very big floats are also properly parsed into very big integers + instead of being truncated to int64. + ([\#771](https://github.com/cometbft/cometbft/pull/771)) +- `[state/kvindex]` Querying event attributes that are bigger than int64 is now + enabled. We are not supporting reading floats from the db into the indexer + nor parsing them into BigFloats to not introduce breaking changes in minor + releases. ([\#771](https://github.com/cometbft/cometbft/pull/771)) -### FEATURES +### IMPROVEMENTS -- `[metrics]` Add metric for mempool size in bytes `SizeBytes`. - ([\#1512](https://github.com/cometbft/cometbft/pull/1512)) +- `[rpc]` Remove response data from response failure logs in order + to prevent large quantities of log data from being produced + ([\#654](https://github.com/cometbft/cometbft/issues/654)) -### IMPROVEMENTS +### SECURITY FIXES -- `[node]` Make handshake cancelable ([cometbft/cometbft\#857](https://github.com/cometbft/cometbft/pull/857)) -- `[node]` Close evidence.db OnStop ([cometbft/cometbft\#1210](https://github.com/cometbft/cometbft/pull/1210): @chillyvee) -- `[mempool]` Add experimental feature to limit the number of persistent peers and non-persistent - peers to which the node gossip transactions (only for "v0" mempool). - ([\#1558](https://github.com/cometbft/cometbft/pull/1558), - ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) -- `[config]` Add mempool parameters `experimental_max_gossip_connections_to_persistent_peers` and - `experimental_max_gossip_connections_to_non_persistent_peers` for limiting the number of peers to - which the node gossip transactions. - ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) - ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) +- `[cmd/cometbft/commands/debug/kill]` **Low severity** - Fix unsafe int cast in + `debug kill` command ([\#793](https://github.com/cometbft/cometbft/pull/793)) +- `[consensus]` **Low severity** - Avoid recursive call after rename to + `(*PeerState).MarshalJSON` + ([\#863](https://github.com/cometbft/cometbft/pull/863)) +- `[mempool/clist_mempool]` **Low severity** - Prevent a transaction from + appearing twice in the mempool + ([\#890](https://github.com/cometbft/cometbft/pull/890): @otrack) +- `[rpc/jsonrpc/client]` **Low severity** - Prevent RPC + client credentials from being inadvertently dumped to logs + ([\#787](https://github.com/cometbft/cometbft/pull/787)) ## v0.34.29 @@ -564,12 +756,12 @@ security issues. ### BUG FIXES -- `[state/kvindex]` Querying event attributes that are bigger than int64 is now - enabled. ([\#771](https://github.com/cometbft/cometbft/pull/771)) - `[pubsub]` Pubsub queries are now able to parse big integers (larger than int64). Very big floats are also properly parsed into very big integers instead of being truncated to int64. ([\#771](https://github.com/cometbft/cometbft/pull/771)) +- `[state/kvindex]` Querying event attributes that are bigger than int64 is now + enabled. ([\#771](https://github.com/cometbft/cometbft/pull/771)) ### IMPROVEMENTS @@ -579,9 +771,6 @@ security issues. ### SECURITY FIXES -- `[rpc/jsonrpc/client]` **Low severity** - Prevent RPC - client credentials from being inadvertently dumped to logs - ([\#788](https://github.com/cometbft/cometbft/pull/788)) - `[cmd/cometbft/commands/debug/kill]` **Low severity** - Fix unsafe int cast in `debug kill` command ([\#794](https://github.com/cometbft/cometbft/pull/794)) - `[consensus]` **Low severity** - Avoid recursive call after rename to @@ -590,8 +779,11 @@ security issues. - `[mempool/clist_mempool]` **Low severity** - Prevent a transaction from appearing twice in the mempool ([\#890](https://github.com/cometbft/cometbft/pull/890): @otrack) +- `[rpc/jsonrpc/client]` **Low severity** - Prevent RPC + client credentials from being inadvertently dumped to logs + ([\#788](https://github.com/cometbft/cometbft/pull/788)) -## v0.34.28 +## v0.37.1 *April 26, 2023* @@ -607,10 +799,43 @@ that code. ### BUG FIXES +- `[consensus]` Rename `(*PeerState).ToJSON` to `MarshalJSON` to fix a logging data race + ([\#524](https://github.com/cometbft/cometbft/pull/524)) - `[consensus]` Unexpected error conditions in `ApplyBlock` are non-recoverable, so ignoring the error and carrying on is a bug. We replaced a `return` that disregarded the error by a `panic`. ([\#496](https://github.com/cometbft/cometbft/pull/496)) +- `[light]` Fixed an edge case where a light client would panic when attempting + to query a node that (1) has started from a non-zero height and (2) does + not yet have any data. The light client will now, correctly, not panic + _and_ keep the node in its list of providers in the same way it would if + it queried a node starting from height zero that does not yet have data + ([\#575](https://github.com/cometbft/cometbft/issues/575)) + +### IMPROVEMENTS + +- `[jsonrpc/client]` Improve the error message for client errors stemming from + bad HTTP responses. + ([cometbft/cometbft\#638](https://github.com/cometbft/cometbft/pull/638)) + +## v0.34.28 + +*April 26, 2023* + +This release fixes several bugs, and has had to introduce one small Go +API-breaking change in the `crypto/merkle` package in order to address what +could be a security issue for some users who directly and explicitly make use of +that code. + +### BREAKING CHANGES + +- `[crypto/merkle]` Do not allow verification of Merkle Proofs against empty trees (`nil` root). `Proof.ComputeRootHash` now panics when it encounters an error, but `Proof.Verify` does not panic + ([\#558](https://github.com/cometbft/cometbft/issues/558)) + +### BUG FIXES + - `[consensus]` Rename `(*PeerState).ToJSON` to `MarshalJSON` to fix a logging data race ([\#524](https://github.com/cometbft/cometbft/pull/524)) +- `[consensus]` Unexpected error conditions in `ApplyBlock` are non-recoverable, so ignoring the error and carrying on is a bug. We replaced a `return` that disregarded the error by a `panic`. + ([\#496](https://github.com/cometbft/cometbft/pull/496)) - `[light]` Fixed an edge case where a light client would panic when attempting to query a node that (1) has started from a non-zero height and (2) does not yet have any data. The light client will now, correctly, not panic @@ -625,6 +850,145 @@ that code. bad HTTP responses. ([cometbft/cometbft\#638](https://github.com/cometbft/cometbft/pull/638)) +## v0.37.0 + +*March 6, 2023* + +This is the first CometBFT release with ABCI 1.0, which introduces the +`PrepareProposal` and `ProcessProposal` methods, with the aim of expanding the +range of use cases that application developers can address. This is the first +change to ABCI towards ABCI++, and the full range of ABCI++ functionality will +only become available in the next major release with ABCI 2.0. See the +[specification](./spec/abci/) for more details. + +In the v0.34.27 release, the CometBFT Go module is still +`github.com/tendermint/tendermint` to facilitate ease of upgrading for users, +but in this release we have changed this to `github.com/cometbft/cometbft`. + +Please also see our [upgrading guidelines](./UPGRADING.md) for more details on +upgrading from the v0.34 release series. + +Also see our [QA results](https://docs.cometbft.com/v0.37/qa/v037/cometbft) for +the v0.37 release. + +We'd love your feedback on this release! Please reach out to us via one of our +communication channels, such as [GitHub +Discussions](https://github.com/cometbft/cometbft/discussions), with any of your +questions, comments and/or concerns. + +See below for more details. + +### BREAKING CHANGES + +- Bump minimum Go version to 1.20 + ([\#385](https://github.com/cometbft/cometbft/issues/385)) +- Change spelling from British English to American. Rename + `Subscription.Cancelled()` to `Subscription.Canceled()` in `libs/pubsub` + ([\#9144](https://github.com/tendermint/tendermint/pull/9144)) +- The `TMHOME` environment variable was renamed to `CMTHOME`, and all environment variables starting with `TM_` are instead prefixed with `CMT_` + ([\#211](https://github.com/cometbft/cometbft/issues/211)) +- `[abci/counter]` Delete counter example app + ([\#6684](https://github.com/tendermint/tendermint/pull/6684)) +- `[abci/params]` Deduplicate `ConsensusParams` and `BlockParams` so + only `types` proto definitions are use. Remove `TimeIotaMs` and use + a hard-coded 1 millisecond value to ensure monotonically increasing + block times. Rename `AppVersion` to `App` so as to not stutter. + ([\#9287](https://github.com/tendermint/tendermint/pull/9287)) +- `[abci]` Added cli commands for `PrepareProposal` and `ProcessProposal`. + ([\#8656](https://github.com/tendermint/tendermint/pull/8656)) +- `[abci]` Added cli commands for `PrepareProposal` and `ProcessProposal`. + ([\#8901](https://github.com/tendermint/tendermint/pull/8901)) +- `[abci]` Change the `key` and `value` fields from + `[]byte` to `string` in the `EventAttribute` type. + ([\#6403](https://github.com/tendermint/tendermint/pull/6403)) +- `[abci]` Make length delimiter encoding consistent + (`uint64`) between ABCI and P2P wire-level protocols + ([\#5783](https://github.com/tendermint/tendermint/pull/5783)) +- `[abci]` New ABCI methods `PrepareProposal` and `ProcessProposal` which give + the app control over transactions proposed and allows for verification of + proposed blocks. ([\#9301](https://github.com/tendermint/tendermint/pull/9301)) +- `[abci]` Removes unused Response/Request `SetOption` from ABCI + ([\#9145](https://github.com/tendermint/tendermint/pull/9145)) +- `[abci]` Renamed `EvidenceType` to `MisbehaviorType` and `Evidence` + to `Misbehavior` as a more accurate label of their contents. + ([\#8216](https://github.com/tendermint/tendermint/pull/8216)) +- `[abci]` Renamed `LastCommitInfo` to `CommitInfo` in preparation for vote + extensions. ([\#9122](https://github.com/tendermint/tendermint/pull/9122)) +- `[config]` Rename the fastsync section and the + fast\_sync key blocksync and block\_sync respectively + ([\#9259](https://github.com/tendermint/tendermint/pull/9259)) +- `[p2p]` Reactor `Send`, `TrySend` and `Receive` renamed to `SendEnvelope`, + `TrySendEnvelope` and `ReceiveEnvelope` to allow metrics to be appended to + messages and measure bytes sent/received. + ([\#230](https://github.com/cometbft/cometbft/pull/230)) +- `[types]` Reduce the use of protobuf types in core logic. `ConsensusParams`, + `BlockParams`, `ValidatorParams`, `EvidenceParams`, `VersionParams` have + become native types. They still utilize protobuf when being sent over + the wire or written to disk. Moved `ValidateConsensusParams` inside + (now native type) `ConsensusParams`, and renamed it to `ValidateBasic`. + ([\#9287](https://github.com/tendermint/tendermint/pull/9287)) + +### BUG FIXES + +- `[blocksync]` handle the case when the sending + queue is full: retry block request after a timeout + ([\#9518](https://github.com/tendermint/tendermint/pull/9518)) +- `[consensus]` ([\#386](https://github.com/cometbft/cometbft/pull/386)) Short-term fix for the case when `needProofBlock` cannot find previous block meta by defaulting to the creation of a new proof block. (@adizere) + - Special thanks to the [Vega.xyz](https://vega.xyz/) team, and in particular to Zohar (@ze97286), for reporting the problem and working with us to get to a fix. +- `[consensus]` Fixed a busy loop that happened when sending of a block part failed by sleeping in case of error. + ([\#4](https://github.com/informalsystems/tendermint/pull/4)) +- `[consensus]` fix round number of `enterPropose` + when handling `RoundStepNewRound` timeout. + ([\#9229](https://github.com/tendermint/tendermint/pull/9229)) +- `[docker]` enable cross platform build using docker buildx + ([\#9073](https://github.com/tendermint/tendermint/pull/9073)) +- `[docker]` ensure Docker image uses consistent version of Go + ([\#9462](https://github.com/tendermint/tendermint/pull/9462)) +- `[p2p]` prevent peers who have errored from being added to `peer_set` + ([\#9500](https://github.com/tendermint/tendermint/pull/9500)) +- `[state/kvindexer]` Fixed the default behaviour of the kvindexer to index and + query attributes by events in which they occur. In 0.34.25 this was mitigated + by a separated RPC flag. @jmalicevic + ([\#77](https://github.com/cometbft/cometbft/pull/77)) +- `[state/kvindexer]` Resolved crashes when event values contained slashes, + introduced after adding event sequences in + [\#77](https://github.com/cometbft/cometbft/pull/77). @jmalicevic + ([\#382](https://github.com/cometbft/cometbft/pull/382)) + +### FEATURES + +- `[abci]` New ABCI methods `PrepareProposal` and `ProcessProposal` which give + the app control over transactions proposed and allows for verification of + proposed blocks. ([\#9301](https://github.com/tendermint/tendermint/pull/9301)) + +### IMPROVEMENTS + +- `[abci]` Added `AbciVersion` to `RequestInfo` allowing + applications to check ABCI version when connecting to CometBFT. + ([\#5706](https://github.com/tendermint/tendermint/pull/5706)) +- `[cli]` add `--hard` flag to rollback command (and a boolean to the `RollbackState` method). This will rollback + state and remove the last block. This command can be triggered multiple times. The application must also rollback + state to the same height. + ([\#9171](https://github.com/tendermint/tendermint/pull/9171)) +- `[consensus]` Save peer LastCommit correctly to achieve 50% reduction in gossiped precommits. + ([\#9760](https://github.com/tendermint/tendermint/pull/9760)) +- `[crypto]` Update to use btcec v2 and the latest btcutil. + ([\#9250](https://github.com/tendermint/tendermint/pull/9250)) +- `[e2e]` Add functionality for uncoordinated (minor) upgrades + ([\#56](https://github.com/tendermint/tendermint/pull/56)) +- `[p2p]` Reactor `Send`, `TrySend` and `Receive` renamed to `SendEnvelope`, + `TrySendEnvelope` and `ReceiveEnvelope` to allow metrics to be appended to + messages and measure bytes sent/received. + ([\#230](https://github.com/cometbft/cometbft/pull/230)) +- `[proto]` Migrate from `gogo/protobuf` to `cosmos/gogoproto` + ([\#9356](https://github.com/tendermint/tendermint/pull/9356)) +- `[rpc]` Added `header` and `header_by_hash` queries to the RPC client + ([\#9276](https://github.com/tendermint/tendermint/pull/9276)) +- `[rpc]` Enable caching of RPC responses + ([\#9650](https://github.com/tendermint/tendermint/pull/9650)) +- `[tools/tm-signer-harness]` Remove the folder as it is unused + ([\#136](https://github.com/cometbft/cometbft/issues/136)) + ## v0.34.27 *Feb 27, 2023* @@ -660,9 +1024,6 @@ to this release! - `[consensus]` Fixed a busy loop that happened when sending of a block part failed by sleeping in case of error. ([\#4](https://github.com/informalsystems/tendermint/pull/4)) -- `[state/kvindexer]` Resolved crashes when event values contained slashes, - introduced after adding event sequences. - (\#[383](https://github.com/cometbft/cometbft/pull/383): @jmalicevic) - `[consensus]` Short-term fix for the case when `needProofBlock` cannot find previous block meta by defaulting to the creation of a new proof block. ([\#386](https://github.com/cometbft/cometbft/pull/386): @adizere) @@ -674,14 +1035,17 @@ to this release! whether this has a meaningful impact on P2P performance, but this patch does correct the underlying behaviour to what it should be ([tendermint/tendermint\#9936](https://github.com/tendermint/tendermint/pull/9936)) +- `[state/kvindexer]` Resolved crashes when event values contained slashes, + introduced after adding event sequences. + (\#[383](https://github.com/cometbft/cometbft/pull/383): @jmalicevic) ### DEPENDENCIES +- Bump tm-load-test to v1.3.0 to remove implicit dependency on Tendermint Core + ([\#165](https://github.com/cometbft/cometbft/pull/165)) - Replace [tm-db](https://github.com/tendermint/tm-db) with [cometbft-db](https://github.com/cometbft/cometbft-db) ([\#160](https://github.com/cometbft/cometbft/pull/160)) -- Bump tm-load-test to v1.3.0 to remove implicit dependency on Tendermint Core - ([\#165](https://github.com/cometbft/cometbft/pull/165)) - `[crypto]` Update to use btcec v2 and the latest btcutil ([tendermint/tendermint\#9787](https://github.com/tendermint/tendermint/pull/9787): @wcsiu) @@ -694,29 +1058,29 @@ to this release! ### IMPROVEMENTS -- `[e2e]` Add functionality for uncoordinated (minor) upgrades - ([\#56](https://github.com/tendermint/tendermint/pull/56)) -- `[tools/tm-signer-harness]` Remove the folder as it is unused - ([\#136](https://github.com/cometbft/cometbft/issues/136)) - Append the commit hash to the version of CometBFT being built ([\#204](https://github.com/cometbft/cometbft/pull/204)) -- `[mempool/v1]` Suppress "rejected bad transaction" in priority mempool logs by - reducing log level from info to debug - ([\#314](https://github.com/cometbft/cometbft/pull/314): @JayT106) - `[consensus]` Add `consensus_block_gossip_parts_received` and `consensus_step_duration_seconds` metrics in order to aid in investigating the impact of database compaction on consensus performance ([tendermint/tendermint\#9733](https://github.com/tendermint/tendermint/pull/9733)) -- `[state/kvindexer]` Add `match.event` keyword to support condition evaluation - based on the event the attributes belong to - ([tendermint/tendermint\#9759](https://github.com/tendermint/tendermint/pull/9759)) +- `[consensus]` Reduce bandwidth consumption of consensus votes by roughly 50% + through fixing a small logic bug + ([tendermint/tendermint\#9776](https://github.com/tendermint/tendermint/pull/9776)) +- `[e2e]` Add functionality for uncoordinated (minor) upgrades + ([\#56](https://github.com/tendermint/tendermint/pull/56)) +- `[mempool/v1]` Suppress "rejected bad transaction" in priority mempool logs by + reducing log level from info to debug + ([\#314](https://github.com/cometbft/cometbft/pull/314): @JayT106) - `[p2p]` Reduce log spam through reducing log level of "Dialing peer" and "Added peer" messages from info to debug ([tendermint/tendermint\#9764](https://github.com/tendermint/tendermint/pull/9764): @faddat) -- `[consensus]` Reduce bandwidth consumption of consensus votes by roughly 50% - through fixing a small logic bug - ([tendermint/tendermint\#9776](https://github.com/tendermint/tendermint/pull/9776)) +- `[state/kvindexer]` Add `match.event` keyword to support condition evaluation + based on the event the attributes belong to + ([tendermint/tendermint\#9759](https://github.com/tendermint/tendermint/pull/9759)) +- `[tools/tm-signer-harness]` Remove the folder as it is unused + ([\#136](https://github.com/cometbft/cometbft/issues/136)) --- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3f050cb866..eeedc5708e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -382,20 +382,23 @@ title of the PR _very_ clearly explains the benefit of a change to a user. Some good examples of changelog entry descriptions: ```md -- [consensus] \#1111 Small transaction throughput improvement (approximately - 3-5\% from preliminary tests) through refactoring the way we use channels -- [mempool] \#1112 Refactor Go API to be able to easily swap out the current - mempool implementation in CometBFT forks -- [p2p] \#1113 Automatically ban peers when their messages are unsolicited or - are received too frequently +- `[consensus]` Small transaction throughput improvement (approximately 3-5\% + from preliminary tests) through refactoring the way we use channels + ([\#1111](https://github.com/cometbft/cometbft/issues/1111)) +- `[mempool]` Refactor Go API to be able to easily swap out the current mempool + implementation in CometBFT forks + ([\#1112](https://github.com/cometbft/cometbft/issues/1112)) +- `[p2p]` Automatically ban peers when their messages are unsolicited or are + received too frequently + ([\#1113](https://github.com/cometbft/cometbft/issues/1113)) ``` Some bad examples of changelog entry descriptions: ```md -- [consensus] \#1111 Refactor channel usage -- [mempool] \#1112 Make API generic -- [p2p] \#1113 Ban for PEX message abuse +- `[consensus]` Refactor channel usage +- `[mempool]` Make API generic +- `[p2p]` Ban for PEX message abuse ``` For more on how to write good changelog entries, see: @@ -409,24 +412,24 @@ For more on how to write good changelog entries, see: Changelog entries should be formatted as follows: ```md -- [module] \#xxx Some description of the change (@contributor) +- `[module]` Some description of the change + ([\#1234](https://github.com/cometbft/cometbft/issues/1234): @contributor) ``` Here, `module` is the part of the code that changed (typically a top-level Go -package), `xxx` is the pull-request number, and `contributor` is the author/s of -the change. +package), `1234` is the pull-request number, and `contributor` is the author/s +of the change (only necessary if you are not a member of the CometBFT core +team). -It's also acceptable for `xxx` to refer to the relevant issue number, but +It's also acceptable for `1234` to refer to the relevant issue number, but pull-request numbers are preferred. Note this means pull-requests should be opened first so the changelog can then be updated with the pull-request's -number. There is no need to include the full link, as this will be added -automatically during release. But please include the backslash and pound, eg. -`\#2313`. +number. Changelog entries should be ordered alphabetically according to the `module`, and numerically according to the pull-request number. -Changes with multiple classifications should be doubly included (eg. a bug fix +Changes with multiple classifications should be doubly included (e.g. a bug fix that is also a breaking change should be recorded under both). Breaking changes are further subdivided according to the APIs/users they impact. @@ -439,7 +442,8 @@ removed from the header in RPC responses as well. The main development branch is `main`. -Every release is maintained in a release branch named `vX.Y.Z`. +Every release is maintained in a release branch named according to its major +release number (e.g. `v0.38.x` or `v1.x`). Pending minor releases have long-lived release candidate ("RC") branches. Minor release changes should be merged to these long-lived RC branches at the same @@ -454,8 +458,8 @@ the feature is complete, the feature branch is merged back (merge commit) into different features in different releases. Note, all pull requests should be squash merged except for merging to a release -branch (named `vX.Y`). This keeps the commit history clean and makes it easy to -reference the pull request where a change was introduced. +branch. This keeps the commit history clean and makes it easy to reference the +pull request where a change was introduced. ### Development Procedure @@ -495,25 +499,6 @@ Before merging a pull request: - Run `make test` to ensure that all tests pass - [Squash][git-squash] merge pull request -#### Pull Requests for Minor Releases - -If your change should be included in a minor release, please also open a PR -against the long-lived minor release candidate branch (e.g., `rc1/v0.33.5`) -_immediately after your change has been merged to main_. - -You can do this by cherry-picking your commit off `main`: - -```sh -$ git checkout rc1/v0.33.5 -$ git checkout -b {new branch name} -$ git cherry-pick {commit SHA from main} -# may need to fix conflicts, and then use git add and git cherry-pick --continue -$ git push origin {new branch name} -``` - -After this, you can open a PR. Please note in the PR body if there were merge -conflicts so that reviewers can be sure to take a thorough look. - ### Git Commit Style We follow the [Go style guide on commit messages][go-git-commit-style]. Write diff --git a/README.md b/README.md index a4552beba9..69243235ac 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ | Branch | Tests | Linting | |---------|------------------------------------------------|---------------------------------------------| | main | [![Tests][tests-badge]][tests-url] | [![Lint][lint-badge]][lint-url] | +| v1.x | [![Tests][tests-badge-v1x]][tests-url-v1x] | [![Lint][lint-badge-v1x]][lint-url-v1x] | | v0.38.x | [![Tests][tests-badge-v038x]][tests-url-v038x] | [![Lint][lint-badge-v038x]][lint-url-v038x] | | v0.37.x | [![Tests][tests-badge-v037x]][tests-url-v037x] | [![Lint][lint-badge-v037x]][lint-url-v037x] | | v0.34.x | [![Tests][tests-badge-v034x]][tests-url-v034x] | [![Lint][lint-badge-v034x]][lint-url-v034x] | @@ -37,34 +38,34 @@ Complete documentation can be found on the ## Releases -Please do not depend on `main` as your production branch. Use +Please do not depend on `main` as your production branch, as it may receive +significant breaking changes at any time. Use [releases](https://github.com/cometbft/cometbft/releases) instead. -We haven't released v1.0 yet -since we are making breaking changes to the protocol and the APIs. See below for -more details about [versioning](#versioning). +If you intend to run CometBFT in production, we're happy to help. To contact us, +in order of preference: -In any case, if you intend to run CometBFT in production, we're happy to help. - -To contact us, you can also -[join the chat](https://discord.com/channels/669268347736686612/669283915743232011). +- [Create a new discussion on + GitHub](https://github.com/cometbft/cometbft/discussions) +- Reach out to us via [Telegram](https://t.me/CometBFT) +- [Join the chat on + Discord](https://discord.com/channels/669268347736686612/669283915743232011) More on how releases are conducted can be found [here](./RELEASES.md). ## Security -To report a security vulnerability, see our [bug bounty -program](https://hackerone.com/cosmos). For examples of the kinds of bugs we're -looking for, see [our security policy](SECURITY.md). +Please see [SECURITY.md](./SECURITY.md). ## Minimum requirements -| CometBFT version | Requirement | Notes | -|------------------|-------------|-------------------| -| main | Go version | Go 1.21 or higher | -| v0.38.x | Go version | Go 1.20 or higher | -| v0.37.x | Go version | Go 1.20 or higher | -| v0.34.x | Go version | Go 1.20 or higher | +| CometBFT version | Requirement | Version | Tested with | +|------------------|-------------|----------------|-------------| +| main | Go version | 1.21 or higher | 1.21 | +| v1.x | Go version | 1.21 or higher | 1.21 | +| v0.38.x | Go version | 1.20 or higher | 1.21 | +| v0.37.x | Go version | 1.20 or higher | 1.21 | +| v0.34.x | Go version | 1.20 or higher | 1.20 | ### Install @@ -88,30 +89,30 @@ yourself with our [Architectural Decision Records ## Versioning -### Semantic Versioning - -CometBFT uses [Semantic Versioning](http://semver.org/) to determine when and -how the version changes. According to SemVer, anything in the public API can -change at any time before version 1.0.0 +As of v1, CometBFT uses the following approach to versioning: -To provide some stability to users of 0.X.X versions of CometBFT, the MINOR -version is used to signal breaking changes across CometBFT's API. This API -includes all publicly exposed types, functions, and methods in non-internal Go -packages as well as the types and methods accessible via the CometBFT RPC -interface. - -Breaking changes to these public APIs will be documented in the CHANGELOG. +- **Major version** bumps, such as v1.0.0 to v2.0.0, would generally involve + changes that _force_ users to perform a coordinated upgrade in order to use + the new version, such as protocol-breaking changes (e.g. changes to how block + hashes are computed and thus what the network considers to be "valid blocks", + or how the consensus protocol works, or changes that affect network-level + compatibility between nodes, etc.). +- **Minor version** bumps, such as v1.1.0 to v1.2.0, are reserved for rolling + out new features or substantial changes that do not force a coordinated + upgrade (i.e. not protocol-breaking), but could potentially break Go APIs. +- **Patch version** bumps, such as v1.0.0 to v1.0.1, are reserved for + bug/security fixes that are not protocol- or Go API-breaking. ### Upgrades -In an effort to avoid accumulating technical debt prior to 1.0.0, we do not -guarantee that breaking changes (i.e. bumps in the MINOR version) will work with -existing CometBFT blockchains. In these cases you will have to start a new -blockchain, or write something custom to get the old data into the new chain. -However, any bump in the PATCH version should be compatible with existing -blockchain histories. +We do not guarantee compatibility between major releases of CometBFT. Minor +releases of the same major release series (v1.1, v1.2, etc.) should, unless +otherwise specified, be compatible with each other. Patch releases of the same +minor release series (v1.0.1, v1.0.2, etc.) are guaranteed to be compatible with +each other. -For more information on upgrading, see [UPGRADING.md](./UPGRADING.md). +For more detailed information on upgrading from one version to another, see +[UPGRADING.md](./UPGRADING.md). ### Supported Versions @@ -122,6 +123,10 @@ CometBFT up-to-date. Upgrading instructions can be found in Currently supported versions include: +- v1.x: Currently in pre-release with no guarantees as to API stability until a + release candidate is cut. See [RELEASES.md](./RELEASES.md) for details on our + process as to API stability guarantees that can be expected of CometBFT + pre-releases. - v0.38.x: CometBFT v0.38 introduces ABCI 2.0, which implements the entirety of ABCI++ - v0.37.x: CometBFT v0.37 introduces ABCI 1.0, which is the first major step @@ -133,8 +138,8 @@ Currently supported versions include: ### Libraries -- [Cosmos SDK](http://github.com/cosmos/cosmos-sdk); A framework for building - applications in Golang +- [Cosmos SDK](http://github.com/cosmos/cosmos-sdk): A framework for building + high-value public blockchain applications in Go - [Tendermint in Rust](https://github.com/informalsystems/tendermint-rs) - [ABCI Tower](https://github.com/penumbra-zone/tower-abci) @@ -181,10 +186,12 @@ maintains [cometbft.com](https://cometbft.com). [sg-badge]: https://sourcegraph.com/github.com/cometbft/cometbft/-/badge.svg [sg-url]: https://sourcegraph.com/github.com/cometbft/cometbft?badge [tests-url]: https://github.com/cometbft/cometbft/actions/workflows/tests.yml +[tests-url-v1x]: https://github.com/cometbft/cometbft/actions/workflows/tests.yml?query=branch%3Av1.x [tests-url-v038x]: https://github.com/cometbft/cometbft/actions/workflows/tests.yml?query=branch%3Av0.38.x [tests-url-v037x]: https://github.com/cometbft/cometbft/actions/workflows/tests.yml?query=branch%3Av0.37.x [tests-url-v034x]: https://github.com/cometbft/cometbft/actions/workflows/tests.yml?query=branch%3Av0.34.x [tests-badge]: https://github.com/cometbft/cometbft/actions/workflows/tests.yml/badge.svg?branch=main +[tests-badge-v1x]: https://github.com/cometbft/cometbft/actions/workflows/tests.yml/badge.svg?branch=v1.x [tests-badge-v038x]: https://github.com/cometbft/cometbft/actions/workflows/tests.yml/badge.svg?branch=v0.38.x [tests-badge-v037x]: https://github.com/cometbft/cometbft/actions/workflows/tests.yml/badge.svg?branch=v0.37.x [tests-badge-v034x]: https://github.com/cometbft/cometbft/actions/workflows/tests.yml/badge.svg?branch=v0.34.x @@ -192,8 +199,10 @@ maintains [cometbft.com](https://cometbft.com). [lint-badge-v034x]: https://github.com/cometbft/cometbft/actions/workflows/lint.yml/badge.svg?branch=v0.34.x [lint-badge-v037x]: https://github.com/cometbft/cometbft/actions/workflows/lint.yml/badge.svg?branch=v0.37.x [lint-badge-v038x]: https://github.com/cometbft/cometbft/actions/workflows/lint.yml/badge.svg?branch=v0.38.x +[lint-badge-v1x]: https://github.com/cometbft/cometbft/actions/workflows/lint.yml/badge.svg?branch=v1.x [lint-url]: https://github.com/cometbft/cometbft/actions/workflows/lint.yml [lint-url-v034x]: https://github.com/cometbft/cometbft/actions/workflows/lint.yml?query=branch%3Av0.34.x [lint-url-v037x]: https://github.com/cometbft/cometbft/actions/workflows/lint.yml?query=branch%3Av0.37.x [lint-url-v038x]: https://github.com/cometbft/cometbft/actions/workflows/lint.yml?query=branch%3Av0.38.x +[lint-url-v1x]: https://github.com/cometbft/cometbft/actions/workflows/lint.yml?query=branch%3Av1.x [tm-core]: https://github.com/tendermint/tendermint diff --git a/RELEASES.md b/RELEASES.md index 7e33174b8b..f2b3f2a353 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,17 +1,17 @@ # Releases CometBFT uses modified [semantic versioning](https://semver.org/) with each -release following a `vX.Y.Z` format. CometBFT is currently on major version 0 -and uses the minor version to signal breaking changes. The `main` branch is -used for active development and thus it is not advisable to build against it. +release following a `vX.Y.Z` format. The versioning approach used by CometBFT +v1.x onwards differs from that of the v0.x series, and is documented in +[README.md](./README.md#versioning). The `main` branch is used for active +development and thus it is not advisable to build against it. The latest changes are always initially merged into `main`. Releases are specified using tags and are built from long-lived "backport" branches that are -cut from `main` when the release process begins. Each release "line" (e.g. -0.34 or 0.33) has its own long-lived backport branch, and the backport branches -have names like `v0.34.x` or `v0.33.x` (literally, `x`; it is not a placeholder -in this case). CometBFT only maintains the last two releases at a time (the -oldest release is predominantly just security patches). +cut from `main` when the release process begins. Each release "line" (e.g. 1.0 +or 0.38) has its own long-lived backport branch, and the backport branches have +names like `v1.x` or `v0.38.x` (literally, `x`; it is not a placeholder in this +case). ## Backporting @@ -22,44 +22,41 @@ We use Mergify's [backport feature](https://mergify.io/features/backports) to automatically backport to the needed branch. There should be a label for any backport branch that you'll be targeting. To notify the bot to backport a pull request, mark the pull request with the label corresponding to the correct -backport branch. For example, to backport to v0.38.x, add the label -`S:backport-to-v0.38.x`. Once the original pull request is merged, the bot will +backport branch. For example, to backport to v1.x, add the label +`S:backport-to-v1.x`. Once the original pull request is merged, the bot will try to cherry-pick the pull request to the backport branch. If the bot fails to backport, it will open a pull request. The author of the original pull request is responsible for solving the conflicts and merging the pull request. ### Creating a backport branch -If this is the first release candidate for a minor version release, e.g. -v0.25.0, you get to have the honor of creating the backport branch! +If this is the first release candidate for a major version release, e.g. v2.0.0, +you get to have the honor of creating the backport branch! Note that, after creating the backport branch, you'll also need to update the -tags on `main` so that `go mod` is able to order the branches correctly. You -should tag `main` with a "dev" tag that is "greater than" the backport -branches tags. Otherwise, `go mod` does not 'know' whether commits on `main` -come before or after the release. +tags on `main` so that `go mod` is able to order the branches correctly. In the following example, we'll assume that we're making a backport branch for -the 0.38.x line. +the 2.x line. 1. Start on `main` 2. Ensure that there is a [branch protection - rule](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) for the - branch you are about to create (you will need admin access to the repository - in order to do this). + rule](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) + for the branch you are about to create (you will need admin access to the + repository in order to do this). 3. Create and push the backport branch: ```sh - git checkout -b v0.38.x - git push origin v0.38.x + git checkout -b v2.x + git push origin v2.x ``` 4. Create a PR to update the documentation directory for the backport branch. - We rewrite any URLs pointing to `main` to point to the backport branch, - so that generated documentation will link to the correct versions of files + We rewrite any URLs pointing to `main` to point to the backport branch, so + that generated documentation will link to the correct versions of files elsewhere in the repository. The following files are to be excluded from this search: @@ -73,21 +70,21 @@ the 0.38.x line. * `https://github.com/cometbft/cometbft/blob/main/LICENSE` Be sure to search for all of the following links and replace `main` with your - corresponding branch label or version (e.g. `v0.38.x` or `v0.38`): + corresponding branch label or version (e.g. `v2.x` or `v2.0`): * `github.com/cometbft/cometbft/blob/main` -> - `github.com/cometbft/cometbft/blob/v0.38.x` + `github.com/cometbft/cometbft/blob/v2.x` * `github.com/cometbft/cometbft/tree/main` -> - `github.com/cometbft/cometbft/tree/v0.38.x` - * `docs.cometbft.com/main` -> `docs.cometbft.com/v0.38` + `github.com/cometbft/cometbft/tree/v2.x` + * `docs.cometbft.com/main` -> `docs.cometbft.com/v2` Once you have updated all of the relevant documentation: ```sh # Create and push the PR. - git checkout -b update-docs-v038x - git commit -m "Update docs for v0.38.x backport branch." - git push -u origin update-docs-v038x + git checkout -b update-docs-v2.x + git commit -m "Update docs for v2.x backport branch." + git push -u origin update-docs-v2.x ``` Be sure to merge this PR before making other changes on the newly-created @@ -104,11 +101,11 @@ the 0.38.x line. After doing these steps, go back to `main` and do the following: -1. Create a new workflow to run e2e nightlies for the new backport branch. (See +1. Create a new workflow to run E2E nightlies for the new backport branch. (See [e2e-nightly-main.yml][e2e] for an example.) 2. Add a new section to the Mergify config (`.github/mergify.yml`) to enable the - backport bot to work on this branch, and add a corresponding `backport-to-v0.38.x` + backport bot to work on this branch, and add a corresponding `backport-to-v2.x` [label](https://github.com/cometbft/cometbft/labels) so the bot can be triggered. 3. Add a new section to the Dependabot config (`.github/dependabot.yml`) to @@ -122,28 +119,28 @@ After doing these steps, go back to `main` and do the following: ## Pre-releases -Before creating an official release, especially a minor release, we may want to +Before creating an official release, especially a major release, we may want to create an alpha or beta version, or release candidate (RC) for our friends and partners to test out. We use git tags to create pre-releases, and we build them off of backport branches, for example: -* `v0.38.0-alpha.1` - The first alpha release of `v0.38.0`. Subsequent alpha - releases will be numbered `v0.38.0-alpha.2`, `v0.38.0-alpha.3`, etc. +* `v2.0.0-alpha.1` - The first alpha release of `v2.0.0`. Subsequent alpha + releases will be numbered `v2.0.0-alpha.2`, `v2.0.0-alpha.3`, etc. Alpha releases are to be considered the _most_ unstable of pre-releases, and are most likely not yet properly QA'd. These are made available to allow early adopters to start integrating and testing new functionality before we're done with QA. -* `v0.38.0-beta.1` - The first beta release of `v0.38.0`. Subsequent beta - releases will be numbered `v0.38.0-beta.2`, `v0.38.0-beta.3`, etc. +* `v2.0.0-beta.1` - The first beta release of `v2.0.0`. Subsequent beta + releases will be numbered `v2.0.0-beta.2`, `v2.0.0-beta.3`, etc. Beta releases can be considered more stable than alpha releases in that we will have QA'd them better than alpha releases, but there still may be minor breaking API changes if users have strong demands for such changes. -* `v0.38.0-rc1` - The first release candidate (RC) of `v0.38.0`. Subsequent RCs - will be numbered `v0.38.0-rc2`, `v0.38.0-rc3`, etc. +* `v2.0.0-rc1` - The first release candidate (RC) of `v2.0.0`. Subsequent RCs + will be numbered `v2.0.0-rc2`, `v2.0.0-rc3`, etc. RCs are considered more stable than beta releases in that we will have completed our QA on them. APIs will most likely be stable at this point. The @@ -154,13 +151,13 @@ off of backport branches, for example: (Note that branches and tags _cannot_ have the same names, so it's important that these branches have distinct names from the tags/release names.) -If this is the first pre-release for a minor release, you'll have to make a new +If this is the first pre-release for a major release, you'll have to make a new backport branch (see above). Otherwise: -1. Start from the backport branch (e.g. `v0.38.x`). -2. Run the integration tests and the E2E nightlies - (which can be triggered from the GitHub UI; - e.g., ). +1. Start from the backport branch (e.g. `v2.x`). +2. Run the integration tests and the E2E nightlies (which can be triggered from + the GitHub UI; e.g., + ). 3. Prepare the pre-release documentation: * Build the changelog with [unclog] _without_ doing an unclog release, and commit the built changelog. This ensures that all changelog entries appear @@ -175,25 +172,27 @@ backport branch (see above). Otherwise: Check the changelog for breaking changes in these components. * Bump ABCI protocol version in `version.go`, if necessary 5. Open a PR with these changes against the backport branch. -6. Once these changes have landed on the backport branch, be sure to pull them back down locally. -7. Once you have the changes locally, create the new tag, specifying a name and a tag "message": - `git tag -a v0.38.0-rc1 -s -m "Release Candidate v0.38.0-rc1` +6. Once these changes have landed on the backport branch, be sure to pull them + back down locally. +7. Once you have the changes locally, create the new tag, specifying a name and + a tag "message": + `git tag -a v2.0.0-rc1 -s -m "Release Candidate v2.0.0-rc1` 8. Push the tag back up to origin: - `git push origin v0.38.0-rc1` + `git push origin v2.0.0-rc1` Now the tag should be available on the repo's releases page. 9. Future pre-releases will continue to be built off of this branch. -## Minor release +## Major release -This minor release process assumes that this release was preceded by release +This major release process assumes that this release was preceded by release candidates. If there were no release candidates, begin by creating a backport branch, as described above. Before performing these steps, be sure the -[Minor Release Checklist](#minor-release-checklist) has been completed. +[Major Release Checklist](#major-release-checklist) has been completed. -1. Start on the backport branch (e.g. `v0.38.x`) -2. Run integration tests (`make test_integrations`) and the e2e nightlies. +1. Start on the backport branch (e.g. `v2.x`) +2. Run integration tests (`make test_integrations`) and the E2E nightlies. 3. Prepare the release: * Do a [release][unclog-release] with [unclog] for the desired version, ensuring that you write up a good summary of the major highlights of the @@ -205,24 +204,26 @@ Before performing these steps, be sure the * Bump P2P and block protocol versions in `version.go`, if necessary * Bump ABCI protocol version in `version.go`, if necessary 4. Open a PR with these changes against the backport branch. -5. Once these changes are on the backport branch, push a tag with prepared release details. - This will trigger the actual release `v0.38.0`. - * `git tag -a v0.38.0 -s -m 'Release v0.38.0'` - * `git push origin v0.38.0` -6. Make sure that `main` is updated with the latest `CHANGELOG.md`, `CHANGELOG_PENDING.md`, and `UPGRADING.md`. +5. Once these changes are on the backport branch, push a tag with prepared + release details. This will trigger the actual release `v2.0.0`. + * `git tag -a v2.0.0 -s -m 'Release v2.0.0'` + * `git push origin v2.0.0` +6. Make sure that `main` is updated with the latest `CHANGELOG.md`, + `CHANGELOG_PENDING.md`, and `UPGRADING.md`. -## Patch release +## Minor and patch releases -Patch releases are done differently from minor releases: They are built off of -long-lived backport branches, rather than from main. As non-breaking changes -land on `main`, they should also be backported into these backport branches. +Minor and patch releases are done differently from major releases: they are +built off of long-lived backport branches, rather than from `main`. As +non-breaking changes land on `main`, they should also be backported into these +backport branches. Patch releases don't have release candidates by default, although any tricky changes may merit a release candidate. To create a patch release: -1. Checkout the long-lived backport branch: `git checkout v0.38.x` +1. Checkout the long-lived backport branch: `git checkout v2.x` 2. Run integration tests (`make test_integrations`) and the nightlies. 3. Check out a new branch and prepare the release: * Do a [release][unclog-release] with [unclog] for the desired version, @@ -233,18 +234,22 @@ To create a patch release: * Bump the ABCI version number, if necessary. (Note that ABCI follows semver, and that ABCI versions are the only versions which can change during patch releases, and only field additions are valid patch changes.) -4. Open a PR with these changes that will land them back on `v0.38.x` +4. Open a PR with these changes that will land them back on `v2.x` 5. Once this change has landed on the backport branch, make sure to pull it locally, then push a tag. - * `git tag -a v0.38.1 -s -m 'Release v0.38.1'` - * `git push origin v0.38.1` -6. Create a pull request back to main with the CHANGELOG & version changes from the latest release. - * Remove all `R:patch` labels from the pull requests that were included in the release. + * `git tag -a v2.0.1 -s -m 'Release v2.0.1'` + * `git push origin v2.0.1` + + The process for minor releases is similar to patch releases: + * `git tag -a v2.1.0 -s -m 'Release v2.1.0` + * `git push origin v2.1.0` +6. Create a pull request back to main with the CHANGELOG and version changes + from the latest release. * Do not merge the backport branch into main. -## Minor Release Checklist +## Major Release Checklist The following set of steps are performed on all releases that increment the -_minor_ version, e.g. v0.25 to v0.26. These steps ensure that CometBFT is well +_major_ version, e.g. v1.0 to v2.0. These steps ensure that CometBFT is well tested, stable, and suitable for adoption by the various diverse projects that rely on CometBFT. @@ -336,28 +341,36 @@ critical systems, testnets of larger sizes should be considered. #### Rotating Node Testnet -Real-world deployments of CometBFT frequently see new nodes arrive and old -nodes exit the network. The rotating node testnet ensures that CometBFT is -able to handle this reliably. In this test, a network with 10 validators and -3 seed nodes is started. A rolling set of 25 full nodes are started and each -connects to the network by dialing one of the seed nodes. Once the node is able -to blocksync to the head of the chain and begins producing blocks using -consensus it is stopped. Once stopped, a new node is started and -takes its place. This network is run for several days. +Real-world deployments of CometBFT frequently see new nodes arrive and old nodes +exit the network. The rotating node testnet ensures that CometBFT is able to +handle this reliably. In this test, a network with 10 validators and 3 seed +nodes is started. A rolling set of 25 full nodes are started and each connects +to the network by dialing one of the seed nodes. Once the node is able to +blocksync to the head of the chain and begins producing blocks using consensus +it is stopped. Once stopped, a new node is started and takes its place. This +network is run for several days. #### Vote-extension Testnet -CometBFT v0.38.0 introduced **vote-extensions**, which are added as the name suggests, to precommit votes sent by validators. -The Vote-extension Testnet is used to determine how vote-extensions affect the performance of CometBFT, under various settings. -The application used in the experiment is the same used on the (#200-node-testnet), but is configured differently to gauge de effects of varying vote extension sizes. -In the (#200-node-testnet) the application extends pre-commit votes with a 64 bit number encoded with variable compression. -In the Vote-extension Testnet, pre-commit votes are extended with a non-compressed extension of configurable size. -Experiments are run with multiple sizes to determine their impact and, for comparison sake, we include a run with the same settings as in the (#200-node-testnet). - -The testnet consists of 175 validators, 20 non-validator full-nodes, and 5 seed nodes. -All 195 full-nodes begin by dialing a subset of the seed nodes to discover peers. -Once all full-nodes are started, a 5 minute period is waited before starting an experiment. -For each experiment, the load generators issue requests at a constant rate during 150 seconds, then wait for 5 minutes to allow the system to quiesce, then repeat the load generation; the load generation step is repeated 5 times for each experiment. +CometBFT v0.38.0 introduced **vote-extensions**, which are added as the name +suggests, to precommit votes sent by validators. The Vote-extension Testnet is +used to determine how vote-extensions affect the performance of CometBFT, under +various settings. The application used in the experiment is the same used on the +(#200-node-testnet), but is configured differently to gauge de effects of +varying vote extension sizes. In the (#200-node-testnet) the application extends +pre-commit votes with a 64 bit number encoded with variable compression. In the +Vote-extension Testnet, pre-commit votes are extended with a non-compressed +extension of configurable size. Experiments are run with multiple sizes to +determine their impact and, for comparison sake, we include a run with the same +settings as in the (#200-node-testnet). + +The testnet consists of 175 validators, 20 non-validator full-nodes, and 5 seed +nodes. All 195 full-nodes begin by dialing a subset of the seed nodes to +discover peers. Once all full-nodes are started, a 5 minute period is waited +before starting an experiment. For each experiment, the load generators issue +requests at a constant rate during 150 seconds, then wait for 5 minutes to allow +the system to quiesce, then repeat the load generation; the load generation step +is repeated 5 times for each experiment. #### Network Partition Testnet @@ -365,25 +378,23 @@ CometBFT is expected to recover from network partitions. A partition where no subset of the nodes is left with the super-majority of the stake is expected to stop making blocks. Upon alleviation of the partition, the network is expected to once again become fully connected and capable of producing blocks. The -network partition testnet ensures that CometBFT is able to handle this -reliably at scale. In this test, a network with 100 validators and 95 full -nodes is started. All validators have equal stake. Once the network is -producing blocks, a set of firewall rules is deployed to create a partitioned -network with 50% of the stake on one side and 50% on the other. Once the -network stops producing blocks, the firewall rules are removed and the nodes -are monitored to ensure they reconnect and that the network again begins -producing blocks. +network partition testnet ensures that CometBFT is able to handle this reliably +at scale. In this test, a network with 100 validators and 95 full nodes is +started. All validators have equal stake. Once the network is producing blocks, +a set of firewall rules is deployed to create a partitioned network with 50% of +the stake on one side and 50% on the other. Once the network stops producing +blocks, the firewall rules are removed and the nodes are monitored to ensure +they reconnect and that the network again begins producing blocks. #### Absent Stake Testnet -CometBFT networks often run with _some_ portion of the voting power offline. -The absent stake testnet ensures that large networks are able to handle this +CometBFT networks often run with _some_ portion of the voting power offline. The +absent stake testnet ensures that large networks are able to handle this reliably. A set of 150 validator nodes and three seed nodes is started. The set -of 150 validators is configured to only possess a cumulative stake of 67% of -the total stake. The remaining 33% of the stake is configured to belong to -a validator that is never actually run in the test network. The network is run -for multiple days, ensuring that it is able to produce blocks without issue. - +of 150 validators is configured to only possess a cumulative stake of 67% of the +total stake. The remaining 33% of the stake is configured to belong to a +validator that is never actually run in the test network. The network is run for +multiple days, ensuring that it is able to produce blocks without issue. [unclog]: https://github.com/informalsystems/unclog [unclog-release]: https://github.com/informalsystems/unclog#releasing-a-new-versions-change-set diff --git a/UPGRADING.md b/UPGRADING.md index 9e17b7d0f3..9662aba572 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -2,57 +2,185 @@ This guide provides instructions for upgrading to specific versions of CometBFT. -## Unreleased +## v1.0.0-alpha.1 + +CometBFT v1.0 is mostly functionally equivalent to CometBFT v0.38, but includes +some substantial breaking API changes that will hopefully allow future changes +to be rolled out quicker. + +### Versioning + +As of v1.0, the CometBFT team provides the following guarantees relating to +versioning: + +- **Major version** bumps, such as v1.0.0 to v2.0.0, would generally involve + changes that _force_ users to perform a coordinated upgrade in order to use + the new version, such as protocol-breaking changes (e.g. changes to how block + hashes are computed and thus what the network considers to be "valid blocks", + or how the consensus protocol works, or changes that affect network-level + compatibility between nodes, etc.). +- **Minor version** bumps, such as v1.1.0 to v1.2.0, are reserved for rolling + out new features or substantial changes that do not force a coordinated + upgrade (i.e. not protocol-breaking), but could potentially break Go APIs. +- **Patch version** bumps, such as v1.0.0 to v1.0.1, are reserved for + bug/security fixes that are not protocol- or Go API-breaking. ### Building CometBFT The minimum Go version has been bumped to [v1.21][go121]. -### Mempool Changes +### Consensus + +Removed the `consensus.State.ReplayFile` and `consensus.RunReplayFile` methods, +as these were exclusively used by the `replay` and `replay-console` subcommands, +which were also removed. (See +[\#1170](https://github.com/cometbft/cometbft/pull/1170)) + +### CLI Subcommands + +- The `replay` and `replay-console` subcommands were removed + ([\#1170](https://github.com/cometbft/cometbft/pull/1170)). + +### Go API + +As per [ADR 109](./docs/architecture/adr-109-reduce-go-api-surface.md), the +following packages that were publicly accessible in CometBFT v0.38 were moved +into the `internal` directory: + +- `blocksync` +- `consensus` +- `evidence` +- `inspect` +- `libs/async` +- `libs/autofile` +- `libs/bits` +- `libs/clist` +- `libs/cmap` +- `libs/events` +- `libs/fail` +- `libs/flowrate` +- `libs/net` +- `libs/os` +- `libs/progressbar` +- `libs/protoio` +- `libs/pubsub` +- `libs/rand` +- `libs/service` +- `libs/strings` +- `libs/sync` +- `libs/tempfile` +- `libs/timer` +- `state` +- `statesync` +- `store` + +If you rely on any of these packages and would like us to make them public +again, please [log an issue on +GitHub](https://github.com/cometbft/cometbft/issues/new/choose) describing your +use case and we will evaluate the best approach to helping you address it. + +### Mempool + +#### `nop` mempool + +CometBFT v1.0.0 provides users with the option of a `nop` (no-op) mempool which, +if selected via configuration, turns off all mempool-related functionality in +Comet (e.g. ability to receive transactions, transaction gossip). Comet then +expects applications to provide their transactions when it calls +`PrepareProposal`, and that application developers will use some external means +of disseminating their transactions. + +If you want to use it, change mempool's `type` to `nop` in your `config.toml` +file: + +```toml +[mempool] + +# The type of mempool for this node to use. +# +# Possible types: +# - "flood" : concurrent linked list mempool with flooding gossip protocol +# (default) +# - "nop" : nop-mempool (short for no operation; the ABCI app is responsible +# for storing, disseminating and proposing txs). "create_empty_blocks=false" +# is not supported. +type = "nop" +``` + +#### Internal `CheckTx` Go API changes + +The `Mempool` interface was modified on `CheckTx`. Note that this interface is +meant for internal use only, so you should be aware of these changes only if you +happen to call these methods directly. + +`CheckTx`'s signature changed from `CheckTx(tx types.Tx, cb +func(*abci.ResponseCheckTx), txInfo TxInfo) error` to `CheckTx(tx types.Tx) +(abcicli.ReqRes, error)`. +- The method used to take a callback function `cb` to be applied to the + ABCI `CheckTx` response. Now `CheckTx` returns the ABCI response of + type `abcicli.ReqRes`, on which the callback must be applied manually. + For example: + + ```golang + reqRes, err := CheckTx(tx) + cb(reqRes.Response.GetCheckTx()) + ``` + +- The second parameter was `txInfo`, which essentially contained + information about the sender of the transaction. Now that information + is stored in the mempool reactor instead of the data structure, so it + is no longer needed in this method. + +### Protobufs and Generated Go Code + +Several major changes have been implemented relating to the Protobuf +definitions: + +1. CometBFT now makes use of the `cometbft.*` Protobuf definitions in + [`proto/cometbft`](./proto/cometbft/). This is a breaking change for all + users who rely on serialization of the Protobuf type paths, such as + integrators who serialize CometBFT's Protobuf data types into `Any`-typed + fields. For example, the `tendermint.types.Block` type in CometBFT v0.38.x is + now accessible as `cometbft.types.v1.Block` (see the next point in the list + for details on versioning). + + See the CometBFT Protobufs [README](/proto/README.md) file for more details. + +2. All CometBFT Protobuf packages include a version whose number will be + independent of the CometBFT version. As mentioned in (1), the + `tendermint.types.Block` type is now available under + `cometbft.types.v1.Block` - the `v1` in the type path indicates the version + of the `types` package used by this version of CometBFT. + + The Protobuf definitions that are wire-level compatible (but not type + path-compatible) with CometBFT v0.34, v0.37 and v0.38, where breaking changes + were introduced, are available under `v1beta*`-versioned types. For example: + + - The `tendermint.abci.Request` type from CometBFT v0.34 is now available as + `cometbft.abci.v1beta1.Request`. + - The `tendermint.abci.Request` type from CometBFT v0.37 is now available as + `cometbft.abci.v1beta2.Request`. + - The `tendermint.abci.Request` type from CometBFT v0.38 is now available as + `cometbft.abci.v1beta3.Request`. + + See the CometBFT Protobufs [README](/proto/README.md) file for more details. + +3. All Go code generated from the `cometbft.*` types is now available under the + [`api`](./api/) directory. This directory is also an independently versioned + Go module. This code is still generated using the Cosmos SDK's [gogoproto + fork](https://github.com/cosmos/gogoproto) at present. + +### RPC + +- The RPC API is now versioned, with the existing RPC being available under both + the `/` path (as in CometBFT v0.38) and a `/v1` path. + + Although invoking methods without specifying the version is still supported + for now, support will be dropped in future releases and users are encouraged + to use the versioned approach. For example, instead of + `curl localhost:26657/block?height=5`, use `curl localhost:26657/v1/block?height=5`. -* The `Mempool` interface was modified on the following methods. Note that this - interface is meant for internal use only, so you should be aware of these - changes only if you happen to call these methods directly. - * `CheckTx`'s signature changed from - `CheckTx(tx types.Tx, cb func(*abci.ResponseCheckTx), txInfo TxInfo) error` - to `CheckTx(tx types.Tx) (abcicli.ReqRes, error)`. - * The method used to take a callback function `cb` to be applied to the ABCI - `CheckTx` response. Now `CheckTx` returns the ABCI response of type - `abcicli.ReqRes`, on which the callback must be applied manually. For - example: - - ```golang - reqRes, err := CheckTx(tx) - cb(reqRes.Response.GetCheckTx()) - ``` - - * The second parameter was `txInfo`, which essentially contained information - about the sender of the transaction. Now that information is stored in the - mempool reactor instead of the data structure, so it is no longer needed in - this method. - -### Consensus Changes - -* Removed the `consensus.State.ReplayFile` and `consensus.RunReplayFile` - methods, as these were exclusively used by the `replay` and `replay-console` - subcommands, which were also removed - ([\#1170](https://github.com/cometbft/cometbft/pull/1170)) - -### Command Line Subcommands - -* Removed the `replay` and `replay-console` subcommands - ([\#1170](https://github.com/cometbft/cometbft/pull/1170)) - -### RPC API - -* The RPC API is now versioned. - Although invoking methods without specifying the version is still supported for now, - support will be dropped in future releases and users are urged to use the versioned - approach. - For example, instead of `curl localhost:26657/block?height=5`, use - `curl localhost:26657/v1/block?height=5`. - -* The `/websocket` endpoint path is no longer configurable in the client or +- The `/websocket` endpoint path is no longer configurable in the client or server. Creating an RPC client now takes the form: ```golang @@ -69,44 +197,44 @@ coordinated upgrade. ### Config Changes -* The field `Version` in the mempool section has been removed. The priority +- The field `Version` in the mempool section has been removed. The priority mempool (what was called version `v1`) has been removed (see below), thus there is only one implementation of the mempool available (what was called `v0`). -* Config fields `TTLDuration` and `TTLNumBlocks`, which were only used by the +- Config fields `TTLDuration` and `TTLNumBlocks`, which were only used by the priority mempool, have been removed. ### Mempool Changes -* The priority mempool (what was referred in the code as version `v1`) has been +- The priority mempool (what was referred in the code as version `v1`) has been removed. There is now only one mempool (what was called version `v0`), that is, the default implementation as a queue of transactions. -* In the protobuf message `ResponseCheckTx`, fields `sender`, `priority`, and +- In the protobuf message `ResponseCheckTx`, fields `sender`, `priority`, and `mempool_error`, which were only used by the priority mempool, were removed but still kept in the message as "reserved". ### ABCI Changes -* The `ABCIVersion` is now `2.0.0`. -* Added new ABCI methods `ExtendVote`, and `VerifyVoteExtension`. +- The `ABCIVersion` is now `2.0.0`. +- Added new ABCI methods `ExtendVote`, and `VerifyVoteExtension`. Applications upgrading to v0.38.0 must implement these methods as described [here](./spec/abci/abci%2B%2B_comet_expected_behavior.md#adapting-existing-applications-that-use-abci) -* Removed methods `BeginBlock`, `DeliverTx`, `EndBlock`, and replaced them by +- Removed methods `BeginBlock`, `DeliverTx`, `EndBlock`, and replaced them by method `FinalizeBlock`. Applications upgrading to `v0.38.0` must refactor the logic handling the methods removed to handle `FinalizeBlock`. -* The Application's hash (or any data representing the Application's current state) +- The Application's hash (or any data representing the Application's current state) is known by the time `FinalizeBlock` finishes its execution. Accordingly, the `app_hash` parameter has been moved from `ResponseCommit` to `ResponseFinalizeBlock`. -* Field `signed_last_block` in structure `VoteInfo` has been replaced by the +- Field `signed_last_block` in structure `VoteInfo` has been replaced by the more expressive `block_id_flag`. Applications willing to keep the semantics of `signed_last_block` can now use the following predicate - * `voteInfo.block_id_flag != BlockIDFlagAbsent` -* For further details, please see the updated [specification](spec/abci/README.md) + - `voteInfo.block_id_flag != BlockIDFlagAbsent` +- For further details, please see the updated [specification](spec/abci/README.md) ### `block_results` RPC endpoint - query result display change (breaking) -* When returning a block, all block events are displayed within the `finalize_block_events` field. +- When returning a block, all block events are displayed within the `finalize_block_events` field. For blocks generated with older versions of CometBFT, that means that block results that appeared as `begin_block_events` and `end_block_events` are merged into `finalize_block_events`. For users who rely on the events to be grouped by the function they were generated by, this change @@ -117,7 +245,7 @@ coordinated upgrade. The changes described here are internal to the implementation of the kvindexer, and they are transparent to the user. However, if you own a fork with a modified version of the indexer, you should be aware of these changes. -* Indexer key for block events will not contain information about the function that returned the event. +- Indexer key for block events will not contain information about the function that returned the event. The events were indexed by their attributes, event type, the function that returned them, the height and event sequence. The functions returning events in old (pre `v0.38.0`) versions of CometBFT were `BeginBlock` or `EndBlock`. As events are returned now only via `FinalizeBlock`, the value of this field has no use, and has been removed. @@ -140,25 +268,25 @@ now changed to `github.com/cometbft/cometbft`. ### ABCI Changes -* The `ABCIVersion` is now `1.0.0`. -* Added new ABCI methods `PrepareProposal` and `ProcessProposal`. For details, +- The `ABCIVersion` is now `1.0.0`. +- Added new ABCI methods `PrepareProposal` and `ProcessProposal`. For details, please see the [spec](spec/abci/README.md). Applications upgrading to v0.37.0 must implement these methods, at the very minimum, as described [here](./spec/abci/abci++_app_requirements.md) -* Deduplicated `ConsensusParams` and `BlockParams`. +- Deduplicated `ConsensusParams` and `BlockParams`. In the v0.34 branch they are defined both in `abci/types.proto` and `types/params.proto`. The definitions in `abci/types.proto` have been removed. In-process applications should make sure they are not using the deleted version of those structures. -* In v0.34, messages on the wire used to be length-delimited with `int64` varint +- In v0.34, messages on the wire used to be length-delimited with `int64` varint values, which was inconsistent with the `uint64` varint length delimiters used in the P2P layer. Both now consistently use `uint64` varint length delimiters. -* Added `AbciVersion` to `RequestInfo`. +- Added `AbciVersion` to `RequestInfo`. Applications should check that CometBFT's ABCI version matches the one they expect in order to ensure compatibility. -* The `SetOption` method has been removed from the ABCI `Client` interface. +- The `SetOption` method has been removed from the ABCI `Client` interface. The corresponding Protobuf types have been deprecated. -* The `key` and `value` fields in the `EventAttribute` type have been changed +- The `key` and `value` fields in the `EventAttribute` type have been changed from type `bytes` to `string`. As per the [Protocol Buffers updating guidelines](https://developers.google.com/protocol-buffers/docs/proto3#updating), this should have no effect on the wire-level encoding for UTF8-encoded