Skip to content

Releases

simplepool 0.5.1

Choose a tag to compare

@github-actions github-actions released this 12 Nov 16:51
a673616

0.5.1 — simplepoolctl upgrade installs what it says it installed

Installer-only release; the pool, dashboard and payout code are the same as
0.5.0.

Operators: check what you are actually running

simplepoolctl upgrade <tag> on a source install whose tree is not a git
checkout (for example one unpacked from a tarball or zip) rebuilt the code
already on disk and then reported built from source (<tag>). Nothing was
upgraded. Check with:

/home/simplepool/build/simplepool --version

If that does not say the version you upgraded to, the scripts on the box are
the old ones and cannot fix themselves. Install the release over the tree
instead, after backing up the database; proxy.conf and shares.db are kept:

sudo sqlite3 /home/simplepool/data/shares.db ".backup /root/shares-pre-0.5.1.db"
sudo bash /home/simplepool/scripts/install.sh --non-interactive --yes --from-release v0.5.1

That also records the box as a release install, so later upgrades fetch
releases. Coming from 0.4.x or earlier, the first start builds an index on
shares(block_hash) before accepting miners (see 0.5.0).

Fixed

  • The installer refuses a requested branch or tag on a tree without .git,
    and says how to install the release instead, rather than rebuilding the old
    code. A plain re-run with no --branch still builds the tree as it is.
  • simplepoolctl upgrade <tag> on a git checkout no longer fails: a tag has no
    origin/<tag> to reset to, so tags are now checked out detached. An unknown
    name stops the install instead of half-running it.
  • The install summary prints the version and commit the built binary reports,
    not the branch name that was asked for.
  • simplepoolctl upgrade stops on a non-git source tree before running the
    installer, stops when the installer fails, and checks after the build that
    the binary reports the requested release version.

Install

curl -fsSL https://raw.githubusercontent.com/LayerTwo-Labs/simplepool/v0.5.1/scripts/install.sh | sudo bash

The installer downloads the tarball below, verifies it against SHA256SUMS,
and interviews you for the rest. See INSTALL.md.

Verify a download by hand

sha256sum -c --ignore-missing SHA256SUMS

Binaries are built on Ubuntu 22.04 (glibc 2.35), so they also run on
Ubuntu 24.04 and Debian 12. Each tarball carries a RELEASE file and a
build/simplepool.build.json pinning the binary to this commit by sha256.

simplepool 0.5.0

Choose a tag to compare

@github-actions github-actions released this 11 Nov 12:45
a6a811e

0.5.0 — a share is paid once, and one miner can no longer hold up the pool

The headline is accounting: a share is now credited exactly once, in memory
and on disk, and the guards that make that true cannot be turned against the
rest of the pool by one connection. Three operator options arrive, all off by
default: the reject guard, per-listener clean_jobs=never, and vardiff's fast
first climb.

Miners on pps-classic: a replayed share is no longer credited twice on disk

The share writer now skips a share whose hash is already in shares, and
writes the PPS credit for a share in the same transaction as the share itself:
a share that is not written is not credited, and a credit cannot land without
its share. Before, the credit was a separate event, so a replayed hash (for
example across a pool restart, which empties the in-memory duplicate check)
was stored and credited again. A batch that fails is rolled back and retried
as a whole; one that keeps failing is dropped and reported, where before only
its failing rows were lost. Rows and balances already in the database are left
as they are.

Operators: the first start after upgrading builds an index on
shares(block_hash). On a large shares.db that takes a while, during which
the pool is not yet accepting connections; plan the restart for it.

A miner that stops reading no longer delays everyone else's new job

