This guide provides instructions for upgrading to specific versions of CometBFT.
The minimum Go version has been bumped to v1.21.
- 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 fromCheckTx(tx types.Tx, cb func(*abci.ResponseCheckTx), txInfo TxInfo) error
toCheckTx(tx types.Tx) (abcicli.ReqRes, error)
.- The method used to take a callback function
cb
to be applied to the ABCICheckTx
response. NowCheckTx
returns the ABCI response of typeabcicli.ReqRes
, on which the callback must be applied manually. For example:
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.
- The method used to take a callback function
-
- Removed the
consensus.State.ReplayFile
andconsensus.RunReplayFile
methods, as these were exclusively used by thereplay
andreplay-console
subcommands, which were also removed (#1170)
- Removed the
replay
andreplay-console
subcommands (#1170)
-
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
, usecurl localhost:26657/v1/block?height=5
. -
The
/websocket
endpoint path is no longer configurable in the client or server. Creating an RPC client now takes the form:// The WebSocket endpoint in the following example is assumed to be available // at http://localhost:26657/v1/websocket rpcClient, err := client.New("http://localhost:26657/v1")
This release introduces state machine-breaking changes, as well as substantial changes on the ABCI interface and indexing. It therefore requires a coordinated upgrade.
- The field
Version
in the mempool section has been removed. The priority mempool (what was called versionv1
) has been removed (see below), thus there is only one implementation of the mempool available (what was calledv0
). - Config fields
TTLDuration
andTTLNumBlocks
, which were only used by the priority mempool, have been removed.
- The priority mempool (what was referred in the code as version
v1
) has been removed. There is now only one mempool (what was called versionv0
), that is, the default implementation as a queue of transactions. - In the protobuf message
ResponseCheckTx
, fieldssender
,priority
, andmempool_error
, which were only used by the priority mempool, were removed but still kept in the message as "reserved".
- The
ABCIVersion
is now2.0.0
. - Added new ABCI methods
ExtendVote
, andVerifyVoteExtension
. Applications upgrading to v0.38.0 must implement these methods as described here - Removed methods
BeginBlock
,DeliverTx
,EndBlock
, and replaced them by methodFinalizeBlock
. Applications upgrading tov0.38.0
must refactor the logic handling the methods removed to handleFinalizeBlock
. - The Application's hash (or any data representing the Application's current state)
is known by the time
FinalizeBlock
finishes its execution. Accordingly, theapp_hash
parameter has been moved fromResponseCommit
toResponseFinalizeBlock
. - Field
signed_last_block
in structureVoteInfo
has been replaced by the more expressiveblock_id_flag
. Applications willing to keep the semantics ofsigned_last_block
can now use the following predicatevoteInfo.block_id_flag != BlockIDFlagAbsent
- For further details, please see the updated specification
- 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 asbegin_block_events
andend_block_events
are merged intofinalize_block_events
. For users who rely on the events to be grouped by the function they were generated by, this change is breaking.
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.
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 wereBeginBlock
orEndBlock
. As events are returned now only viaFinalizeBlock
, the value of this field has no use, and has been removed. The main motivation is the reduction of the storage footprint.
Events indexed with previous CometBFT or Tendermint Core versions, will still be transparently processed. There is no need to re-index the events. This function field is not exposed to queries, and was not visible to users. However, if you forked CometBFT and changed the indexer code directly to accommodate for this, this will impact your code.
This release introduces state machine-breaking changes, and therefore requires a coordinated upgrade.
When upgrading from the v0.34 release series, please note that the Go module has
now changed to github.com/cometbft/cometbft
.
- The
ABCIVersion
is now1.0.0
. - Added new ABCI methods
PrepareProposal
andProcessProposal
. For details, please see the spec. Applications upgrading to v0.37.0 must implement these methods, at the very minimum, as described here - Deduplicated
ConsensusParams
andBlockParams
. In the v0.34 branch they are defined both inabci/types.proto
andtypes/params.proto
. The definitions inabci/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 values, which was inconsistent with theuint64
varint length delimiters used in the P2P layer. Both now consistently useuint64
varint length delimiters. - Added
AbciVersion
toRequestInfo
. 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 ABCIClient
interface. The corresponding Protobuf types have been deprecated. - The
key
andvalue
fields in theEventAttribute
type have been changed from typebytes
tostring
. As per the Protocol Buffers updating guidelines, this should have no effect on the wire-level encoding for UTF8-encoded strings.
If you rely on the /tx_search
or /block_search
endpoints for event querying,
please note that the default behaviour of these endpoints has changed in a way
that might break your queries. The original behaviour was poorly specified,
which did not respect event boundaries.
Please see tendermint/tendermint#9712 for context on the bug that was addressed that resulted in this behaviour change.
This is the first official release of CometBFT, forked originally from Tendermint Core v0.34.24 and subsequently updated in Informal Systems' public fork of Tendermint Core for v0.34.25 and v0.34.26.
If you already make use of Tendermint Core (either the original Tendermint Core
v0.34.24, or Informal Systems' public fork), you can upgrade to CometBFT
v0.34.27 by replacing your dependency in your go.mod
file:
go mod edit -replace github.com/tendermint/tendermint=github.com/cometbft/[email protected]
We make use of the original module URL in order to minimize the impact of
switching to CometBFT. This is only possible in our v0.34 release series, and we
will be switching our module URL to github.com/cometbft/cometbft
in the next
major release.
CometBFT, by default, will consider its home directory in ~/.cometbft
from now
on instead of ~/.tendermint
.
The environment variable prefixes have now changed from TM
to CMT
. For
example, TMHOME
becomes CMTHOME
.
We have implemented a fallback check in case TMHOME
is still set and CMTHOME
is not, but you will start to see a warning message in the logs if the old
TMHOME
variable is set. This fallback check will be removed entirely in a
subsequent major release of CometBFT.
CometBFT must be compiled using Go 1.19 or higher. The use of Go 1.18 is not supported, since this version has reached end-of-life with the release of Go 1.20.
If you run into any trouble with this upgrade, please contact us.
For historical upgrading instructions for Tendermint Core v0.34.24 and earlier, please see the Tendermint Core upgrading instructions.