Full reference docs, plus four fixes found writing them - #86
Merged
Merged
Conversation
Local knowledge-graph output, built per machine; not part of the project.
The server has eight port slots and listen_port takes the first, so only seven listener lines can be bound. An eighth loaded cleanly and was then silently dropped: a port the operator configured, advertised and firewalled, with nothing listening on it. It is now a config error naming the limit.
When fee_bps of a block came to less than the 546-sat dust limit, the coinbase dropped the operator output and the pool wallet received the whole reward, but store_pplns_distribute still took fee_bps off before crediting miners. The difference sat in the pool wallet credited to nobody. The distributor now applies the coinbase's dust rule. Affects pplns-thunder and pplns-btc blocks under ~546*10000/fee_bps sats (54,600 at 1%). stratum.c's copy of the rule now uses COINBASE_DUST_SATS instead of a literal.
blocks_found_hash_idx is created by the proxy at startup, after collapsing duplicate rows, and cannot live here: install.sh applies this file under set -e on every upgrade, where a UNIQUE index over an old database with duplicates would abort the upgrade half-done, and this file must not delete rows from a possibly live shares.db. Also fix the events_lost comment, which called a counter unix seconds.
The dashboard bound every interface while the installer and docs said it was loopback behind nginx. /admin is HTTP Basic auth, which must not be reachable in the clear. DASHBOARD_BIND now defaults to 127.0.0.1, like the payout and slipstream services. install.sh sets loopback when nginx fronts it and 0.0.0.0 with --no-nginx; the Docker image sets 0.0.0.0 inside the container. A server reached directly on :8081 needs DASHBOARD_BIND=0.0.0.0 in its drop-in before upgrading. install.sh also stops claiming --pps-sats-per-diff defaults to 1000 (it defaults to unset, derived per template) and warns when it is passed.
Adds every proxy.conf key and service environment variable with defaults and validation, the stratum protocol as implemented, the coinbase layout, ports, HTTP APIs and Redis channels, the full schema, hard limits, and build/release/tests, all taken from source. Fixes claims that had gone stale: extranonce1 is no longer XORed with the clock, the stratum password is read for d=<n>, there are five modes not two, and the page no longer scrolls sideways on a phone. CHANGELOG gains an Unreleased section.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrites
docs/simplepool.htmlinto a complete reference, and fixes the problems that turned up while checking it against the source.Needs operator action
DASHBOARD_BIND=127.0.0.1). Nothing changes behind nginx. A server that serves the dashboard directly on:8081needsEnvironment=DASHBOARD_BIND=0.0.0.0in its systemd drop-in before it is upgraded or redeployed.deploy-to-server.shre-renders the unit from the template, so without that line the dashboard stops answering on:8081.install.shsets the right value itself (loopback with nginx,0.0.0.0with--no-nginx), and the Docker image sets0.0.0.0inside the container.Changes miner payouts
fee_bpscame to less than 546 sats, the coinbase had no fee output, so the pool wallet received the whole reward. The distributor still tookfee_bpsoff before crediting miners, so the difference stayed in the pool wallet, credited to no one. It now applies the coinbase's dust rule. This only affects blocks under about546 × 10000 / fee_bpssats (54,600 at 1%).Fixes
listenerline is now a config error.listen_porttakes one of the eight port slots, so only seven extra ports can be bound. An eighth used to load without error and then silently not be bound.install.sh --helpno longer says--pps-sats-per-diffdefaults to 1000; it defaults to unset, so the rate is derived per template. The installer also warns when the flag is passed.schema.sqldocuments why the uniqueblocks_found(hash)index is created by the proxy at startup and not in this file. It also fixes theevents_lostcomment, which called a counter unix seconds.Docs
docs/simplepool.htmlnow covers everything below, all checked against the source:proxy.confkey with its default, allowed values and failure behaviour; the listener sub-keys; what each mode requires; removed keys; command-line flags and exit codesd=<n>, vardiffIt also corrects stale claims: extranonce1 is no longer XORed with the clock, the stratum password is read for
d=<n>, the stat card now says five modes, and a CSS fix stops the page scrolling sideways on phones. The generated sequence diagrams are unchanged, andsequence-diagrams.py --checkpasses.CHANGELOG.mdhas an Unreleased section with the two call-outs above.Testing
make test: all 11 C suites pass. New tests:test_config: 7 listeners load, 8 are refusedtest_store: a dust-sized fee is not deducted (fails on the old code), and a real fee still isnpm testindashboard/: 189 pass, 2 skippedDASHBOARD_BINDand checked withlsofthat it listens on127.0.0.1by default and on*withDASHBOARD_BIND=0.0.0.0.