-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add DHT and RequestResponse notifications (#461)
# Description This PR implements the following changes: - [x] Add DHT notifications - [x] Put receipt and workflow info to DHT notifications - [x] Got receipt and workflow info from DHT notifications - [x] Receipt and workflow info quorum success notifications - [x] Receipt and workflow info quorum failure notifications - [x] Add request-response notifications - [x] Sent workflow info to peer - [x] Received workflow info from peer - [x] Update notifications to accept `Ipld` data, not just strings - [x] Refactor swarm `FoundEvent` into `DecodedRecord` and `FoundEvent` (to include extra information on `FoundEvent` without overloading decoding mechanism) - [x] Add better error for timed out records (records with the code "Timeout") - [x] Fix `IndexedResources` decoding and add/update unit tests to check it - [x] Fix flaky `test_libp2p_receipt_gossip_serial` integration test - [x] Remove no connected peer checks (we dial up a peer if they are not connected but stored in the DHT) - [x] Rename `check_lines_for` test utility to `check_for_line_with` - [x] Remove unused `handler_timeout_fn`s - [x] Move `defaults.toml` from `homestar-runtime/fixtures` to `homestar-runtime/config` - [x] Update `ReceivedReceiptPubsub` notification "peerId" field to "publisher" to better reflect the role of the peer (breaking change for clients). - [x] Remove receipt persistence on receiving workflow info (to be replaced with another mechanism) - [x] Break `retrieve_from_query` into `retrieve_from_dht` and `retrieve_from_provider` - [x] Update retrieve workflow info from provider mechanism to trigger on `retrieve_from_dht` error or timeout - [x] Update DHT behavior to only add addresses manually with the `kad::BucketInserts::Manual` configuration - [x] Handle swarm `RequestResponse` `ResponseSent` event with a debug log (instead of leaving it uncaught) - [x] Increase threads allocated per test ## Link to issue Closes #131 Closes #475 ## Type of change - [x] Bug fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) - [x] Refactor (non-breaking change that updates existing functionality) - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) The breaking change is the update to the `ReceivedReceiptPubsub` notification. ## Test plan (required) We've added tests to check: - [x] Put receipt and workflow info to DHT - [x] Got workflow info from DHT notifications - [x] Receipt and workflow info quorum success - [x] Receipt and workflow info quorum failure - [x] Provider sent workflow info to peer - [x] Peer received workflow info from a provider - [x] Peer received workflow info indirectly through a recursive request (Test written, but ignored until we can isolate nodes) We also have the starts for a test of got receipt from DHT that will be used with future updates to receipt retrieval (in the `test_libp2p_dht_records_serial` test, but commented out) --------- Co-authored-by: Quinn Wilton <[email protected]>
- Loading branch information
1 parent
b1cf4da
commit 5c876c5
Showing
32 changed files
with
2,317 additions
and
383 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.