Commit Graph
15 Commits
Author SHA1 Message Date
cblgh be5a50cdcc back baby 2026-09-06 17:09:34 +02:00
cblgh a21ed7bc9a hiatus notice 2026-09-06 17:09:34 +02:00
cblgh 7bfd1fcf2c implement fixed-size evicting string stack data structure
this stack implementation has a fixed-size. new items are pushed to the
front and, if the capacity has been met, the last item gets evicted.  if
you push an item onto the stack that was already on the stack, this
"bumps" that item by merely moves the item to the front (as opposed to
allowing duplicates). the capacity is set at initialization.

the intended use case for this data structure is for the iroh-tracker to
only keep a fixed amount of topics and, per topic, a fixed amount of
peers. topics that are actively recalled get pushed to the front, and
peers within a topic that are seen often also get pushed to the front.

see examples/stack-example.go for how it can be used

eventually i'll refactor this to use just bytes instead as that is more
useful for the purpose of the tracker. this could also be an opportunity
to look into generics since string & byte are basically interchangeable.
2026-09-06 16:56:43 +02:00
cblgh b61dbb44c9 run prune on a timer and bump on repeat add from seen endpoints 2026-07-02 11:09:05 +02:00
cblgh ac2ef7f2ee hello now rejects incorrect read keys 2026-07-01 18:20:03 +02:00
cblgh 7a99ef3e16 improve client, now does its business and exits 2026-07-01 18:07:24 +02:00
cblgh 2272b739d1 tracker wip kinda works, client needs more love 2026-07-01 17:55:41 +02:00
cblgh bc644cec85 simple wire protocol structure implemented (no errors/0s)
TODO:
* decide on future response structure but maybe prefixing with the name is ok
* decide on error/nil values
* server: actually do things with the data sent to us by client
2026-06-30 21:47:17 +02:00
cblgh 5590e9423d refactor read/write bytes routines and use in client and server 2026-06-30 09:29:07 +02:00
cblgh db8d4b9ac9 remove polling 2026-06-29 16:41:26 +02:00
cblgh 3723193944 cycle testing secret + use V1/<type>/<rest> prefix 2026-06-29 16:24:55 +02:00
cblgh 1f18e85d85 improve wire protocol bytes reading 2026-06-29 14:58:30 +02:00
cblgh 7807bec835 simple client hello works 2026-06-28 23:06:25 +02:00
cblgh 2c3d7e5d41 gitignore 2026-06-28 15:54:37 +02:00
cblgh ac133bdaf0 init v1 data structures in place, wire protoocol in notes but not implemented 2026-06-28 15:52:39 +02:00