A job broadcast wrote to each miner in turn while holding the connection-list
lock, and each write was bounded only by the 10 s socket send timeout. N
miners that had stopped reading delayed the new job for every other miner by
up to N x 10 s, and no connection could be accepted or torn down meanwhile.
The broadcast now writes outside that lock, and all its writes share one
deadline, bcast_send_budget_ms (default 300). A miner whose notify cannot be
written by then is disconnected, as one past the old timeout was; so is one
whose own reply write has held its socket for more than 20 ms (each such
miner reached after the budget is spent adds up to 20 ms). A miner that is
reading is unaffected. A failed reply write now also closes the connection
instead of carrying on after a possibly partial line. Nothing to configure.

Reject guard: close connections that send almost only bad shares (opt-in)

A connection could send bad shares for ever: the pool kept the socket open,
wrote a reject row per submit and validated each one. Set
reject_guard_pct (for example 90) and a connection whose judged share
attempts -- accepted, low difficulty, invalid, duplicate, unknown or stale job
-- are more than that percentage rejected, after reject_guard_min_samples
(default 200) of them, gets one error and is closed. The worker is then
refused at authorize for reject_guard_cooldown_sec (default 600), doubling
for each repeat while the last offence is remembered (24 h after its cooldown
ends), up to reject_guard_max_cooldown_sec (default
86400). The cooldown is keyed on (worker name, peer address), so other rigs
behind the same address are untouched; it is a soft cooldown (a new worker
label avoids it), while the close always holds: the counts belong to the
connection, and re-authorizing or renaming does not restart them. Default off:
nothing changes unless you set it. See proxy.conf.example.

Operators: per-listener clean_jobs=never

A listener line takes a new field, clean_jobs=tip|never; the default is
tip, which is today's behaviour, so nothing changes unless you set it. Some
hashrate-marketplace proxies flush their whole fleet's in-flight work when a
notify carries clean_jobs=true and report the flushed shares as rejects on
their own meter, and can stop routing hashrate to the pool. On a never port
every broadcast carries clean_jobs=false, including on a new block. The
trade-off: miners on that port keep hashing the previous block's job a little
longer. Those shares are still accepted, because retired jobs stay solvable,
but a share that meets the network target on the old tip is a block on the old
parent and will be stale. Use it only on a port where the clean flag does more
harm. The first notify after authorize keeps clean_jobs=true. Any value other
than tip or never is a startup error.

A share can no longer be credited twice after the duplicate ring turns over

The server-wide duplicate check forgot its oldest hash whenever a new one
arrived, whatever its age. Jobs stay solvable for up to 5 minutes, so on a pool
taking more than about 55 shares/s a share's hash could leave the ring while
its job could still be named, and the same share sent again was credited
again. A hash is now forgotten only once its job can no longer be named, and
only shares that met their share target (or the network target) are recorded.
When every hash in the ring still covers a solvable job, a connection holding a
quarter of the ring or more has its new share refused with duplicate check full, share not credited (still counted toward its vardiff, so it climbs out);
every other connection is still credited, the oldest hash being forgotten for
it as before. One connection filling the ring therefore cannot stop the rest
of the pool being paid. A share that meets the network target is always
submitted as a block and recorded. The ring
now holds 262144 hashes (12 MB, up from 640 KB), enough for about 790 shares/s
sustained pool-wide at the default 30 s job cadence; with no new job, a stall
fills it after 262144 shares (about 44 min at 100 shares/s).

Capacity, and why it refuses. The ring holds 262144 hashes for up to
~330 s each, so it covers about 790 shares/s. The hashrate that fills it is
790 × the lowest difficulty a connection can have (initial_diff, or
vardiff_min with vardiff on) × 2^32: at difficulty 1, the default, that is
only ~3.4 TH/s of real work, e.g. from connections reopened before vardiff
raises them. Set vardiff_min / initial_diff so this is well above any
single miner the pool expects; the pool logs the figure at startup and warns
below 1 PH/s. A bounded memory must either forget keys of live jobs
(and risk paying a share twice) or refuse when full; this refuses the
connection that is filling it and no one else.

