This guide explains Bitcoin Core setban RPC in plain English. It shows what the command does, what its result means and what it cannot prove.
TL;DR
- What it is: Bitcoin Core 0.16.0 setban added or removed an IP address or subnet from the node’s local banned list. A missing netmask defaulted to a single IPv4 address.
- Why it matters: setban is a precise local defence control whose main risk is overbroad scope or misunderstood time. Safe use validates CIDR and expiry and measures chain connectivity after every change.
- Current position: Require a second reviewer and explicit rollback or expiry, and pause payments, signing or network-dependent services until post-change evidence is complete.
Bitcoin Core setban RPC in simple English
Bitcoin Core setban RPC: Retain trigger, peer behaviour, scope, operator and expiry without exposing addresses widely. A ban is local incident response, not verified malicious identity.
Simple example
A node operator is checking Bitcoin Core setban RPC. Verify current state before mutation and the list afterwards. After change, monitor outbound diversity, peer count, headers, blocks and chain freshness.
Key terms in plain English
- Bitcoin Core:
- Widely used software that validates Bitcoin and can provide wallet, network and operator tools.
- RPC:
- A command that software sends to a node to request information or a local action.
- Node:
- A computer running Bitcoin software that checks data and communicates with other peers.
Scope validation
Parse and canonicalise the exact IP or CIDR without broadening it. A bare IPv4 address means one host, while a subnet can affect many honest peers. Require special approval for broad prefixes.
Add and remove
command must be add or remove. Verify current state before mutation and the list afterwards. Removing a nonexistent or wrong entry should not trigger a broader clearbanned fallback.
Relative duration
With absolute false, bantime is seconds from now. Use bounded positive integers and record calculation time. Zero or empty invokes the configured default rather than a zero-length ban.
Absolute expiry
With absolute true, bantime is Unix seconds. Validate timezone-independent epoch value, ensure it is in the future and display the resolved UTC expiry for review before executing.
Local evidence
Retain trigger, peer behaviour, scope, operator and expiry without exposing addresses widely. A ban is local incident response, not verified malicious identity. Compare independent node evidence where practical.
Connectivity impact
After change, monitor outbound diversity, peer count, headers, blocks and chain freshness. A broad or repeated ban can contribute to isolation. Keep protected recovery access and exact removal procedure.
How specialists test it
Operators test the command on a non-production node first. They check a normal reply, an invalid request, a timeout and a restart. This shows what the response means and prevents one local result from being mistaken for a network-wide outcome.
Frequently asked questions
What is the main point of Bitcoin Core setban RPC?
Bitcoin Core setban RPC: Retain trigger, peer behaviour, scope, operator and expiry without exposing addresses widely.
For Bitcoin Core setban RPC, what should a beginner know about scope validation?
Parse and canonicalise the exact IP or CIDR without broadening it. A bare IPv4 address means one host, while a subnet can affect many honest peers.
For Bitcoin Core setban RPC, what should a beginner know about add and remove?
command must be add or remove. Verify current state before mutation and the list afterwards.
For Bitcoin Core setban RPC, what should a beginner know about relative duration?
With absolute false, bantime is seconds from now. Use bounded positive integers and record calculation time.
Conclusion
setban is a precise local defence control whose main risk is overbroad scope or misunderstood time. Safe use validates CIDR and expiry and measures chain connectivity after every change.
Primary sources
Check the current specification status and the documentation for the exact implementation you operate before moving production funds or changing a mining node.
Join the ASIC Mining Discussion
Members can read and join the discussion
Log in to read comments from other miners. Create a free account if you would like to ask a question or share your experience.
Membership helps us protect the discussion from spam and keep answers useful.