Skip to content

Conversation

@luislhl
Copy link
Contributor

@luislhl luislhl commented Jan 14, 2026

Motivation

An easy way to dynamically add peer-ids to our blacklist was needed to block some misbehaving peers.

Although we have the /p2p/netfilter endpoint built in #484, it's more generic and more low level, requiring the user to know about chain names, rule names, keep the uuid of created rules when deleting them, etc.

The sysctl command aims to be a simpler/quicker way to add peer-ids to the blacklist, and it works well with the current p2p.kill_connection sysctl command (because neither this new command nor the existing endpoint will disconnect the peer-ids after adding to the blacklist, in case it's connected already).

Acceptance Criteria

  • New sysctl commands p2p.blacklist.add_peers, p2p.blacklist.remove_peers and p2p.blacklist.list_peers
  • Validate that the peer-ids are in a valid format
  • Keep track of the rule uuid so that user can remove them later using only the peer-id
  • These rules will be kept in memory and be specific for one fullnode, so they won't persist throughout the network. The user could use the --peer-id-blacklist cli arg to make them persist in each needed fullnode.

TODO

  • Update docs/SOPs with the new command
  • Test

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@luislhl luislhl self-assigned this Jan 14, 2026
@luislhl luislhl moved this from Todo to In Progress (Done) in Hathor Network Jan 14, 2026
@luislhl luislhl requested a review from glevco January 14, 2026 21:19
@luislhl luislhl moved this from In Progress (Done) to In Progress (WIP) in Hathor Network Jan 14, 2026
@github-actions
Copy link

github-actions bot commented Jan 14, 2026

🐰 Bencher Report

Branchfeat/sysctl/peer-id-blacklist
Testbedubuntu-22.04

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Lower Boundary
(Limit %)
sync-v2 (up to 20000 blocks)Latency
minutes (m)
📈 plot
🚷 threshold
🚨 alert (🔔)
1.38 m
(-19.62%)Baseline: 1.72 m
1.54 m
(111.97%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
minutes (m)
(Result Δ%)
Lower Boundary
minutes (m)
(Limit %)
Upper Boundary
minutes (m)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚷 view threshold
🚨 view alert (🔔)
1.38 m
(-19.62%)Baseline: 1.72 m
1.54 m
(111.97%)

2.06 m
(66.98%)
🐰 View full continuous benchmarking report in Bencher

@luislhl luislhl force-pushed the feat/sysctl/peer-id-blacklist branch from ebde188 to 73cc599 Compare January 20, 2026 19:50
@luislhl luislhl force-pushed the feat/sysctl/peer-id-blacklist branch from 73cc599 to 87d1c04 Compare January 20, 2026 20:05
@luislhl luislhl moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress (Done)

Development

Successfully merging this pull request may close these issues.

2 participants