Operators: watch the log for duplicate check full. It is reported once
per 10 s per connection, with the count refused, and means the pool is taking
shares faster than the ring covers. It also appears if no new job arrives for
a long time (template source down): the current and recent jobs then never
expire, so once the ring has filled, the connections holding most of it are
refused until a new job comes. On a network whose target is easier than the share target
(e.g. regtest) every share is a block, so the oldest hash is always dropped
and the ring behaves as before.

Vardiff: opt-in fast first climb

New vardiff_fast_climb (default 0, off). A connection far below its
hashrate submits hundreds of shares a window, and the 4x-per-window step can
take minutes to reach the right difficulty. With vardiff_fast_climb = 1, a
window holding at least 200 shares at the current difficulty whose rate is over
twice the target retargets up after 5 s by the measured ratio (capped at
1024x). Downward moves and all other windows are unchanged. It needs
vardiff_min_samples at 200 or below; above that it never fires.

Vardiff no longer chases shares mined at an earlier difficulty

A retarget sends mining.set_difficulty without re-notifying, so a miner keeps
returning shares for jobs issued at the previous difficulty. Those shares were
counted as evidence about the new difficulty: after a downward step they read
as a rate spike, pushed difficulty straight back up, and the next window then
read low and stepped down again. Only shares credited at the difficulty now in
force are counted toward the rate. A window made mostly of earlier-difficulty
shares is treated as draining rather than idle: it restarts instead of taking
the idle step down. A client that keeps returning shares for older jobs can
hold vardiff still for up to the job retention time (300 s) after a change; it
cannot stay stuck beyond that, since those jobs expire. Nothing to configure.

Jobs built from an unchanged template are now distinct work

The pool re-issues a job every 30 s even when the template has not moved, and
until now that job's coinbase and merkle root were byte-identical to the
previous one's -- only ntime moved. A rig that restarts its search on each
job and rolls ntime could land on a header it had already submitted, and the
pool rejected the re-found hash as a duplicate share. Each job now carries its own 4-byte salt in the coinbase
scriptSig (one 5-byte push after the tag; derived from the job id). The push
counts against the 100-byte scriptSig cap and against coinbase_max_bytes, so
a coinbase sitting exactly at either limit can lose its last payout or be
refused where it was not before. Nothing to configure.

Operators: the dashboard now listens on loopback by default

dashboard/server.js binds DASHBOARD_BIND, default 127.0.0.1, where it
used to bind every interface. Behind nginx nothing changes. If you reach the
dashboard directly on :8081, add Environment=DASHBOARD_BIND=0.0.0.0 to its
systemd drop-in before upgrading
, or it stops answering there. install.sh
sets it for you: loopback with nginx, all interfaces with --no-nginx. The
Docker image sets 0.0.0.0 inside the container.

Miners on pplns-thunder / pplns-btc: small blocks are no longer short-changed

When a block's operator fee came to less than the 546-sat dust limit, the
coinbase (correctly) paid no fee output and the pool wallet received the whole
reward — but the distributor still took fee_bps off before crediting miners,
so the difference sat in the pool wallet credited to nobody. The distributor
now applies the coinbase's dust rule. Only blocks worth less than roughly
546 × 10000 / fee_bps sats are...

Read more

v0.4.0

Choose a tag to compare

@rsantacroce rsantacroce released this 12 Oct 21:15
5f9ac48

