December 17, 2024
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:
- Proposer-Based Timestamps (PBTS) support. PBTS is a Byzantine fault-tolerant algorithm used by CometBFT for computing block times. When activated on a chain, it replaces the pre-existing BFT-time algorithm. See spec doc for PBTS.
- 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.
- 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.
- An opt-in
nopmempool, 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 for details. - The first officially supported release of the data companion API.
- 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 and ADR 107.
- Moving many Go packages that are currently publicly accessible into the
internaldirectory 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 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 and the specific changes below for more details. In this release, we are also introducing a migration guide, please refer to the Upgrading from CometBFT v0.38.x to v1.0 document.
[abci/types]RenameUpdateValidatortoNewValidatorUpdate, removeEd25519ValidatorUpdate(#2843)- [
config] deprecate boltdb and cleveldb. If you're using either of those, please reach out (#2775) [abci/client]DeprecateSetResponseCallback(cb Callback)in theClientinterface as it is no longer used. (#3084)[abci/client]ReqRes'sSetCallbackmethod now takes a function that returns an error, a newErrormethod is added, and the unusedGetCallbackmethod is removed (#4040).[abci/types]ReplaceValidatorUpdate.PubKeywithPubKeyTypeandPubKeyBytesto allow applications to avoid implementingPubKeyinterface. (#2843)[abci]Changed the proto-derived enum type and constant aliases to the buf-recommended naming conventions adopted in theabci/v1proto package. For example,ResponseProcessProposal_ACCEPTis renamed toPROCESS_PROPOSAL_STATUS_ACCEPT(#736).[abci]TheTypeenum field is now required to be set to a value other than the defaultCHECK_TX_TYPE_UNKNOWNfor a validCheckTxRequest(#736).[abci]DeprecatesABCIParamsfield ofConsensusParamand introduces replacement inFeatureParamsto enable Vote Extensions. (#2322)[abci]Renamed the alias types for gRPC requests, responses, and service instances to follow the naming changes in the proto-derivedapi/cometbft/abci/v1package (#1533):- The prefixed naming pattern
RequestFoo,ReponseFoochanged to suffixedFooRequest,FooResponse. - Each method gets its own unique request and response type to allow for independent evolution with backward compatibility.
ABCIClientrenamed toABCIServiceClient.ABCIServerrenamed toABCIServiceServer.
- The prefixed naming pattern
[blocksync]Move tointernal(#1485)[cmd]Removereplayandreplay-consolesubcommands and corresponding consensus file replay code, such asconsensus.RunReplayFile, andconsensus.State.ReplayFile(#1170)[comet]Version variables, inversion/version.go, have been renamed to reflect the CometBFT rebranding. (#1621)[config]Mergetimeout_prevoteandtimeout_precommit,timeout_prevote_deltaandtimeout_precommit_deltaintotimeout_roundandtimeout_round_deltaaccordingly (#2895)[config]Removecleveldbandboltdb(#2786)[config]Removeskip_timeout_commitin favor oftimeout_commit=0(#2892)[consensus]Move tointernal(#1485)[consensus]Handshaker.Handshakenow requirescontext.Context(#857)[node]NewNodenow requirescontext.Contextas the first parameter (#857)[crypto/merkle]The publicProof.ComputeRootHashfunction has been deleted. (#558)[crypto]Remove Sr25519 curve (#3646)[crypto]RemovePubKey#EqualsandPrivKey#Equals(#3606)[crypto]Remove unnecessarySha256wrapper (#3248)[crypto]Remove unnecessaryxchacha20andxsalsa20implementations (#3347)[evidence]Move tointernal(#1485)[go/runtime]Bump minimum Go version to v1.23 (#4039)[inspect]Move tointernal(#1485)[internal/state]Moved functionMedianTimeto packagetypes, and made it a method ofCommitso it can be used by external packages. (#2397)[libs/async]Move tointernal(#1485)[libs/autofile]Move tointernal(#1485)[libs/bits]Move tointernal(#1485)[libs/clist]Move tointernal(#1485)[libs/cmap]Move tointernal(#1485)[libs/events]Move tointernal(#1485)[libs/fail]Move tointernal(#1485)[libs/flowrate]Move tointernal(#1485)[libs/net]Move tointernal(#1485)[libs/os]Move tointernal(#1485)[libs/progressbar]Move tointernal(#1485)[libs/rand]Move tointernal(#1485)[libs/strings]Move tointernal(#1485)[libs/tempfile]Move tointernal(#1485)[libs/timer]Move tointernal(#1485)[mempool]Add to theMempoolinterface a new methodPreUpdate(). This method should be called before acquiring the mempool lock, to signal that a new update is coming. Also add toErrMempoolIsFulla new fieldRecheckFull. (#3314)[mempool]Change the signature ofCheckTxin theMempoolinterface toCheckTx(tx types.Tx, sender p2p.ID) (*abcicli.ReqRes, error). (#1010, #3084)[mempool]ExtendErrInvalidTxwith new fields taken fromCheckTxResponse(#4550).[mempool]RemovemempoolIDsfor internally storing peer ids asp2p.IDinstead ofuint16. (#1146)[node]Change the signature ofGenesisDocProviderto return the checksum of JSON content alongside the parsed genesis data (#1287).[node]Go API breaking change toDefaultNewNode. The function passesCliParamsto a node now. (#3595)[node]Go API breaking change toProvider. The function takes
CliParamsas a parameter now. (#3595)[node]Go-API breaking: Change the signature ofLoadStateFromDBOrGenesisDocProviderto accept an optional operator provided hash of the genesis file (#1324).[p2p]Removep2p_peer_send_bytes_totalandp2p_peer_receive_bytes_totalmetrics as they are costly to track, and not that informative in debugging (#3184)[p2p]RenameIPeerSet#ListtoCopy, addRandom,ForEachmethods. RenamePeerSet#ListtoCopy, addRandom,ForEachmethods. (#2246)[privval]allow privval to sign arbitrary bytes (#2692)[proto/api]Made/apia standalone Go module with its owngo.mod(#1561)[proto/privval]Replacepub_keywithpub_key_typeandpub_key_bytesinPubKeyResponse(#2878)[proto/types]Deprecatepub_keyin favor ofpub_key_typeandpub_key_bytesinValidator(#2878)[proto]Removeabci.ValidatorUpdate.pub_key, addpub_key_typeandpub_key_bytes(#2843)[proto]Remove stateful block data retrieval methods from the data companion gRPC API as per RFC 106 (#2230):GetLatestfromcometbft.services.block.v1.BlockService;GetLatestBlockResultsfromcometbft.services.block_results.v1.BlockResultsService.
[rpc/grpc]Remove support for stateful block data retrieval methods from the data companion APIs as per RFC 106GetLatestBlockmethod removed from theBlockServiceClientinterface.GetLatestBlockResultsmethod removed from theBlockResultServiceClientinterface.GetLatestendpoint is no longer served byBlockServiceServerinstances.GetLatestBlockResultsendpoint is no longer served byBlockResultServiceServerinstances.
[proto]Renamed the packages fromtendermint.*tocometbft.*and introduced versioned packages to distinguish between proto definitions released in0.34.x,0.37.x,0.38.x, and1.xversions. 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 newapifolder and changed the import paths accordingly. (#495, #1504)[proto]The names in thecometbft.abci.v1versioned proto package are changed to satisfy the buf guidelines (#736, #1504, #1530):- Names of request and response types used in gRPC changed by making
Request/Responsethe suffix instead of the prefix, e.g.RequestCheckTx⭢CheckTxRequest. - The
RequestandResponsemultiplex messages are redefined accordingly. CheckTxTypevalues renamed with theCHECK_TX_TYPE_prefix.MisbehaviorTypevalues renamed with theMISBEHAVIOR_TYPE_prefix.Resultenum formerly nested inResponseOfferSnapshotreplaced with the package-levelOfferSnapshotResult, its values named with theOFFER_SNAPSHOT_RESULT_prefix.Resultenum formerly nested inResponseApplyShapshotChunkreplaced with the package-levelApplySnapshotChunkResult, its values named with theAPPLY_SNAPSHOT_CHUNK_RESULT_prefix.Statusenum formerly nested inResponseProcessProposalreplaced with the package-levelProcessProposalStatus, its values named with thePROCESS_PROPOSAL_STATUS_prefix.Statusenum formerly nested inResponseVerifyVoteExtensionreplaced with the package-levelVerifyVoteExtensionStatus, its values named with theVERIFY_VOTE_EXTENSION_STATUS_prefix.- New definition of
Misbehaviorusing the changedMisbehaviorType. - The gRPC service is renamed
ABCIServiceand defined using the types listed above.
- Names of request and response types used in gRPC changed by making
[proto]In thecometbft.state.v1package, the definition forABCIResponsesInfois changed, renamingresponse_finalize_blockfield tofinalize_block.[proxy]ExpandClientCreatorinterface to allow for per-"connection" control of client creation (#1141)[rpc/client]Hard-code the/websocketendpoint path such that it is no longer configurable, removing the related client constructor parameter (#1412)[rpc/grpc]Remove the deprecated gRPC broadcast API (#650)[rpc]The endpointsbroadcast_tx_*now return an error when the node is performing block sync or state sync. (#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)[state/indexer/block]BlockIndexer now has additional methodPrune,GetRetainHeight,SetRetainHeight(#1176)[state/txindex]TxIndexer now has additional methods:Prune,GetRetainHeight,SetRetainHeight(#1176)[state/store]go-API breaking change inPruneABCIResponses: added parameter to force compaction. (#1972)[state/store]go-API breaking change inPruneStates: added parameter to pass the number of pruned states and return pruned entries in current pruning iteration. (#1972)[state]Thestate.Storeinterface has been expanded to accommodate the data pull companion API of ADR 101 (#1096)[store]Make theLoadBlockmethod also return block metadata (#1556)[version]Bumped the P2P version from 8 to 9, as this release contains new P2P messages. (#1411)
[bits]preventBitArray.UnmarshalJSONfrom crashing on 0 bits (#2774)[blocksync]Added peer banning (#ABC-0013)[blockstore]Send correct error message when vote extensions do not align with received packet (#ABC-0014)[blocksync]Do not stay in blocksync if the node's validator voting power is high enough to block the chain while it is not online (#3406)[blocksync]Wait forpoolRoutineto stop in(*Reactor).OnStop(#1879)[cmd]Alignp2p.external_addressargument to set the node P2P external address. (#3460)[consensus]Consensus now prevotesnilwhen the proposed value does not match the value the local validator has locked on (#1203)[consensus]Do not panic if the validator index of aVotemessage is out of bounds, when vote extensions are enabled (#ABC-0021)[consensus]Fix a race condition in the consensus timeout ticker. Race is caused by two timeouts being scheduled at the same time. (#3092)[consensus]Fix for Security AdvisoryASA-2024-001: Validation ofVoteExtensionsEnableHeightcan cause chain halt (ASA-2024-001)[consensus]Remove logic to unlock block on +2/3 prevote for nil (#1175: @BrendanChou)[crypto]SupportsBatchVerifierreturns false if public key is nil instead of dereferencing nil. (#1825)[evidence]WhenVerifyCommitLight&VerifyCommitLightTrustingare called as part of evidence verification, all signatures present in the evidence must be verified (#1749)[indexer]Fixed ineffective select break statements; they now point to their enclosing for loop label to exit (#3544)[light]Cross-check proposer priorities in retrieved validator sets (#ABC-0016)[light]Return and log an error when starting from an empty trusted store. This can happen using thelightCometBFT command-line command while using a fresh trusted store and no trusted height and hash are provided. (#3992)[mempool]Fix data race when rechecking with async ABCI client (#1827)[mempool]Fix data races inCListMempoolby making atomic the types ofheight,txsBytes, andnotifiedTxsAvailable. (#642)[mempool]Fix mutex inCListMempool.Flushmethod, by changing it from read-lock to write-lock (#2443).[mempool]Panic when a CheckTx request to the app returns an error (#2225)[mempool]The calculation method of tx size returned by calling proxyapp should be consistent with that of mempool (#1687)[metrics]Call unusedrejected_txsmetric in mempool (#4019)[mocks]Mockeryv2.49.0broke the mocks. We had to add a.mockery.yamlto properly handle this change. (#4521)[p2p/pex]Gracefully shutdown Reactor (#2010)[p2p]Node respects configuredmax_num_outbound_peerslimit when dialing peers provided by a seed node (#486)[privval]Ignore duplicate privval listen when already connected (#3828[privval]Retry accepting a connection (#2047)[rpc]Fix an issue where a legacy ABCI response, created onv0.37or before, is not returned properly inv0.38and up on the/block_resultsRPC endpoint. (#3002)[rpc]Fix nil pointer error in/txand/tx_searchwhen block is absent (#3352)[state/indexer]Respect both height params while querying for events (#1529)[state/pruning]When no blocks are pruned, do not attempt to prune statestore (#1616)[state]Fix rollback to a specific height (#2136)[types]Added missing JSON tags toDuplicateVoteEvidenceandLightClientAttackEvidencetypes (#3528)[types]Do not batch verify a commit if the validator set keys have different types. (#3195- added missing optional function for BlocksResultsService in gRPC client (#3693)
- code that modifies or stores references to the return value of Iterator Key() and Value() APIs creates a copy of it (#3541)
- Bump api to v1.0.0 for v1.0.0 Release (#4666)
- Bump api to v1.0.0-rc.1 for v1.0.0 Release Candidate 1 (#3191)
- Bump api to v1.0.0-rc2 for v1.0.0 Release Candidate 2 (#4455)
- Bump cometbft-db to v0.9.0, providing support for RocksDB v8 (#1725)
[crypto/secp256k1]Adjust to breaking interface changes inbtcec/v2latest release, while avoiding breaking changes to local CometBFT functions (#3728)- pinned mockery's version to v2.49.2 to prevent potential changes in mocks after each new release of mockery (#4605)
- reinstate BoltDB and ClevelDB as backend DBs, bumped cometbft-db version to v0.14.0 (#3661)
- updated Go version to 1.22.5 (#3527)
- updated cometbft-db dependency to v0.13.0 (#3596)
[mempool]Mark methodsTxsFrontandTxsWaitChaninCListMempoolas deprecated. They should be replaced by the newCListIterator(#3303).[mempool]Mark unusedTxsmethodsLen,Swap, andLessas deprecated (#3873).
[indexer]Introduces configurable table names for the PSQL indexer. (#3593)[config]Addpebbledb. To use, build withpebbledbtag (go build -tags pebbledb) (#2132)[config]Add[grpc.block_results_service]gRPC configurationBlockResultsService(#1095)[config]Add[grpc.block_service]section to configure gRPCBlockService(#1094)[config]Add configuration parameters to tweak forced compaction. (#1972)[config]Added[grpc.version_service]section for configuring the gRPC version service. (#816)[config]Added[grpc]section to configure the gRPC server. (#816)[config]Added[storage.experimental_db_key_layout]storage parameter, set to "v2" for order preserving representation (#2327)[config]Removed unused[mempool.max_batch_bytes]mempool parameter. (#2056)[config]Update the default value ofmempool.max_txs_bytesto 64 MiB. (#2756)[consensus]Make mempool updates asynchronous from consensus Commit's, reducing latency for reaching consensus timeouts. (#3008)[consensus]Update block validation to no longer require the block timestamp to be the median of the timestamps of the previous commit. (@anca) (tendermint/tendermint#7382)[consensus]Update proposal validation logic to Prevote nil if a proposal does not meet the conditions for Timeliness per the proposer-based timestamp specification. (@anca) (tendermint/tendermint#7415)[consensus]Update the proposal logic per the Propose-based timestamps specification so that the proposer will wait for the previous block time to occur before proposing the next block. (@williambanfield) (tendermint/tendermint#7376)[consensus]Use the proposed block timestamp as the proposal timestamp. Update the block validation logic to ensure that the proposed block's timestamp matches the timestamp in the proposal message. (@williambanfield) (tendermint/tendermint#7391)[consensus]Use the proposer timestamp for the first height instead of the genesis time. Chains will still start consensus at the genesis time. (@anca) (tendermint/tendermint#7711)[consensus]add a newsynchronyfield to theConsensusParameterstruct for controlling the parameters of the proposer-based timestamp algorithm. (@williambanfield) (tendermint/tendermint#7354)[crypto]Add support for BLS12-381 keys. Since the implementation needscgoand brings in new dependencies, we use thebls12381build flag to enable it (#2765)[crypto]use decred secp256k1 directly (#4294)[docs]Add report on storage improvements and findings. (#2569)[e2e]Addblock_max_bytesoption to the manifest file. (#2362)[e2e]Addmonitorcommand to manage Prometheus and Grafana servers (#4338).[e2e]Add new--internal-ipflag toloadcommand for sending the load to the nodes' internal IP addresses. This is useful when running from inside a private network (#3963).[e2e]Add new--testnet-dirparameter to set a custom directory for the generated testnet files. (#2433)[evidence/store]Added support for a different DB key representation within the evidence store (#2327)[grpc]AddBlockResultsServicewith client to fetch BlockResults for a given height, or latest. (#1095)[grpc]AddBlockServicewith client to facilitate fetching of blocks and streaming of the latest committed block height (#1094)[light/store]Added support for a different DB key representation within the light block store (#2327)[mempool]Addnopmempool (#1643). If you want to use it, change mempool'stypetonop:
[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"[metrics]Add metric for mempool size in bytesSizeBytes. (#1512)[metrics]Add metrics to monitor pruning and current available data in stores:PruningServiceBlockRetainHeight,PruningServiceBlockResultsRetainHeight,ApplicationBlockRetainHeight,BlockStoreBaseHeight,ABCIResultsBaseHeight. (#1234)[metrics]Added metrics to monitor block store access. (#1974)[metrics]Added metrics to monitor state store access. (#1974)[privval]Addkey-typeflag to all command that may generate aprivvalfile, and makeGenFilePVflexible to accept different key generators. (#3517)[proto]Add definitions and generated code for ADR-101PruningServicein thecometbft.services.pruning.v1proto package (#1097)[rpc/grpc]Add privileged gRPC server and client facilities, inserver/privilegedandclient/privilegedpackages 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)[rpc/grpc]Add a pruning service adding on the privileged gRPC server API to give an ADR-101 data companion control over block data retained by the node. TheWithPruningServiceoption method inserver/privilegedis provided to configure the pruning service (#1097)[rpc/grpc]AddPruningServiceClientinterface for the gRPC client inclient/privilegedalong with a configuration option to enable it (#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)[proto]addsyncing_to_heighttoFinalizeBlockRequestto let the ABCI app know if the node is syncing or not. (#1247)[rpc/grpc]Add gRPC client with support for version service (#816)[rpc/grpc]Add gRPC endpoint for pruning the block and transaction indexes (#1327)[rpc/grpc]Add gRPC server to the node, configurable via a new[grpc]section in the configuration file (#816)[rpc/grpc]Add gRPC version service to allow clients to establish the software and protocol versions of the node (#816)[state]Add TxIndexer and BlockIndexer pruning metrics (#1334)[store]Added support for a different DB key representation to state and block store (#2327)[store]When pruning force compaction of the database. (#1972)[test]Added monitoring tools and dashboards for local testing withlocalnet. (#2107)
[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)[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)[abci]Increase ABCI socket message size limit to 2GB (#1730: @troykessler)[blockstore]Remove a redundantHeader.ValidateBasiccall inLoadBlockMeta, 75% reducing this time. (#2964)[blockstore]Use LRU caches for LoadBlockPart. Make the LoadBlockPart and LoadBlockCommit APIs return mutative copies, that the caller is expected to not modify. This saves on memory copying. (#3342)[blockstore]Use LRU caches in blockstore, significiantly improving consensus gossip routine performance (#3003)[blocksync]Avoid double-callingtypes.BlockFromProtofor performance reasons (#2016)[blocksync]Request a block from peer B if we are approaching pool's height (less than 50 blocks) and the current peer A is slow in sending us the block (#2475)[blocksync]Request the block N from peer B immediately after gettingNoBlockResponsefrom peer A (#2475)[blocksync]Sort peers by download rate (the fastest peer is picked first) (#2475)[blocksync]make the max number of downloaded blocks dynamic. Previously it was a const 600. Now it'speersCount * maxPendingRequestsPerPeer (20)(#2467)[cli/node]The genesis hash provided with the--genesis-hashis now forwarded to the node, instead of reading the file. (#1324)[config]Added[storage.pruning]and[storage.pruning.data_companion]sections to facilitate background pruning and data companion (ADR 101) operations (#1096)[config]Addedgenesis_hashstorage parameter, which when set it is checked on node startup (#1324)[config]Addedrecheck_timeoutmempool parameter to set how much time to wait for recheck responses from the app (only applies to non-local ABCI clients). (#1827)[config]Dynamic mempool type when writing config (#4281)[config]Remove unusedGenesisHashflag (#3595)[config]Use embed pkg for the default template (#3057)[consensus/state]Remove a redundantVerifyBlockcall inFinalizeCommit(#2928)[consensus]Addchain_size_bytesmetric for measuring the size of the blockchain in bytes (#2093)[consensus]Fix some reactor messages taking write locks instead of read locks. (#3159)[consensus]Improve performance of consensus metrics by lowering string operations (#3017)[consensus]Log vote validation failures at info level (#1022)[consensus]Lower the consensus blocking overhead of broadcasts fromnum_peers * process_creation_timetoprocess_creation_time. (#3180)[consensus]Make Vote messages only take one peerstate mutex (#3156)[consensus]Make broadcastingHasVoteandHasProposalBlockPartcontrol messages useTrySendinstead ofSend. This saves notable amounts of performance, while at the same time those messages are for preventing redundancy, not critical, and may be dropped without risks for the protocol. (#3151)[consensus]Make the consensus reactor no longer have packets on receive take the consensus lock. Consensus will now update the reactor's view after every relevant change through the existing synchronous event bus subscription. (#3211)[consensus]New metrics (counters) to track duplicate votes and block parts. (#896)[consensus]Optimize vote and block part gossip with new messageHasProposalBlockPartMessage, which is similar toHasVoteMessage; and random sleep in the loop broadcasting those messages. The sleep can be configured with new configpeer_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)[consensus]Reduce the default MaxBytes to 4MB and increase MaxGas to 10 million (#1518)[consensus]Reuse an internal buffer for block building to reduce memory allocation overhead. (#3162)[consensus]Use an independent rng for gossip threads, reducing mutex contention. (#3005)[consensus]When prevoting, avoid calling PropocessProposal when we know the proposal was already validated by correct nodes. (#1230)[crypto/merkle]faster calculation of hashes (#1921)[docs]Add a new ABCI 2.0 tutorial. (#2853) thanks @alijnmerchant21 for contributions to the tutorial[docs]Added an upgrade guide from CometBFTv0.38.xtov1.0. (#4184)[docs]Merge configuration doc in explanation section with the config.toml document in references. (#2769)[e2e]Addlog_formatoption to manifest file (#3836).[e2e]Addlog_leveloption to manifest file (#3819).[e2e]Add log level option in e2e generator (#3880)[e2e]Add manifest optionVoteExtensionsUpdateHeightto test vote extension activation viaInitChainandFinalizeBlock. Also, extend the manifest generator to produce different values of this new option (#2065)[e2e]Add manifest optionload_max_txsto limit the number of transactions generated by theloadcommand. (#2094)[e2e]Add new targetsfastandcleanto Makefile. (#2192)[e2e]Allow disabling the PEX reactor on all nodes in the testnet (#1579)[e2e]Allow latency emulation between nodes. (#1560)[e2e]Introduce the possibility in the manifest for some nodes to run in a preconfigured clock skew. (#2453)[e2e]Log the number of transactions that were sent successfully or failed. (#2328)[e2e]increase the timeout value during akillnode perturbation (#4351)[event-bus]Remove the debug logs in PublishEventTx, which were noticed production slowdowns. (#2911)[flowrate]Remove expensive time.Now() calls from flowrate calls. Changes clock updates to happen in a separate goroutine. (#3016)[grpc]Set grpc.MaxConcurrentStreams to 100 to limit the maximum number of concurrent streams per connection. (#1546)[indexer]Optimized the PSQL indexer (#2142) thanks to external contributor @k0marov ![internal/bits]10x speedup and remove heap overhead ofbitArray.PickRandom(used extensively in consensus gossip) (#2841).[internal/bits]10x speedup creating initialized bitArrays, which speedsup extendedCommit.BitArray(). This is used in consensus vote gossip. (#2959).[jsonrpc]enable HTTP basic auth in websocket client (#2434)[libs/json]Lower the memory overhead of JSON encoding by using JSON encoders internally. (#2846)[libs/pubsub]Allow dash (-) in event tags (#3401)[linting]Removed undesired linting fromMakefileand added dependency check forcodespell. (#1958)[log]Change "mempool is full" log to debug level (#4123)[log]allow strip out all debug-level code from the binary at compile time using build flags (#2847)[mempool]Add a metric (a counter) to measure whether a tx was received more than once. (#634)[mempool]Add experimental feature to limit the number of persistent peers and non-persistent peers to which the node gossip transactions. (#1558) (#1584)[config]Add mempool parametersexperimental_max_gossip_connections_to_persistent_peersandexperimental_max_gossip_connections_to_non_persistent_peersfor limiting the number of peers to which the node gossip transactions. (#1558) (#1584)[mempool]Before updating the mempool, consider it as full if rechecking is still in progress. This will stop accepting transactions in the mempool if the node can't keep up with re-CheckTx. (#3314)[mempool]NewEntryandIteratorinterfaces. NewCListIteratordata struct to iterate on the mempool's CList instead of methodsTxsFrontandTxsWaitChan(#3303).[metrics]Addevicted_txsmetric to mempool (#4019)[node]On upgrade, after #1296, delete the genesis file existing in the DB. (#1297)[node]Remove genesis persistence in state db, replaced by a hash (#1017, #1295)[node]Thenode.Nodestruct now manages astate.Prunerservice to facilitate background pruning (#1096)[node]export node package errors (#3056)[p2p/channel]SpeedupProtoIOwriter creation time, and thereby speedup channel writing by 5%. (#2949)[p2p/conn]Minor speedup (3%) to connection.WritePacketMsgTo, by removing MinInt calls. (#2952)[p2p/conn]Remove the usage of a synchronous pool of buffers in secret connection, storing instead the buffer in the connection struct. This reduces the synchronization primitive usage, speeding up the code. (#3403)[p2p/conn]Removes several heap allocations per packet send, stemming from how we double-wrap packets prior to proto marshalling them in the connection layer. This change reduces the memory overhead and speeds up the code. (#3423)[p2p/conn]Speedup connection.WritePacketMsgTo, by reusing internal buffers rather than re-allocating. (#2986)[p2p/conn]Speedup secret connection large packet reads, by buffering the read to the underlying connection. (#3419)[p2p/conn]Speedup secret connection large writes, by buffering the write to the underlying connection. (#3346)[p2p/conn]Update send monitor, used for sending rate limiting, once per batch of packets sent (#3382)[p2p]Lowerflush_throttle_timeoutto 10ms (#2988)[p2p]RemoveSwitch#Broadcastunused return channel (#3182)[p2p]fix exponential backoff logic to increase reconnect retries close to 24 hours (#3519)[p2p]makePeerSet.Removemore efficient (Author: @odeke-em) #2246[privval]DO NOT require extension signature from privval if vote extensions are disabled. Remote signers can skip signing the extension ifskip_extension_signingflag inSignVoteRequestis true. (#2496)[proto]Addskip_extension_signingfield to theSignVoteRequestmessage incometbft.privval.v1(#2522). Thecometbft.privval.v1beta2package is added to capture the protocol as it was released in CometBFT 0.38.x (#2529).[protoio]Remove one allocation and new object call fromReadMsg, leading to a 4% p2p message reading performance gain. (#3018)[rpc]Add a configurable maximum batch size for RPC requests. (#2867).[rpc]ExportMakeHTTPDialerto allow HTTP client constructors more flexibility. (#1594)[rpc]Move the websockets info log for successful replies to debug. (#2788)[rpc]Support setting proxy from env toDefaultHttpClient. (#1900)[rpc]The RPC API is now versioned, with all existing endpoints accessible via/v1/*as well as/*(#1412)[rpc]Use default port for HTTP(S) URLs when there is no explicit port (#1903)[spec]Update Apalache type annotations in the light client spec (#955)[state/execution]Cache the block hash computation inside of the Block Type, so we only compute it once. (#2924)[state/indexer]Add transaction and block index pruning (#1176)[state/indexer]Fix txSearch performance issue (#2855)[state/indexer]Lower the heap allocation of transaction searches (#2839)[state/txindex]search optimization (#3458)[state]ABCI response pruning has been added for use by the data companion (#1096)[state]Block pruning has been moved from the block executor into a background process (#1096)[state]Save the state using a single DB batch (#1735)[state]avoid double-savingFinalizeBlockResponsefor performance reasons (#2017)[store]Save block using a single DB batch if block is less than 640kB, otherwise each block part is saved individually (#1755)[types]Check that proposer is one of the validators inValidateBasic(#ABC-0016)[types]Make a new methodGetByAddressMutforValSet, which does not copy the returned validator. (#3119)[types]Significantly speedup types.MakePartSet and types.AddPart, which are used in creating a block proposal (#3117)[types]ValidateValidator#AddressinValidateBasic(#1715)
September 12, 2023
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 for more details on ABCI 2.0.
[abci]IntroduceFinalizeBlockwhich condensesBeginBlock,DeliverTxandEndBlockinto a single method call (#9468)[abci]Moveapp_hashparameter fromCommittoFinalizeBlock(#8664)[config]RemoveVersionfield fromMempoolConfig. (#260)[crypto/merkle]Do not allow verification of Merkle Proofs against empty trees (nilroot).Proof.ComputeRootHashnow panics when it encounters an error, butProof.Verifydoes not panic (#558)[inspect]Add a newinspectcommand for introspecting the state and block store of a crashed tendermint node. (#9655)[kvindexer]Added support for big integers and big floats in the kvindexer. Breaking changes: functionNumberin packagelibs/pubsub/query/syntaxchanged its return value. (#797)[mempool]Application can now setConsensusParams.Block.MaxBytesto -1 to have visibility on all transactions in the mempool atPrepareProposaltime. This means that the total size of transactions sent viaRequestPrepareProposalmight exceedRequestPrepareProposal.max_tx_bytes. If that is the case, the application MUST make sure that the total size of transactions returned inResponsePrepareProposal.txsdoes not exceedRequestPrepareProposal.max_tx_bytes, otherwise CometBFT will panic. (#980)[mempool]Remove priority mempool. (#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)[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) (@yihuang)[state/store]Added Go functions to save height at which offline state sync is performed. (#1057) (@jmalicevic)[node]Move DBContext and DBProvider from the node package to the config package. (#9655)[node]RemovedConsensusState()accessor fromNodestruct - all access to consensus state should go via the reactor (#1120)[p2p]Remove UPnP functionality (#1113)[p2p]Remove unused p2p/trust package (#9625)[protobuf]Remove fieldssender,priority, andmempool_errorfromResponseCheckTx. (#260)[pubsub]Added support for big integers and big floats in the pubsub event query system. Breaking changes: functionNumberin packagelibs/pubsub/query/syntaxchanged its return value. (#797)[rpc]Remove global environment and replace with constructor (#9655)[rpc]Removedbegin_block_eventsandend_block_eventsfromBlockResultsResponse. The events are merged into one field calledfinalize_block_events. (#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)[state]Move pruneBlocks from node/state to state/execution. (#6541)[state]Signature ofExtendVotechanged inBlockExecutor. It now includes the block whose precommit will be extended, an the state object. (#1270)
[abci-cli]Fix broken abci-cli help command. (#9717)[abci]Restore the snake_case naming in JSON serialization ofExecTxResult(#855).[consensus]Avoid recursive call after rename to (*PeerState).MarshalJSON (#863)[consensus]Rename(*PeerState).ToJSONtoMarshalJSONto fix a logging data race (#524)[consensus]Unexpected error conditions inApplyBlockare non-recoverable, so ignoring the error and carrying on is a bug. We replaced areturnthat disregarded the error by apanic. (#496)[docker]Ensure Docker image uses consistent version of Go. (#9462)[kvindexer]Forward porting the fixes done to the kvindexer in 0.37 in PR #77 (#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)[mempool/clist_mempool]Prevent a transaction to appear twice in the mempool (#890: @otrack)
[rpc/grpc]Mark the gRPC broadcast API as deprecated. It will be superseded by a broader API as part of #81 (#650)
[abci]New ABCI methodsVerifyVoteExtensionandExtendVoteallow 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)[node/state]Add Go API to bootstrap block store and state store to a height (#1057) (@yihuang)[proxy]IntroduceNewConnSyncLocalClientCreator, 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 and #1145)[proxy]IntroduceNewUnsyncLocalClientCreator, 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)
[blocksync]Generate new metrics during BlockSync (#543)[crypto/merkle]Improve HashAlternatives performance (#6443)[crypto/merkle]Improve HashAlternatives performance (#6513)[jsonrpc/client]Improve the error message for client errors stemming from bad HTTP responses. (cometbft/cometbft#638)[mempool]Application can now setConsensusParams.Block.MaxBytesto -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 atPrepareProposaltime. (#980)[node]Close evidence.db OnStop (cometbft/cometbft#1210: @chillyvee)[node]Make handshake cancelable (cometbft/cometbft#857)[p2p/pex]Improve addrBook.hash performance (#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)[pubsub]Performance improvements for the event query API (#7319)[rpc]Remove response data from response failure logs in order to prevent large quantities of log data from being produced (#654)[state]Make loggingblock_app_hashandapp_hashconsistent by logging them both as hex. (#1264)
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 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 for more details on upgrading from the v0.34 release series.
Also see our QA results 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, with any of your questions, comments and/or concerns.
See below for more details.
- Bump minimum Go version to 1.20 (#385)
- Change spelling from British English to American. Rename
Subscription.Cancelled()toSubscription.Canceled()inlibs/pubsub(#9144) - The
TMHOMEenvironment variable was renamed toCMTHOME, and all environment variables starting withTM_are instead prefixed withCMT_(#211) - [config] The boolean key
fastsyncis deprecated and replaced byblock_sync. (#9259) At the same time,block_syncis also deprecated. In the next release, BlocSync will always be enabled andblock_syncwill be removed. (#409) [abci/counter]Delete counter example app (#6684)[abci/params]DeduplicateConsensusParamsandBlockParamsso onlytypesproto definitions are use. RemoveTimeIotaMsand use a hard-coded 1 millisecond value to ensure monotonically increasing block times. RenameAppVersiontoAppso as to not stutter. (#9287)[abci]Added cli commands forPrepareProposalandProcessProposal. (#8656)[abci]Added cli commands forPrepareProposalandProcessProposal. (#8901)[abci]Change thekeyandvaluefields from[]bytetostringin theEventAttributetype. (#6403)[abci]Make length delimiter encoding consistent (uint64) between ABCI and P2P wire-level protocols (#5783)[abci]New ABCI methodsPrepareProposalandProcessProposalwhich give the app control over transactions proposed and allows for verification of proposed blocks. (#9301)[abci]Removes unused Response/RequestSetOptionfrom ABCI (#9145)[abci]RenamedEvidenceTypetoMisbehaviorTypeandEvidencetoMisbehavioras a more accurate label of their contents. (#8216)[abci]RenamedLastCommitInfotoCommitInfoin preparation for vote extensions. (#9122)[config]Rename the fastsync section and the fast_sync key blocksync and block_sync respectively (#9259)[p2p]ReactorSend,TrySendandReceiverenamed toSendEnvelope,TrySendEnvelopeandReceiveEnvelopeto allow metrics to be appended to messages and measure bytes sent/received. (#230)[types]Reduce the use of protobuf types in core logic.ConsensusParams,BlockParams,ValidatorParams,EvidenceParams,VersionParamshave become native types. They still utilize protobuf when being sent over the wire or written to disk. MovedValidateConsensusParamsinside (now native type)ConsensusParams, and renamed it toValidateBasic. (#9287)
[blocksync]handle the case when the sending queue is full: retry block request after a timeout (#9518)[consensus](#386) Short-term fix for the case whenneedProofBlockcannot find previous block meta by defaulting to the creation of a new proof block. (@adizere)- Special thanks to the 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)[consensus]fix round number ofenterProposewhen handlingRoundStepNewRoundtimeout. (#9229)[docker]enable cross platform build using docker buildx (#9073)[docker]ensure Docker image uses consistent version of Go (#9462)[p2p]prevent peers who have errored from being added topeer_set(#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)[state/kvindexer]Resolved crashes when event values contained slashes, introduced after adding event sequences in #77. @jmalicevic (#382)
[abci]New ABCI methodsPrepareProposalandProcessProposalwhich give the app control over transactions proposed and allows for verification of proposed blocks. (#9301)
[abci]AddedAbciVersiontoRequestInfoallowing applications to check ABCI version when connecting to CometBFT. (#5706)[cli]add--hardflag to rollback command (and a boolean to theRollbackStatemethod). 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)[consensus]Save peer LastCommit correctly to achieve 50% reduction in gossiped precommits. (#9760)[crypto]Update to use btcec v2 and the latest btcutil. (#9250)[e2e]Add functionality for uncoordinated (minor) upgrades (#56)[p2p]ReactorSend,TrySendandReceiverenamed toSendEnvelope,TrySendEnvelopeandReceiveEnvelopeto allow metrics to be appended to messages and measure bytes sent/received. (#230)[proto]Migrate fromgogo/protobuftocosmos/gogoproto(#9356)[rpc]Addedheaderandheader_by_hashqueries to the RPC client (#9276)[rpc]Enable caching of RPC responses (#9650)[tools/tm-signer-harness]Remove the folder as it is unused (#136)
Feb 27, 2023
This is the first official release of CometBFT - a fork of Tendermint Core. This particular release is intended to be compatible with the Tendermint Core v0.34 release series.
For details as to how to upgrade to CometBFT from Tendermint Core, please see our upgrading guidelines.
If you have any questions, comments, concerns or feedback on this release, we
would love to hear from you! Please contact us via GitHub
Discussions,
Discord (in the #cometbft channel) or
Telegram.
Special thanks to @wcsiu, @ze97286, @faddat and @JayT106 for their contributions to this release!
- Rename binary to
cometbftand Docker image tocometbft/cometbft(#152) - The
TMHOMEenvironment variable was renamed toCMTHOME, and all environment variables starting withTM_are instead prefixed withCMT_(#211) - Use Go 1.19 to build CometBFT, since Go 1.18 has reached end-of-life. (#360)
[consensus]Fixed a busy loop that happened when sending of a block part failed by sleeping in case of error. (#4)[consensus]Short-term fix for the case whenneedProofBlockcannot find previous block meta by defaulting to the creation of a new proof block. (#386: @adizere)- Special thanks to the Vega.xyz team, and in particular to Zohar (@ze97286), for reporting the problem and working with us to get to a fix.
[p2p]Correctly use non-blockingTrySendEnvelopemethod when attempting to send messages, as opposed to the blockingSendEnvelopemethod. It is unclear 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)[state/kvindexer]Resolved crashes when event values contained slashes, introduced after adding event sequences. (#383: @jmalicevic)
- Bump tm-load-test to v1.3.0 to remove implicit dependency on Tendermint Core (#165)
- Replace tm-db with cometbft-db (#160)
[crypto]Update to use btcec v2 and the latest btcutil (tendermint/tendermint#9787: @wcsiu)
[rpc]Addmatch_eventquery parameter to indicate to the RPC that it should match events within attributes, not only within a height (tendermint/tendermint#9759)
- Append the commit hash to the version of CometBFT being built (#204)
[consensus]Addconsensus_block_gossip_parts_receivedandconsensus_step_duration_secondsmetrics in order to aid in investigating the impact of database compaction on consensus performance (tendermint/tendermint#9733)[consensus]Reduce bandwidth consumption of consensus votes by roughly 50% through fixing a small logic bug (tendermint/tendermint#9776)[e2e]Add functionality for uncoordinated (minor) upgrades (#56)[mempool/v1]Suppress "rejected bad transaction" in priority mempool logs by reducing log level from info to debug (#314: @JayT106)[p2p]Reduce log spam through reducing log level of "Dialing peer" and "Added peer" messages from info to debug (tendermint/tendermint#9764: @faddat)[state/kvindexer]Addmatch.eventkeyword to support condition evaluation based on the event the attributes belong to (tendermint/tendermint#9759)[tools/tm-signer-harness]Remove the folder as it is unused (#136)
CometBFT is a fork of Tendermint Core as of late December 2022.
Friendly reminder, we have a bug bounty program.
For changes released before the creation of CometBFT, please refer to the Tendermint Core CHANGELOG.md.