Commit Graph

57 Commits

Author SHA1 Message Date
Owen G 85db2ad6dc tokyo night theme 2026-01-04 16:12:52 -07:00
Owen G 7f88a45ae7 Move colors to variables and fix up UI 2026-01-04 16:00:42 -07:00
LKLY b15787abca Add Star History section to README
Added Star History section with visual representation.
2026-01-03 11:03:30 -05:00
LKLY c87e94ed14 Merge pull request #25 from pdekeulenaer/update-readme-homepage-instructions
052Minor changes to readme
2026-01-03 10:05:16 -05:00
Philip De Keulenaer e0e2c4d43c Minor changes to readme 2026-01-03 10:03:22 +01:00
fccview b88de139d7 Merge pull request #17 from kiliantyler/feat/lru-cache
Merging so we can fix conflicts before the chat MR, this looks good to me and works fine
2026-01-03 07:42:08 +00:00
LKLY 8adac4114e Merge pull request #18 from owennewo-dev/bandwidth-measurement
fix: display bandwidth in/out in MB and GB when possible.
2026-01-02 22:08:49 -05:00
lklynet a37f282c23 feat(p2p): I added a connection rotation and limited max connections
Implement connection rotation to periodically close oldest connections when exceeding half of MAX_CONNECTIONS. Also enforce MAX_CONNECTIONS limit by rejecting new connections when limit is reached (32). This improves network stability and resource management.

I also changed max relay hops from 3 to 2.

With the connection rotation I think these more conservative numbers should suffice and save on resources.
2026-01-02 22:02:27 -05:00
Kilian Tyler a2f16e0d51 docs: Update MAX_PEERS default value 2026-01-02 20:35:43 -05:00
Owen G d0c3801e37 fix(diagnostics): bandwidth display
Display bandwidth in/out in MB and GB when possible. Previously always shown in KB.
2026-01-02 18:24:42 -07:00
Kilian Tyler 66e197f77e feat(config): Increase max peer limit 2026-01-02 20:21:47 -05:00
Kilian Tyler 3df927b2d7 Merge remote-tracking branch 'lklynet/main' into feat/lru-cache 2026-01-02 20:13:24 -05:00
Kilian Tyler 629183c82e feat(peers): Implement LRU and unique peer count 2026-01-02 20:13:07 -05:00
lklynet 5613c2eafe docs: update readme with improved formatting and content
- Restructure header with centered div and h1 tag
- Add Kubernetes deployment instructions
- Expand ecosystem integrations section
- Update FAQ with more humorous answers
- Improve markdown table formatting
- Remained cool af while doing it too
2026-01-02 20:12:39 -05:00
Kilian Tyler f4bb4eeab6 Merge pull request #10 from fccview/feature/security-improvement
Ehm.. refactored a bunch.. sorry
2026-01-02 19:00:56 -05:00
Kilian Tyler e88f36412d ci: Granular workflow permissions 2026-01-02 18:59:47 -05:00
Kilian Tyler 19b13b3238 docs(readme): document environment variables 2026-01-02 18:57:37 -05:00
Kilian Tyler 78e1b82815 ci(workflows): Decouple image build & publish 2026-01-02 18:57:29 -05:00
Kilian Tyler bcd6daf6b6 ci(workflow): Integrate API readiness tests 2026-01-02 18:45:26 -05:00
Kilian Tyler e0d752a5b3 Merge remote-tracking branch 'lklynet/main' into feature/security-improvement 2026-01-02 18:34:59 -05:00
Kilian Tyler e268fbd382 Merge pull request #11 from kiliantyler/feat/arm-docker
Add multi-architecture Docker builds
2026-01-02 18:34:07 -05:00
Kilian Tyler 857055bc0c fix(docker): Include src and public directories 2026-01-02 18:32:26 -05:00
Fernando Campione 38db5374bc fix conflicts and create a class for Hyperloglog to keep with the refactored architecture 2026-01-02 20:59:11 +00:00
lklynet 9e157c71f2 build: copy additional static files to docker image 2026-01-02 15:45:28 -05:00
Kilian Tyler 96f63b8f83 feat(ci): Add multi-architecture Docker builds 2026-01-02 15:40:37 -05:00
Fernando Campione b5b646a68f Ehm.. refactor much? sorry 2026-01-02 20:35:17 +00:00
lklynet fa9259ce24 feat: add logo, favicon and license to project
style: update README header formatting
2026-01-02 15:16:34 -05:00
LKLY 5ccef3ef45 Merge pull request #5 from kiliantyler/optimizations
Performance optimizations
2026-01-02 15:01:07 -05:00
LKLY 9b5b1de5d9 Merge branch 'main' into optimizations 2026-01-02 15:00:57 -05:00
lklynet 07404e9583 refactor: remove MAX_PEERS limit and related enforcement logic 2026-01-02 14:57:57 -05:00
Kilian Tyler bfdefcd1a7 fix(peers): count and relay peers even when storage is full
Previously, when seenPeers reached MAX_PEERS, new peer messages were
completely dropped - never verified, counted, or relayed. This caused
the node to stop discovering new peers and stop propagating messages.