What's Changed

  • Bring the explainer up to date with what 0.3.0 actually does by @rsantacroce in #59
  • Stop the docs contradicting the code, and each other by @rsantacroce in #60
  • Document the guard that turns miners away, and stop contradicting it by @rsantacroce in #62
  • Pay taproot and P2WSH addresses instead of validating them and dropping them by @Wired4ncer in #68
  • stratum: don't touch a connection after handing it to its thread by @Wired4ncer in #67
  • Open an existing database again, instead of indexing a column it lacks by @Wired4ncer in #64
  • stratum: fix a use-after-free on the per-connection coinbase, and four lifetime bugs around it by @Wired4ncer in #66
  • vardiff: a downward retarget trips the miner-floor check and undoes itself by @Wired4ncer in #69
  • Leave stdin alone when a listener fails to bind by @Wired4ncer in #65
  • Demote the per-submit SUBMIT CHECK dump from INFO to DEBUG by @Wired4ncer in #71
  • config: stop truncating values at a '#' by @Wired4ncer in #70
  • Widen the job retention window from ~60s to ~300s by @Wired4ncer in #72
  • Let miners reach the pool over IPv6, behind a config gate by @Wired4ncer in #73
  • Let a miner ask for its own difficulty, as a floor it cannot go under by @Wired4ncer in #74
  • WIP: pplns pool_mode — pooled mining without operator variance by @rsantacroce in #61
  • regtest: follow the enforcer's ack policy from boolean to enum by @rsantacroce in #77
  • Stop every share submission from scanning 16,384 keys under one lock by @Wired4ncer in #78
  • pplns window: refuse a walk that cannot prove it covered the window by @Wired4ncer in #81
  • coinbase-direct PPLNS — pay the window from the block's own coinbase by @rsantacroce in #76
  • vardiff oscillates at the shipped defaults: six shares a window is not a rate by @Wired4ncer in #80
  • Nothing limits mining.authorize: budget it per connection and per address by @Wired4ncer in #79
  • Use the long-poll client for the startup ping and initial GBT (slow/large templates) by @mblowes in #75
  • dashboard: light theme by default, less page per visit, and the network difficulty by @rsantacroce in #82
  • slipstream: take txs from anyone, get them into the pool's blocks by @rsantacroce in #83
  • dashboard: a Slipstream page by @rsantacroce in #84
  • dashboard: a Slipstream page (#84, onto main) by @rsantacroce in #85
  • Full reference docs, plus four fixes found writing them by @rsantacroce in #86
  • docs: publish simplepool.html to GitHub Pages by @rsantacroce in #88
  • broadcaster: post pool stats to a Telegram channel by @rsantacroce in #87
  • docs: publish the Slipstream API guide to GitHub Pages by @rsantacroce in #89
  • broadcaster: post a periodic stats update (BROADCASTER_SUMMARY_HOURS) by @rsantacroce in #93
  • broadcaster: post into one topic of a forum group (TELEGRAM_THREAD_ID) by @rsantacroce in #94
  • stratum: make the listen backlog configurable; 64 silently drops connections by @Wired4ncer in #91
  • main: give submitblock its own client and its own timeout budget by @Wired4ncer in #90
  • broadcaster: /pool_status, a pin switch, and the last block in snapshots by @rsantacroce in #95
  • broadcaster: say "last mined block", and show the chain tip beside it by @rsantacroce in #96
  • dashboard: grace period for a new block's bare template by @rsantacroce in #97
  • dashboard: add a "Pool at a glance" card to the overview by @rsantacroce in #99
  • coinbase: per-job salt push so jobs from an unchanged template are distinct work by @Wired4ncer in #98
  • test: cbwin-e2e waits for the DB lock when it renames shares by @rsantacroce in #100

New Contributors

Full Changelog: v0.3.0...v0.4.0

simplepool 0.3.0

Choose a tag to compare

@github-actions github-actions released this 25 Aug 13:08
9fc3251

Install

curl -fsSL https://raw.githubusercontent.com/LayerTwo-Labs/simplepool/v0.3.0/scripts/install.sh | sudo bash

The installer downloads the tarball below, verifies it against SHA256SUMS,
and interviews you for the rest. See INSTALL.md.

Verify a download by hand

sha256sum -c --ignore-missing SHA256SUMS

Binaries are built on Ubuntu 22.04 (glibc 2.35), so they also run on
Ubuntu 24.04 and Debian 12. Each tarball carries a RELEASE file and a
build/simplepool.build.json pinning the binary to this commit by sha256.