storj/pkg/kademlia
Jennifer Li Johnson 724bb44723
Remove Kademlia dependencies from Satellite and Storagenode (#2966)
What:

cmd/inspector/main.go: removes kad commands
internal/testplanet/planet.go: Waits for contact chore to finish
satellite/contact/nodesservice.go: creates an empty nodes service implementation
satellite/contact/service.go: implements Local and FetchInfo methods & adds external address config value
satellite/discovery/service.go: replaces kad.FetchInfo with contact.FetchInfo in Refresh() & removes Discover()
satellite/peer.go: sets up contact service and endpoints
storagenode/console/service.go: replaces nodeID with contact.Local()
storagenode/contact/chore.go: replaces routing table with contact service
storagenode/contact/nodesservice.go: creates empty implementation for ping and request info nodes service & implements RequestInfo method
storagenode/contact/service.go: creates a service to return the local node and update its own capacity
storagenode/monitor/monitor.go: uses contact service in place of routing table
storagenode/operator.go: moves operatorconfig from kad into its own setup
storagenode/peer.go: sets up contact service, chore, pingstats and endpoints
satellite/overlay/config.go: changes NodeSelectionConfig.OnlineWindow default to 4hr to allow for accurate repair selection
Removes kademlia setups in:

cmd/storagenode/main.go
cmd/storj-sim/network.go
internal/testplane/planet.go
internal/testplanet/satellite.go
internal/testplanet/storagenode.go
satellite/peer.go
scripts/test-sim-backwards.sh
scripts/testdata/satellite-config.yaml.lock
storagenode/inspector/inspector.go
storagenode/peer.go
storagenode/storagenodedb/database.go
Why: Replacing Kademlia

Please describe the tests:
• internal/testplanet/planet_test.go:

TestBasic: assert that the storagenode can check in with the satellite without any errors
TestContact: test that all nodes get inserted into both satellites' overlay cache during testplanet setup
• satellite/contact/contact_test.go:

TestFetchInfo: Tests that the FetchInfo method returns the correct info
• storagenode/contact/contact_test.go:

TestNodeInfoUpdated: tests that the contact chore updates the node information
TestRequestInfoEndpoint: tests that the Request info endpoint returns the correct info
Please describe the performance impact: Node discovery should be at least slightly more performant since each node connects directly to each satellite and no longer needs to wait for bootstrapping. It probably won't be faster in real time on start up since each node waits a random amount of time (less than 1 hr) to initialize its first connection (jitter).
2019-09-19 15:56:34 -04:00
..
kademliaclient Remove Kademlia dependencies from Satellite and Storagenode (#2966) 2019-09-19 15:56:34 -04:00
routinggraph Inspector draw routing table (#1732) 2019-04-22 11:34:11 +03:00
testrouting all: enable staticcheck (#2849) 2019-08-22 13:40:15 +02:00
antechamber_test.go Creates Routing Table Antechamber (#2318) 2019-07-01 17:20:19 -04:00
antechamber.go Routing table antechamber should expire old nodes that failed connection (#2387) 2019-07-01 23:20:12 -04:00
config.go Stylistic Go Cleanup (#2524) 2019-07-22 15:10:04 -04:00
endpoint.go rm noisy debug logs that we dont need (#3083) 2019-09-18 12:43:57 -07:00
inspector.go pkg/dht: remove (#2599) 2019-07-19 20:34:00 +03:00
kademlia_test.go storagenode/console: remove kademlia (#2942) 2019-09-11 16:41:43 -04:00
kademlia.go storagenode/console: remove kademlia (#2942) 2019-09-11 16:41:43 -04:00
peer_discovery_test.go pkg/kademlia: clean up peer discovery (#2252) 2019-06-26 16:16:46 +03:00
peer_discovery.go Stylistic Go Cleanup (#2524) 2019-07-22 15:10:04 -04:00
replacement_cache_test.go kademlia/routing: add contexts to more places so monkit works (#2188) 2019-06-13 16:51:50 +02:00
replacement_cache.go Routing table tests (#1270) 2019-02-22 13:39:29 -05:00
routing_helpers_test.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
routing_helpers.go Routing table antechamber should expire old nodes that failed connection (#2387) 2019-07-01 23:20:12 -04:00
routing_integration_helpers_test.go pkg/dht: remove (#2599) 2019-07-19 20:34:00 +03:00
routing_integration_test.go pkg/dht: remove (#2599) 2019-07-19 20:34:00 +03:00
routing_test.go internal/testrand: new package for random data (#2282) 2019-06-26 13:38:51 +03:00
routing.go don't use global loggers (#2671) 2019-07-31 15:09:45 +03:00
utils_test.go Stylistic Go Cleanup (#2524) 2019-07-22 15:10:04 -04:00
utils.go Replace list calls with iterates in kademlia routing table (#1318) 2019-02-26 11:07:53 -05:00