-
Notifications
You must be signed in to change notification settings - Fork 2.6k
core/authority-discovery: Enable authorities to discover each other #3452
Commits on Aug 21, 2019
-
node/runtime: Add authority-discovery as session handler
The srml/authority-discovery module implements the OneSessionHandler in order to keep its authority set in sync. This commit adds the module to the set of session handlers.
Configuration menu - View commit details
-
Copy full SHA for f72e1cb - Browse repository at this point
Copy the full SHA f72e1cbView commit details -
core/network: Make network worker return Dht events on poll
Instead of network worker implement the Future trait, have it implement the Stream interface returning Dht events. For now these events are ignored in build_network_future but will be used by the core/authority-discovery module in subsequent commits.
Configuration menu - View commit details
-
Copy full SHA for d34eb4f - Browse repository at this point
Copy the full SHA d34eb4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 94a238a - Browse repository at this point
Copy the full SHA 94a238aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7de7db7 - Browse repository at this point
Copy the full SHA 7de7db7View commit details
Commits on Aug 22, 2019
-
core/network: Finish NetworkWoker if NetworkService stream finished
When the channel from network service to network worker is finished, also finish the network worker stream given that both network worker and network service have the same lifetime.
Configuration menu - View commit details
-
Copy full SHA for ed294de - Browse repository at this point
Copy the full SHA ed294deView commit details -
core/authority-discovery: Ensure being woken up on next interval tick
Authority discovery implements the future trait. Polling this future always returns NotReady. The future uses Tokios timer crate to become proactive periodically, e.g. advertising its own external addresses. This commit ensures that the underlying Tokio task is always registered at the Tokio Reactor to be woken up on the next interval tick. This is achieved by making sure `interval.poll` returns `NotReady` at least once within each `AuthorityDiscovery.poll` execution.
Configuration menu - View commit details
-
Copy full SHA for fbc3a5b - Browse repository at this point
Copy the full SHA fbc3a5bView commit details
Commits on Aug 27, 2019
-
core/authority-discovery: Adjust interval to be proactive on
Kademlia's default time-to-live for Dht records is 36h, republishing records every 24h. Given that a node could restart at any point in time, one can not depend on the republishing process, thus starting to publish own external addresses should happen on an interval < 36h. In addition have the first tick of the interval be at the beginning not after an interval duration.
Configuration menu - View commit details
-
Copy full SHA for 9de2655 - Browse repository at this point
Copy the full SHA 9de2655View commit details
Commits on Aug 29, 2019
-
core/authority-discovery: Implement unit tests
Abstract NetworkService via NetworkProvider trait to be able to mock it within the unit tests. In addition add basic unit test for `publish_own_ext_addresses`, `request_addresses_of_others` and `handle_dht_events`.
Configuration menu - View commit details
-
Copy full SHA for 5d1042d - Browse repository at this point
Copy the full SHA 5d1042dView commit details -
core/authority-discovery: Publish and query on different intervals
Split the global `AuthorityDiscovery.interval` into two intervals: `publish_interval` and `query_interval`. Dht entries of other authorities can change at any point in time. Thereby one should query more often than publish.
Configuration menu - View commit details
-
Copy full SHA for 4421bad - Browse repository at this point
Copy the full SHA 4421badView commit details
Commits on Aug 30, 2019
-
*: Remove abstract type AuthorityId replaced by newtype Vec<u8>
The authority discovery module treats an authority identifier as an opaque string. Thus the type abstraction `AuthorityId` is unnecessary, bloating the `core/service` construction code.
Configuration menu - View commit details
-
Copy full SHA for 76db412 - Browse repository at this point
Copy the full SHA 76db412View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d025e0 - Browse repository at this point
Copy the full SHA 2d025e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 56da02c - Browse repository at this point
Copy the full SHA 56da02cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a5f974 - Browse repository at this point
Copy the full SHA 1a5f974View commit details
Commits on Sep 2, 2019
-
*: Instantiate authority discovery within node/cli
Instead of instantiating the authority discovery module within core/service, this commit instantiates authority discovery within node/cli. The authority discovery module depends on the srml authority discovery module, which depends on the im online module, as well as session, ... With the former approach all these dependencies were enforced on any substrate implementation. With the latter approach these dependencies are optional.
Configuration menu - View commit details
-
Copy full SHA for 32214d9 - Browse repository at this point
Copy the full SHA 32214d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f5c938 - Browse repository at this point
Copy the full SHA 2f5c938View commit details
Commits on Sep 3, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 30bd78e - Browse repository at this point
Copy the full SHA 30bd78eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a376bf - Browse repository at this point
Copy the full SHA 1a376bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for c5d5a90 - Browse repository at this point
Copy the full SHA c5d5a90View commit details
Commits on Sep 4, 2019
-
Configuration menu - View commit details
-
Copy full SHA for d162540 - Browse repository at this point
Copy the full SHA d162540View commit details -
Configuration menu - View commit details
-
Copy full SHA for 024687e - Browse repository at this point
Copy the full SHA 024687eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c8534c - Browse repository at this point
Copy the full SHA 9c8534cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e954eb - Browse repository at this point
Copy the full SHA 2e954ebView commit details
Commits on Sep 5, 2019
-
Configuration menu - View commit details
-
Copy full SHA for c39c50e - Browse repository at this point
Copy the full SHA c39c50eView commit details