Groups and Regions
A group brings several independent Haysher instances into one public view. Each instance runs its own pools and publishes its own statistics. The group adds their figures together on the overview, lists every instance's blocks and stats on the blocks and stats pages, and can show each region's label, website link, and figures on the stats page.
Why Group Instances?
- See the whole operation. Show combined hashrate, connected workers, blocks found, and the best share across regions, alongside the number of instances currently reporting, with every region's blocks and stats on one page each.
- Help miners choose a region. Labels such as America · US East, Europe · EU, and Asia-Pacific · Singapore make the available locations clear. Links take miners to each region's own portal and connection settings.
- Keep regional operation independent. Each instance keeps its own node configuration, Stratum endpoints, database, keys, accounting, and payout rules. A remote member's outage does not stop local mining or make the local health check fail.
Grouping shares public statistics. It does not combine balances or PPLNS windows, transfer miners, or route Stratum connections. Miners choose an instance and use that instance's connection settings. A region label describes the service; it does not select a host or measure latency.
Use Regional Bitcoin Nodes as a Fleet
The Bitcoin Core (bitcoind) nodes running alongside group instances can also form a shared node fleet.
Configure each engine's local node under [node] and the other regions' nodes under
[[secondary_nodes]], with access to their RPC and ZMQ endpoints over a private network.
The engine submits a found block to all eligible fleet nodes concurrently. Nodes in different regions
can then relay the block through their own peer connections, helping it reach the wider Bitcoin network
more quickly. The fleet also provides node failover: if the selected node becomes unavailable, the
engine can switch to another eligible node's template on the most-work chain, improving mining
reliability. Configure the fleet separately from [group]; see Nodes for node
selection, health checks, and block submission.
Configure a Three-Region Group
Add a [group] section to each instance's existing TOML configuration. Use the same group name and
consistent regional labels everywhere. Each instance lists only the other two members: its own figures
are included automatically.
For the Europe instance:
[group]
name = "Group"
label = "Europe · EU"
show_members = true
refresh_secs = 30
[[group.members]]
name = "amer"
url = "https://amer.example.com"
label = "America · US East"
link = "https://amer.example.com"
[[group.members]]
name = "apac"
url = "https://apac.example.com"
label = "Asia-Pacific · Singapore"
link = "https://apac.example.com"
On the America instance, set the local label to America · US East and list Europe and Asia-Pacific as
members. On the Asia-Pacific instance, set the local label to Asia-Pacific · Singapore and list Europe and
America.
Replace the example origins with the actual services. All members must run on the same Bitcoin network.
The engine reads its configuration at startup. Restart each instance after changing its group settings.
No [group] section means the portal shows that instance alone, and its group APIs return 404.
Group Options
| Key | Default | Meaning |
|---|---|---|
name |
Required | The group's name in GET /api/v1/group; 1–64 characters after trimming. |
label |
None | This instance's public region label; required when show_members = true. |
show_members |
false |
Show each instance's label and figures in the stats page's Regions card, its rows' region on the blocks and stats pages, and both in the group APIs. When false, show only group totals and unlabelled rows. |
refresh_secs |
30 |
Positive refresh interval in seconds for each remote member. Fractional seconds are supported. |
At least one [[group.members]] entry is required. Each entry takes:
| Key | Default | Meaning |
|---|---|---|
name |
Required | Internal identifier for logs and metrics: 1–32 lowercase ASCII letters, digits, or hyphens. It must be unique within this instance's member list. |
url |
Required | Origin from which the engine reads the member's public pool, stats, and blocks APIs. Each member origin must be unique. |
label |
None | Public region label; required when show_members = true. |
link |
None | Optional origin of the member's public website, which its label and its blocks' finders link to. Without it, the region is shown without a link. |
Labels are trimmed and must contain 1–32 printable characters without control characters. A supplied
label is validated even when show_members is false. Member identifiers and polling URLs are not exposed
as labels in the group API.
Both url and link must be exact HTTP or HTTPS origins, such as https://amer.example.com or
https://amer.example.com:8443, with no path, trailing slash, query, fragment, or credentials. Use HTTPS
for public services. The engine appends /api/v1/pool, /api/v1/stats, and /api/v1/blocks to url; do
not add an API path or point a member at /api/v1/group, which already contains aggregate figures. A different link can point to a public
portal while url names the origin serving that instance's API.
Refreshes and Unavailable Regions
Every instance polls its configured members from the server. The member's public /api/v1/pool endpoint
must be reachable from that server; redirects are not followed. Each fetch has a five-second timeout
and a 64 KiB response limit. An invalid response or a different Bitcoin network is rejected.
A member that answers is also read for the group's stats and blocks: its /api/v1/stats every refresh,
under the same limit, and its /api/v1/blocks, up to 256 KiB, whenever its chain tip or blocks found move.
A member's last blocks stay listed while it does not answer, since a found block stays found. A failed stats
or blocks read keeps the last one and does not stop the member's figures from counting.
The latest successful figures count for three refresh intervals from the start of their successful
poll: 90 seconds with refresh_secs = 30. A single failed poll can therefore leave recent figures in
the totals. Before the first successful response, or once those figures expire, the member is excluded
until a later successful poll.
The overview and GET /api/v1/group report:
instances: the local instance plus every configured member.reporting: the instances currently contributing figures, always including the local instance.hash_rate,devices, andblocks_found: totals from the contributing instances. Connected workers are counted as worker identities, not unique people or a deduplicated count of physical devices.round_best_share: the best of the contributing instances' best shares. Each instance's round starts at its own last block.members, whenshow_members = true: the local region first, followed by configured members in order, each with its figures and where its round starts. Unavailable members remain listed withreporting = falseand null statistics, so missing data is not presented as zero activity.
GET /api/v1/group/blocks and GET /api/v1/group/stats list every instance's blocks and stats, each row
with its instance; the blocks and stats pages show them with a Region column while show_members is on.
See the API Reference for both.
Different instances can briefly show different totals because they poll independently. Grouping does not poll recursively, so a member's group totals are never added a second time.
Verify and Monitor
After restarting, open each region's overview and check its Round card's figures and reporting count, then
its stats page's Regions card (labels, links, figures, and round starts) and the blocks and stats pages'
Region column.
For a three-region group, a healthy view shows three instances reporting. Inspect /api/v1/group on
each instance to check its local-region marker and each member's availability.
The metric haysher_group_member_up{member="amer"} indicates whether that configured remote member
currently counts in the totals. It follows the same freshness window, so it is not an instant outage
signal. Monitor each instance's peers separately alongside local health.
See Configuration for the configuration reference, API Reference for the group response, Operations for monitoring, and Web Portal for portal and website customization.
This page describes Haysher 0.2.6+3794e7f1.