mirror of
https://github.com/logos-blockchain/research.git
synced 2026-08-07 11:43:20 +00:00
First half of the cover-traffic work: the two new modules and their tests. quota.py -- the emission budget. Cover traffic gives every node the same number of emissions per epoch, which only holds while a node block proposals fit inside its quota. The bind is exact: alpha_max = ln(1-q)/ln(1-f), where alpha is stake relative to the INFERRED total D_hat, since that is the denominator the lottery threshold is derived from. In true stake the ceiling carries the estimator ratio, s_max = (D_hat/D)*alpha_max, with D_hat/D an input rather than an assumption. The familiar q/f is a small-q approximation that runs 1.7% high and so overstates the tolerable stake. Sitting on the mean bind overruns the quota half the time, so max_alpha_for_confidence gives the ceiling that holds with stated probability. traffic.py -- the timeline. The rest of the simulator samples independent rounds and draws each hold from the stationary residual, which has no notion of time and so can never let two messages meet at a relay. Here every node owns one free-running clock shared by all messages through it, extended lazily so only the relays actually visited grow one. A clock sampled once still reproduces mixclock.mix_wait, so single-message statistics are unchanged. It separates two quantities that are easy to conflate: mixing (messages a relay holds at once) and blending (messages it has SEEN between consecutive releases). Blending is the anonymity set -- every broadcast reaches every node, so an observer cannot tell which of them the relay forwarded. Gaps sampled at a release are size-biased, so blending is rate*(2M+1)/3, twice the mean hold, not rate*M/2 as a naive reading gives. Measured within 1-4% of that at M = 3, 10, 30 and linear in the cover rate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>