Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a tendermint-validator crate #1152

Open
wants to merge 58 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
df231ed
Update to deprecations in ed25519 1.3 (#1024)
mzabaluev Nov 26, 2021
9cd12b0
Fix up deprecation for ED25519_SIGNATURE_SIZE (#1032)
mzabaluev Nov 26, 2021
711ea34
Update docs and repo config for new versioning approach (#1020)
thanethomson Nov 26, 2021
0b52add
Add domain types (updated) and fix integration tests for Tendermint v…
thanethomson Nov 27, 2021
0a53b18
rpc: Remove ErrorDetail::Server (#1040)
mzabaluev Dec 2, 2021
9b6bd82
ADR-010: Time API improvements (#1035)
mzabaluev Dec 7, 2021
52a603d
Fix lints reported by clippy 0.1.57 (#1041)
mzabaluev Dec 7, 2021
3381ea7
Replace chrono with time 0.3 (#1030)
mzabaluev Dec 7, 2021
f739e86
Attempt GA branch pattern match for version-specific branches (#1044)
thanethomson Dec 7, 2021
01ff277
Bump time dependency version to 0.3.5 (#1049)
mzabaluev Dec 8, 2021
8aa91c3
Remove unnecessary cdylib artifacts from the build (#1052)
mzabaluev Dec 13, 2021
6e33529
Derive `Hash` on `tendermint::Time` (#1054)
mzabaluev Dec 13, 2021
c45ea8c
Bump `k256` to v0.10 (#1059)
tony-iqlusion Dec 15, 2021
f6451a7
Bump getrandom to 0.2 (#1062)
tomtau Dec 20, 2021
a121189
deps: Use ed25519-consensus instead of ed25519-dalek (#1067)
thanethomson Dec 20, 2021
8d77986
rpc: Switch hyper-proxy to use rustls (#1068)
mzabaluev Jan 10, 2022
b52a5af
Split out verifier parts of `tendermint-light-client` to `tendermint-…
soareschen Jan 12, 2022
9844e17
Fix clippy warnings in rpc-probe (#1076)
thanethomson Jan 12, 2022
a8c2f7b
Use Time instead of u64 seconds in tendermint-testgen Header (master)…
soareschen Jan 14, 2022
23a8950
tendermint: Derive `Clone` for `tendermint::PrivateKey` (#1082)
thanethomson Jan 14, 2022
38668f1
Release v0.24.0-pre.1 (#1078)
thanethomson Jan 14, 2022
63cbc5b
backport: rpc-probe updates from #1061 (#1084)
thanethomson Jan 19, 2022
39484dd
Bump nightly Rust in CI to 2022-01-11 (#1085)
thanethomson Jan 19, 2022
46a4c28
backport: `block_results` RPC endpoint changes from #1061 (#1086)
thanethomson Jan 31, 2022
904862c
Add CI check on no_std compliance for supported tendermint crates (#1…
thanethomson Feb 8, 2022
c70f6ee
Make encode_vec() infallible (#1093)
hu55a1n1 Feb 14, 2022
33a4841
Add block_by_hash RPC endpoint and tests (#1089)
hansl Feb 15, 2022
3ba4540
ci: Bump grcov version to 0.8.7 (#1098)
thanethomson Mar 7, 2022
e9e12ce
Fix clippy warnings from Rust v1.59.0 (#1097)
thanethomson Mar 12, 2022
84012a7
Add support for `tendermint::chain::Id` constants (#1105)
tony-iqlusion Mar 17, 2022
3941276
Updated spec url (#1110)
brson Mar 30, 2022
65b916b
[master] Update `prost` to v0.10 (#1115)
romac Apr 8, 2022
d2b9f33
Fix clippy warnings for Rust v1.60 (#1118)
thanethomson Apr 9, 2022
6bb8855
meta: Add audit config (#1119)
xla Apr 9, 2022
c828262
p2p: Rework transport to be async (#1116)
xla Apr 9, 2022
280381c
Update CI coverage check to use llvm-cov (#1121)
thanethomson Apr 10, 2022
b23d626
meta: Enforce consistent styles (#1120)
xla Apr 11, 2022
7a8d681
light-client: Replace `Io` with async variant (#995)
xla Apr 12, 2022
ebde4a2
Release v0.24.0 pre.2 (#1124)
thanethomson May 5, 2022
c917544
Bump protos to those provided by Tendermint v0.35.4 (#1126)
thanethomson May 6, 2022
a453e6e
Bump `k256` to v0.11 (#1129)
tony-iqlusion May 10, 2022
cd3e391
Bump `sha2` to v0.10; replace `ripemd160` with `ripemd` v0.1 (#1130)
tony-iqlusion May 11, 2022
27e7f60
`light-client`: Replace `serde_cbor` with `serde_json` (#1133)
devashishdxt Jun 1, 2022
1a252a8
Update cargo audit config file format to v0.17.0 (#1141)
thanethomson Jun 9, 2022
7ad20be
Fix JSON deserialization of abci::ResponseInfo (#1131)
mzabaluev Jun 9, 2022
b3d31a5
Update configuration file format for Tendermint v0.35 (#1144)
thanethomson Jun 10, 2022
cc70ad1
tendermint-proto: Add a feature flag and generate gRPC server definit…
tomtau Jun 11, 2022
6a28510
rpc: Sanitize slice data accessors for ABCI types (#1140)
mzabaluev Jun 11, 2022
42a5767
ADR-011: Validator Crate (#1142)
tomtau Jun 15, 2022
9d2d10b
tendermint: Added conversions from signing requests to consensus states
tomtau Jun 27, 2022
5cce766
added private key signing
tomtau Jun 28, 2022
2f958af
validator: added a validator crate
tomtau Jun 30, 2022
d1d1782
renamed KMSServer, BTreeMap instead of HashMap, type args moved to wh…
tomtau Jul 4, 2022
94bb7ff
renamed `tendermint-validator` to `tendermint-privval`
tomtau Jul 4, 2022
2e20e64
switch to async-signature
tomtau Jul 22, 2022
d9bad59
switch to signature traits + no_std fix
tomtau Jul 22, 2022
97a0b92
blanket `SignerProvider` implementation + server responses hoisted
tomtau Jul 25, 2022
36eff21
switch to the `AsyncKeypair`
tomtau Aug 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[advisories]
ignore = []
informational_warnings = ["unmaintained"]
severity_threshold = "low"

[database]
path = "~/.cargo/advisory-db"
url = "https://github.com/RustSec/advisory-db.git"
fetch = true
stale = false

[output]
deny = ["unmaintained"] # exit on error if unmaintained dependencies are found
format = "terminal"
quiet = false
show_tree = true

[target]
arch = "x86_64"
os = "linux"

[yanked]
enabled = true
update_index = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- `[rpc]` Change data accessor methods `abci::Data::value` and
`abci::Log::value` to `Data::as_bytes` and `Log::as_str`,
returning a byte array slice and a string slice respectively.
([#1140](https://github.com/informalsystems/tendermint-rs/pull/1140))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[tendermint-config]` Update supported Tendermint configuration file format to
v0.35 ([#1144](https://github.com/informalsystems/tendermint-rs/pull/1144))
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- `[tools/proto-compiler]` Annotate serde to fall back to `Default` for the
omitted fields when deserializing `tendermint_proto::abci::ResponseInfo` struct,
also providing deserialization for the response at the `/abci_info` RPC endpoint.
([#1132](https://github.com/informalsystems/tendermint-rs/issues/1132))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- `[light-client]` Replace `serde_cbor` with `serde_json` in `light_client` dependencies ([#1133](https://github.com/informalsystems/tendermint-rs/pull/1133)).
2 changes: 2 additions & 0 deletions .changelog/unreleased/features/1134-proto-grpc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[tendermint-proto]` Add a feature flag and generate gRPC server definitions
([#1134](https://github.com/informalsystems/tendermint-rs/issues/1134))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[tendermint]` Added conversions from signing requests to consensus states
and private key signing
([#1134](https://github.com/informalsystems/tendermint-rs/issues/1134))
2 changes: 2 additions & 0 deletions .changelog/unreleased/features/1134-validator-crate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added validator crate as per ADR-011
([#1134](https://github.com/informalsystems/tendermint-rs/issues/1134))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- `[tendermint-light-client]` Split out the verification functionality from the
`tendermint-light-client` crate into its own `no_std`-compatible crate:
`tendermint-light-client-verifier`. This helps move us closer to `no_std`
compliance in both tendermint-rs and ibc-rs
([#1027](https://github.com/informalsystems/tendermint-rs/issues/1027))
11 changes: 11 additions & 0 deletions .changelog/v0.24.0-pre.1/breaking-changes/1030-remove-chrono.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- `[tendermint]` Reform `tendermint::Time`
([#1030](https://github.com/informalsystems/tendermint-rs/issues/1030)):
* The struct content is made private.
* The range of acceptable values is restricted to years 1-9999
(as reckoned in UTC).
* Removed conversions from/to `chrono::DateTime<chrono::Utc>`.
* Changes in error variants: removed `TimestampOverflow`, replaced with
`TimestampNanosOutOfRange`; removed `ChronoParse`, replaced with `TimeParse`.
- `[tendermint-rpc]` Use `OffsetDateTime` and `Date` types provided by the `time` crate
in query operands instead of their `chrono` counterparts.
([#1030](https://github.com/informalsystems/tendermint-rs/issues/1030))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[tendermint-rpc]` Remove the `ErrorDetail::Server` variant
([#1039](https://github.com/informalsystems/tendermint-rs/issues/1039))
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- `[tendermint]` Box a large field value in `evidence::Evidence`
([#1041](https://github.com/informalsystems/tendermint-rs/pull/1041))
- `[tendermint-light-client]` Box large field values in `fork_detector::Fork`
([#1041](https://github.com/informalsystems/tendermint-rs/pull/1041))
- `[tendermint-rpc]` Box a large field value in `event::EventData`
([#1041](https://github.com/informalsystems/tendermint-rs/pull/1041))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[tendermint-p2p]` All public APIs using `ed25519-
dalek` types now use types from `ed25519-consensus`
([#1046](https://github.com/informalsystems/tendermint-rs/pull/1046))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Updated integration testing to test against Tendermint v0.35.0
([#862](https://github.com/informalsystems/tendermint-rs/issues/862))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[tendermint]` Added domain types for ABCI
([#862](https://github.com/informalsystems/tendermint-rs/issues/862))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[tendermint-abci]` Changed low-level wire encoding protocol to
accommodate <https://github.com/tendermint/tendermint/issues/5783>
([#862](https://github.com/informalsystems/tendermint-rs/issues/862))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- `[tendermint-rpc]` The `event::Event::events` field is now represented as
`Option<Vec<crate::abci::Event>>` as opposed to `Option<HashMap<String,
Vec<String>>>` to accommodate breaking change in Tendermint v0.35.0
subscription interface ([#862](https://github.com/informalsystems/tendermint-
rs/issues/862))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[tendermint-rpc]` The `/tx` endpoint now encodes
the `hash` parameter as hexadecimal instead of base64
([#862](https://github.com/informalsystems/tendermint-rs/issues/862))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[tendermint, tendermint-p2p]` Replaced the `ed25519-dalek` dependency with
`ed25519-consensus`
([#1046](https://github.com/informalsystems/tendermint-rs/pull/1046))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[tendermint-rpc]`: Switch `hyper-proxy` to use `rustls`, eliminating
the only use of `native-tls` in tendermint-rs dependencies
([#1068](https://github.com/informalsystems/tendermint-rs/pull/1068))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[tendermint]` Deprecated `signature::ED25519_SIGNATURE_SIZE`
in favor of `Ed25519Signature::BYTE_SIZE`
([#1023](https://github.com/informalsystems/tendermint-rs/issues/1023))
11 changes: 11 additions & 0 deletions .changelog/v0.24.0-pre.1/improvements/1030-new-time-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- Remove dependencies on the `chrono` crate.
([#1030](https://github.com/informalsystems/tendermint-rs/issues/1030))
- `[tendermint]` Improve `tendermint::Time`
([#1030](https://github.com/informalsystems/tendermint-rs/issues/1030)):
* Restrict the validity range of `Time` to dates with years in the range
1-9999, to match the specification of protobuf message `Timestamp`.
Add an `ErrorDetail` variant `DateOutOfRange` to report when this
restriction is not met.
* Added a conversion to, and a fallible conversion from,
`OffsetDateTime` of the `time` crate.
* Added `Time` methods `checked_add` and `checked_sub`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[tendermint]` `Hash` is implemented for `tendermint::Time`
([#1054](https://github.com/informalsystems/tendermint-rs/pull/1054))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[tendermint]` Implement `Clone` for `PrivateKey`
([#1077](https://github.com/informalsystems/tendermint-rs/issues/1077))
12 changes: 12 additions & 0 deletions .changelog/v0.24.0-pre.1/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*Jan 13, 2022*

This pre-release targets Tendermint Core v0.35 and introduces a number of
breaking changes from the v0.23 series of tendermint-rs. We provide a
pre-release here so people can start experimenting with and preparing for
Tendermint v0.35 compatibility, but a number of refinements need to be made
before we can produce a v0.24.0 release.

One of the major changes involves the introduction of [domain types for
ABCI](https://github.com/informalsystems/tendermint-rs/pull/1022) in preparation
for the release of ABCI++ in Tendermint v0.36. It also includes a number of
fixes and backports from the v0.23.x series of tendermint-rs.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[tendermint-proto]` Make `Protobuf::encode_vec()` infallible
([#1064](https://github.com/informalsystems/tendermint-rs/issues/1064))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[tools/rpc-probe]` CLI updated to support probing Gaia nodes in addition
to kvstore-based Tendermint nodes to generate static fixtures for RPC tests
([#1084](https://github.com/informalsystems/tendermint-rs/pull/1084))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[tendermint-light-client]` Replace Io with async variant
([#953](https://github.com/informalsystems/tendermint-rs/issues/953))
3 changes: 3 additions & 0 deletions .changelog/v0.24.0-pre.2/dependencies/1097-contracts-dep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[tendermint-light-client]` Upgrade
[`contracts`](https://crates.io/crates/contracts) dependency to v0.6.2
([#1097](https://github.com/informalsystems/tendermint-rs/pull/1097))
2 changes: 2 additions & 0 deletions .changelog/v0.24.0-pre.2/dependencies/1113-prost-0.10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Update `prost` to v0.10 ([#1113](https://github.com/informalsystems/tendermint-
rs/issues/1113))
2 changes: 2 additions & 0 deletions .changelog/v0.24.0-pre.2/features/1105-chain-id-constants.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[tendermint]` Add `tendermint::chain::Id::new` with support for chain ID constants
([#1105](https://github.com/informalsystems/tendermint-rs/issues/1105)).
1 change: 1 addition & 0 deletions .changelog/v0.24.0-pre.2/features/832-block-by-hash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- `[tendermint-rpc]` Add support for the `/block_by_hash` RPC endpoint. See <https://docs.tendermint.com/master/rpc/#/Info/block_by_hash> for details ([#832](https://github.com/informalsystems/tendermint-rs/issues/832)).
4 changes: 4 additions & 0 deletions .changelog/v0.24.0-pre.2/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*May 4, 2022*

The major change in this pre-release is the introduction of a fully `async`
light client interface.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- `[tendermint-rpc]` Allow deserialization of public keys from validator updates
from `block_results` endpoint in multiple JSON formats until this is fixed in
Tendermint
([#1021](https://github.com/informalsystems/tendermint-rs/issues/1021))
11 changes: 8 additions & 3 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,31 @@ name: Bug report
about: Create a report to help us squash bugs!
labels: bug
---

Version(s) of tendermint-rs: <!-- e.g. v0.23.0 -->

### What went wrong?

<!--

Please give us an overview of what went wrong, and what you expected to happen instead.

-->

**Steps to reproduce**
### Steps to reproduce

<!--

Please provide step-by-step instructions as to how to reproduce the problem.

-->

**What's the definition of "done" for this issue?**
### Definition of "done"

<!--

Please describe clear and practical acceptance criteria for this issue. Anyone
in the team should be able to look at this issue and determine whether or not
the bug's been fixed.
the bug's been fixed, and therefore whether or not this issue can be closed.

-->
10 changes: 8 additions & 2 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@ name: Enhancement
about: A request for a new feature, or to enhance existing functionality
labels: enhancement
---

Version(s) of tendermint-rs: <!-- e.g. v0.23.0 -->

### Description

<!--

Please describe the enhancement you would like to see implemented in
tendermint-rs. Give as much context as possible.

-->

**What's the definition of "done" for this issue?**
### Definition of "done"

<!--

Please describe clear and practical acceptance criteria for this issue. Anyone
in the team should be able to look at this issue and determine whether or not
the new feature/enhancement has been implemented.
the new feature/enhancement has been implemented, and therefore whether or not
this issue can be closed.

-->
11 changes: 8 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<!--

Thanks for filing a PR! Before hitting the button, please check the following items.
Please note that every non-trivial PR must reference an issue that explains the
changes in the PR.
Thanks for filing a PR!

Before hitting the button, please check the following items. Please note that
every non-trivial PR must reference an issue that explains the changes in the
PR.

Please also make sure you've targeted the correct branch with your PR. See the
contributing guidelines for details.

-->

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "docs/**"
branches:
- master
- 'v*.*.*'
jobs:
cleanup-runs:
runs-on: ubuntu-latest
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/no-std.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: no_std check
on:
pull_request: {}
push:
branches: master

jobs:
check-no-std-panic-conflict:
name: Check no_std panic conflict
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: |
cd tools/no-std-check
make check-panic-conflict

check-substrate:
name: Check no_std substrate support
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
override: true
- run: |
cd tools/no-std-check
make check-substrate
4 changes: 3 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "docs/**"
branches:
- master
- 'v*.*.*'
jobs:
cleanup-runs:
runs-on: ubuntu-latest
Expand All @@ -23,7 +24,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: nightly
components: rustfmt
override: true
- uses: actions-rs/cargo@v1
with:
Expand Down
35 changes: 14 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "docs/**"
branches:
- master
- 'v*.*.*'
jobs:
cleanup-runs:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -125,7 +126,7 @@ jobs:
runs-on: ubuntu-latest
services:
tendermint:
image: informaldev/tendermint:0.34.13
image: informaldev/tendermint:0.35.0
ports:
- 26656:26656
- 26657:26657
Expand All @@ -143,28 +144,20 @@ jobs:
env:
RUST_LOG: debug

nightly-coverage:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-11-10
override: true
- uses: actions-rs/cargo@v1
with:
command: test-all-features
env:
RUSTFLAGS: '-Zinstrument-coverage'
LLVM_PROFILE_FILE: '%p-%m.profraw'
- name: Install grcov
run: |
rustup component add llvm-tools-preview
curl -L https://github.com/mozilla/grcov/releases/download/v0.8.2/grcov-linux-x86_64.tar.bz2 | tar jxf -
- name: Run grcov
run: |
./grcov . --source-dir . --binary-path ./target/debug/ --output-type lcov --output-path ./lcov.info --branch --ignore-not-existing
- name: Upload to Codecov
run: |
bash <(curl -s https://codecov.io/bash) -f ./lcov.info
toolchain: stable
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
files: lcov.info
fail_ci_if_error: true