Skip to content

Instantly share code, notes, and snippets.

View sanity's full-sized avatar

Ian Clarke sanity

View GitHub Profile
@sanity
sanity / gateway-connection-logs.txt
Created September 27, 2025 18:01
Freenet v0.1.28 connection logs - 12+ hour test showing no peer-to-peer connections
Sep 27 03:22:35 nova init-gateway.sh[3769180]: 2025-09-27T01:22:35.154955Z INFO freenet::transport::peer_connection: PeerConnection created with persistent keep-alive task, remote: 5.9.111.215:40008
Sep 27 03:22:35 nova init-gateway.sh[3769180]: at crates/core/src/transport/peer_connection.rs:237
Sep 27 03:22:35 nova init-gateway.sh[3769180]: 2025-09-27T01:22:35.154978Z INFO freenet_core::transport::keepalive_lifecycle: Keep-alive task STARTED for connection, remote: 5.9.111.215:40008
Sep 27 03:22:35 nova init-gateway.sh[3769180]: at crates/core/src/transport/peer_connection.rs:150
Sep 27 03:22:35 nova init-gateway.sh[3769180]: 2025-09-27T01:22:35.155576Z WARN freenet::operations::connect: Couldn't forward connect petition, not enough connections, tx: 01K64C777HNMCJPWJHYTRSAJR0, joiner: v6MWKgqJD4XT6oWG
Sep 27 03:22:35 nova init-gateway.sh[3769180]: at crates/core/src/operations/connect.rs:1029
Sep 27 03:22:35 nova init-gateway.sh[3769180]: in freenet::node::network_bridge::handshake:
@sanity
sanity / peer-manager.sh
Created September 27, 2025 13:15
Freenet Peer Manager - Systemd-based peer lifecycle management
#!/bin/bash
set -e
BASE_DIR="/mnt/media/freenet-peers"
PEERS_DIR="$BASE_DIR/peers"
STATE_DIR="$BASE_DIR/state"
CONFIG_FILE="$STATE_DIR/peer-config.json"
FREENET_BIN="/usr/local/bin/freenet"
GATEWAY_ADDR="127.0.0.1:31337"
@sanity
sanity / river-debugging-report.md
Last active August 27, 2025 17:33
River Message Propagation Debugging Report - January 27, 2025

River Message Propagation Debugging Report

Date: January 27, 2025
Machine: technic
River Version: v0.1.10 (with subscription fix)
Freenet Version: v0.1.21

Executive Summary

River v0.1.10 addresses a critical subscription bug where room creators never subscribed to their own rooms. While this fix resolves the issue in local gateway testing, the production gateway on nova fails to store contracts. Testing shows PUT operations reach the gateway but subsequent GET operations fail with "Contract state not found in store". The production gateway's --skip-load-from-network flag may be preventing local contract storage.

FREENET PROJECT INC. CONTRIBUTOR LICENSE AGREEMENT ("Agreement")

Please read this agreement carefully before contributing to the Freenet Project Inc. By contributing, you are agreeing to become a party to this Agreement.

  1. Definitions
    a. "Contribution" means any original work of authorship, including any modifications or additions to an existing work, submitted by you to the Freenet Project Inc.
    b. "Project" refers to the Freenet Project Inc's initiatives hosted on GitHub.

  2. Copyright Transfer
    a. You hereby irrevocably transfer and assign to Freenet Project Inc., and agree to irrevocably transfer and assign to Freenet Project Inc., all right, title, and interest in and to your Contribution, including all copyrights and copyright applications and registrations relating to your Contribution. You also agree to execute any documents and take any other actions as may reasonably be necessary, or as Freenet Project Inc. may reasonably request, to effectuate the transfer and assignment

<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="kweb_native_assets/jquery/jquery-3.1.1.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.8.2/dist/semantic.min.css">
<script src="https://cdn.jsdelivr.net/npm/fomantic-ui@2.8.2/dist/semantic.min.js"></script>
<script language="JavaScript">
/*
The C Neural Network Toolkit - Include File
(c) 1993,1994 Ian Clarke
*/
#define train teach
struct node
{
float error,input,output,correct_output,threshold,change_in_threshold;
short type;
@sanity
sanity / todo.kt
Last active August 6, 2017 15:48
fun main(args: Array<String>) {
val random = Random()
Kweb(port = 1544, refreshPageOnHotswap = true, plugins = listOf(semanticUIPlugin)) {
data class TodoItem(
val id: String,
val description: String,
val done: Boolean,
val deleted: Boolean
)
package com.github.sanity.kweb.demos.todo
import com.github.sanity.kweb.KWeb
import com.github.sanity.kweb.dom.element.creation.*
import com.github.sanity.kweb.dom.element.events.on
import com.github.sanity.kweb.dom.element.modification.addText
import com.github.sanity.kweb.dom.element.modification.delete
import kotlinx.coroutines.experimental.future.await
import kotlinx.coroutines.experimental.future.future

Keybase proof

I hereby claim:

  • I am sanity on github.
  • I am sanity (https://keybase.io/sanity) on keybase.
  • I have a public key whose fingerprint is 34F2 C999 0D28 269E 97BF 6429 110F 8172 0708 E0C2

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am sanity on github.
  • I am sanity (https://keybase.io/sanity) on keybase.
  • I have a public key whose fingerprint is C736 0C04 6AEB 5EAD C4DD B251 9C7F 9291 1C8B A445

To claim this, I am signing this object: