# LXMF: propagation node peering can silently never start (ZeroDivisionError in stamp generation)

_Purgatory · started by esilveira on Sun, Sep 20, 2026 9:53 PM_

Tags: LXMF

---

## Original post

**esilveira** · Sun, Sep 20, 2026 9:53 PM

If your propagation nodes never peer, and nothing in the logs says why, this may be it.

LXStamper.generate_stamp finds the stamp, then computes speed = rounds/duration only to
write a debug line. When the search finishes inside one clock tick, duration is 0.0,
and the ZeroDivisionError propagates out — throwing away a stamp that had already been
found.

It is silent because LXMPeer.sync() generates the peering key on a daemon thread. The
exception reaches only that thread's stderr, the key is never set, peering_key_ready()
stays False, and every later sync is postponed with "since a peering key has not been
generated yet". Peering then simply never happens.

How often, on Windows 11 / Python 3.10.11, at the default peering cost of 1:
ZeroDivisionError in 17 of 20 runs. At cost 8, 1 of 20. It depends on your clock's
granularity, which is why it can look like a local quirk — on a second machine here, every
single run raised.

Raising peering_cost is not a fix. It only shortens the odds, and charges real work
(~100 ms at cost 14, ~800 ms at cost 18, per peering key).

Reproduction, no network needed: repro_lxmf_stamp.py in
github.com/elSilveira/dethron-research/tree/master/window/upstream

The one-line guard, applied to all four divisions of the same shape:
Reticulum-Community/LXMF PR #1.

Not filed at markqvist/LXMF its MIRROR.md asks for no issues or discussions, and that
seems worth respecting even for a patch. If you maintain a fork, take it; no attribution
needed.

---

## Reply 1

**burger** · Tue, Sep 29, 2026 10:37 AM

нет иди нахуй

---
