-
Notifications
You must be signed in to change notification settings - Fork 224
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
flex-error: resolve conflicts with master
#945
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Implement thread-safe cloning of a secret connection Signed-off-by: Thane Thomson <[email protected]> * Expand documentation for SecretConnection on threading considerations Signed-off-by: Thane Thomson <[email protected]> * Extract peer construction into its own method Signed-off-by: Thane Thomson <[email protected]> * Add test for cloned SecretConnection This adds a `TcpStream`-based test for parallelizing operations on a `SecretConnection`. I used `TcpStream` instead of the buffered reader in the other tests because it wasn't feasible to implement the `TryClone` trait for that buffered pipe implementation. Signed-off-by: Thane Thomson <[email protected]> * Add more messages to test Signed-off-by: Thane Thomson <[email protected]> * Expand comment for clarity Signed-off-by: Thane Thomson <[email protected]> * Add .changelog entry Signed-off-by: Thane Thomson <[email protected]> * Restore half-duplex operations Signed-off-by: Thane Thomson <[email protected]> * Extract encrypt/decrypt fns as independent methods Signed-off-by: Thane Thomson <[email protected]> * Remove unnecessary trait bounds Signed-off-by: Thane Thomson <[email protected]> * Extract send/receive state Signed-off-by: Thane Thomson <[email protected]> * Extract read/write functionality as standalone methods Signed-off-by: Thane Thomson <[email protected]> * Add logic to facilitate splitting SecretConnection into its sending and receiving halves Signed-off-by: Thane Thomson <[email protected]> * Restore split SecretConnection test using new semantics Signed-off-by: Thane Thomson <[email protected]> * Update changelog entry Signed-off-by: Thane Thomson <[email protected]> * Update docs for `SecretConnection` Signed-off-by: Thane Thomson <[email protected]> * Condense error reporting Signed-off-by: Thane Thomson <[email protected]> * Extract TryClone trait into its own crate As per the discussion at #938 (comment), this extracts the `TryClone` trait into a new crate called `tendermint-std-ext` in the `std-ext` directory. This new crate is intended to contain any code that we need that extends the Rust standard library. Signed-off-by: Thane Thomson <[email protected]> * Reorder imports Signed-off-by: Thane Thomson <[email protected]> * Assert validation regardless of debug build This introduces the internal encryption assertions at runtime regardless of build type. This may introduce a small performance hit, but it's probably worth it to ensure correctness. Effectively this is keeping an eye on the code in the `encrypt_and_write` fn to ensure its correctness. Signed-off-by: Thane Thomson <[email protected]> * Remove remote_pubkey optionality from sender/receiver halves Signed-off-by: Thane Thomson <[email protected]> * Update SecretConnection docs with comment content Signed-off-by: Thane Thomson <[email protected]> * Fix doc link to TryClone trait Signed-off-by: Thane Thomson <[email protected]> * Fix doc link to TryClone trait Signed-off-by: Thane Thomson <[email protected]> * Add docs on SecretConnection failures and connection integrity Signed-off-by: Thane Thomson <[email protected]> * Synchronize sending/receiving failures to comply with crypto algorithm constraints Signed-off-by: Thane Thomson <[email protected]> * Rename try_split method to split for SecretConnection Signed-off-by: Thane Thomson <[email protected]> * Remove redundant field name prefixes Signed-off-by: Thane Thomson <[email protected]> * Fix broken link in docs Signed-off-by: Thane Thomson <[email protected]>
* Fix needless borrows in codebase Signed-off-by: Thane Thomson <[email protected]> * Ignore needless collect warning (we do actually seem to need it) Signed-off-by: Thane Thomson <[email protected]> * Remove trailing semicolon in macro to fix docs compiling Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Codecov Report
@@ Coverage Diff @@
## soares/flex-error #945 +/- ##
===================================================
+ Coverage 71.4% 71.6% +0.1%
===================================================
Files 201 203 +2
Lines 16361 16480 +119
===================================================
+ Hits 11698 11811 +113
- Misses 4663 4669 +6
Continue to review full report at Codecov.
|
thanethomson
added a commit
that referenced
this pull request
Aug 7, 2021
* Use flex-error for tendermint * Use flex-error for p2p * Use flex-error for light-client * Use flex-error for light_client::predicates * Fix lint * Use flex-error for builder and io errors * Use flex-error for rpc errors * Use flex-error for protobuf errors * Use flex-error for abci * Fix test_bisection_no_witness_left * Fix build errors in all-features * Fix failing tests * Fix more failures * Fix tungstenite error under wasm target * Fix incoming_fixtures test * Fix conflict * Update flex-error to v0.4.0 * set std feature in flex-error instead of individual crates * Add flex-error patch to tools/Cargo.toml * Use published version of flex-error v0.4.1 * Enable flex-error/eyre_tracer feature by default * Add .changelog entry (#940) Signed-off-by: Thane Thomson <[email protected]> * flex-error: resolve conflicts with `master` (#945) * Implement full-duplex secret connection (#938) * Implement thread-safe cloning of a secret connection Signed-off-by: Thane Thomson <[email protected]> * Expand documentation for SecretConnection on threading considerations Signed-off-by: Thane Thomson <[email protected]> * Extract peer construction into its own method Signed-off-by: Thane Thomson <[email protected]> * Add test for cloned SecretConnection This adds a `TcpStream`-based test for parallelizing operations on a `SecretConnection`. I used `TcpStream` instead of the buffered reader in the other tests because it wasn't feasible to implement the `TryClone` trait for that buffered pipe implementation. Signed-off-by: Thane Thomson <[email protected]> * Add more messages to test Signed-off-by: Thane Thomson <[email protected]> * Expand comment for clarity Signed-off-by: Thane Thomson <[email protected]> * Add .changelog entry Signed-off-by: Thane Thomson <[email protected]> * Restore half-duplex operations Signed-off-by: Thane Thomson <[email protected]> * Extract encrypt/decrypt fns as independent methods Signed-off-by: Thane Thomson <[email protected]> * Remove unnecessary trait bounds Signed-off-by: Thane Thomson <[email protected]> * Extract send/receive state Signed-off-by: Thane Thomson <[email protected]> * Extract read/write functionality as standalone methods Signed-off-by: Thane Thomson <[email protected]> * Add logic to facilitate splitting SecretConnection into its sending and receiving halves Signed-off-by: Thane Thomson <[email protected]> * Restore split SecretConnection test using new semantics Signed-off-by: Thane Thomson <[email protected]> * Update changelog entry Signed-off-by: Thane Thomson <[email protected]> * Update docs for `SecretConnection` Signed-off-by: Thane Thomson <[email protected]> * Condense error reporting Signed-off-by: Thane Thomson <[email protected]> * Extract TryClone trait into its own crate As per the discussion at #938 (comment), this extracts the `TryClone` trait into a new crate called `tendermint-std-ext` in the `std-ext` directory. This new crate is intended to contain any code that we need that extends the Rust standard library. Signed-off-by: Thane Thomson <[email protected]> * Reorder imports Signed-off-by: Thane Thomson <[email protected]> * Assert validation regardless of debug build This introduces the internal encryption assertions at runtime regardless of build type. This may introduce a small performance hit, but it's probably worth it to ensure correctness. Effectively this is keeping an eye on the code in the `encrypt_and_write` fn to ensure its correctness. Signed-off-by: Thane Thomson <[email protected]> * Remove remote_pubkey optionality from sender/receiver halves Signed-off-by: Thane Thomson <[email protected]> * Update SecretConnection docs with comment content Signed-off-by: Thane Thomson <[email protected]> * Fix doc link to TryClone trait Signed-off-by: Thane Thomson <[email protected]> * Fix doc link to TryClone trait Signed-off-by: Thane Thomson <[email protected]> * Add docs on SecretConnection failures and connection integrity Signed-off-by: Thane Thomson <[email protected]> * Synchronize sending/receiving failures to comply with crypto algorithm constraints Signed-off-by: Thane Thomson <[email protected]> * Rename try_split method to split for SecretConnection Signed-off-by: Thane Thomson <[email protected]> * Remove redundant field name prefixes Signed-off-by: Thane Thomson <[email protected]> * Fix broken link in docs Signed-off-by: Thane Thomson <[email protected]> * Fix recent clippy errors on `master` (#941) * Fix needless borrows in codebase Signed-off-by: Thane Thomson <[email protected]> * Ignore needless collect warning (we do actually seem to need it) Signed-off-by: Thane Thomson <[email protected]> * Remove trailing semicolon in macro to fix docs compiling Signed-off-by: Thane Thomson <[email protected]> * Remove unnecessary macros Signed-off-by: Thane Thomson <[email protected]> * Correct error messages Signed-off-by: Thane Thomson <[email protected]> Co-authored-by: Thane Thomson <[email protected]> Co-authored-by: Thane Thomson <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follows from #923
.changelog/