From 5d2e2dbc95276cf515497f70ca0c7b36c44f5792 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 8 Feb 2023 15:17:32 +0100 Subject: [PATCH] v0.37.x: Rename Tendermint to CometBFT: further actions (backport #224) (#254) * Rename Tendermint to CometBFT: further actions (#224) * rename: Tendermint -> CometBFT in README files * rename: Tendermint -> CometBFT in doc.go files * rename: Tendermint -> CometBFT in Go documentation * Removing unused/outdated CHANGELOGs * rename: using CometBFT in issues and PR templates * rename: references to tendermin in libs/events * rename: renaming on text files under rpc/ dir * rename: Tendermint-go -> CometBFT in proto docs * rename: Tendermint -> CometBFT in generated go docs * rename: renaming Tendermint -> CometBFT in scripts * rename: renaming to CometBFT in code comments * rename: general script files on repository root * rename: using CometBFT in github config files * rename: Go docs in .proto files, pb.go regenerated * rename: toml config file generated content * rename: avoiding unnecessary TM entries in comments * rename: renaming in log messages and strings * rename: upgrading instructions renamed, needs review * rename: fixing generated protobuf files * rename: fixing generated protobuf files * rename: fixing broken test, renamed string * Apply suggestions from code review * Update .github/PULL_REQUEST_TEMPLATE.md Co-authored-by: Thane Thomson * Update abci/README.md Co-authored-by: Thane Thomson * Update proto/README.md Co-authored-by: Thane Thomson * rename: removing unused files on repo root --------- Co-authored-by: Daniel Cason Co-authored-by: Thane Thomson (cherry picked from commit 1cb55d49baa86a227c4b9eadad2d7a344670eb51) # Conflicts: # .gitignore # abci/README.md # cmd/tendermint/commands/version.go # config/config.go # config/toml.go # consensus/README.md # consensus/replay.go # consensus/replay_test.go # crypto/README.md # crypto/ed25519/ed25519.go # inspect/doc.go # inspect/inspect.go # libs/pubsub/query/query.go # libs/pubsub/query/syntax/doc.go # light/doc.go # networks/local/README.md # node/node.go # node/setup.go # p2p/README.md # proto/README.md # rpc/core/abci.go # rpc/core/blocks.go # rpc/core/consensus.go # rpc/core/doc.go # rpc/core/events.go # rpc/core/evidence.go # rpc/core/health.go # rpc/core/mempool.go # rpc/core/net.go # rpc/core/status.go # rpc/core/tx.go # rpc/jsonrpc/doc.go # rpc/openapi/openapi.yaml # test/fuzz/README.md # test/fuzz/oss-fuzz-build.sh # tools/README.md # version/version.go * rename: fixing cherry-pick conflicts when possible * rename: deleting files the backport should not add * rename: versions from v0.37.x restored + renaming * rename: versions from v0.37.x restored + renaming * Apply suggestions from code review Co-authored-by: Jasmina Malicevic * rename: fixing links main -> v0.37.x branch * rename: removing reference to tendermint/go-amino * rename: tendermint_test -> cometbft_test * rename: minor renaming to CometBFT changes --------- Co-authored-by: Daniel Co-authored-by: Jasmina Malicevic --- .github/ISSUE_TEMPLATE/bug-report.md | 6 +- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/ISSUE_TEMPLATE/feature-request.md | 2 +- .github/ISSUE_TEMPLATE/proposal.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 6 +- .github/issue_template.md | 2 +- .github/workflows/janitor.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/pre-release.yml | 4 +- .github/workflows/release.yml | 4 +- .gitignore | 3 - .goreleaser.yml | 8 +- DOCKER/README.md | 4 +- Makefile | 2 +- UPGRADING.md | 2 +- Vagrantfile | 66 --- abci/README.md | 5 +- abci/example/kvstore/README.md | 2 +- abci/types/application.go | 2 +- abci/types/mocks/base.go | 2 +- abci/types/types.pb.go | 2 +- appveyor.yml | 12 - cmd/cometbft/commands/version.go | 10 +- config/config.go | 46 +- config/toml.go | 14 +- consensus/README.md | 4 +- consensus/replay.go | 10 +- consensus/replay_test.go | 12 +- consensus/state.go | 13 +- consensus/wal_generator.go | 2 +- crypto/CHANGELOG.md | 154 ------ crypto/README.md | 10 +- crypto/doc.go | 4 +- crypto/ed25519/ed25519.go | 2 +- crypto/example_test.go | 18 +- crypto/merkle/proof_value.go | 2 +- crypto/sr25519/privkey.go | 2 +- internal/test/doc.go | 2 +- libs/CHANGELOG.md | 438 ------------------ libs/cli/setup.go | 2 +- libs/events/Makefile | 2 +- libs/events/README.md | 7 +- libs/json/doc.go | 2 +- libs/log/logger.go | 2 +- libs/log/tmfmt_logger.go | 4 +- libs/pubsub/query/Makefile | 2 +- light/detector.go | 2 +- light/doc.go | 14 +- light/example_test.go | 6 +- mempool/mempool.go | 2 +- networks/local/README.md | 2 +- node/node.go | 8 +- p2p/README.md | 8 +- p2p/netaddress.go | 2 +- p2p/node_info.go | 2 +- p2p/pex/addrbook.go | 2 +- p2p/trust/metric.go | 3 - p2p/trust/store.go | 3 - p2p/trust/store_test.go | 3 - p2p/trust/ticker.go | 3 - p2p/upnp/probe.go | 2 +- privval/socket_listeners_test.go | 2 +- proto/README.md | 8 +- proto/tendermint/abci/types.proto | 2 +- proto/tendermint/crypto/keys.pb.go | 2 +- proto/tendermint/crypto/keys.proto | 2 +- proto/tendermint/types/types.pb.go | 2 +- proto/tendermint/types/types.proto | 2 +- proxy/multi_app_conn.go | 6 +- rpc/client/examples_test.go | 4 +- rpc/client/http/http.go | 14 +- rpc/client/interface.go | 6 +- rpc/client/local/local.go | 6 +- rpc/client/main_test.go | 2 +- rpc/client/mock/abci.go | 4 +- rpc/client/mock/client.go | 2 +- rpc/core/README.md | 8 +- rpc/core/abci.go | 4 +- rpc/core/blocks.go | 14 +- rpc/core/consensus.go | 8 +- rpc/core/doc.go | 4 +- rpc/core/events.go | 8 +- rpc/core/evidence.go | 2 +- rpc/core/health.go | 2 +- rpc/core/mempool.go | 16 +- rpc/core/net.go | 4 +- rpc/core/status.go | 4 +- rpc/core/tx.go | 4 +- rpc/grpc/grpc_test.go | 2 +- rpc/jsonrpc/doc.go | 2 +- rpc/jsonrpc/server/http_uri_handler.go | 2 +- rpc/jsonrpc/server/ws_handler.go | 2 +- rpc/openapi/index.html | 2 +- rpc/openapi/openapi.yaml | 50 +- rpc/test/helpers.go | 12 +- scripts/dist.sh | 10 +- scripts/json2wal/main.go | 2 +- scripts/linkify_changelog.py | 6 +- scripts/metricsgen/metricsgen.go | 2 +- scripts/proto-gen.sh | 4 +- scripts/qa/reporting/README.md | 2 +- scripts/qa/reporting/latency_throughput.py | 6 +- spec/abci/abci++_client_server.md | 2 +- state/errors.go | 2 +- state/execution.go | 4 +- state/indexer/sink/psql/backport.go | 4 +- state/indexer/sink/psql/psql.go | 2 +- state/indexer/sink/psql/schema.sql | 2 +- state/rollback.go | 2 +- state/state.go | 2 +- state/store.go | 2 +- statesync/syncer.go | 2 +- store/store_test.go | 4 +- test/README.md | 6 +- test/fuzz/README.md | 2 +- test/fuzz/oss-fuzz-build.sh | 14 +- .../p2p/secret_connection/init-corpus/main.go | 2 +- test/loadtime/Makefile | 2 +- test/loadtime/README.md | 12 +- test/loadtime/cmd/load/main.go | 2 +- test/loadtime/cmd/report/main.go | 2 +- test/loadtime/payload/payload.proto | 2 +- test/loadtime/report/report.go | 2 +- test/test_cover.sh | 2 +- tests.mk | 2 +- tools/README.md | 6 +- types/block.go | 4 +- types/evidence.go | 2 +- types/genesis.go | 4 +- types/priv_validator.go | 2 +- types/protobuf.go | 4 +- version/version.go | 4 +- 132 files changed, 308 insertions(+), 1010 deletions(-) delete mode 100644 Vagrantfile delete mode 100644 appveyor.yml delete mode 100644 crypto/CHANGELOG.md delete mode 100644 libs/CHANGELOG.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 99455e0c4..e519c322c 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -8,14 +8,14 @@ about: Create a report to help us squash bugs! Please fill in as much of the template below as you can. If you have general questions, please create a new discussion: -https://github.com/tendermint/tendermint/discussions +https://github.com/cometbft/cometbft/discussions Be ready for followup questions, and please respond in a timely manner. We might -ask you to provide additional logs and data (tendermint & app). +ask you to provide additional logs and data (CometBFT & App). --> -**Tendermint version** (use `tendermint version` or `git rev-parse --verify HEAD` if installed from source): +**CometBFT version** (use `cometbft version` or `git rev-parse --verify HEAD` if installed from source): **ABCI app** (name for built-in, URL for self-written if it's publicly available): diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 08852d444..872b674a9 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - name: Ask a question - url: https://github.com/tendermint/tendermint/discussions + url: https://github.com/cometbft/cometbft/discussions about: Please ask and answer questions here diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 77b20c09f..bb1c2b8c0 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -19,7 +19,7 @@ v without deliberation ## Proposal diff --git a/.github/ISSUE_TEMPLATE/proposal.md b/.github/ISSUE_TEMPLATE/proposal.md index d255ad765..34a47b354 100644 --- a/.github/ISSUE_TEMPLATE/proposal.md +++ b/.github/ISSUE_TEMPLATE/proposal.md @@ -20,7 +20,7 @@ v Word of caution: Under-specified proposals may be rejected summarily ## Proposal diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7ac4b15ca..f20847973 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,16 +8,16 @@ If this PR is non-trivial/large/complex, please ensure that you have either created an issue that the team's had a chance to respond to, or had some discussion with the team prior to submitting substantial pull requests. The team can be reached via GitHub Discussions or the Cosmos Network Discord server in -the #tendermint-core channel. GitHub Discussions is preferred over Discord as it +the #cometbft channel. GitHub Discussions is preferred over Discord as it allows us to keep track of conversations topically. -https://github.com/tendermint/tendermint/discussions +https://github.com/cometbft/cometbft/discussions If the work in this PR is not aligned with the team's current priorities, please be advised that it may take some time before it is merged - especially if it has not yet been discussed with the team. See the project board for the team's current priorities: -https://github.com/orgs/tendermint/projects/15/views/5 +https://github.com/orgs/cometbft/projects/1 --> diff --git a/.github/issue_template.md b/.github/issue_template.md index 13e5ac0b5..a0b5a0377 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -1,6 +1,6 @@ diff --git a/.github/workflows/janitor.yml b/.github/workflows/janitor.yml index 466ec37d3..22cba4a93 100644 --- a/.github/workflows/janitor.yml +++ b/.github/workflows/janitor.yml @@ -1,6 +1,6 @@ name: Janitor # Janitor cleans up previous runs of various workflows -# To add more workflows to cancel visit https://api.github.com/repos/tendermint/tendermint/actions/workflows and find the actions name +# To add more workflows to cancel visit https://api.github.com/repos/cometbft/cometbft/actions/workflows and find the actions name on: pull_request: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 01b572570..c78202081 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,5 @@ name: Golang Linter -# Lint runs golangci-lint over the entire Tendermint repository. +# Lint runs golangci-lint over the entire CometBFT repository. # # This workflow is run on every pull request and push to main. # diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 5b45af829..e5424c5a1 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -28,7 +28,7 @@ jobs: args: build --skip-validate # skip validate skips initial sanity checks in order to be able to fully run # Link to CHANGELOG_PENDING.md as release notes. - - run: echo https://github.com/tendermint/tendermint/blob/${GITHUB_REF#refs/tags/}/CHANGELOG_PENDING.md > ../release_notes.md + - run: echo https://github.com/cometbft/cometbft/blob/${GITHUB_REF#refs/tags/}/CHANGELOG_PENDING.md > ../release_notes.md - name: Release uses: goreleaser/goreleaser-action@v4 @@ -58,7 +58,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": ":sparkles: New Tendermint pre-release: <${{ env.RELEASE_URL }}|${{ github.ref_name }}>" + "text": ":sparkles: New CometBFT pre-release: <${{ env.RELEASE_URL }}|${{ github.ref_name }}>" } } ] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5030ce105..c51f7539b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: version: latest args: build --skip-validate # skip validate skips initial sanity checks in order to be able to fully run - - run: echo https://github.com/tendermint/tendermint/blob/${GITHUB_REF#refs/tags/}/CHANGELOG.md#${GITHUB_REF#refs/tags/} > ../release_notes.md + - run: echo https://github.com/cometbft/cometbft/blob/${GITHUB_REF#refs/tags/}/CHANGELOG.md#${GITHUB_REF#refs/tags/} > ../release_notes.md - name: Release uses: goreleaser/goreleaser-action@v4 @@ -55,7 +55,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": ":rocket: New Tendermint release: <${{ env.RELEASE_URL }}|${{ github.ref_name }}>" + "text": ":rocket: New CometBFT release: <${{ env.RELEASE_URL }}|${{ github.ref_name }}>" } } ] diff --git a/.gitignore b/.gitignore index ae1fbe85a..d9247f281 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,6 @@ .bak .idea/ .revision -.tendermint -.tendermint-lite .cometbft .cometbft-lite .terraform @@ -32,7 +30,6 @@ index.html.md libs/pubsub/query/fuzz_test/output profile\.out remote_dump -rpc/test/.tendermint rpc/test/.cometbft scripts/cutWALUntil/cutWALUntil scripts/wal2json/wal2json diff --git a/.goreleaser.yml b/.goreleaser.yml index 9236fb394..5b0e08c55 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,14 +1,14 @@ -project_name: tendermint +project_name: cometbft env: # Require use of Go modules. - GO111MODULE=on builds: - - id: "tendermint" - main: ./cmd/tendermint/main.go + - id: "cometbft" + main: ./cmd/cometbft/main.go ldflags: - - -s -w -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Version }} + - -s -w -X github.com/cometbft/cometbft/version.TMCoreSemVer={{ .Version }} env: - CGO_ENABLED=0 goos: diff --git a/DOCKER/README.md b/DOCKER/README.md index cc7978bc0..216b4e4f0 100644 --- a/DOCKER/README.md +++ b/DOCKER/README.md @@ -6,7 +6,7 @@ DockerHub tags for official releases are [here](https://hub.docker.com/r/cometbf Official releases can be found [here](https://github.com/cometbft/cometbft/releases). -The Dockerfile for CometBFT is not expected to change in the near future. The main file used for all builds can be found [here](https://raw.githubusercontent.com/cometbft/cometbft/main/DOCKER/Dockerfile). +The Dockerfile for CometBFT is not expected to change in the near future. The main file used for all builds can be found [here](https://raw.githubusercontent.com/cometbft/cometbft/v0.37.x/DOCKER/Dockerfile). Respective versioned files can be found (replace the Xs with the version number). @@ -49,7 +49,7 @@ Note that this will build and use a different image than the ones provided here. ## License -- CometBFT's license is [Apache 2.0](https://github.com/cometbft/cometbft/blob/main/LICENSE). +- CometBFT's license is [Apache 2.0](https://github.com/cometbft/cometbft/blob/v0.37.x/LICENSE). ## Contributing diff --git a/Makefile b/Makefile index ffc7a25bf..50e02b0f8 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ all: check build test install include tests.mk ############################################################################### -### Build Tendermint ### +### Build CometBFT ### ############################################################################### build: diff --git a/UPGRADING.md b/UPGRADING.md index 335eedd72..6966af1e2 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -22,7 +22,7 @@ Tendermint Core. 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`. - Applications should check that Tendermint's ABCI version matches the one they expect + 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 corresponding Protobuf types have been deprecated. diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 00e5c55c7..000000000 --- a/Vagrantfile +++ /dev/null @@ -1,66 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure("2") do |config| - config.vm.box = "ubuntu/focal64" - - config.vm.provider "virtualbox" do |v| - v.memory = 4096 - v.cpus = 2 - end - - config.vm.provision "shell", inline: <<-SHELL - apt-get update - - # install base requirements - apt-get install -y --no-install-recommends wget curl jq zip \ - make shellcheck bsdmainutils psmisc - apt-get install -y language-pack-en - - # install docker - apt-get install -y --no-install-recommends apt-transport-https \ - ca-certificates \ - curl \ - gnupg-agent \ - software-properties-common - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - - add-apt-repository \ - "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) \ - stable" - apt-get update - apt-get install -y docker-ce - usermod -aG docker vagrant - - # install go - wget -q https://dl.google.com/go/go1.15.linux-amd64.tar.gz - tar -xvf go1.15.linux-amd64.tar.gz - mv go /usr/local - rm -f go1.15.linux-amd64.tar.gz - - # install nodejs (for docs) - curl -sL https://deb.nodesource.com/setup_11.x | bash - - apt-get install -y nodejs - - # cleanup - apt-get autoremove -y - - # set env variables - echo 'export GOROOT=/usr/local/go' >> /home/vagrant/.bash_profile - echo 'export GOPATH=/home/vagrant/go' >> /home/vagrant/.bash_profile - echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> /home/vagrant/.bash_profile - echo 'export LC_ALL=en_US.UTF-8' >> /home/vagrant/.bash_profile - echo 'cd go/src/github.com/tendermint/tendermint' >> /home/vagrant/.bash_profile - - mkdir -p /home/vagrant/go/bin - mkdir -p /home/vagrant/go/src/github.com/tendermint - ln -s /vagrant /home/vagrant/go/src/github.com/tendermint/tendermint - - chown -R vagrant:vagrant /home/vagrant/go - chown vagrant:vagrant /home/vagrant/.bash_profile - - # get all deps and tools, ready to install/test - su - vagrant -c 'source /home/vagrant/.bash_profile' - su - vagrant -c 'cd /home/vagrant/go/src/github.com/tendermint/tendermint && make tools' - SHELL -end diff --git a/abci/README.md b/abci/README.md index 7bc8ae7d9..cefa5dd25 100644 --- a/abci/README.md +++ b/abci/README.md @@ -8,7 +8,6 @@ can manage an application state running in another. Previously, the ABCI was referred to as TMSP. -The community has provided a number of additional implementations, see the [Tendermint Ecosystem](https://github.com/tendermint/awesome#ecosystem) ## Installation & Usage @@ -19,8 +18,8 @@ To get up and running quickly, see the [getting started guide](../docs/app-dev/g A detailed description of the ABCI methods and message types is contained in: -- [The main spec](https://github.com/tendermint/tendermint/blob/v0.37.x/spec/abci/abci.md) -- [A protobuf file](./types/types.proto) +- [The v0.37.x spec](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/README.md) +- [A protobuf file](../proto/tendermint/types/types.proto) - [A Go interface](./types/application.go) ## Protocol Buffers diff --git a/abci/example/kvstore/README.md b/abci/example/kvstore/README.md index edc2c47a5..885e897e0 100644 --- a/abci/example/kvstore/README.md +++ b/abci/example/kvstore/README.md @@ -14,7 +14,7 @@ The app has no replay protection (other than what the mempool provides). The PersistentKVStoreApplication wraps the KVStoreApplication and provides two additional features: -1) persistence of state across app restarts (using Tendermint's ABCI-Handshake mechanism) +1) persistence of state across app restarts (using CometBFT's ABCI-Handshake mechanism) 2) validator set changes The state is persisted in leveldb along with the last block committed, diff --git a/abci/types/application.go b/abci/types/application.go index 0913ea463..68ff8a4af 100644 --- a/abci/types/application.go +++ b/abci/types/application.go @@ -19,7 +19,7 @@ type Application interface { CheckTx(RequestCheckTx) ResponseCheckTx // Validate a tx for the mempool // Consensus Connection - InitChain(RequestInitChain) ResponseInitChain // Initialize blockchain w validators/other info from TendermintCore + InitChain(RequestInitChain) ResponseInitChain // Initialize blockchain w validators/other info from CometBFT PrepareProposal(RequestPrepareProposal) ResponsePrepareProposal ProcessProposal(RequestProcessProposal) ResponseProcessProposal BeginBlock(RequestBeginBlock) ResponseBeginBlock // Signals the beginning of a block diff --git a/abci/types/mocks/base.go b/abci/types/mocks/base.go index 1fc922cdb..9e8a2b6a2 100644 --- a/abci/types/mocks/base.go +++ b/abci/types/mocks/base.go @@ -61,7 +61,7 @@ func (m BaseMock) CheckTx(input types.RequestCheckTx) types.ResponseCheckTx { } // Consensus Connection -// Initialize blockchain w validators/other info from TendermintCore +// Initialize blockchain w validators/other info from CometBFT func (m BaseMock) InitChain(input types.RequestInitChain) types.ResponseInitChain { var ret types.ResponseInitChain defer func() { diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 2bc202852..f06a16f15 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -2124,7 +2124,7 @@ type ResponseCheckTx struct { Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` Sender string `protobuf:"bytes,9,opt,name=sender,proto3" json:"sender,omitempty"` Priority int64 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"` - // mempool_error is set by Tendermint. + // mempool_error is set by CometBFT. // ABCI applictions creating a ResponseCheckTX should not set mempool_error. MempoolError string `protobuf:"bytes,11,opt,name=mempool_error,json=mempoolError,proto3" json:"mempool_error,omitempty"` } diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index afaab5b83..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 1.0.{build} -configuration: Release -platform: - - x64 - - x86 -clone_folder: c:\go\path\src\github.com\tendermint\tendermint -before_build: - - cmd: set GOPATH=%GOROOT%\path - - cmd: set PATH=%GOPATH%\bin;%PATH% -build_script: - - cmd: make test -test: off diff --git a/cmd/cometbft/commands/version.go b/cmd/cometbft/commands/version.go index 45eca20b9..020b69da0 100644 --- a/cmd/cometbft/commands/version.go +++ b/cmd/cometbft/commands/version.go @@ -14,26 +14,26 @@ var VersionCmd = &cobra.Command{ Use: "version", Short: "Show version info", Run: func(cmd *cobra.Command, args []string) { - tmVersion := version.TMCoreSemVer + cmtVersion := version.TMCoreSemVer if version.TMGitCommitHash != "" { - tmVersion += "+" + version.TMGitCommitHash + cmtVersion += "+" + version.TMGitCommitHash } if verbose { values, _ := json.MarshalIndent(struct { - Tendermint string `json:"tendermint"` + CometBFT string `json:"cometbft"` ABCI string `json:"abci"` BlockProtocol uint64 `json:"block_protocol"` P2PProtocol uint64 `json:"p2p_protocol"` }{ - Tendermint: tmVersion, + CometBFT: cmtVersion, ABCI: version.ABCISemVer, BlockProtocol: version.BlockProtocol, P2PProtocol: version.P2PProtocol, }, "", " ") fmt.Println(string(values)) } else { - fmt.Println(tmVersion) + fmt.Println(cmtVersion) } }, } diff --git a/config/config.go b/config/config.go index be2dc0859..04e0fff72 100644 --- a/config/config.go +++ b/config/config.go @@ -62,7 +62,7 @@ var ( defaultSubscriptionBufferSize = 200 ) -// Config defines the top level configuration for a Tendermint node +// Config defines the top level configuration for a CometBFT node type Config struct { // Top level options use an anonymous struct BaseConfig `mapstructure:",squash"` @@ -82,7 +82,7 @@ type Config struct { Instrumentation *InstrumentationConfig `mapstructure:"instrumentation"` } -// DefaultConfig returns a default configuration for a Tendermint node +// DefaultConfig returns a default configuration for a CometBFT node func DefaultConfig() *Config { return &Config{ BaseConfig: DefaultBaseConfig(), @@ -171,7 +171,7 @@ func (cfg *Config) CheckDeprecated() []string { //----------------------------------------------------------------------------- // BaseConfig -// BaseConfig defines the base configuration for a Tendermint node +// BaseConfig defines the base configuration for a CometBFT node type BaseConfig struct { //nolint: maligned // chainID is unexposed and immutable but here for convenience chainID string @@ -181,7 +181,7 @@ type BaseConfig struct { //nolint: maligned RootDir string `mapstructure:"home"` // TCP or UNIX socket address of the ABCI application, - // or the name of an ABCI application compiled in with the Tendermint binary + // or the name of an ABCI application compiled in with the CometBFT binary ProxyApp string `mapstructure:"proxy_app"` // A custom human readable name for this node @@ -235,7 +235,7 @@ type BaseConfig struct { //nolint: maligned // Path to the JSON file containing the last sign state of a validator PrivValidatorState string `mapstructure:"priv_validator_state_file"` - // TCP or UNIX socket address for Tendermint to listen on for + // TCP or UNIX socket address for CometBFT to listen on for // connections from an external PrivValidator process PrivValidatorListenAddr string `mapstructure:"priv_validator_laddr"` @@ -250,7 +250,7 @@ type BaseConfig struct { //nolint: maligned FilterPeers bool `mapstructure:"filter_peers"` // false } -// DefaultBaseConfig returns a default base configuration for a Tendermint node +// DefaultBaseConfig returns a default base configuration for a CometBFT node func DefaultBaseConfig() BaseConfig { return BaseConfig{ Genesis: defaultGenesisJSONPath, @@ -269,10 +269,10 @@ func DefaultBaseConfig() BaseConfig { } } -// TestBaseConfig returns a base configuration for testing a Tendermint node +// TestBaseConfig returns a base configuration for testing a CometBFT node func TestBaseConfig() BaseConfig { cfg := DefaultBaseConfig() - cfg.chainID = "tendermint_test" + cfg.chainID = "cometbft_test" cfg.ProxyApp = "kvstore" cfg.BlockSyncMode = false cfg.DBBackend = "memdb" @@ -322,7 +322,7 @@ func (cfg BaseConfig) ValidateBasic() error { //----------------------------------------------------------------------------- // RPCConfig -// RPCConfig defines the configuration options for the Tendermint RPC server +// RPCConfig defines the configuration options for the CometBFT RPC server type RPCConfig struct { RootDir string `mapstructure:"home"` @@ -410,20 +410,20 @@ type RPCConfig struct { MaxHeaderBytes int `mapstructure:"max_header_bytes"` // The path to a file containing certificate that is used to create the HTTPS server. - // Might be either absolute path or path related to Tendermint's config directory. + // Might be either absolute path or path related to CometBFT's config directory. // // If the certificate is signed by a certificate authority, // the certFile should be the concatenation of the server's certificate, any intermediates, // and the CA's certificate. // - // NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. + // NOTE: both tls_cert_file and tls_key_file must be present for CometBFT to create HTTPS server. // Otherwise, HTTP server is run. TLSCertFile string `mapstructure:"tls_cert_file"` // The path to a file containing matching private key that is used to create the HTTPS server. - // Might be either absolute path or path related to tendermint's config directory. + // Might be either absolute path or path related to CometBFT's config directory. // - // NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. + // NOTE: both tls_cert_file and tls_key_file must be present for CometBFT to create HTTPS server. // Otherwise, HTTP server is run. TLSKeyFile string `mapstructure:"tls_key_file"` @@ -534,7 +534,7 @@ func (cfg RPCConfig) IsTLSEnabled() bool { //----------------------------------------------------------------------------- // P2PConfig -// P2PConfig defines the configuration options for the Tendermint peer-to-peer networking layer +// P2PConfig defines the configuration options for the CometBFT peer-to-peer networking layer type P2PConfig struct { //nolint: maligned RootDir string `mapstructure:"home"` @@ -703,7 +703,7 @@ func DefaultFuzzConnConfig() *FuzzConnConfig { //----------------------------------------------------------------------------- // MempoolConfig -// MempoolConfig defines the configuration options for the Tendermint mempool +// MempoolConfig defines the configuration options for the CometBFT mempool type MempoolConfig struct { // Mempool version to use: // 1) "v0" - (default) FIFO mempool. @@ -713,7 +713,7 @@ type MempoolConfig struct { // the $CMTHOME env variable or --home cmd flag rather than overriding this // struct field. RootDir string `mapstructure:"home"` - // Recheck (default: true) defines whether Tendermint should recheck the + // Recheck (default: true) defines whether CometBFT should recheck the // validity for all remaining transaction in the mempool after a block. // Since a block affects the application state, some transactions in the // mempool may become invalid. If this does not apply to your application, @@ -767,7 +767,7 @@ type MempoolConfig struct { TTLNumBlocks int64 `mapstructure:"ttl-num-blocks"` } -// DefaultMempoolConfig returns a default configuration for the Tendermint mempool +// DefaultMempoolConfig returns a default configuration for the CometBFT mempool func DefaultMempoolConfig() *MempoolConfig { return &MempoolConfig{ Version: MempoolV0, @@ -785,7 +785,7 @@ func DefaultMempoolConfig() *MempoolConfig { } } -// TestMempoolConfig returns a configuration for testing the Tendermint mempool +// TestMempoolConfig returns a configuration for testing the CometBFT mempool func TestMempoolConfig() *MempoolConfig { cfg := DefaultMempoolConfig() cfg.CacheSize = 1000 @@ -823,7 +823,7 @@ func (cfg *MempoolConfig) ValidateBasic() error { //----------------------------------------------------------------------------- // StateSyncConfig -// StateSyncConfig defines the configuration for the Tendermint state sync service +// StateSyncConfig defines the configuration for the CometBFT state sync service type StateSyncConfig struct { Enable bool `mapstructure:"enable"` TempDir string `mapstructure:"temp_dir"` @@ -913,7 +913,7 @@ func (cfg *StateSyncConfig) ValidateBasic() error { //----------------------------------------------------------------------------- // BlockSyncConfig -// BlockSyncConfig (formerly known as FastSync) defines the configuration for the Tendermint block sync service +// BlockSyncConfig (formerly known as FastSync) defines the configuration for the CometBFT block sync service type BlockSyncConfig struct { Version string `mapstructure:"version"` } @@ -945,7 +945,7 @@ func (cfg *BlockSyncConfig) ValidateBasic() error { //----------------------------------------------------------------------------- // ConsensusConfig -// ConsensusConfig defines the configuration for the Tendermint consensus service, +// ConsensusConfig defines the configuration for the Tendermint consensus algorithm, adopted by CometBFT, // including timeouts and details about the WAL and the block structure. type ConsensusConfig struct { RootDir string `mapstructure:"home"` @@ -1119,7 +1119,7 @@ type StorageConfig struct { } // DefaultStorageConfig returns the default configuration options relating to -// Tendermint storage optimization. +// CometBFT storage optimization. func DefaultStorageConfig() *StorageConfig { return &StorageConfig{ DiscardABCIResponses: false, @@ -1204,7 +1204,7 @@ func DefaultInstrumentationConfig() *InstrumentationConfig { Prometheus: false, PrometheusListenAddr: ":26660", MaxOpenConnections: 3, - Namespace: "tendermint", + Namespace: "cometbft", } } diff --git a/config/toml.go b/config/toml.go index 9c9fd3ac7..f1c95acf5 100644 --- a/config/toml.go +++ b/config/toml.go @@ -81,7 +81,7 @@ const defaultConfigTemplate = `# This is a TOML config file. ####################################################################### # TCP or UNIX socket address of the ABCI application, -# or the name of an ABCI application compiled in with the Tendermint binary +# or the name of an ABCI application compiled in with the CometBFT binary proxy_app = "{{ .BaseConfig.ProxyApp }}" # A custom human readable name for this node @@ -133,7 +133,7 @@ priv_validator_key_file = "{{ js .BaseConfig.PrivValidatorKey }}" # Path to the JSON file containing the last sign state of a validator priv_validator_state_file = "{{ js .BaseConfig.PrivValidatorState }}" -# TCP or UNIX socket address for Tendermint to listen on for +# TCP or UNIX socket address for CometBFT to listen on for # connections from an external PrivValidator process priv_validator_laddr = "{{ .BaseConfig.PrivValidatorListenAddr }}" @@ -246,17 +246,17 @@ max_body_bytes = {{ .RPC.MaxBodyBytes }} max_header_bytes = {{ .RPC.MaxHeaderBytes }} # The path to a file containing certificate that is used to create the HTTPS server. -# Might be either absolute path or path related to Tendermint's config directory. +# Might be either absolute path or path related to CometBFT's config directory. # If the certificate is signed by a certificate authority, # the certFile should be the concatenation of the server's certificate, any intermediates, # and the CA's certificate. -# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. +# NOTE: both tls_cert_file and tls_key_file must be present for CometBFT to create HTTPS server. # Otherwise, HTTP server is run. tls_cert_file = "{{ .RPC.TLSCertFile }}" # The path to a file containing matching private key that is used to create the HTTPS server. -# Might be either absolute path or path related to Tendermint's config directory. -# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. +# Might be either absolute path or path related to CometBFT's config directory. +# NOTE: both tls-cert-file and tls-key-file must be present for CometBFT to create HTTPS server. # Otherwise, HTTP server is run. tls_key_file = "{{ .RPC.TLSKeyFile }}" @@ -570,7 +570,7 @@ func ResetTestRootWithChainID(testName string, chainID string) *Config { } if !cmtos.FileExists(genesisFilePath) { if chainID == "" { - chainID = "tendermint_test" + chainID = "cometbft_test" } testGenesis := fmt.Sprintf(testGenesisFmt, chainID) cmtos.MustWriteFile(genesisFilePath, []byte(testGenesis), 0644) diff --git a/consensus/README.md b/consensus/README.md index ab7206d95..01c75e3e0 100644 --- a/consensus/README.md +++ b/consensus/README.md @@ -1,3 +1,3 @@ -# Consensus +# Consensus -See the [consensus spec](https://github.com/tendermint/tendermint/tree/v0.37.x/spec/consensus) and the [reactor consensus spec](https://github.com/tendermint/tendermint/tree/v0.37.x/spec/reactors/consensus) for more information. +See the [consensus spec](https://github.com/cometbft/cometbft/tree/v0.37.x/spec/consensus) for more information. diff --git a/consensus/replay.go b/consensus/replay.go index e82c87c13..43930f631 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -270,7 +270,7 @@ func (h *Handshaker) Handshake(proxyApp proxy.AppConns) error { return fmt.Errorf("error on replay: %v", err) } - h.logger.Info("Completed ABCI Handshake - Tendermint and App are synced", + h.logger.Info("Completed ABCI Handshake - CometBFT and App are synced", "appHeight", blockHeight, "appHash", appHash) // TODO: (on restart) replay mempool @@ -374,11 +374,11 @@ func (h *Handshaker) ReplayBlocks( return appHash, sm.ErrAppBlockHeightTooHigh{CoreHeight: storeBlockHeight, AppHeight: appBlockHeight} case storeBlockHeight < stateBlockHeight: - // the state should never be ahead of the store (this is under tendermint's control) + // the state should never be ahead of the store (this is under CometBFT's control) panic(fmt.Sprintf("StateBlockHeight (%d) > StoreBlockHeight (%d)", stateBlockHeight, storeBlockHeight)) case storeBlockHeight > stateBlockHeight+1: - // store should be at most one ahead of the state (this is under tendermint's control) + // store should be at most one ahead of the state (this is under CometBFT's control) panic(fmt.Sprintf("StoreBlockHeight (%d) > StateBlockHeight + 1 (%d)", storeBlockHeight, stateBlockHeight+1)) } @@ -386,7 +386,7 @@ func (h *Handshaker) ReplayBlocks( // Now either store is equal to state, or one ahead. // For each, consider all cases of where the app could be, given app <= store if storeBlockHeight == stateBlockHeight { - // Tendermint ran Commit and saved the state. + // CometBFT ran Commit and saved the state. // Either the app is asking for replay, or we're all synced up. if appBlockHeight < storeBlockHeight { // the app is behind, so replay blocks, but no need to go through WAL (state is already synced to store) @@ -527,7 +527,7 @@ func assertAppHashEqualsOneFromState(appHash []byte, state sm.State) { State: %v -Did you reset Tendermint without resetting your application's data?`, +Did you reset CometBFT without resetting your application's data?`, appHash, state.AppHash, state)) } } diff --git a/consensus/replay_test.go b/consensus/replay_test.go index 7d245fe28..9b267514a 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -718,7 +718,7 @@ func testHandshakeReplay(t *testing.T, config *cfg.Config, nBlocks int, mode uin store.commits = commits state := genesisState.Copy() - // run the chain through state.ApplyBlock to build up the tendermint state + // run the chain through state.ApplyBlock to build up the CometBFT state state = buildTMStateFromChain(t, config, stateStore, state, chain, nBlocks, mode) latestAppHash := state.AppHash @@ -729,7 +729,7 @@ func testHandshakeReplay(t *testing.T, config *cfg.Config, nBlocks int, mode uin clientCreator2 := proxy.NewLocalClientCreator(kvstoreApp) if nBlocks > 0 { // run nBlocks against a new client to build up the app state. - // use a throwaway tendermint state + // use a throwaway CometBFT state proxyApp := proxy.NewAppConns(clientCreator2, proxy.NopMetrics()) stateDB1 := dbm.NewMemDB() stateStore := sm.NewStore(stateDB1, sm.StoreOptions{ @@ -857,7 +857,7 @@ func buildTMStateFromChain( chain []*types.Block, nBlocks int, mode uint) sm.State { - // run the whole chain against this client to build up the tendermint state + // run the whole chain against this client to build up the CometBFT state clientCreator := proxy.NewLocalClientCreator( kvstore.NewPersistentKVStoreApplication( filepath.Join(config.DBDir(), fmt.Sprintf("replay_test_%d_%d_t", nBlocks, mode)))) @@ -902,7 +902,7 @@ func buildTMStateFromChain( } func TestHandshakePanicsIfAppReturnsWrongAppHash(t *testing.T) { - // 1. Initialize tendermint and commit 3 blocks with the following app hashes: + // 1. Initialize CometBFT and commit 3 blocks with the following app hashes: // - 0x01 // - 0x02 // - 0x03 @@ -924,7 +924,7 @@ func TestHandshakePanicsIfAppReturnsWrongAppHash(t *testing.T) { store.chain = blocks - // 2. Tendermint must panic if app returns wrong hash for the first block + // 2. CometBFT must panic if app returns wrong hash for the first block // - RANDOM HASH // - 0x02 // - 0x03 @@ -948,7 +948,7 @@ func TestHandshakePanicsIfAppReturnsWrongAppHash(t *testing.T) { }) } - // 3. Tendermint must panic if app returns wrong hash for the last block + // 3. CometBFT must panic if app returns wrong hash for the last block // - 0x01 // - 0x02 // - RANDOM HASH diff --git a/consensus/state.go b/consensus/state.go index 3bbe3899a..28ea49c2c 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -636,7 +636,7 @@ func (cs *State) updateToState(state sm.State) { cs.LastCommit = cs.Votes.Precommits(cs.CommitRound) case cs.LastCommit == nil: - // NOTE: when Tendermint starts, it has no votes. reconstructLastCommit + // NOTE: when consensus starts, it has no votes. reconstructLastCommit // must be called to reconstruct LastCommit from SeenCommit. panic(fmt.Sprintf( "last commit cannot be empty after initial block (H:%d)", @@ -1283,7 +1283,7 @@ func (cs *State) defaultDoPrevote(height int64, round int32) { return } - // Validate proposal block, from Tendermint's perspective + // Validate proposal block, from consensus' perspective err := cs.blockExec.ValidateBlock(cs.state, cs.ProposalBlock) if err != nil { // ProposalBlock is invalid, prevote nil. @@ -1296,11 +1296,12 @@ func (cs *State) defaultDoPrevote(height int64, round int32) { /* Before prevoting on the block received from the proposer for the current round and height, we request the Application, via `ProcessProposal` ABCI call, to confirm that the block is - valid. If the Application does not accept the block, Tendermint prevotes `nil`. + valid. If the Application does not accept the block, consensus prevotes `nil`. - WARNING: misuse of block rejection by the Application can seriously compromise Tendermint's - liveness properties. Please see `PrepareProosal`-`ProcessProposal` coherence and determinism - properties in the ABCI++ specification. + WARNING: misuse of block rejection by the Application can seriously compromise + the liveness properties of consensus. + Please see `PrepareProosal`-`ProcessProposal` coherence and determinism properties + in the ABCI++ specification. */ isAppValid, err := cs.blockExec.ProcessProposal(cs.ProposalBlock, cs.state) if err != nil { diff --git a/consensus/wal_generator.go b/consensus/wal_generator.go index 5eb05aad7..fb13bdc58 100644 --- a/consensus/wal_generator.go +++ b/consensus/wal_generator.go @@ -117,7 +117,7 @@ func WALGenerateNBlocks(t *testing.T, wr io.Writer, numBlocks int) (err error) { if err := consensusState.Stop(); err != nil { t.Error(err) } - return fmt.Errorf("waited too long for tendermint to produce %d blocks (grep logs for `wal_generator`)", numBlocks) + return fmt.Errorf("waited too long for CometBFT to produce %d blocks (grep logs for `wal_generator`)", numBlocks) } } diff --git a/crypto/CHANGELOG.md b/crypto/CHANGELOG.md deleted file mode 100644 index dd7c1039f..000000000 --- a/crypto/CHANGELOG.md +++ /dev/null @@ -1,154 +0,0 @@ -# Changelog - -## 0.9.0 - -BREAKING CHANGES - -- `priv.PubKey()` no longer returns an error. Any applicable errors (such as when fetching the public key from a hardware wallet) should be checked and returned when constructing the private key. - -## 0.8.0 - -**TBD** - -## 0.7.0 - -**May 30th, 2018** - -BREAKING CHANGES - -No breaking changes compared to 0.6.2, but making up for the version bump that -should have happened in 0.6.1. - -We also bring in the `tmlibs/merkle` package with breaking changes: - -- change the hash function from RIPEMD160 to tmhash (first 20-bytes of SHA256) -- remove unused funcs and unexport SimpleMap - -FEATURES - -- [xchacha20poly1305] New authenticated encryption module -- [merkle] Moved in from tmlibs -- [merkle/tmhash] New hash function: the first 20-bytes of SHA256 - -IMPROVEMENTS - -- Remove some dead code -- Use constant-time compare for signatures - -BUG FIXES - -- Fix MixEntropy weakness -- Fix PrivKeyEd25519.Generate() - -## 0.6.2 (April 9, 2018) - -IMPROVEMENTS - -- Update for latest go-amino - -## 0.6.1 (March 26, 2018) - -BREAKING CHANGES - -- Encoding uses MarshalBinaryBare rather than MarshalBinary (which auto-length-prefixes) for pub/priv/sig. - -## 0.6.0 (March 2, 2018) - -BREAKING CHANGES - -- Update Amino names from "com.tendermint/..." to "tendermint/" - -## 0.5.0 (March 2, 2018) - -BREAKING CHANGES - -- nano: moved to `_nano` now while we're having build issues -- bcrypt: moved to `keys/bcrypt` -- hd: moved to `keys/hd`; `BTC` added to some function names; other function cleanup -- keys/cryptostore: moved to `keys`, renamed to `keybase`, and completely refactored -- keys: moved BIP39 related code to `keys/words` - -FEATURE - -- `Address` is a type alias for `cmn.HexBytes` - -BUG FIX - -- PrivKey comparisons done in constant time - -## 0.4.1 (October 27, 2017) - -This release removes support for bcrypt as it was merged too soon without an upgrade plan -for existing keys. - -REVERTS THE FOLLOWING COMMITS: - -- Parameterize and lower bcrypt cost - dfc4cdd2d71513e4a9922d679c74f36357c4c862 -- Upgrade keys to use bcrypt with salts (#38) - 8e7f0e7701f92206679ad093d013b9b162427631 - -## 0.4.0 (October 27, 2017) - -BREAKING CHANGES: - -- `keys`: use bcrypt plus salt - -FEATURES: - -- add support for signing via Ledger Nano - -IMPROVEMENTS: - -- linting and comments - -## 0.3.0 (September 22, 2017) - -BREAKING CHANGES: - -- Remove `cmd` and `keys/tx` packages altogether: move it to the cosmos-sdk -- `cryptostore.Generator` takes a secret -- Remove `String()` from `Signature` interface - -FEATURES: - -- `keys`: add CRC16 error correcting code - -IMPROVEMENTS: - -- Allow no passwords on keys for development convenience - - -## 0.2.1 (June 21, 2017) - -- Improve keys command - - No password prompts in non-interactive mode (echo 'foobar' | keys new foo) - - Added support for seed phrases - - Seed phrase now returned on `keys new` - - Add `keys restore` to restore private key from key phrase - - Checksum to verify typos in the seed phrase (rather than just a useless key) - - Add `keys delete` to remove a key if needed - -## 0.2.0 (May 18, 2017) - -BREAKING CHANGES: - -- [hd] The following functions no longer take a `coin string` as argument: `ComputeAddress`, `AddrFromPubKeyBytes`, `ComputeAddressForPrivKey`, `ComputeWIF`, `WIFFromPrivKeyBytes` -- Changes to `PrivKey`, `PubKey`, and `Signature` (denoted `Xxx` below): - - interfaces are renamed `XxxInner`, and are not for use outside the package, though they must be exposed for sake of serialization. - - `Xxx` is now a struct that wraps the corresponding `XxxInner` interface - -FEATURES: - -- `github.com/tendermint/go-keys -> github.com/tendermint/go-crypto/keys` - command and lib for generating and managing encrypted keys -- [hd] New function `WIFFromPrivKeyBytes(privKeyBytes []byte, compress bool) string` -- Changes to `PrivKey`, `PubKey`, and `Signature` (denoted `Xxx` below): - - Expose a new method `Unwrap() XxxInner` on the `Xxx` struct which returns the corresponding `XxxInner` interface - - Expose a new method `Wrap() Xxx` on the `XxxInner` interface which returns the corresponding `Xxx` struct - -IMPROVEMENTS: - -- Update to use new `tmlibs` repository - -## 0.1.0 (April 14, 2017) - -Initial release - diff --git a/crypto/README.md b/crypto/README.md index f80f6e96c..63a65c098 100644 --- a/crypto/README.md +++ b/crypto/README.md @@ -1,22 +1,22 @@ # crypto -crypto is the cryptographic package adapted for Tendermint's uses +crypto is the cryptographic package adapted for CometBFT's uses ## Importing it To get the interfaces, -`import "github.com/tendermint/tendermint/crypto"` +`import "github.com/cometbft/cometbft/crypto"` For any specific algorithm, use its specific module e.g. -`import "github.com/tendermint/tendermint/crypto/ed25519"` +`import "github.com/cometbft/cometbft/crypto/ed25519"` ## Binary encoding -For Binary encoding, please refer to the [Tendermint encoding specification](https://github.com/tendermint/tendermint/blob/v0.37.x/spec/core/encoding.md). +For Binary encoding, please refer to the [CometBFT encoding specification](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/core/encoding.md). ## JSON Encoding -JSON encoding is done using tendermint's internal json encoder. For more information on JSON encoding, please refer to [Tendermint JSON encoding](https://github.com/tendermint/tendermint/blob/ccc990498df70f5a3df06d22476c9bb83812cbe3/libs/json/doc.go) +JSON encoding is done using CometBFT's internal json encoder. For more information on JSON encoding, please refer to [CometBFT JSON encoding](https://github.com/cometbft/cometbft/blob/v0.37.x/libs/json/doc.go) ```go Example JSON encodings: diff --git a/crypto/doc.go b/crypto/doc.go index 95ae0af18..6b58cd8b3 100644 --- a/crypto/doc.go +++ b/crypto/doc.go @@ -1,5 +1,5 @@ // crypto is a customized/convenience cryptography package for supporting -// Tendermint. +// CometBFT. // It wraps select functionality of equivalent functions in the // Go standard library, for easy usage with our libraries. @@ -34,7 +34,7 @@ // We also provide hashing wrappers around algorithms: // Sha256 -// sum := crypto.Sha256([]byte("This is Tendermint")) +// sum := crypto.Sha256([]byte("This is CometBFT")) // fmt.Printf("%x\n", sum) package crypto diff --git a/crypto/ed25519/ed25519.go b/crypto/ed25519/ed25519.go index d3a0dbcf5..3ab6ab57d 100644 --- a/crypto/ed25519/ed25519.go +++ b/crypto/ed25519/ed25519.go @@ -98,7 +98,7 @@ func (privKey PrivKey) Type() string { // GenPrivKey generates a new ed25519 private key. // It uses OS randomness in conjunction with the current global random seed -// in tendermint/libs/common to generate the private key. +// in cometbft/libs/rand to generate the private key. func GenPrivKey() PrivKey { return genPrivKey(crypto.CReader()) } diff --git a/crypto/example_test.go b/crypto/example_test.go index 1b2d07303..610072778 100644 --- a/crypto/example_test.go +++ b/crypto/example_test.go @@ -1,17 +1,3 @@ -// Copyright 2017 Tendermint. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package crypto_test import ( @@ -21,8 +7,8 @@ import ( ) func ExampleSha256() { - sum := crypto.Sha256([]byte("This is Tendermint")) + sum := crypto.Sha256([]byte("This is CometBFT")) fmt.Printf("%x\n", sum) // Output: - // f91afb642f3d1c87c17eb01aae5cb65c242dfdbe7cf1066cc260f4ce5d33b94e + // ea186526b041852d923b02c91aa04b00c0df258b3d69cb688eaba577f5562758 } diff --git a/crypto/merkle/proof_value.go b/crypto/merkle/proof_value.go index 40eb6076f..7c267e7ef 100644 --- a/crypto/merkle/proof_value.go +++ b/crypto/merkle/proof_value.go @@ -13,7 +13,7 @@ const ProofOpValue = "simple:v" // ValueOp takes a key and a single value as argument and // produces the root hash. The corresponding tree structure is // the SimpleMap tree. SimpleMap takes a Hasher, and currently -// Tendermint uses tmhash. SimpleValueOp should support +// CometBFT uses tmhash. SimpleValueOp should support // the hash function as used in tmhash. TODO support // additional hash functions here as options/args to this // operator. diff --git a/crypto/sr25519/privkey.go b/crypto/sr25519/privkey.go index 0b02d330f..98d7e3c1b 100644 --- a/crypto/sr25519/privkey.go +++ b/crypto/sr25519/privkey.go @@ -75,7 +75,7 @@ func (privKey PrivKey) Type() string { // GenPrivKey generates a new sr25519 private key. // It uses OS randomness in conjunction with the current global random seed -// in tendermint/libs/common to generate the private key. +// in cometbft/libs/rand to generate the private key. func GenPrivKey() PrivKey { return genPrivKey(crypto.CReader()) } diff --git a/internal/test/doc.go b/internal/test/doc.go index 86438e290..70cc02126 100644 --- a/internal/test/doc.go +++ b/internal/test/doc.go @@ -1,5 +1,5 @@ /* -Package factory provides generation code for common structs in Tendermint. +Package factory provides generation code for common structs in CometBFT. It is used primarily for the testing of internal components such as statesync, consensus, blocksync etc.. */ diff --git a/libs/CHANGELOG.md b/libs/CHANGELOG.md deleted file mode 100644 index 0f900c57f..000000000 --- a/libs/CHANGELOG.md +++ /dev/null @@ -1,438 +0,0 @@ -# Changelog - -## 0.9.0 - -*June 24th, 2018* - -BREAKING: - - [events, pubsub] Removed - moved to github.com/tendermint/tendermint - - [merkle] Use 20-bytes of SHA256 instead of RIPEMD160. NOTE: this package is - moving to github.com/tendermint/go-crypto ! - - [common] Remove gogoproto from KVPair types - - [common] Error simplification, #220 - -FEATURES: - - - [db/remotedb] New DB type using an external CLevelDB process via - GRPC - - [autofile] logjack command for piping stdin to a rotating file - - [bech32] New package. NOTE: should move out of here - it's just two small - functions - - [common] ColoredBytes([]byte) string for printing mixed ascii and bytes - - [db] DebugDB uses ColoredBytes() - -## 0.8.4 - -*June 5, 2018* - -IMPROVEMENTS: - - - [autofile] Flush on Stop; Close() method to Flush and close file - -## 0.8.3 - -*May 21, 2018* - -FEATURES: - - - [common] ASCIITrim() - -## 0.8.2 (April 23rd, 2018) - -FEATURES: - - - [pubsub] TagMap, NewTagMap - - [merkle] SimpleProofsFromMap() - - [common] IsASCIIText() - - [common] PrefixEndBytes // e.g. increment or nil - - [common] BitArray.MarshalJSON/.UnmarshalJSON - - [common] BitArray uses 'x' not 'X' for String() and above. - - [db] DebugDB shows better colorized output - -BUG FIXES: - - - [common] Fix TestParallelAbort nondeterministic failure #201/#202 - - [db] PrefixDB Iterator/ReverseIterator fixes - - [db] DebugDB fixes - -## 0.8.1 (April 5th, 2018) - -FEATURES: - - - [common] Error.Error() includes cause - - [common] IsEmpty() for 0 length - -## 0.8.0 (April 4th, 2018) - -BREAKING: - - - [merkle] `PutVarint->PutUvarint` in encodeByteSlice - - [db] batch.WriteSync() - - [common] Refactored and fixed `Parallel` function - - [common] Refactored `Rand` functionality - - [common] Remove unused `Right/LeftPadString` functions - - [common] Remove StackError, introduce Error interface (to replace use of pkg/errors) - -FEATURES: - - - [db] NewPrefixDB for a DB with all keys prefixed - - [db] NewDebugDB prints everything during operation - - [common] SplitAndTrim func - - [common] rand.Float64(), rand.Int63n(n), rand.Int31n(n) and global equivalents - - [common] HexBytes Format() - -BUG FIXES: - - - [pubsub] Fix unsubscribing - - [cli] Return config errors - - [common] Fix WriteFileAtomic Windows bug - -## 0.7.1 (March 22, 2018) - -IMPROVEMENTS: - - - glide -> dep - -BUG FIXES: - - - [common] Fix panic in NewBitArray for negative bits - - [common] Fix and simplify WriteFileAtomic so it cleans up properly - -## 0.7.0 (February 20, 2018) - -BREAKING: - - - [db] Major API upgrade. See `db/types.go`. - - [common] added `Quit() <-chan struct{}` to Service interface. - The returned channel is closed when service is stopped. - - [common] Remove HTTP functions - - [common] Heap.Push takes an `int`, new Heap.PushComparable takes the comparable. - - [logger] Removed. Use `log` - - [merkle] Major API updade - uses cmn.KVPairs. - - [cli] WriteDemoConfig -> WriteConfigValues - - [all] Remove go-wire dependency! - -FEATURES: - - - [db] New FSDB that uses the filesystem directly - - [common] HexBytes - - [common] KVPair and KI64Pair (protobuf based key-value pair objects) - -IMPROVEMENTS: - - - [clist] add WaitChan() to CList, NextWaitChan() and PrevWaitChan() - to CElement. These can be used instead of blocking `*Wait()` methods - if you need to be able to send quit signal and not block forever - - [common] IsHex handles 0x-prefix - -BUG FIXES: - - - [common] BitArray check for nil arguments - - [common] Fix memory leak in RepeatTimer - -## 0.6.0 (December 29, 2017) - -BREAKING: - - [cli] remove --root - - [pubsub] add String() method to Query interface - -IMPROVEMENTS: - - [common] use a thread-safe and well seeded non-crypto rng - -BUG FIXES - - [clist] fix misuse of wait group - - [common] introduce Ticker interface and logicalTicker for better testing of timers - -## 0.5.0 (December 5, 2017) - -BREAKING: - - [common] replace Service#Start, Service#Stop first return value (bool) with an - error (ErrAlreadyStarted, ErrAlreadyStopped) - - [common] replace Service#Reset first return value (bool) with an error - - [process] removed - -FEATURES: - - [common] IntInSlice and StringInSlice functions - - [pubsub/query] introduce `Condition` struct, expose `Operator`, and add `query.Conditions()` - -## 0.4.1 (November 27, 2017) - -FEATURES: - - [common] `Keys()` method on `CMap` - -IMPROVEMENTS: - - [log] complex types now encoded as "%+v" by default if `String()` method is undefined (previously resulted in error) - - [log] logger logs its own errors - -BUG FIXES: - - [common] fixed `Kill()` to build on Windows (Windows does not have `syscall.Kill`) - -## 0.4.0 (October 26, 2017) - -BREAKING: - - [common] GoPath is now a function - - [db] `DB` and `Iterator` interfaces have new methods to better support iteration - -FEATURES: - - [autofile] `Read([]byte)` and `Write([]byte)` methods on `Group` to support binary WAL - - [common] `Kill()` sends SIGTERM to the current process - -IMPROVEMENTS: - - comments and linting - -BUG FIXES: - - [events] fix allocation error prefixing cache with 1000 empty events - -## 0.3.2 (October 2, 2017) - -BUG FIXES: - -- [autofile] fix AutoFile.Sync() to open file if it's been closed -- [db] fix MemDb.Close() to not empty the database (ie. its just a noop) - - -## 0.3.1 (September 22, 2017) - -BUG FIXES: - -- [common] fix WriteFileAtomic to not use /tmp, which can be on another device - -## 0.3.0 (September 22, 2017) - -BREAKING CHANGES: - -- [log] logger functions no longer returns an error -- [common] NewBaseService takes the new logger -- [cli] RunCaptureWithArgs now captures stderr and stdout - - +func RunCaptureWithArgs(cmd Executable, args []string, env map[string]string) (stdout, stderr string, err error) - - -func RunCaptureWithArgs(cmd Executable, args []string, env map[string]string) (output string, err error) - -FEATURES: - -- [common] various common HTTP functionality -- [common] Date range parsing from string (ex. "2015-12-31:2017-12-31") -- [common] ProtocolAndAddress function -- [pubsub] New package for publish-subscribe with more advanced filtering - -BUG FIXES: - -- [common] fix atomicity of WriteFileAtomic by calling fsync -- [db] fix memDb iteration index out of range -- [autofile] fix Flush by calling fsync - -## 0.2.2 (June 16, 2017) - -FEATURES: - -- [common] IsHex and StripHex for handling `0x` prefixed hex strings -- [log] NewTracingLogger returns a logger that output error traces, ala `github.com/pkg/errors` - -IMPROVEMENTS: - -- [cli] Error handling for tests -- [cli] Support dashes in ENV variables - -BUG FIXES: - -- [flowrate] Fix non-deterministic test failures - -## 0.2.1 (June 2, 2017) - -FEATURES: - -- [cli] Log level parsing moved here from tendermint repo - -## 0.2.0 (May 18, 2017) - -BREAKING CHANGES: - -- [common] NewBaseService takes the new logger - - -FEATURES: - -- [cli] New library to standardize building command line tools -- [log] New logging library - -BUG FIXES: - -- [autofile] Close file before rotating - -## 0.1.0 (May 1, 2017) - -Initial release, combines what were previously independent repos: - -- go-autofile -- go-clist -- go-common -- go-db -- go-events -- go-flowrate -- go-logger -- go-merkle -- go-process - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/cli/setup.go b/libs/cli/setup.go index e4955dcf4..521695bdb 100644 --- a/libs/cli/setup.go +++ b/libs/cli/setup.go @@ -24,7 +24,7 @@ type Executable interface { Execute() error } -// PrepareBaseCmd is meant for tendermint and other servers +// PrepareBaseCmd is meant for CometBFT and other servers func PrepareBaseCmd(cmd *cobra.Command, envPrefix, defaultHome string) Executor { cobra.OnInitialize(func() { initEnv(envPrefix) }) cmd.PersistentFlags().StringP(HomeFlag, "", defaultHome, "directory for config and data") diff --git a/libs/events/Makefile b/libs/events/Makefile index 696aafff1..efc79277a 100644 --- a/libs/events/Makefile +++ b/libs/events/Makefile @@ -1,5 +1,5 @@ .PHONY: docs -REPO:=github.com/tendermint/tendermint/libs/events +REPO:=github.com/cometbft/cometbft/libs/events docs: @go get github.com/davecheney/godoc2md diff --git a/libs/events/README.md b/libs/events/README.md index 9c4d7dc55..f64c11187 100644 --- a/libs/events/README.md +++ b/libs/events/README.md @@ -2,7 +2,7 @@ # events -`import "github.com/tendermint/tendermint/libs/events"` +`import "github.com/cometbft/cometbft/libs/events"` * [Overview](#pkg-overview) * [Index](#pkg-index) @@ -27,7 +27,7 @@ Pub-Sub in go with event caching ### Package files -[event_cache.go](/src/github.com/tendermint/tendermint/libs/events/event_cache.go) [events.go](/src/github.com/tendermint/tendermint/libs/events/events.go) +[event_cache.go](/src/github.com/cometbft/cometbft/libs/events/event_cache.go) [events.go](/src/github.com/cometbft/cometbft/libs/events/events.go) @@ -107,9 +107,6 @@ type EventData interface { } ``` -Generic event data can be typed and registered with tendermint/go-amino -via concrete implementation of this interface - diff --git a/libs/json/doc.go b/libs/json/doc.go index 1b92c0db6..a4fb461db 100644 --- a/libs/json/doc.go +++ b/libs/json/doc.go @@ -6,7 +6,7 @@ // JSON tags (e.g. `json:"name,omitempty"`) are supported in the same way as encoding/json, as is // custom marshaling overrides via the json.Marshaler and json.Unmarshaler interfaces. // -// Note that not all JSON emitted by Tendermint is generated by this library; some is generated by +// Note that not all JSON emitted by CometBFT is generated by this library; some is generated by // encoding/json instead, and kept like that for backwards compatibility. // // Encoding of numbers uses strings for 64-bit integers (including unspecified ints), to improve diff --git a/libs/log/logger.go b/libs/log/logger.go index 34aca8af5..22ed68f1a 100644 --- a/libs/log/logger.go +++ b/libs/log/logger.go @@ -6,7 +6,7 @@ import ( kitlog "github.com/go-kit/log" ) -// Logger is what any Tendermint library should take. +// Logger is what any CometBFT library should take. type Logger interface { Debug(msg string, keyvals ...interface{}) Info(msg string, keyvals ...interface{}) diff --git a/libs/log/tmfmt_logger.go b/libs/log/tmfmt_logger.go index 492c1c12e..1d8cb80aa 100644 --- a/libs/log/tmfmt_logger.go +++ b/libs/log/tmfmt_logger.go @@ -37,7 +37,7 @@ type tmfmtLogger struct { } // NewTMFmtLogger returns a logger that encodes keyvals to the Writer in -// Tendermint custom format. Note complex types (structs, maps, slices) +// CometBFT custom format. Note complex types (structs, maps, slices) // formatted as "%+v". // // Each log event produces no more than one call to w.Write. @@ -95,7 +95,7 @@ func (l tmfmtLogger) Log(keyvals ...interface{}) error { } - // Form a custom Tendermint line + // Form a custom CometBFT line // // Example: // D[2016-05-02|11:06:44.322] Stopping AddrBook (ignoring: already stopped) diff --git a/libs/pubsub/query/Makefile b/libs/pubsub/query/Makefile index e08800817..a91ed2139 100644 --- a/libs/pubsub/query/Makefile +++ b/libs/pubsub/query/Makefile @@ -1,7 +1,7 @@ fuzzy_test: go get -u -v github.com/dvyukov/go-fuzz/go-fuzz go get -u -v github.com/dvyukov/go-fuzz/go-fuzz-build - go-fuzz-build github.com/tendermint/tendermint/libs/pubsub/query/fuzz_test + go-fuzz-build github.com/cometbft/cometbft/libs/pubsub/query/fuzz_test go-fuzz -bin=./fuzz_test-fuzz.zip -workdir=./fuzz_test/output .PHONY: fuzzy_test diff --git a/light/detector.go b/light/detector.go index feec90eb1..162a0e0d3 100644 --- a/light/detector.go +++ b/light/detector.go @@ -13,7 +13,7 @@ import ( // The detector component of the light client detects and handles attacks on the light client. // More info here: -// tendermint/docs/architecture/adr-047-handling-evidence-from-light-client.md +// cometbft/docs/architecture/adr-047-handling-evidence-from-light-client.md // detectDivergence is a second wall of defense for the light client. // diff --git a/light/doc.go b/light/doc.go index d06ee9211..d77fa2955 100644 --- a/light/doc.go +++ b/light/doc.go @@ -5,11 +5,11 @@ The concept of light clients was introduced in the Bitcoin white paper. It describes a watcher of distributed consensus process that only validates the consensus algorithm and not the state machine transactions within. -Tendermint light clients allow bandwidth & compute-constrained devices, such as +CometBFT light clients allow bandwidth & compute-constrained devices, such as smartphones, low-power embedded chips, or other blockchains to efficiently -verify the consensus of a Tendermint blockchain. This forms the basis of safe +verify the consensus of a CometBFT blockchain. This forms the basis of safe and efficient state synchronization for new network nodes and inter-blockchain -communication (where a light client of one Tendermint instance runs in another +communication (where a light client of one CometBFT instance runs in another chain's state machine). In a network that is expected to reliably punish validators for misbehavior by @@ -28,7 +28,7 @@ fork the network at some point in its prior history. See Vitalik's post at [Proof of Stake: How I Learned to Love Weak Subjectivity](https://blog.ethereum.org/2014/11/25/proof-stake-learned-love-weak-subjectivity/). -NOTE: Tendermint provides a somewhat different (stronger) light client model +NOTE: CometBFT provides a somewhat different (stronger) light client model than Bitcoin under eclipse, since the eclipsing node(s) can only fool the light client if they have two-thirds of the private keys from the last root-of-trust. @@ -94,7 +94,7 @@ Check out other examples in example_test.go ## 2. Pure functions to verify a new header (see verifier.go) Verify function verifies a new header against some trusted header. See -https://github.com/cometbft/cometbft/blob/v0.37.x/spec/consensus/light-client/verification.md +https://github.com/cometbft/cometbft/blob/v0.37.x/spec/light-client/verification/README.md for details. There are two methods of verification: sequential and bisection @@ -111,14 +111,14 @@ refer to docs/imgs/light_client_bisection_alg.png ## 3. Secure RPC proxy -Tendermint RPC exposes a lot of info, but a malicious node could return any +CometBFT RPC exposes a lot of info, but a malicious node could return any data it wants to queries, or even to block headers, even making up fake signatures from non-existent validators to justify it. Secure RPC proxy serves as a wrapper, which verifies all the headers, using a light client connected to some other node. See -https://docs.tendermint.com/v0.37/tendermint-core/light-client-protocol.html +https://docs.cometbft.com/v0.37/core/light-client.html for usage example. Or see https://github.com/cometbft/cometbft/tree/v0.37.x/spec/consensus/light-client diff --git a/light/example_test.go b/light/example_test.go index e6bfcf407..f5cf1b879 100644 --- a/light/example_test.go +++ b/light/example_test.go @@ -21,7 +21,7 @@ import ( // Automatically getting new headers and verifying them. func ExampleClient_Update() { - // give Tendermint time to generate some blocks + // give CometBFT time to generate some blocks time.Sleep(5 * time.Second) dbDir, err := os.MkdirTemp("", "light-client-example") @@ -89,7 +89,7 @@ func ExampleClient_Update() { // Manually getting light blocks and verifying them. func ExampleClient_VerifyLightBlockAtHeight() { - // give Tendermint time to generate some blocks + // give CometBFT time to generate some blocks time.Sleep(5 * time.Second) dbDir, err := os.MkdirTemp("", "light-client-example") @@ -155,7 +155,7 @@ func ExampleClient_VerifyLightBlockAtHeight() { } func TestMain(m *testing.M) { - // start a tendermint node (and kvstore) in the background to test against + // start a CometBFT node (and kvstore) in the background to test against app := kvstore.NewApplication() node := rpctest.StartTendermint(app, rpctest.SuppressStdout) diff --git a/mempool/mempool.go b/mempool/mempool.go index 8a9ffa698..244b6d9aa 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -161,7 +161,7 @@ func (e ErrTxTooLarge) Error() string { return fmt.Sprintf("Tx too large. Max size is %d, but got %d", e.Max, e.Actual) } -// ErrMempoolIsFull defines an error where Tendermint and the application cannot +// ErrMempoolIsFull defines an error where CometBFT and the application cannot // handle that much load. type ErrMempoolIsFull struct { NumTxs int diff --git a/networks/local/README.md b/networks/local/README.md index 5084688f0..bb1e8a991 100644 --- a/networks/local/README.md +++ b/networks/local/README.md @@ -1,3 +1,3 @@ # Local Cluster with Docker Compose -See the [docs](https://docs.tendermint.com/v0.37/networks/docker-compose.html). +See the [docs](https://docs.cometbft.com/v0.37/networks/docker-compose.html). diff --git a/node/node.go b/node/node.go index 8362afd93..f2a2034f4 100644 --- a/node/node.go +++ b/node/node.go @@ -92,7 +92,7 @@ func DefaultGenesisDocProviderFunc(config *cfg.Config) GenesisDocProvider { // Provider takes a config and a logger and returns a ready to go Node. type Provider func(*cfg.Config, log.Logger) (*Node, error) -// DefaultNewNode returns a Tendermint node with default settings for the +// DefaultNewNode returns a CometBFT node with default settings for the // PrivValidator, ClientCreator, GenesisDoc, and DBProvider. // It implements NodeProvider. func DefaultNewNode(config *cfg.Config, logger log.Logger) (*Node, error) { @@ -190,7 +190,7 @@ func StateProvider(stateProvider statesync.StateProvider) Option { //------------------------------------------------------------------------------ -// Node is the highest level interface to a full Tendermint node. +// Node is the highest level interface to a full CometBFT node. // It includes all configuration information and running services. type Node struct { service.BaseService @@ -701,7 +701,7 @@ func startStateSync(ssR *statesync.Reactor, bcR blockSyncReactor, conR *cs.React return nil } -// NewNode returns a new, ready to go, Tendermint Node. +// NewNode returns a new, ready to go, CometBFT Node. func NewNode(config *cfg.Config, privValidator types.PrivValidator, nodeKey *p2p.NodeKey, @@ -772,7 +772,7 @@ func NewNode(config *cfg.Config, } // Create the handshaker, which calls RequestInfo, sets the AppVersion on the state, - // and replays any blocks as necessary to sync tendermint with the app. + // and replays any blocks as necessary to sync CometBFT with the app. consensusLogger := logger.With("module", "consensus") if !stateSync { if err := doHandshake(stateStore, state, blockStore, genDoc, eventBus, proxyApp, consensusLogger); err != nil { diff --git a/p2p/README.md b/p2p/README.md index cbbcb9d0b..99903f405 100644 --- a/p2p/README.md +++ b/p2p/README.md @@ -4,7 +4,7 @@ The p2p package provides an abstraction around peer-to-peer communication. Docs: -- [Connection](https://github.com/tendermint/tendermint/blob/v0.37.x/spec/p2p/connection.md) for details on how connections and multiplexing work -- [Peer](https://github.com/tendermint/tendermint/blob/v0.37.x/spec/p2p/node.md) for details on peer ID, handshakes, and peer exchange -- [Node](https://github.com/tendermint/tendermint/blob/v0.37.x/spec/p2p/node.md) for details about different types of nodes and how they should work -- [Config](https://github.com/tendermint/tendermint/blob/v0.37.x/spec/p2p/config.md) for details on some config option +- [Connection](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/p2p/connection.md) for details on how connections and multiplexing work +- [Peer](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/p2p/node.md) for details on peer ID, handshakes, and peer exchange +- [Node](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/p2p/node.md) for details about different types of nodes and how they should work +- [Config](https://github.com/cometbft/cometbft/blob/v0.37.x/spec/p2p/config.md) for details on some config option diff --git a/p2p/netaddress.go b/p2p/netaddress.go index 96ef58199..fef9afd16 100644 --- a/p2p/netaddress.go +++ b/p2p/netaddress.go @@ -1,4 +1,4 @@ -// Modified for Tendermint +// Modified for CometBFT // Originally Copyright (c) 2013-2014 Conformal Systems LLC. // https://github.com/conformal/btcd/blob/master/LICENSE diff --git a/p2p/node_info.go b/p2p/node_info.go index 4b75df56d..59cf885cb 100644 --- a/p2p/node_info.go +++ b/p2p/node_info.go @@ -75,7 +75,7 @@ func NewProtocolVersion(p2p, block, app uint64) ProtocolVersion { var _ NodeInfo = DefaultNodeInfo{} // DefaultNodeInfo is the basic node information exchanged -// between two peers during the Tendermint P2P handshake. +// between two peers during the CometBFT P2P handshake. type DefaultNodeInfo struct { ProtocolVersion ProtocolVersion `json:"protocol_version"` diff --git a/p2p/pex/addrbook.go b/p2p/pex/addrbook.go index 8a26ad399..857a6a063 100644 --- a/p2p/pex/addrbook.go +++ b/p2p/pex/addrbook.go @@ -1,4 +1,4 @@ -// Modified for Tendermint +// Modified for CometBFT // Originally Copyright (c) 2013-2014 Conformal Systems LLC. // https://github.com/conformal/btcd/blob/master/LICENSE diff --git a/p2p/trust/metric.go b/p2p/trust/metric.go index d977398d2..4f6dcfafb 100644 --- a/p2p/trust/metric.go +++ b/p2p/trust/metric.go @@ -1,6 +1,3 @@ -// Copyright 2017 Tendermint. All rights reserved. -// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. - package trust import ( diff --git a/p2p/trust/store.go b/p2p/trust/store.go index 728ddb9e4..0f2c948ca 100644 --- a/p2p/trust/store.go +++ b/p2p/trust/store.go @@ -1,6 +1,3 @@ -// Copyright 2017 Tendermint. All rights reserved. -// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. - package trust import ( diff --git a/p2p/trust/store_test.go b/p2p/trust/store_test.go index d0f1367ab..ad5fbd593 100644 --- a/p2p/trust/store_test.go +++ b/p2p/trust/store_test.go @@ -1,6 +1,3 @@ -// Copyright 2017 Tendermint. All rights reserved. -// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. - package trust import ( diff --git a/p2p/trust/ticker.go b/p2p/trust/ticker.go index 3f0f30919..f83148f1b 100644 --- a/p2p/trust/ticker.go +++ b/p2p/trust/ticker.go @@ -1,6 +1,3 @@ -// Copyright 2017 Tendermint. All rights reserved. -// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. - package trust import ( diff --git a/p2p/upnp/probe.go b/p2p/upnp/probe.go index 00192050e..b40d92e65 100644 --- a/p2p/upnp/probe.go +++ b/p2p/upnp/probe.go @@ -26,7 +26,7 @@ func makeUPNPListener(intPort int, extPort int, logger log.Logger) (NAT, net.Lis } logger.Info("make upnp listener", "msg", log.NewLazySprintf("External address: %v", ext)) - port, err := nat.AddPortMapping("tcp", extPort, intPort, "Tendermint UPnP Probe", 0) + port, err := nat.AddPortMapping("tcp", extPort, intPort, "CometBFT UPnP Probe", 0) if err != nil { return nat, nil, ext, fmt.Errorf("port mapping error: %v", err) } diff --git a/privval/socket_listeners_test.go b/privval/socket_listeners_test.go index 0af884386..28d94300d 100644 --- a/privval/socket_listeners_test.go +++ b/privval/socket_listeners_test.go @@ -28,7 +28,7 @@ type listenerTestCase struct { // testUnixAddr will attempt to obtain a platform-independent temporary file // name for a Unix socket func testUnixAddr() (string, error) { - f, err := os.CreateTemp("", "tendermint-privval-test-*") + f, err := os.CreateTemp("", "cometbft-privval-test-*") if err != nil { return "", err } diff --git a/proto/README.md b/proto/README.md index ebecd82d1..0ee853666 100644 --- a/proto/README.md +++ b/proto/README.md @@ -9,15 +9,15 @@ The `.proto` files within this section are core to the protocol and updates must ### Steps 1. Make an issue with the proposed change. - - Within in the issue members from both the Tendermint-go and Tendermint-rs team will leave comments. If there is not consensus on the change an [RFC](../rfc/README.md) may be requested. + - Within in the issue members from both the CometBFT and Tendermint-rs team will leave comments. If there is not consensus on the change an [RFC](../docs/rfc/README.md) may be requested. 1a. Submission of an RFC as a pull request should be made to facilitate further discussion. 1b. Merge the RFC. -2. Make the necessary changes to the `.proto` file(s), [core data structures](../spec/core/data_structures.md) and/or [ABCI protocol](../spec/abci/apps.md). -3. Open issues within Tendermint-go and Tendermint-rs repos. This is used to notify the teams that a change occurred in the spec. +2. Make the necessary changes to the `.proto` file(s), [core data structures](../spec/core/data_structures.md) and/or [ABCI protocol](../spec/abci). +3. Open issues within CometBFT and Tendermint-rs repos. This is used to notify the teams that a change occurred in the spec. 1. Tag the issue with a spec version label. This will notify the team the changed has been made on master but has not entered a release. ### Versioning -The spec repo aims to be versioned. Once it has been versioned, updates to the protobuf files will live on master. After a certain amount of time, decided on by Tendermint-go and Tendermint-rs team leads, a release will be made on the spec repo. The spec may contain minor releases as well, depending on the implementation these changes may lead to a breaking change. If so, the implementation team should open an issue within the spec repo requiring a major release of the spec. +The spec repo aims to be versioned. Once it has been versioned, updates to the protobuf files will live on master. After a certain amount of time, decided on by CometBFT and tendermint-rs team leads, a release will be made on the spec repo. The spec may contain minor releases as well, depending on the implementation these changes may lead to a breaking change. If so, the implementation team should open an issue within the spec repo requiring a major release of the spec. If the steps above were followed each implementation should have issues tagged with a spec change label. Once all issues have been completed the team should signify their readiness for release. diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index f9373fcf0..cf9927d79 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -233,7 +233,7 @@ message ResponseCheckTx { string sender = 9; int64 priority = 10; - // mempool_error is set by Tendermint. + // mempool_error is set by CometBFT. // ABCI applictions creating a ResponseCheckTX should not set mempool_error. string mempool_error = 11; } diff --git a/proto/tendermint/crypto/keys.pb.go b/proto/tendermint/crypto/keys.pb.go index 26446f6e9..0edb2269f 100644 --- a/proto/tendermint/crypto/keys.pb.go +++ b/proto/tendermint/crypto/keys.pb.go @@ -24,7 +24,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// PublicKey defines the keys available for use with Tendermint Validators +// PublicKey defines the keys available for use with Validators type PublicKey struct { // Types that are valid to be assigned to Sum: // diff --git a/proto/tendermint/crypto/keys.proto b/proto/tendermint/crypto/keys.proto index a5d3ce85d..8fa192fa4 100644 --- a/proto/tendermint/crypto/keys.proto +++ b/proto/tendermint/crypto/keys.proto @@ -5,7 +5,7 @@ option go_package = "github.com/cometbft/cometbft/proto/tendermint/crypto"; import "gogoproto/gogo.proto"; -// PublicKey defines the keys available for use with Tendermint Validators +// PublicKey defines the keys available for use with Validators message PublicKey { option (gogoproto.compare) = true; option (gogoproto.equal) = true; diff --git a/proto/tendermint/types/types.pb.go b/proto/tendermint/types/types.pb.go index 74cecc4c4..ce6844bad 100644 --- a/proto/tendermint/types/types.pb.go +++ b/proto/tendermint/types/types.pb.go @@ -261,7 +261,7 @@ func (m *BlockID) GetPartSetHeader() PartSetHeader { return PartSetHeader{} } -// Header defines the structure of a Tendermint block header. +// Header defines the structure of a block header. type Header struct { // basic block info Version version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 6af25b7a2..425f041da 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -54,7 +54,7 @@ message BlockID { // -------------------------------- -// Header defines the structure of a Tendermint block header. +// Header defines the structure of a block header. message Header { // basic block info tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; diff --git a/proxy/multi_app_conn.go b/proxy/multi_app_conn.go index d3e523d2a..9117c3046 100644 --- a/proxy/multi_app_conn.go +++ b/proxy/multi_app_conn.go @@ -16,7 +16,7 @@ const ( connSnapshot = "snapshot" ) -// AppConns is the Tendermint's interface to the application that consists of +// AppConns is the CometBFT's interface to the application that consists of // multiple connections. type AppConns interface { service.Service @@ -116,7 +116,7 @@ func (app *multiAppConn) OnStart() error { app.consensusConnClient = c app.consensusConn = NewAppConnConsensus(c, app.metrics) - // Kill Tendermint if the ABCI application crashes. + // Kill CometBFT if the ABCI application crashes. go app.killTMOnClientError() return nil @@ -129,7 +129,7 @@ func (app *multiAppConn) OnStop() { func (app *multiAppConn) killTMOnClientError() { killFn := func(conn string, err error, logger cmtlog.Logger) { logger.Error( - fmt.Sprintf("%s connection terminated. Did the application crash? Please restart tendermint", conn), + fmt.Sprintf("%s connection terminated. Did the application crash? Please restart CometBFT", conn), "err", err) killErr := cmtos.Kill() if killErr != nil { diff --git a/rpc/client/examples_test.go b/rpc/client/examples_test.go index d0554e2b2..3074b5780 100644 --- a/rpc/client/examples_test.go +++ b/rpc/client/examples_test.go @@ -13,7 +13,7 @@ import ( ) func ExampleHTTP_simple() { - // Start a tendermint node (and kvstore) in the background to test against + // Start a CometBFT node (and kvstore) in the background to test against app := kvstore.NewApplication() node := rpctest.StartTendermint(app, rpctest.SuppressStdout, rpctest.RecreateConfig) defer rpctest.StopTendermint(node) @@ -66,7 +66,7 @@ func ExampleHTTP_simple() { } func ExampleHTTP_batching() { - // Start a tendermint node (and kvstore) in the background to test against + // Start a CometBFT node (and kvstore) in the background to test against app := kvstore.NewApplication() node := rpctest.StartTendermint(app, rpctest.SuppressStdout, rpctest.RecreateConfig) diff --git a/rpc/client/http/http.go b/rpc/client/http/http.go index aeedaa084..30a31f77b 100644 --- a/rpc/client/http/http.go +++ b/rpc/client/http/http.go @@ -20,16 +20,16 @@ import ( ) /* -HTTP is a Client implementation that communicates with a Tendermint node over +HTTP is a Client implementation that communicates with a CometBFT node over JSON RPC and WebSockets. This is the main implementation you probably want to use in production code. -There are other implementations when calling the Tendermint node in-process +There are other implementations when calling the CometBFT node in-process (Local), or when you want to mock out the server for test code (mock). -You can subscribe for any event published by Tendermint using Subscribe method. +You can subscribe for any event published by CometBFT using Subscribe method. Note delivery is best-effort. If you don't read events fast enough or network is -slow, Tendermint might cancel the subscription. The client will attempt to +slow, CometBFT might cancel the subscription. The client will attempt to resubscribe (you don't need to do anything). It will keep trying every second indefinitely until successful. @@ -672,7 +672,7 @@ func (w *WSEvents) Subscribe(ctx context.Context, subscriber, query string, outc := make(chan ctypes.ResultEvent, outCap) w.mtx.Lock() - // subscriber param is ignored because Tendermint will override it with + // subscriber param is ignored because CometBFT will override it with // remote IP anyway. w.subscriptions[query] = outc w.mtx.Unlock() @@ -753,11 +753,11 @@ func (w *WSEvents) eventListener() { if resp.Error != nil { w.Logger.Error("WS error", "err", resp.Error.Error()) // Error can be ErrAlreadySubscribed or max client (subscriptions per - // client) reached or Tendermint exited. + // client) reached or CometBFT exited. // We can ignore ErrAlreadySubscribed, but need to retry in other // cases. if !isErrAlreadySubscribed(resp.Error) { - // Resubscribe after 1 second to give Tendermint time to restart (if + // Resubscribe after 1 second to give CometBFT time to restart (if // crashed). w.redoSubscriptionsAfter(1 * time.Second) } diff --git a/rpc/client/interface.go b/rpc/client/interface.go index 28739bee0..7e0895a48 100644 --- a/rpc/client/interface.go +++ b/rpc/client/interface.go @@ -2,10 +2,10 @@ package client /* The client package provides a general purpose interface (Client) for connecting -to a tendermint node, as well as higher-level functionality. +to a CometBFT node, as well as higher-level functionality. The main implementation for production code is client.HTTP, which -connects via http to the jsonrpc interface of the tendermint node. +connects via http to the jsonrpc interface of the CometBFT node. For connecting to a node running in the same process (eg. when compiling the abci app in the same process), you can use the client.Local @@ -116,7 +116,7 @@ type NetworkClient interface { } // EventsClient is reactive, you can subscribe to any message, given the proper -// string. see tendermint/types/events.go +// string. see cometbft/types/events.go type EventsClient interface { // Subscribe subscribes given subscriber to query. Returns a channel with // cap=1 onto which events are published. An error is returned if it fails to diff --git a/rpc/client/local/local.go b/rpc/client/local/local.go index 4569b3482..3c2b7602e 100644 --- a/rpc/client/local/local.go +++ b/rpc/client/local/local.go @@ -25,14 +25,14 @@ This implementation is useful for: * Running tests against a node in-process without the overhead of going through an http server -* Communication between an ABCI app and Tendermint core when they +* Communication between an ABCI app and CometBFT when they are compiled in process. For real clients, you probably want to use client.HTTP. For more powerful control during testing, you probably want the "client/mock" package. -You can subscribe for any event published by Tendermint using Subscribe method. -Note delivery is best-effort. If you don't read events fast enough, Tendermint +You can subscribe for any event published by CometBFT using Subscribe method. +Note delivery is best-effort. If you don't read events fast enough, CometBFT might cancel the subscription. The client will attempt to resubscribe (you don't need to do anything). It will keep trying indefinitely with exponential backoff (10ms -> 20ms -> 40ms) until successful. diff --git a/rpc/client/main_test.go b/rpc/client/main_test.go index 15e118d00..93733537a 100644 --- a/rpc/client/main_test.go +++ b/rpc/client/main_test.go @@ -12,7 +12,7 @@ import ( var node *nm.Node func TestMain(m *testing.M) { - // start a tendermint node (and kvstore) in the background to test against + // start a CometBFT node (and kvstore) in the background to test against dir, err := os.MkdirTemp("/tmp", "rpc-client-test") if err != nil { panic(err) diff --git a/rpc/client/mock/abci.go b/rpc/client/mock/abci.go index c76dd17bb..59a257d43 100644 --- a/rpc/client/mock/abci.go +++ b/rpc/client/mock/abci.go @@ -13,7 +13,7 @@ import ( // ABCIApp will send all abci related request to the named app, // so you can test app behavior from a client without needing -// an entire tendermint node +// an entire CometBFT node type ABCIApp struct { App abci.Application } @@ -92,7 +92,7 @@ func (a ABCIApp) BroadcastTxSync(ctx context.Context, tx types.Tx) (*ctypes.Resu // ABCIMock will send all abci related request to the named app, // so you can test app behavior from a client without needing -// an entire tendermint node +// an entire CometBFT node type ABCIMock struct { Info Call Query Call diff --git a/rpc/client/mock/client.go b/rpc/client/mock/client.go index b020c7d6e..f88577573 100644 --- a/rpc/client/mock/client.go +++ b/rpc/client/mock/client.go @@ -10,7 +10,7 @@ the server response you want to mock (eg. error handling), or if you just want to record the calls to verify in your tests. For real clients, you probably want the "http" package. If you -want to directly call a tendermint node in process, you can use the +want to directly call a CometBFT node in process, you can use the "local" package. */ diff --git a/rpc/core/README.md b/rpc/core/README.md index f62d2dbf4..be9faf5a4 100644 --- a/rpc/core/README.md +++ b/rpc/core/README.md @@ -1,4 +1,4 @@ -# Tendermint RPC +# CometBFT RPC ## Pagination @@ -8,11 +8,11 @@ custom page size up to 100 with the ?per_page parameter. ## Subscribing to events -The user can subscribe to events emitted by Tendermint, using `/subscribe`. If +The user can subscribe to events emitted by CometBFT, using `/subscribe`. If the maximum number of clients is reached or the client has too many subscriptions, an error will be returned. The subscription timeout is 5 sec. Each subscription has a buffer to accommodate short bursts of events or some slowness in clients. If the buffer gets full, the subscription will be canceled -("client is not pulling messages fast enough"). If Tendermint exits, all -subscriptions are canceled ("Tendermint exited"). The user can unsubscribe +("client is not pulling messages fast enough"). If CometBFT exits, all +subscriptions are canceled ("CometBFT exited"). The user can unsubscribe using either `/unsubscribe` or `/unsubscribe_all`. diff --git a/rpc/core/abci.go b/rpc/core/abci.go index a497ece5a..e56c4ecf4 100644 --- a/rpc/core/abci.go +++ b/rpc/core/abci.go @@ -9,7 +9,7 @@ import ( ) // ABCIQuery queries the application for some information. -// More: https://docs.tendermint.com/v0.37/rpc/#/ABCI/abci_query +// More: https://docs.cometbft.com/v0.37/rpc/#/ABCI/abci_query func ABCIQuery( ctx *rpctypes.Context, path string, @@ -31,7 +31,7 @@ func ABCIQuery( } // ABCIInfo gets some info about the application. -// More: https://docs.tendermint.com/v0.37/rpc/#/ABCI/abci_info +// More: https://docs.cometbft.com/v0.37/rpc/#/ABCI/abci_info func ABCIInfo(ctx *rpctypes.Context) (*ctypes.ResultABCIInfo, error) { resInfo, err := env.ProxyAppQuery.InfoSync(proxy.RequestInfo) if err != nil { diff --git a/rpc/core/blocks.go b/rpc/core/blocks.go index 178a9aeea..684395fb1 100644 --- a/rpc/core/blocks.go +++ b/rpc/core/blocks.go @@ -16,7 +16,7 @@ import ( // BlockchainInfo gets block headers for minHeight <= height <= maxHeight. // Block headers are returned in descending order (highest first). -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/blockchain +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/blockchain func BlockchainInfo(ctx *rpctypes.Context, minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error) { // maximum 20 block metas const limit int64 = 20 @@ -79,7 +79,7 @@ func filterMinMax(base, height, min, max, limit int64) (int64, int64, error) { // Header gets block header at a given height. // If no height is provided, it will fetch the latest header. -// More: https://docs.tendermint.com/master/rpc/#/Info/header +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/header func Header(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultHeader, error) { height, err := getHeight(env.BlockStore.Height(), heightPtr) if err != nil { @@ -95,7 +95,7 @@ func Header(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultHeader, erro } // HeaderByHash gets header by hash. -// More: https://docs.tendermint.com/master/rpc/#/Info/header_by_hash +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/header_by_hash func HeaderByHash(ctx *rpctypes.Context, hash bytes.HexBytes) (*ctypes.ResultHeader, error) { // N.B. The hash parameter is HexBytes so that the reflective parameter // decoding logic in the HTTP service will correctly translate from JSON. @@ -111,7 +111,7 @@ func HeaderByHash(ctx *rpctypes.Context, hash bytes.HexBytes) (*ctypes.ResultHea // Block gets block at a given height. // If no height is provided, it will fetch the latest block. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/block +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/block func Block(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlock, error) { height, err := getHeight(env.BlockStore.Height(), heightPtr) if err != nil { @@ -127,7 +127,7 @@ func Block(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlock, error) } // BlockByHash gets block by hash. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/block_by_hash +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/block_by_hash func BlockByHash(ctx *rpctypes.Context, hash []byte) (*ctypes.ResultBlock, error) { block := env.BlockStore.LoadBlockByHash(hash) if block == nil { @@ -140,7 +140,7 @@ func BlockByHash(ctx *rpctypes.Context, hash []byte) (*ctypes.ResultBlock, error // Commit gets block commit at a given height. // If no height is provided, it will fetch the commit for the latest block. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/commit +// More: https://docs.cometbft.com/main/rpc/#/Info/commit func Commit(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultCommit, error) { height, err := getHeight(env.BlockStore.Height(), heightPtr) if err != nil { @@ -171,7 +171,7 @@ func Commit(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultCommit, erro // Results are for the height of the block containing the txs. // Thus response.results.deliver_tx[5] is the results of executing // getBlock(h).Txs[5] -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/block_results +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/block_results func BlockResults(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlockResults, error) { height, err := getHeight(env.BlockStore.Height(), heightPtr) if err != nil { diff --git a/rpc/core/consensus.go b/rpc/core/consensus.go index c3636fd48..0b791faf4 100644 --- a/rpc/core/consensus.go +++ b/rpc/core/consensus.go @@ -14,7 +14,7 @@ import ( // validators are sorted by their voting power - this is the canonical order // for the validators in the set as used in computing their Merkle root. // -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/validators +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/validators func Validators(ctx *rpctypes.Context, heightPtr *int64, pagePtr, perPagePtr *int) (*ctypes.ResultValidators, error) { // The latest validator that we know is the NextValidator of the last block. height, err := getHeight(latestUncommittedHeight(), heightPtr) @@ -48,7 +48,7 @@ func Validators(ctx *rpctypes.Context, heightPtr *int64, pagePtr, perPagePtr *in // DumpConsensusState dumps consensus state. // UNSTABLE -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/dump_consensus_state +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/dump_consensus_state func DumpConsensusState(ctx *rpctypes.Context) (*ctypes.ResultDumpConsensusState, error) { // Get Peer consensus states. peers := env.P2PPeers.Peers().List() @@ -82,7 +82,7 @@ func DumpConsensusState(ctx *rpctypes.Context) (*ctypes.ResultDumpConsensusState // ConsensusState returns a concise summary of the consensus state. // UNSTABLE -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/consensus_state +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/consensus_state func ConsensusState(ctx *rpctypes.Context) (*ctypes.ResultConsensusState, error) { // Get self round state. bz, err := env.ConsensusState.GetRoundStateSimpleJSON() @@ -91,7 +91,7 @@ func ConsensusState(ctx *rpctypes.Context) (*ctypes.ResultConsensusState, error) // ConsensusParams gets the consensus parameters at the given block height. // If no height is provided, it will fetch the latest consensus params. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/consensus_params +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/consensus_params func ConsensusParams(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultConsensusParams, error) { // The latest consensus params that we know is the consensus params after the // last block. diff --git a/rpc/core/doc.go b/rpc/core/doc.go index 61291a6e0..56f052a1e 100644 --- a/rpc/core/doc.go +++ b/rpc/core/doc.go @@ -1,7 +1,7 @@ /* -Package core defines the Tendermint RPC endpoints. +Package core defines the CometBFT RPC endpoints. -Tendermint ships with its own JSONRPC library - +CometBFT ships with its own JSONRPC library - https://github.com/cometbft/cometbft/tree/v0.37.x/rpc/jsonrpc. ## Get the list diff --git a/rpc/core/events.go b/rpc/core/events.go index 10c0c0442..b320eb932 100644 --- a/rpc/core/events.go +++ b/rpc/core/events.go @@ -19,7 +19,7 @@ const ( ) // Subscribe for events via WebSocket. -// More: https://docs.tendermint.com/v0.37/rpc/#/Websocket/subscribe +// More: https://docs.cometbft.com/v0.37/rpc/#/Websocket/subscribe func Subscribe(ctx *rpctypes.Context, query string) (*ctypes.ResultSubscribe, error) { addr := ctx.RemoteAddr() @@ -80,7 +80,7 @@ func Subscribe(ctx *rpctypes.Context, query string) (*ctypes.ResultSubscribe, er if sub.Err() != cmtpubsub.ErrUnsubscribed { var reason string if sub.Err() == nil { - reason = "Tendermint exited" + reason = "CometBFT exited" } else { reason = sub.Err().Error() } @@ -102,7 +102,7 @@ func Subscribe(ctx *rpctypes.Context, query string) (*ctypes.ResultSubscribe, er } // Unsubscribe from events via WebSocket. -// More: https://docs.tendermint.com/v0.37/rpc/#/Websocket/unsubscribe +// More: https://docs.cometbft.com/v0.37/rpc/#/Websocket/unsubscribe func Unsubscribe(ctx *rpctypes.Context, query string) (*ctypes.ResultUnsubscribe, error) { addr := ctx.RemoteAddr() env.Logger.Info("Unsubscribe from query", "remote", addr, "query", query) @@ -118,7 +118,7 @@ func Unsubscribe(ctx *rpctypes.Context, query string) (*ctypes.ResultUnsubscribe } // UnsubscribeAll from all events via WebSocket. -// More: https://docs.tendermint.com/v0.37/rpc/#/Websocket/unsubscribe_all +// More: https://docs.cometbft.com/v0.37/rpc/#/Websocket/unsubscribe_all func UnsubscribeAll(ctx *rpctypes.Context) (*ctypes.ResultUnsubscribe, error) { addr := ctx.RemoteAddr() env.Logger.Info("Unsubscribe from all", "remote", addr) diff --git a/rpc/core/evidence.go b/rpc/core/evidence.go index 5f68152bf..d33754b62 100644 --- a/rpc/core/evidence.go +++ b/rpc/core/evidence.go @@ -10,7 +10,7 @@ import ( ) // BroadcastEvidence broadcasts evidence of the misbehavior. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/broadcast_evidence +// More: https://docs.cometbft.com/v0.37/rpc/#/Evidence/broadcast_evidence func BroadcastEvidence(ctx *rpctypes.Context, ev types.Evidence) (*ctypes.ResultBroadcastEvidence, error) { if ev == nil { return nil, errors.New("no evidence was provided") diff --git a/rpc/core/health.go b/rpc/core/health.go index 249b60574..71607dc43 100644 --- a/rpc/core/health.go +++ b/rpc/core/health.go @@ -7,7 +7,7 @@ import ( // Health gets node health. Returns empty result (200 OK) on success, no // response - in case of an error. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/health +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/health func Health(ctx *rpctypes.Context) (*ctypes.ResultHealth, error) { return &ctypes.ResultHealth{}, nil } diff --git a/rpc/core/mempool.go b/rpc/core/mempool.go index 636f3e291..6ea599b7e 100644 --- a/rpc/core/mempool.go +++ b/rpc/core/mempool.go @@ -14,11 +14,11 @@ import ( ) //----------------------------------------------------------------------------- -// NOTE: tx should be signed, but this is only checked at the app level (not by Tendermint!) +// NOTE: tx should be signed, but this is only checked at the app level (not by CometBFT!) // BroadcastTxAsync returns right away, with no response. Does not wait for // CheckTx nor DeliverTx results. -// More: https://docs.tendermint.com/v0.37/rpc/#/Tx/broadcast_tx_async +// More: https://docs.cometbft.com/v0.37/rpc/#/Tx/broadcast_tx_async func BroadcastTxAsync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error) { err := env.Mempool.CheckTx(tx, nil, mempl.TxInfo{}) if err != nil { @@ -29,7 +29,7 @@ func BroadcastTxAsync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadca // BroadcastTxSync returns with the response from CheckTx. Does not wait for // DeliverTx result. -// More: https://docs.tendermint.com/v0.37/rpc/#/Tx/broadcast_tx_sync +// More: https://docs.cometbft.com/v0.37/rpc/#/Tx/broadcast_tx_sync func BroadcastTxSync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error) { resCh := make(chan *abci.Response, 1) err := env.Mempool.CheckTx(tx, func(res *abci.Response) { @@ -58,7 +58,7 @@ func BroadcastTxSync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcas } // BroadcastTxCommit returns with the responses from CheckTx and DeliverTx. -// More: https://docs.tendermint.com/v0.37/rpc/#/Tx/broadcast_tx_commit +// More: https://docs.cometbft.com/v0.37/rpc/#/Tx/broadcast_tx_commit func BroadcastTxCommit(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) { subscriber := ctx.RemoteAddr() @@ -122,7 +122,7 @@ func BroadcastTxCommit(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadc case <-deliverTxSub.Cancelled(): var reason string if deliverTxSub.Err() == nil { - reason = "Tendermint exited" + reason = "CometBFT exited" } else { reason = deliverTxSub.Err().Error() } @@ -147,7 +147,7 @@ func BroadcastTxCommit(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadc // UnconfirmedTxs gets unconfirmed transactions (maximum ?limit entries) // including their number. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/unconfirmed_txs +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/unconfirmed_txs func UnconfirmedTxs(ctx *rpctypes.Context, limitPtr *int) (*ctypes.ResultUnconfirmedTxs, error) { // reuse per_page validator limit := validatePerPage(limitPtr) @@ -162,7 +162,7 @@ func UnconfirmedTxs(ctx *rpctypes.Context, limitPtr *int) (*ctypes.ResultUnconfi } // NumUnconfirmedTxs gets number of unconfirmed transactions. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/num_unconfirmed_txs +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/num_unconfirmed_txs func NumUnconfirmedTxs(ctx *rpctypes.Context) (*ctypes.ResultUnconfirmedTxs, error) { return &ctypes.ResultUnconfirmedTxs{ Count: env.Mempool.Size(), @@ -173,7 +173,7 @@ func NumUnconfirmedTxs(ctx *rpctypes.Context) (*ctypes.ResultUnconfirmedTxs, err // CheckTx checks the transaction without executing it. The transaction won't // be added to the mempool either. -// More: https://docs.tendermint.com/v0.37/rpc/#/Tx/check_tx +// More: https://docs.cometbft.com/v0.37/rpc/#/Tx/check_tx func CheckTx(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultCheckTx, error) { res, err := env.ProxyAppMempool.CheckTxSync(abci.RequestCheckTx{Tx: tx}) if err != nil { diff --git a/rpc/core/net.go b/rpc/core/net.go index 42b7af7fa..89d97ed2a 100644 --- a/rpc/core/net.go +++ b/rpc/core/net.go @@ -11,7 +11,7 @@ import ( ) // NetInfo returns network info. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/net_info +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/net_info func NetInfo(ctx *rpctypes.Context) (*ctypes.ResultNetInfo, error) { peersList := env.P2PPeers.Peers().List() peers := make([]ctypes.Peer, 0, len(peersList)) @@ -93,7 +93,7 @@ func UnsafeDialPeers(ctx *rpctypes.Context, peers []string, persistent, uncondit } // Genesis returns genesis file. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/genesis +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/genesis func Genesis(ctx *rpctypes.Context) (*ctypes.ResultGenesis, error) { if len(env.genChunks) > 1 { return nil, errors.New("genesis response is large, please use the genesis_chunked API instead") diff --git a/rpc/core/status.go b/rpc/core/status.go index 912227d5c..0431b69b6 100644 --- a/rpc/core/status.go +++ b/rpc/core/status.go @@ -10,9 +10,9 @@ import ( "github.com/cometbft/cometbft/types" ) -// Status returns Tendermint status including node info, pubkey, latest block +// Status returns CometBFT status including node info, pubkey, latest block // hash, app hash, block height and time. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/status +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/status func Status(ctx *rpctypes.Context) (*ctypes.ResultStatus, error) { var ( earliestBlockHeight int64 diff --git a/rpc/core/tx.go b/rpc/core/tx.go index 9244d4ae1..6fbc7b6ee 100644 --- a/rpc/core/tx.go +++ b/rpc/core/tx.go @@ -16,7 +16,7 @@ import ( // Tx allows you to query the transaction results. `nil` could mean the // transaction is in the mempool, invalidated, or was not sent in the first // place. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/tx +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/tx func Tx(ctx *rpctypes.Context, hash []byte, prove bool) (*ctypes.ResultTx, error) { // if index is disabled, return error if _, ok := env.TxIndexer.(*null.TxIndex); ok { @@ -50,7 +50,7 @@ func Tx(ctx *rpctypes.Context, hash []byte, prove bool) (*ctypes.ResultTx, error // TxSearch allows you to query for multiple transactions results. It returns a // list of transactions (maximum ?per_page entries) and the total count. -// More: https://docs.tendermint.com/v0.37/rpc/#/Info/tx_search +// More: https://docs.cometbft.com/v0.37/rpc/#/Info/tx_search func TxSearch( ctx *rpctypes.Context, query string, diff --git a/rpc/grpc/grpc_test.go b/rpc/grpc/grpc_test.go index 016a4054e..ba53cf232 100644 --- a/rpc/grpc/grpc_test.go +++ b/rpc/grpc/grpc_test.go @@ -13,7 +13,7 @@ import ( ) func TestMain(m *testing.M) { - // start a tendermint node in the background to test against + // start a CometBFT node in the background to test against app := kvstore.NewApplication() node := rpctest.StartTendermint(app) diff --git a/rpc/jsonrpc/doc.go b/rpc/jsonrpc/doc.go index 44c2ade13..d6d2cb509 100644 --- a/rpc/jsonrpc/doc.go +++ b/rpc/jsonrpc/doc.go @@ -80,5 +80,5 @@ // // # Examples // -// - [Tendermint](https://github.com/cometbft/cometbft/blob/v0.37.x/rpc/core/routes.go) +// - [CometBFT](https://github.com/cometbft/cometbft/blob/v0.37.x/rpc/core/routes.go) package jsonrpc diff --git a/rpc/jsonrpc/server/http_uri_handler.go b/rpc/jsonrpc/server/http_uri_handler.go index e27dfd3cf..134eff20f 100644 --- a/rpc/jsonrpc/server/http_uri_handler.go +++ b/rpc/jsonrpc/server/http_uri_handler.go @@ -78,7 +78,7 @@ func makeHTTPHandler(rpcFunc *RPCFunc, logger log.Logger) func(http.ResponseWrit } // Covert an http query to a list of properly typed values. -// To be properly decoded the arg must be a concrete type from tendermint (if its an interface). +// To be properly decoded the arg must be a concrete type from CometBFT (if its an interface). func httpParamsToArgs(rpcFunc *RPCFunc, r *http.Request) ([]reflect.Value, error) { // skip types.Context const argsOffset = 1 diff --git a/rpc/jsonrpc/server/ws_handler.go b/rpc/jsonrpc/server/ws_handler.go index c49a36c02..8e07d68dd 100644 --- a/rpc/jsonrpc/server/ws_handler.go +++ b/rpc/jsonrpc/server/ws_handler.go @@ -52,7 +52,7 @@ func NewWebsocketManager( // The default behavior would be relevant to browser-based clients, // afaik. I suppose having a pass-through is a workaround for allowing // for more complex security schemes, shifting the burden of - // AuthN/AuthZ outside the Tendermint RPC. + // AuthN/AuthZ outside the CometBFT RPC. // I can't think of other uses right now that would warrant a TODO // though. The real backstory of this TODO shall remain shrouded in // mystery diff --git a/rpc/openapi/index.html b/rpc/openapi/index.html index f4e5d0a12..77fc73f19 100644 --- a/rpc/openapi/index.html +++ b/rpc/openapi/index.html @@ -4,7 +4,7 @@ - Tendermint RPC + CometBFT RPC diff --git a/rpc/openapi/openapi.yaml b/rpc/openapi/openapi.yaml index c1bf2cfb5..eb1df657f 100644 --- a/rpc/openapi/openapi.yaml +++ b/rpc/openapi/openapi.yaml @@ -1,11 +1,11 @@ openapi: 3.0.0 info: - title: Tendermint RPC + title: CometBFT RPC contact: - name: Tendermint RPC - url: https://github.com/tendermint/tendermint/issues/new/choose + name: CometBFT RPC + url: https://github.com/cometbft/cometbft/issues/new/choose description: | - Tendermint supports the following RPC protocols: + CometBFT supports the following RPC protocols: * URI over HTTP * JSONRPC over HTTP @@ -54,12 +54,12 @@ info: version: "main" license: name: Apache 2.0 - url: https://github.com/tendermint/tendermint/blob/main/LICENSE + url: https://github.com/cometbft/cometbft/blob/v0.37.x/LICENSE servers: - url: https://rpc.cosmos.network - description: Cosmos mainnet node to interact with the Tendermint RPC + description: Cosmos mainnet node to interact with the CometBFT RPC - url: http://localhost:26657 - description: Interact with the Tendermint RPC locally on your device + description: Interact with the CometBFT RPC locally on your device tags: - name: Websocket description: Subscribe/unsubscribe are reserved for websocket events. @@ -83,7 +83,7 @@ paths: description: | If you want to be sure that the transaction is included in a block, you can subscribe for the result using JSONRPC via a websocket. See - https://docs.tendermint.com/v0.37/app-dev/subscribing-to-events-via-websocket.html + https://docs.cometbft.com/v0.37/core/subscription.html If you haven't received anything after a couple of blocks, resend it. If the same happens again, send it to some other node. A few reasons why it could happen: @@ -95,7 +95,7 @@ paths: Please refer to - https://docs.tendermint.com/v0.37/tendermint-core/using-tendermint.html#formatting + https://docs.cometbft.com/v0.37/core/using-cometbft.html#formatting for formatting/encoding rules. parameters: - in: query @@ -127,7 +127,7 @@ paths: description: | If you want to be sure that the transaction is included in a block, you can subscribe for the result using JSONRPC via a websocket. See - https://docs.tendermint.com/v0.37/app-dev/subscribing-to-events-via-websocket.html + https://docs.cometbft.com/v0.37/core/subscription.html If you haven't received anything after a couple of blocks, resend it. If the same happens again, send it to some other node. A few reasons why it could happen: @@ -139,7 +139,7 @@ paths: 3. node can be offline Please refer to - https://docs.tendermint.com/v0.37/tendermint-core/using-tendermint.html#formatting + https://docs.cometbft.com/v0.37/core/using-cometbft.html#formatting for formatting/encoding rules. parameters: - in: query @@ -172,7 +172,7 @@ paths: IMPORTANT: use only for testing and development. In production, use BroadcastTxSync or BroadcastTxAsync. You can subscribe for the transaction result using JSONRPC via a websocket. See - https://docs.tendermint.com/v0.37/app-dev/subscribing-to-events-via-websocket.html + https://docs.cometbft.com/v0.37/core/subscription.html CONTRACT: only returns error if mempool.CheckTx() errs or if we timeout waiting for tx to commit. @@ -181,7 +181,7 @@ paths: will contain a non-OK ABCI code. Please refer to - https://docs.tendermint.com/v0.37/tendermint-core/using-tendermint.html#formatting + https://docs.cometbft.com/v0.37/core/using-cometbft.html#formatting for formatting/encoding rules. parameters: - in: query @@ -214,7 +214,7 @@ paths: The transaction won't be added to the mempool. Please refer to - https://docs.tendermint.com/v0.37/tendermint-core/using-tendermint.html#formatting + https://docs.cometbft.com/v0.37/core/using-cometbft.html#formatting for formatting/encoding rules. Upon success, the `Cache-Control` header will be set with the default @@ -261,13 +261,13 @@ paths: tm.event = 'Tx' AND tx.height = 5 # all txs of the fifth block tx.height = 5 # all txs of the fifth block - Tendermint provides a few predefined keys: tm.event, tx.hash and tx.height. + CometBFT provides a few predefined keys: tm.event, tx.hash and tx.height. Note for transactions, you can define additional keys by providing events with DeliverTx response. import ( - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/pubsub/query" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/pubsub/query" ) abci.ResponseDeliverTx{ @@ -334,14 +334,14 @@ paths: query.MustParse("tm.event = 'Tx' AND rewards.withdraw.source = 'W'") See list of all possible events here - https://godoc.org/github.com/tendermint/tendermint/types#pkg-constants + https://godoc.org/github.com/cometbft/cometbft/types#pkg-constants For complete query syntax, check out - https://godoc.org/github.com/tendermint/tendermint/libs/pubsub/query. + https://godoc.org/github.com/cometbft/cometbft/libs/pubsub/query. ```go - import rpchttp "github.com/tendermint/rpc/client/http" - import "github.com/tendermint/tendermint/types" + import rpchttp "github.com/cometbft/rpc/client/http" + import "github.com/cometbft/cometbft/types" client := rpchttp.New("tcp:0.0.0.0:26657", "/websocket") err := client.Start() @@ -364,7 +364,7 @@ paths: }() ``` - NOTE: if you're not reading events fast enough, Tendermint might + NOTE: if you're not reading events fast enough, CometBFT might terminate the subscription. parameters: - in: query @@ -487,7 +487,7 @@ paths: tags: - Info description: | - Get Tendermint status including node info, pubkey, latest block hash, app hash, block height and time. + Get CometBFT status including node info, pubkey, latest block hash, app hash, block height and time. responses: "200": description: Status of the node @@ -961,7 +961,7 @@ paths: description: | Complete consensus state. - See https://pkg.go.dev/github.com/tendermint/tendermint/types?tab=doc#Vote.String for Vote string description. + See https://pkg.go.dev/github.com/cometbft/cometbft/types?tab=doc#Vote.String for Vote string description. content: application/json: schema: @@ -3013,7 +3013,7 @@ components: example: - "ed25519" - # Events in tendermint + # Events in CometBFT Event: type: object properties: diff --git a/rpc/test/helpers.go b/rpc/test/helpers.go index b16160b0f..79a23ea0d 100644 --- a/rpc/test/helpers.go +++ b/rpc/test/helpers.go @@ -97,7 +97,7 @@ func createConfig() *cfg.Config { cmt, rpc, grpc := makeAddrs() c.P2P.ListenAddress = cmt c.RPC.ListenAddress = rpc - c.RPC.CORSAllowedOrigins = []string{"https://tendermint.com/"} + c.RPC.CORSAllowedOrigins = []string{"https://cometbft.com/"} c.RPC.GRPCListenAddress = grpc return c } @@ -115,7 +115,7 @@ func GetGRPCClient() core_grpc.BroadcastAPIClient { return core_grpc.StartGRPCClient(grpcAddr) } -// StartTendermint starts a test tendermint server in a go routine and returns when it is initialized +// StartTendermint starts a test CometBFT server in a go routine and returns when it is initialized func StartTendermint(app abci.Application, opts ...func(*Options)) *nm.Node { nodeOpts := defaultOptions for _, opt := range opts { @@ -132,13 +132,13 @@ func StartTendermint(app abci.Application, opts ...func(*Options)) *nm.Node { waitForGRPC() if !nodeOpts.suppressStdout { - fmt.Println("Tendermint running!") + fmt.Println("CometBFT running!") } return node } -// StopTendermint stops a test tendermint server, waits until it's stopped and +// StopTendermint stops a test CometBFT server, waits until it's stopped and // cleans up test/config files. func StopTendermint(node *nm.Node) { if err := node.Stop(); err != nil { @@ -148,7 +148,7 @@ func StopTendermint(node *nm.Node) { os.RemoveAll(node.Config().RootDir) } -// NewTendermint creates a new tendermint server and sleeps forever +// NewTendermint creates a new CometBFT server and sleeps forever func NewTendermint(app abci.Application, opts *Options) *nm.Node { // Create & start node config := GetConfig(opts.recreateConfig) @@ -178,7 +178,7 @@ func NewTendermint(app abci.Application, opts *Options) *nm.Node { return node } -// SuppressStdout is an option that tries to make sure the RPC test Tendermint +// SuppressStdout is an option that tries to make sure the RPC test CometBFT // node doesn't log anything to stdout. func SuppressStdout(o *Options) { o.suppressStdout = true diff --git a/scripts/dist.sh b/scripts/dist.sh index 234380403..c615dc6db 100755 --- a/scripts/dist.sh +++ b/scripts/dist.sh @@ -21,7 +21,7 @@ mkdir -p build/pkg # Get the git commit VERSION := "$(shell git describe --always)" -GIT_IMPORT="github.com/tendermint/tendermint/version" +GIT_IMPORT="github.com/cometbft/cometbft/version" # Determine the arch/os combos we're building for XC_ARCH=${XC_ARCH:-"386 amd64 arm"} @@ -41,7 +41,7 @@ for arch in "${arch_list[@]}"; do for os in "${os_list[@]}"; do if [[ "$XC_EXCLUDE" != *" $os/$arch "* ]]; then echo "--> $os/$arch" - GOOS=${os} GOARCH=${arch} go build -ldflags "-s -w -X ${GIT_IMPORT}.TMCoreSemVer=${VERSION}" -tags="${BUILD_TAGS}" -o "build/pkg/${os}_${arch}/tendermint" ./cmd/tendermint + GOOS=${os} GOARCH=${arch} go build -ldflags "-s -w -X ${GIT_IMPORT}.TMCoreSemVer=${VERSION}" -tags="${BUILD_TAGS}" -o "build/pkg/${os}_${arch}/cometbft" ./cmd/cometbft fi done done @@ -57,17 +57,17 @@ for PLATFORM in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type d); do popd >/dev/null 2>&1 done -# Add "tendermint" and $VERSION prefix to package name. +# Add "cometbft" and $VERSION prefix to package name. rm -rf ./build/dist mkdir -p ./build/dist for FILENAME in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type f); do FILENAME=$(basename "$FILENAME") - cp "./build/pkg/${FILENAME}" "./build/dist/tendermint_${VERSION}_${FILENAME}" + cp "./build/pkg/${FILENAME}" "./build/dist/cometbft_${VERSION}_${FILENAME}" done # Make the checksums. pushd ./build/dist -shasum -a256 ./* > "./tendermint_${VERSION}_SHA256SUMS" +shasum -a256 ./* > "./cometbft_${VERSION}_SHA256SUMS" popd # Done diff --git a/scripts/json2wal/main.go b/scripts/json2wal/main.go index 4f521c99a..484708587 100644 --- a/scripts/json2wal/main.go +++ b/scripts/json2wal/main.go @@ -37,7 +37,7 @@ func main() { } defer walFile.Close() - // the length of tendermint/wal/MsgInfo in the wal.json may exceed the defaultBufSize(4096) of bufio + // the length of wal/MsgInfo in the wal.json may exceed the defaultBufSize(4096) of bufio // because of the byte array in BlockPart // leading to unmarshal error: unexpected end of JSON input br := bufio.NewReaderSize(f, int(2*types.BlockPartSizeBytes)) diff --git a/scripts/linkify_changelog.py b/scripts/linkify_changelog.py index 16647c05f..00a816555 100644 --- a/scripts/linkify_changelog.py +++ b/scripts/linkify_changelog.py @@ -3,11 +3,11 @@ # This script goes through the provided file, and replaces any " \#", # with the valid mark down formatted link to it. e.g. -# " [\#number](https://github.com/tendermint/tendermint/issues/) +# " [\#number](https://github.com/cometbft/cometbft/issues/) # Note that if the number is for a PR, github will auto-redirect you when you click the link. # It is safe to run the script multiple times in succession. # # Example usage $ python3 linkify_changelog.py ../CHANGELOG_PENDING.md for line in fileinput.input(inplace=1): - line = re.sub(r"\s\\#([0-9]*)", r" [\\#\1](https://github.com/tendermint/tendermint/issues/\1)", line.rstrip()) - print(line) \ No newline at end of file + line = re.sub(r"\s\\#([0-9]*)", r" [\\#\1](https://github.com/cometbft/cometbft/issues/\1)", line.rstrip()) + print(line) diff --git a/scripts/metricsgen/metricsgen.go b/scripts/metricsgen/metricsgen.go index 0f564e66a..1da45cb83 100644 --- a/scripts/metricsgen/metricsgen.go +++ b/scripts/metricsgen/metricsgen.go @@ -1,4 +1,4 @@ -// metricsgen is a code generation tool for creating constructors for Tendermint +// metricsgen is a code generation tool for creating constructors for CometBFT // metrics types. package main diff --git a/scripts/proto-gen.sh b/scripts/proto-gen.sh index 95198cf4e..f870ec106 100755 --- a/scripts/proto-gen.sh +++ b/scripts/proto-gen.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Update the generated code for protocol buffers in the Tendermint repository. -# This must be run from inside a Tendermint working directory. +# Update the generated code for protocol buffers in the CometBFT repository. +# This must be run from inside a CometBFT working directory. # set -euo pipefail diff --git a/scripts/qa/reporting/README.md b/scripts/qa/reporting/README.md index 088332837..ff7f379c7 100644 --- a/scripts/qa/reporting/README.md +++ b/scripts/qa/reporting/README.md @@ -40,7 +40,7 @@ pip install -r requirements.txt # '-t' flag overrides the default title at the top of the plot. ./latency_throughput.py \ - -t 'Tendermint v0.34.x Latency vs Throughput' \ + -t 'CometBFT v0.34.x Latency vs Throughput' \ ./tm034.png \ /path/to/csv/files/raw.csv ``` diff --git a/scripts/qa/reporting/latency_throughput.py b/scripts/qa/reporting/latency_throughput.py index 2cdab72ac..f57b23cc9 100755 --- a/scripts/qa/reporting/latency_throughput.py +++ b/scripts/qa/reporting/latency_throughput.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 """ A simple script to parse the CSV output from the loadtime reporting tool (see -https://github.com/tendermint/tendermint/tree/main/test/loadtime/cmd/report). +https://github.com/cometbft/cometbft/tree/v0.37.x/test/loadtime/cmd/report). Produces a plot of average transaction latency vs total transaction throughput according to the number of load testing tool WebSocket connections to the -Tendermint node. +CometBFT node. """ import argparse @@ -15,7 +15,7 @@ import matplotlib.pyplot as plt import numpy as np -DEFAULT_TITLE = "Tendermint latency vs throughput" +DEFAULT_TITLE = "CometBFT latency vs throughput" def main(): diff --git a/spec/abci/abci++_client_server.md b/spec/abci/abci++_client_server.md index b5c3d8d30..dfc03ac1c 100644 --- a/spec/abci/abci++_client_server.md +++ b/spec/abci/abci++_client_server.md @@ -46,7 +46,7 @@ The implementations in CometBFT's repository can be tested using `abci-cli` by s the `--abci` flag appropriately. See examples, in various stages of maintenance, in -[Go](https://github.com/cometbft/cometbft/tree/main/abci/server), +[Go](https://github.com/cometbft/cometbft/tree/v0.37.x/abci/server), [JavaScript](https://github.com/tendermint/js-abci), [C++](https://github.com/mdyring/cpp-tmsp), and [Java](https://github.com/jTendermint/jabci). diff --git a/state/errors.go b/state/errors.go index 38c581f7d..d0c34282c 100644 --- a/state/errors.go +++ b/state/errors.go @@ -76,7 +76,7 @@ func (e ErrAppBlockHeightTooLow) Error() string { func (e ErrLastStateMismatch) Error() string { return fmt.Sprintf( - "latest tendermint block (%d) LastAppHash (%X) does not match app's AppHash (%X)", + "latest CometBFT block (%d) LastAppHash (%X) does not match app's AppHash (%X)", e.Height, e.Core, e.App, diff --git a/state/execution.go b/state/execution.go index d548c5153..d23e18ee7 100644 --- a/state/execution.go +++ b/state/execution.go @@ -212,7 +212,7 @@ func (blockExec *BlockExecutor) ApplyBlock( fail.Fail() // XXX - // validate the validator updates and convert to tendermint types + // validate the validator updates and convert to CometBFT types abciValUpdates := abciResponses.EndBlock.ValidatorUpdates err = validateValidatorUpdates(abciValUpdates, state.ConsensusParams.Validator) if err != nil { @@ -542,7 +542,7 @@ func updateState( // Fire NewBlock, NewBlockHeader. // Fire TxEvent for every tx. -// NOTE: if Tendermint crashes before commit, some or all of these events may be published again. +// NOTE: if CometBFT crashes before commit, some or all of these events may be published again. func fireEvents( logger log.Logger, eventBus types.BlockEventPublisher, diff --git a/state/indexer/sink/psql/backport.go b/state/indexer/sink/psql/backport.go index cdb766356..184687318 100644 --- a/state/indexer/sink/psql/backport.go +++ b/state/indexer/sink/psql/backport.go @@ -28,7 +28,7 @@ const ( eventTypeEndBlock = "end_block" ) -// TxIndexer returns a bridge from es to the Tendermint v0.34 transaction indexer. +// TxIndexer returns a bridge from es to the CometBFT v0.34 transaction indexer. func (es *EventSink) TxIndexer() BackportTxIndexer { return BackportTxIndexer{psql: es} } @@ -59,7 +59,7 @@ func (BackportTxIndexer) Search(context.Context, *query.Query) ([]*abci.TxResult return nil, errors.New("the TxIndexer.Search method is not supported") } -// BlockIndexer returns a bridge that implements the Tendermint v0.34 block +// BlockIndexer returns a bridge that implements the CometBFT v0.34 block // indexer interface, using the Postgres event sink as a backing store. func (es *EventSink) BlockIndexer() BackportBlockIndexer { return BackportBlockIndexer{psql: es} diff --git a/state/indexer/sink/psql/psql.go b/state/indexer/sink/psql/psql.go index b207ef211..af3b989d7 100644 --- a/state/indexer/sink/psql/psql.go +++ b/state/indexer/sink/psql/psql.go @@ -81,7 +81,7 @@ func queryWithID(tx *sql.Tx, query string, args ...interface{}) (uint32, error) // insertEvents inserts a slice of events and any indexed attributes of those // events into the database associated with dbtx. // -// If txID > 0, the event is attributed to the Tendermint transaction with that +// If txID > 0, the event is attributed to the transaction with that // ID; otherwise it is recorded as a block event. func insertEvents(dbtx *sql.Tx, blockID, txID uint32, evts []abci.Event) error { // Populate the transaction ID field iff one is defined (> 0). diff --git a/state/indexer/sink/psql/schema.sql b/state/indexer/sink/psql/schema.sql index 1091cd4c3..ce5a241ba 100644 --- a/state/indexer/sink/psql/schema.sql +++ b/state/indexer/sink/psql/schema.sql @@ -1,6 +1,6 @@ /* This file defines the database schema for the PostgresQL ("psql") event sink - implementation in Tendermint. The operator must create a database and install + implementation in CometBFT. The operator must create a database and install this schema before using the database to index events. */ diff --git a/state/rollback.go b/state/rollback.go index 4b9089e5a..6420192cf 100644 --- a/state/rollback.go +++ b/state/rollback.go @@ -9,7 +9,7 @@ import ( "github.com/cometbft/cometbft/version" ) -// Rollback overwrites the current Tendermint state (height n) with the most +// Rollback overwrites the current CometBFT state (height n) with the most // recent previous state (height n - 1). // Note that this function does not affect application state. func Rollback(bs BlockStore, ss Store, removeBlock bool) (int64, []byte, error) { diff --git a/state/state.go b/state/state.go index 1b2c3dad2..5b33e07df 100644 --- a/state/state.go +++ b/state/state.go @@ -37,7 +37,7 @@ var InitStateVersion = cmtstate.Version{ //----------------------------------------------------------------------------- -// State is a short description of the latest committed block of the Tendermint consensus. +// State is a short description of the latest committed block of the consensus protocol. // It keeps all information necessary to validate new blocks, // including the last validator set and the consensus params. // All fields are exposed so the struct can be easily serialized, diff --git a/state/store.go b/state/store.go index f8bed96ff..61bdc160d 100644 --- a/state/store.go +++ b/state/store.go @@ -178,7 +178,7 @@ func (store dbStore) save(state State, key []byte) error { // If first block, save validators for the block. if nextHeight == 1 { nextHeight = state.InitialHeight - // This extra logic due to Tendermint validator set changes being delayed 1 block. + // This extra logic due to validator set changes being delayed 1 block. // It may get overwritten due to InitChain validator updates. if err := store.saveValidatorsInfo(nextHeight, nextHeight, state.Validators); err != nil { return err diff --git a/statesync/syncer.go b/statesync/syncer.go index 50335d6af..3d7906f04 100644 --- a/statesync/syncer.go +++ b/statesync/syncer.go @@ -284,7 +284,7 @@ func (s *syncer) Sync(snapshot *snapshot, chunks *chunkQueue) (sm.State, *types. // Optimistically build new state, so we don't discover any light client failures at the end. state, err := s.stateProvider.State(pctx, snapshot.Height) if err != nil { - s.logger.Info("failed to fetch and verify tendermint state", "err", err) + s.logger.Info("failed to fetch and verify CometBFT state", "err", err) if err == light.ErrNoWitnesses { return sm.State{}, nil, err } diff --git a/store/store_test.go b/store/store_test.go index eb93d3374..83ec298e5 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -412,7 +412,7 @@ func TestLoadBlockPart(t *testing.T) { require.Nil(t, res, "a non-existent block part should return nil") // 2. Next save a corrupted block then try to load it - err := db.Set(calcBlockPartKey(height, index), []byte("Tendermint")) + err := db.Set(calcBlockPartKey(height, index), []byte("CometBFT")) require.NoError(t, err) res, _, panicErr = doFn(loadPart) require.NotNil(t, panicErr, "expecting a non-nil panic") @@ -536,7 +536,7 @@ func TestLoadBlockMeta(t *testing.T) { require.Nil(t, res, "a non-existent blockMeta should return nil") // 2. Next save a corrupted blockMeta then try to load it - err := db.Set(calcBlockMetaKey(height), []byte("Tendermint-Meta")) + err := db.Set(calcBlockMetaKey(height), []byte("CometBFT-Meta")) require.NoError(t, err) res, _, panicErr = doFn(loadMeta) require.NotNil(t, panicErr, "expecting a non-nil panic") diff --git a/test/README.md b/test/README.md index 18839f0cd..7437fd2d7 100644 --- a/test/README.md +++ b/test/README.md @@ -1,9 +1,9 @@ -# Tendermint Tests +# CometBFT Tests The unit tests (ie. the `go test` s) can be run with `make test`. The integration tests can be run with `make test_integrations`. -Running the integrations test will build a docker container with local version of tendermint +Running the integrations test will build a docker container with local version of CometBFT and run the following tests in docker containers: - go tests, with --race @@ -11,7 +11,7 @@ and run the following tests in docker containers: - app tests - kvstore app over socket - persistence tests - - crash tendermint at each of many predefined points, restart, and ensure it syncs properly with the app + - crash cometbft at each of many predefined points, restart, and ensure it syncs properly with the app ## Fuzzing diff --git a/test/fuzz/README.md b/test/fuzz/README.md index 707217afd..1737400cd 100644 --- a/test/fuzz/README.md +++ b/test/fuzz/README.md @@ -1,6 +1,6 @@ # fuzz -Fuzzing for various packages in Tendermint using [go-fuzz](https://github.com/dvyukov/go-fuzz) library. +Fuzzing for various packages in CometBFT using [go-fuzz](https://github.com/dvyukov/go-fuzz) library. Inputs: diff --git a/test/fuzz/oss-fuzz-build.sh b/test/fuzz/oss-fuzz-build.sh index deb3ef9f7..ab2f7fede 100755 --- a/test/fuzz/oss-fuzz-build.sh +++ b/test/fuzz/oss-fuzz-build.sh @@ -1,10 +1,10 @@ #!/bin/bash -# This script is invoked by OSS-Fuzz to run fuzz tests against Tendermint core. +# This script is invoked by OSS-Fuzz to run fuzz tests against CometBFT. # See https://github.com/google/oss-fuzz/blob/master/projects/tendermint/build.sh -compile_go_fuzzer github.com/tendermint/tendermint/test/fuzz/mempool/v0 Fuzz mempool_v0_fuzzer -compile_go_fuzzer github.com/tendermint/tendermint/test/fuzz/mempool/v1 Fuzz mempool_v1_fuzzer -compile_go_fuzzer github.com/tendermint/tendermint/test/fuzz/p2p/addrbook Fuzz p2p_addrbook_fuzzer -compile_go_fuzzer github.com/tendermint/tendermint/test/fuzz/p2p/pex Fuzz p2p_pex_fuzzer -compile_go_fuzzer github.com/tendermint/tendermint/test/fuzz/p2p/secret_connection Fuzz p2p_secret_connection_fuzzer -compile_go_fuzzer github.com/tendermint/tendermint/test/fuzz/rpc/jsonrpc/server Fuzz rpc_jsonrpc_server_fuzzer +compile_go_fuzzer github.com/cometbft/cometbft/test/fuzz/mempool/v0 Fuzz mempool_v0_fuzzer +compile_go_fuzzer github.com/cometbft/cometbft/test/fuzz/mempool/v1 Fuzz mempool_v1_fuzzer +compile_go_fuzzer github.com/cometbft/cometbft/test/fuzz/p2p/addrbook Fuzz p2p_addrbook_fuzzer +compile_go_fuzzer github.com/cometbft/cometbft/test/fuzz/p2p/pex Fuzz p2p_pex_fuzzer +compile_go_fuzzer github.com/cometbft/cometbft/test/fuzz/p2p/secret_connection Fuzz p2p_secret_connection_fuzzer +compile_go_fuzzer github.com/cometbft/cometbft/test/fuzz/rpc/jsonrpc/server Fuzz rpc_jsonrpc_server_fuzzer diff --git a/test/fuzz/p2p/secret_connection/init-corpus/main.go b/test/fuzz/p2p/secret_connection/init-corpus/main.go index 155ce4d67..c28ff06e7 100644 --- a/test/fuzz/p2p/secret_connection/init-corpus/main.go +++ b/test/fuzz/p2p/secret_connection/init-corpus/main.go @@ -31,7 +31,7 @@ func initCorpus(baseDir string) { `{"a": 12, "tsp": 999, k: "blue"}`, `9999.999`, `""`, - `Tendermint fuzzing`, + `CometBFT fuzzing`, } for i, datum := range data { diff --git a/test/loadtime/Makefile b/test/loadtime/Makefile index bab69e28e..1b2eb45a2 100644 --- a/test/loadtime/Makefile +++ b/test/loadtime/Makefile @@ -1,4 +1,4 @@ -GOMOD="github.com/tendermint/tendermint/test/loadtime" +GOMOD="github.com/cometbft/cometbft/test/loadtime" OUTPUT?=build/ build: diff --git a/test/loadtime/README.md b/test/loadtime/README.md index 8043d5297..c19880c49 100644 --- a/test/loadtime/README.md +++ b/test/loadtime/README.md @@ -1,7 +1,7 @@ # loadtime This directory contains the `loadtime` tools, a set of tools for generating -transaction load against Tendermint and measuring their resulting latency. +transaction load against CometBFT and measuring their resulting latency. `loadtime` generates transactions that contain the timestamp of when they were generated as well as additional metadata to track the variables used when generating the load. @@ -20,13 +20,13 @@ make build ## `load` The `load` binary is built when `make build` is invoked. The `load` tool generates -transactions and broadcasts them to Tendermint. +transactions and broadcasts them to CometBFT. `load` leverages the [tm-load-test](https://github.com/informalsystems/tm-load-test) framework. As a result, all flags and options specified on the `tm-load-test` apply to `load`. -Below is a basic invocation for generating load against a Tendermint websocket running +Below is a basic invocation for generating load against a CometBFT websocket running on `localhost:25567` ```bash @@ -46,12 +46,12 @@ the timestamp of the block the transaction was executed in to determine transact `report` outputs a set of metrics calculated on the list of latencies, including minimum, maximum, and average latency as well as the standard deviation. -Below is a basic invocation of the report tool with a data directory under `/home/test/.tendermint/data/` +Below is a basic invocation of the report tool with a data directory under `/home/test/.cometbft/data/` where the data was saved in a `goleveldb` database. ```bash -./build/report --database-type goleveldb --data-dir ~/.tendermint/data +./build/report --database-type goleveldb --data-dir ~/.cometbft/data ``` The `report` tool also supports outputting the raw data as `csv`. This can be @@ -61,7 +61,7 @@ Below is an invocation of the report tool that outputs the data to a `csv` file in `out.csv` ```bash -./build/report --database-type goleveldb --data-dir ~/.tendermint/data --csv out.csv +./build/report --database-type goleveldb --data-dir ~/.cometbft/data --csv out.csv ``` The `report` tool outputs the data for each experiment separately, identified diff --git a/test/loadtime/cmd/load/main.go b/test/loadtime/cmd/load/main.go index f10e30002..fd8a3d9c5 100644 --- a/test/loadtime/cmd/load/main.go +++ b/test/loadtime/cmd/load/main.go @@ -37,7 +37,7 @@ func main() { loadtest.Run(&loadtest.CLIConfig{ AppName: "loadtime", AppShortDesc: "Generate timestamped transaction load.", - AppLongDesc: "loadtime generates transaction load for the purpose of measuring the end-to-end latency of a transaction from submission to execution in a Tendermint network.", + AppLongDesc: "loadtime generates transaction load for the purpose of measuring the end-to-end latency of a transaction from submission to execution in a CometBFT network.", DefaultClientFactory: "loadtime-client", }) } diff --git a/test/loadtime/cmd/report/main.go b/test/loadtime/cmd/report/main.go index 4d6e09a53..2d2c2c982 100644 --- a/test/loadtime/cmd/report/main.go +++ b/test/loadtime/cmd/report/main.go @@ -16,7 +16,7 @@ import ( var ( db = flag.String("database-type", "goleveldb", "the type of database holding the blockstore") - dir = flag.String("data-dir", "", "path to the directory containing the tendermint databases") + dir = flag.String("data-dir", "", "path to the directory containing the CometBFT databases") csvOut = flag.String("csv", "", "dump the extracted latencies as raw csv for use in additional tooling") ) diff --git a/test/loadtime/payload/payload.proto b/test/loadtime/payload/payload.proto index 19075ba51..59438a058 100644 --- a/test/loadtime/payload/payload.proto +++ b/test/loadtime/payload/payload.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package loadtime.payload; -option go_package = "github.com/tendermint/tendermint/test/loadtime/payload"; +option go_package = "github.com/cometbft/cometbft/test/loadtime/payload"; import "google/protobuf/timestamp.proto"; diff --git a/test/loadtime/report/report.go b/test/loadtime/report/report.go index 048f194ca..8b46ee524 100644 --- a/test/loadtime/report/report.go +++ b/test/loadtime/report/report.go @@ -12,7 +12,7 @@ import ( ) // BlockStore defines the set of methods needed by the report generator from -// Tendermint's store.Blockstore type. Using an interface allows for tests to +// CometBFT's store.Blockstore type. Using an interface allows for tests to // more easily simulate the required behavior without having to use the more // complex real API. type BlockStore interface { diff --git a/test/test_cover.sh b/test/test_cover.sh index 17df139e6..5e13cbba2 100644 --- a/test/test_cover.sh +++ b/test/test_cover.sh @@ -1,6 +1,6 @@ #! /bin/bash -PKGS=$(go list github.com/tendermint/tendermint/...) +PKGS=$(go list github.com/cometbft/cometbft/...) set -e diff --git a/tests.mk b/tests.mk index 7cee74ce9..ec461eb69 100644 --- a/tests.mk +++ b/tests.mk @@ -18,7 +18,7 @@ test_cover: test_apps: # run the app tests using bash - # requires `abci-cli` and `tendermint` binaries installed + # requires `abci-cli` and `cometbft` binaries installed bash test/app/test.sh .PHONY: test_apps diff --git a/tools/README.md b/tools/README.md index 24ffb7eca..7dc79c155 100644 --- a/tools/README.md +++ b/tools/README.md @@ -1,5 +1,5 @@ # tools -Tools for working with Tendermint and associated technologies. Documentation for -these tools can be found online in the [Tendermint tools -documentation](https://docs.tendermint.com/v0.37/tools/). +Tools for working with CometBFT and associated technologies. +Documentation for these tools can be found online in the +[CometBFT tools documentation](https://docs.cometbft.com/v0.37/tools/). diff --git a/types/block.go b/types/block.go index 6365751d1..c93acf85c 100644 --- a/types/block.go +++ b/types/block.go @@ -39,7 +39,7 @@ const ( MaxOverheadForBlock int64 = 11 ) -// Block defines the atomic unit of a Tendermint blockchain. +// Block defines the atomic unit of a CometBFT blockchain. type Block struct { mtx cmtsync.Mutex @@ -317,7 +317,7 @@ func MaxDataBytesNoEvidence(maxBytes int64, valsCount int) int64 { //----------------------------------------------------------------------------- -// Header defines the structure of a Tendermint block header. +// Header defines the structure of a CometBFT block header. // NOTE: changes to the Header should be duplicated in: // - header.Hash() // - abci.Header diff --git a/types/evidence.go b/types/evidence.go index 59e5e6c97..ef56a1988 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -191,7 +191,7 @@ func DuplicateVoteEvidenceFromProto(pb *cmtproto.DuplicateVoteEvidence) (*Duplic // a light client such that a full node can verify, propose and commit the evidence on-chain for // punishment of the malicious validators. There are three forms of attacks: Lunatic, Equivocation // and Amnesia. These attacks are exhaustive. You can find a more detailed overview of this at -// tendermint/docs/architecture/adr-047-handling-evidence-from-light-client.md +// cometbft/docs/architecture/adr-047-handling-evidence-from-light-client.md type LightClientAttackEvidence struct { ConflictingBlock *LightBlock CommonHeight int64 diff --git a/types/genesis.go b/types/genesis.go index db045b839..d6d0b2afa 100644 --- a/types/genesis.go +++ b/types/genesis.go @@ -24,7 +24,7 @@ const ( // core types for a genesis definition // NOTE: any changes to the genesis definition should // be reflected in the documentation: -// docs/tendermint-core/using-tendermint.md +// docs/core/using-cometbft.md // GenesisValidator is an initial validator. type GenesisValidator struct { @@ -34,7 +34,7 @@ type GenesisValidator struct { Name string `json:"name"` } -// GenesisDoc defines the initial conditions for a tendermint blockchain, in particular its validator set. +// GenesisDoc defines the initial conditions for a CometBFT blockchain, in particular its validator set. type GenesisDoc struct { GenesisTime time.Time `json:"genesis_time"` ChainID string `json:"chain_id"` diff --git a/types/priv_validator.go b/types/priv_validator.go index bd651e5b0..e4740c36c 100644 --- a/types/priv_validator.go +++ b/types/priv_validator.go @@ -10,7 +10,7 @@ import ( cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" ) -// PrivValidator defines the functionality of a local Tendermint validator +// PrivValidator defines the functionality of a local CometBFT validator // that signs votes and proposals, and never double signs. type PrivValidator interface { GetPubKey() (crypto.PubKey, error) diff --git a/types/protobuf.go b/types/protobuf.go index 50e22edca..2a0790fc6 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -9,7 +9,7 @@ import ( //------------------------------------------------------- -// TM2PB is used for converting Tendermint ABCI to protobuf ABCI. +// TM2PB is used for converting CometBFT ABCI to protobuf ABCI. // UNSTABLE var TM2PB = tm2pb{} @@ -94,7 +94,7 @@ func (tm2pb) NewValidatorUpdate(pubkey crypto.PubKey, power int64) abci.Validato //---------------------------------------------------------------------------- -// PB2TM is used for converting protobuf ABCI to Tendermint ABCI. +// PB2TM is used for converting protobuf ABCI to CometBFT ABCI. // UNSTABLE var PB2TM = pb2tm{} diff --git a/version/version.go b/version/version.go index 24cd40be7..6a063c6f0 100644 --- a/version/version.go +++ b/version/version.go @@ -3,7 +3,7 @@ package version const ( // The default version of TMCoreSemVer is the value used as the - // fallback version of Tendermint Core when not using git describe. + // fallback version of CometBFT when not using git describe. // It is formatted with semantic versioning. TMCoreSemVer = "0.37.0-alpha.1" // ABCISemVer is the semantic version of the ABCI protocol @@ -20,6 +20,6 @@ const ( var ( // TMGitCommitHash uses git rev-parse HEAD to find commit hash which is helpful - // for the engineering team when working with the tendermint binary. See Makefile + // for the engineering team when working with the cometbft binary. See Makefile TMGitCommitHash = "" )