Skip to content

Commit

Permalink
Rename the crates to cometbft*, remove deprecated crates (#4)
Browse files Browse the repository at this point in the history
* Rename crates to cometbft prefix, drop abci

All crates published as part of the forked cometbft-rs project
will use the cometbft* naming.
The tendermint-abci crate was deprecated and has a better alternative
maintained elsewhere, so it is removed rather than renamed.

* Rename crate imports to cometbft*

Bulk search-and-replace changes.

* Remove p2p, std-ext, test crates

Do not continue the  p2p crate as part of cometbft-rs, before the need for it
is clear. Also drop the auxiliary crates whose only use was to provide
functionality for, or test, tendermint-p2p.

* testgen: rename the binary to cometbft-testgen

* config: rename Tendermint error variant to Cometbft

* light-client-verifier: rename Tendermint error variant to Cometbft

* cometbft: rename doc links in abci

* Switch test coverage job to stable toolhcain

* light-client: fix a misplaced doc comment
  • Loading branch information
mzabaluev committed Dec 11, 2023
1 parent 194d81e commit 7e1787c
Show file tree
Hide file tree
Showing 334 changed files with 659 additions and 3,999 deletions.
4 changes: 2 additions & 2 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[alias]
build-all = "build --workspace --all-targets --"
build-wasm-tendermint = "build -p tendermint --manifest-path tendermint/Cargo.toml --target wasm32-unknown-unknown --release --no-default-features --"
build-wasm-light-client = "build -p tendermint-light-client --manifest-path light-client/Cargo.toml --target wasm32-unknown-unknown --release --no-default-features --"
build-wasm-cometbft = "build -p cometbft --manifest-path cometbft/Cargo.toml --target wasm32-unknown-unknown --release --no-default-features --"
build-wasm-light-client = "build -p cometbft-light-client --manifest-path light-client/Cargo.toml --target wasm32-unknown-unknown --release --no-default-features --"
build-abci = "build --manifest-path abci/Cargo.toml --bin kvstore-rs --features binary,kvstore-app"
build-tools = "build --manifest-path tools/Cargo.toml --all-features --all-targets --workspace"
test-all-features = "test --all-features --no-fail-fast"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ labels: enhancement
<!--
Please describe the enhancement you would like to see implemented in
tendermint-rs. Give as much context as possible.
cometbft-rs. Give as much context as possible.
-->

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

tendermint:
build-all:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- run: cargo build-wasm-tendermint
- run: cargo build-wasm-cometbft
- run: cargo build-wasm-light-client

tools:
Expand Down
35 changes: 14 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,40 @@ jobs:
# - https://github.51.almunity/t/support-for-yaml-anchors/16128/15
# - https://github.51.almunity/t/reusing-sharing-inheriting-steps-between-jobs-declarations/16851/13
# - https://github.51.almunity/t/using-matrix-variable-in-docker-image-name/17296
tendermint:
cometbft:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test-all-features -p tendermint
- run: cargo test-all-features -p cometbft

tendermint-rpc:
cometbft-rpc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test-all-features -p tendermint-rpc
- run: cargo test-all-features -p cometbft-rpc

tendermint-proto:
cometbft-proto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test-all-features -p tendermint-proto
- run: cargo test-all-features -p cometbft-proto

tendermint-light-client:
cometbft-light-client:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
# NOTE: We test with default features to make sure things work without "unstable".
- name: Test with default features
run: cargo test -p tendermint-light-client
run: cargo test -p cometbft-light-client
- name: Test with all features
run: cargo test-all-features -p tendermint-light-client
run: cargo test-all-features -p cometbft-light-client

# From https://rustwasm.github.io/docs/wasm-bindgen/wasm-bindgen-test/continuous-integration.html#github-actions
tendermint-light-client-js:
cometbft-light-client-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -71,19 +71,12 @@ jobs:
- run: wasm-pack test --headless --chrome ./light-client-js/
- run: wasm-pack test --headless --firefox ./light-client-js/

tendermint-test:
cometbft-testgen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test-all-features -p tendermint-test

tendermint-testgen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test-all-features -p tendermint-testgen
- run: cargo test-all-features -p cometbft-testgen

kvstore-integration-stable:
runs-on: ubuntu-latest
Expand All @@ -101,11 +94,11 @@ jobs:
env:
RUST_LOG: debug

nightly-coverage:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- run: cargo test-all-features
Expand Down
8 changes: 2 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@
resolver = "2"

members = [
"abci",
"cometbft",
"config",
"light-client",
"light-client-verifier",
"light-client-detector",
"light-client-cli",
"light-client-js",
"p2p",
"pbt-gen",
"proto",
"rpc",
"std-ext",
"tendermint",
"test",
"testgen"
]

Expand All @@ -24,6 +20,6 @@ exclude = [
"tools/no-std-check"
]

[profile.release.package.tendermint-light-client-js]
[profile.release.package.cometbft-light-client-js]
# Tell `rustc` to optimize for small code size.
opt-level = "s"
40 changes: 0 additions & 40 deletions abci/Cargo.toml

This file was deleted.

116 changes: 0 additions & 116 deletions abci/README.md

This file was deleted.

Loading

0 comments on commit 7e1787c

Please sign in to comment.