Now we always verify, count (HyperLogLog), and relay valid messages.
We just don't store peers in seenPeers if we're at capacity.
2026-01-02 14:39:49 -05:00
Kilian Tyler 8711a4e0fa perf(heartbeat): add adaptive rate with fast startup sync
- Fast mode (2s interval) for first 2 minutes after first connection
- Slow mode (30s interval) for steady state operation
- Timer starts on first connection, not process start
- Stale peer timeout increased to 90s to match slower heartbeat
2026-01-02 14:30:21 -05:00
Kilian Tyler 3fcf71d6e8 perf(peers): use lightweight Buffer storage instead of KeyObject
Store raw DER buffer (~100 bytes) instead of parsed KeyObject (~2-5KB)
per peer. Parse on-demand during verification only. Also reduces
MAX_PEERS from 10000 to 1000 for better memory efficiency.
2026-01-02 14:29:19 -05:00
Kilian Tyler 5d1e4f059e feat(peers): add HyperLogLog for scalable peer counting
Adds approximate unique peer counting with fixed ~1KB memory usage.
Can count millions of peers with ~2% accuracy. Separates counting
(unlimited) from storage (capped at MAX_PEERS for verification).
2026-01-02 14:28:25 -05:00
Kilian Tyler 895281e54d perf(gossip): add bloom filter for message deduplication
Prevents re-relaying messages we've already forwarded. Uses a
time-bucketed dual bloom filter that rotates every 30 seconds
to prevent fill-up while maintaining deduplication.
2026-01-02 14:26:46 -05:00
Kilian Tyler 86dff90364 perf(gossip): add fanout-limited relay to reduce bandwidth
Instead of relaying messages to ALL connections, relay to max 3
random peers. This reduces O(N) per-hop to O(1) while maintaining
epidemic spread through the network.
2026-01-02 14:25:59 -05:00
lklynet 2bd144ba07 perf(peers): optimize message handling and peer management
- Add MAX_PEERS limit to prevent memory exhaustion
- Check message sequence early to drop duplicates before expensive verify
- Simplify peer update logic by removing redundant checks
2026-01-02 13:12:05 -05:00
lklynet 0d589872cd perf(peer-handling): optimize peer verification and cleanup intervals
- Cache peer public keys to avoid repeated key creation
- Increase peer cleanup interval from 2.5s to 15s to reduce overhead
- Adjust cleanup check interval from 500ms to 5s
2026-01-02 12:49:38 -05:00
LKLY 9607ff522f Merge pull request #2 from LunyaaDev/perf/dockerfile
perf: reduce docker image size
2026-01-02 12:39:39 -05:00
lklynet 1e16d431d5 perf: throttle updates and limit particles to prevent crashes
Added rate limiting to broadcast updates to once per second and cap visual particles at 500 to prevent browser crashes from excessive rendering. Stop ruining my fun.
2026-01-02 11:40:26 -05:00
LunyaaDev fa3e8cc8b4 add docker compose 2026-01-02 17:38:54 +01:00
LunyaaDev 11d640c9a1 reduce docker image size 2026-01-02 17:34:04 +01:00
lklynet 81864969da feat(security): add PoW and Ed25519 signatures to prevent Sybil attacks 2026-01-02 11:05:44 -05:00
lklynet 149298016e some flair and pizzazz 2026-01-02 09:52:00 -05:00
lklynet c6d4a3e8f1 my god hes done it 2026-01-01 23:31:21 -05:00
lklynet 0dc2c6efb2 refactor: replace uuidv4 with crypto.randomUUID for id generation 2026-01-01 23:27:07 -05:00
lklynet d25e8e793b build(docker): update base image and improve build process
- Switch to node:18-bookworm for better stability
- Add required build tools (python3, make, g++)
- Use npm ci for more reliable production installs
- Update package.json metadata and dependencies
2026-01-01 23:24:13 -05:00
lklynet 6ca4c9e21a build: simplify Dockerfile by removing unnecessary dependencies
Remove python3, make, and g++ as they are no longer needed for building native modules. Also switch to a lighter base image by removing the '-bullseye-slim' tag since the full node:18 image is sufficient.
2026-01-01 23:18:48 -05:00
lklynet 7db91bb594 build(docker): optimize docker image size and build process
Use slim base image and install build dependencies only when needed
Rebuild native modules during install for production compatibility
2026-01-01 23:16:42 -05:00
lklynet 0f2fddab6d ai's dumb ass couldnt figure it out either lmao 2026-01-01 23:12:42 -05:00