summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-07-18Unify the error handlingJesper Jensen
2025-07-18Add a simple API for lookupsJesper Jensen
2025-07-03Only save config when there are worthy changesJesper Jensen
2025-07-03Add metric for lookup stateJesper Jensen
2025-07-02Rework when a lookup is considered completeJesper Jensen
Keep track of outstanding requests sent as part of a lookup and rely on those individual request timeouts to signal the end of the lookup as a whole. This also makes sure we have the lookup around for the entire duration of all downstream requests.
2025-06-29Free the keys SMHJesper Jensen
2025-06-29Free the nodeid labelJesper Jensen
2025-06-23Print the invalid dest_lenJesper Jensen
2025-06-21Add metric for peers fetched from tableJesper Jensen
It would be nice to know a little bit about how useful we are to the swarm.
2025-06-21Lower load factor limitJesper Jensen
2025-06-21Fix the expire hashmap remove codeJesper Jensen
2025-06-19Correct duplicate checkJesper Jensen
I though it was a cool feature that C allowed you to implicitly memcmp statically sized arrays. It turns out it doesn't, it was just comparing their pointers which are obviously not equal.
2025-06-18Don't copy entries that are emptyJesper Jensen
2025-06-18Add a debug printout of collisionJesper Jensen
2025-06-15Discard the request when there's no timeout funcJesper Jensen
2025-06-15Time out lookup requests tooJesper Jensen
2025-06-14Add content-type to metrics pageJesper Jensen
2025-05-11Discard lookup responses when it's completedJesper Jensen
2025-05-11Give nodes a little more timeout timeJesper Jensen
2025-05-11Handle error from lookupJesper Jensen
2025-05-11Add metric for discarded packetsJesper Jensen
2025-05-10Decrement requests in flight on clearJesper Jensen
That's a bug
2025-05-10Run the lookup once in a whileJesper Jensen
2025-05-10Run the lookup on startupJesper Jensen
2025-05-10Reintroduce the workpool size metricJesper Jensen
2025-05-10Remove the routing table rebuildJesper Jensen
2025-05-10Rebuild the rounting table on startupJesper Jensen
2025-05-07Transfer the id after loading itJesper Jensen
2025-05-06Also check for unitialized lookupJesper Jensen
2025-05-06Add metric for wakeup timeJesper Jensen
2025-05-06Reset the expire time of routing table on startupJesper Jensen
2025-05-05Also count current expired hashes in the nextJesper Jensen
2025-05-04Expose the hash table size as a metricJesper Jensen
2025-05-04Remove the duplicate resize hackJesper Jensen
It turns out this problem also included a bunch of other data corruption issues. I don't really know how that got in there, but I don't think this was a data-structure issue. We should revert to an assert to crash hard. We now have some checks that should give us a warning closer to when the corruption happens next time.
2025-05-04Use atomic-rename trick to avoid clobbering stateJesper Jensen
2025-05-04Check that the load is accurateJesper Jensen
2025-05-04time_t is apparently signed?Jesper Jensen
2025-05-04Extract the expire metric outJesper Jensen
2025-05-04Add metric to track next hash expireJesper Jensen
2025-05-04Add some check for expiry timeJesper Jensen
2025-05-04Support for longer transaction IDsJesper Jensen
2025-05-04Remove unused metricJesper Jensen
2025-05-04Remove some noisy debug tracingJesper Jensen
2025-05-04Add some code to assert that there are no dupesJesper Jensen
2025-05-04Drop duplicated peer entriesJesper Jensen
Apparently it's somehow possible for us to duplicate the peer entry. While we figure out how, let's just drop them instead of crashing.
2025-05-04Set the metrics AFTER initializing SMHJesper Jensen
2025-05-04Refactor lookup init and add routing table metricJesper Jensen
I think it would be nice to see the detailed routing table occupancy. I've added a metric that exposes the current occupancy of each bucket. That should provide me some insight into the current distribution of nodes and if we need to find a way to keep the closer buckets alive.
2025-04-26Add end timeout to lookup functionJesper Jensen
2025-04-16Add a first approximation of a lookup algorithmJesper Jensen
This isn't really "correct" but it's probably going to work. It's a rough implementation of the Kademlia lookup algorithm, with the modification that we don't keep track of anything behind the frontier. We are therefore counting on peers being ok with us potentially sending them the "same" request multiple times. If they respond in a reasonable time, the double request rate _should_ be minimal, but that of course carries the risk that an already overloaded peer would get even more queries. I don't know. It's a first try at something. I need to see it work before I write it off completely.
2025-04-15Reformat target generationJesper Jensen
I think this reads nicer