package net.i2p.router.networkdb.kademlia
The Kademlia distributed hash table (DHT) network database: lookup, store and explore jobs, the data store, the floodfill variants, and lookup throttling.
Lookups route by XOR distance over the 256-bit hash space; floodfill routers store the closest third of the keyspace so the network stays reachable without a central authority. Not for use by apps, clients or plugins.
See also: Kademlia paper.
- ClassDescriptionCache for blinding data as specified in I2P proposal 123.Lightweight background job that refreshes RouterInfo for peers we recently interacted with.Interface for database storage operations in the network database.Ask a connected peer for his RI.Override to not call failed() in
DirectLookupMatchJob.setMessage(I2NPMessage), as it will be called from runJob().Periodically searches through all leases to find expired ones, failing those keys and firing up a new search for each (in case we want it later, might as well preemptively fetch it).Oldest first.Go through the routing table pick routers that are out of date, but don't expire routers we're actively connected to.Represents an exploratory search job for a particular key in the Kademlia network database.Handler for DatabaseLookupMessage received on floodfills.Handles incoming DatabaseStoreMessage for floodfill network database operations.Simple job to monitor the floodfill pool.The Kademlia network database, using floodfill participants as the only storage tier.Record the store failure in the peer profile.Note in the profile that the store succeeded.Lightweight entry for batched timeout processing.Default implementation of the SegmentedNetworkDatabaseFacade.This is where we implement semi-Kademlia with the floodfills, by selecting floodfills closest to a given key for searches and stores.Classification result for floodfill peer selection.Job to flood nearby floodfill routers with our RI.This class extends StoreJob to fire off a FloodfillVerifyStoreJob after a successful store.Two-phase floodfill store verification.Result of querying a second floodfill (phase 2).Result of querying the store peer (phase 1).Handles match processing for flood-only search operations.Message selector for flood-only database lookup operations.Timeout handler for flood-only search operations.Flood-only search implementation for network database lookups.Base class for flood-based search operations with fallback to Kademlia.Provides basic denial-of-service protection for database flood operations.Processes database lookup messages received by floodfill routers.Processes and stores DatabaseStoreMessage data in the floodfill network database.Background maintenance job that keeps introducer RouterInfos warm in the local netDb.Performs targeted followup lookups during iterative search operations.Processes DatabaseSearchReplyMessage responses during iterative searches.Slightly modified version of FloodOnlyLookupSelector.Traditional Kademlia iterative search with enhanced robustness.Handles timeout events for individual peer lookups in iterative searches.Kademlia based version of network database.Job to refresh client LeaseSets periodically.Pull the caching used only by KBucketImpl out of Hash and put it here.Tracks lookup frequency per (peer, tunnel) pair to provide DOS protection via temporary bans on excessive requesters.(peer, tunnel) key with cached hash.Provides denial-of-service protection for network database lookup operations.Method and class for garlic encrypting outbound netdb traffic, and sending keys and tags for others to encrypt inbound netdb traffic, including management of the ElGamal/AES tags.A single key and tag, for receiving a single message.Wrapper so that we can keep track of the key and tags for later notification to the SKM.Negative cache for network database lookup operations.Abstract base class for peer selection in Kademlia routing tables.Persistent network database storage with disk I/O and memory management.Pre-computed classification flags for a RouterInfo being written.Probes peers to verify they are still alive, usingDirectLookupJobto ask for their RouterInfo.RefreshRoutersJob performs router info refresh operations periodically.Periodically republishes a local LeaseSet to the network database.Base class for iterative network database search operations.Holds callbacks and expiration for a deferred search.Message selector for matching search operation responses from specific peers.Processes DatabaseSearchReplyMessage responses from floodfill peers.Manages state for network database search operations.Called after a match to a db search is foundThis class implements an interface for managing many netDbs as part of a single I2P instance, each representing its own view of the network.Performs targeted followup lookups for RouterInfo entries from search replies.Performs a targeted lookup to a single peer for a specific key.Evicts the least-recently-attested peer from a full routing bucket so the netdb routing table rotates toward live peers instead of filling with dead-but-unexpired routers.This job initiates exploration of the network database by selecting keys to explore and queuing ExploreJobs up to a maximum per run.Abstract base class for network database store operations.Compare leases by XOR distance to a target hash.Message selector for matching database store operation confirmations.Manages state for network database store operations.In-memory network database storage implementation.Signature verification failed because the sig type is unknown or unavailable.