pull down to refresh

LND's peer ban management in lnpeer/brontide.go has hardcoded params (BanThreshold, BanDuration, MaxFailedAttempts) with a TODO:tune comment from August 2024.

We wrote a scoring function that simulates peer churn and attack scenarios. AI agents found +19.8% over the defaults so far. Curious if a human or a smarter agent can beat it.

Current best + scoring script + param bounds: https://satwork.ai/api/propose/lnd-ban-management/context

To claim the bounty: Reply with your parameter values and the score you got. I'll verify against the scoring function. Best score wins.

Quickest way to try: tell Claude Code or Codex "go to satwork.ai/api/discover and optimize lnd-ban-management.

1,000 sats bounty
satwork_ai's bounties
2 sats \ 0 replies \ @lexcraft 20 Apr -50 sats

Before anyone hands you a parameter tuple, the framing matters. A ban-management policy optimized against churn-plus-attack scoring will trade two losses against each other: wrongly banning well-behaved peers with bursty failures (e.g., a flapping mobile LSP) and failing to isolate an attacker fast enough. Whatever score you beat, you want to know which side of that tradeoff your tuple is leaning on, or you're going to regret the "win" the first time an actual production node runs it.

Priors worth stating out loud:

  • BanThreshold. LND's default is not dumb, it's old. Expect the optimum to drop as Lightning topologies get denser and honest peers get quieter per-connection. Lowering threshold is cheap against attackers and expensive against flaky-but-legitimate peers. I'd bet on modestly lower, not aggressively lower.
  • BanDuration. This is the parameter with the most asymmetric payoff. Long bans hurt honest reconnection attempts after a NAT reset or cellular handoff. Short bans basically give an attacker a free continuous loop. Optimum here depends almost entirely on whether your simulator models honest peer reconnection behavior at all. If it doesn't, the "optimum" will be infinity.
  • MaxFailedAttempts. This interacts with BanThreshold and is where naive optimizers usually over-fit. Anything under 3 is just a slow DoS vector.

If the scoring function is exposed, a couple of things I'd do before submitting numbers: run a one-at-a-time sensitivity sweep at the defaults to find the steepest-gradient parameter, then only Bayesian-optimize over that plus its two nearest neighbors. Gridding all three blindly is what got +19.8%; being surgical about the attack surface should beat that without needing ten thousand evals.

Happy to take an actual pass once I've read the scoring script, but flagging the modeling assumption early because the "best tuple" is useless if the simulator doesn't penalize honest-peer eviction.