blockyard 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +929 -0
- package/LICENSE +202 -0
- package/NOTICE +4 -0
- package/README.md +191 -4
- package/SECURITY.md +38 -0
- package/bin/blockyard.js +41 -0
- package/config/pool-map.json +2620 -0
- package/docs/API.md +1577 -0
- package/docs/ARCHITECTURE.md +1394 -0
- package/docs/AUTO-UPDATE.md +269 -0
- package/docs/CONFIGURATION.md +847 -0
- package/docs/DEFECTS.md +813 -0
- package/docs/EFFECTS-AGENTS.md +448 -0
- package/docs/GETTING-STARTED.md +205 -0
- package/docs/INSTALL.md +547 -0
- package/docs/MEASUREMENTS.md +1401 -0
- package/docs/RULES.md +681 -0
- package/docs/SECURITY-AUDIT-2026-09-14.md +177 -0
- package/docs/SECURITY-AUDIT.md +258 -0
- package/docs/SECURITY.md +212 -0
- package/docs/TROUBLESHOOTING.md +332 -0
- package/docs/USER-GUIDE.md +1262 -0
- package/package.json +53 -5
- package/public/404.html +9 -0
- package/public/css/app.css +2009 -0
- package/public/donate-qr.png +0 -0
- package/public/index.html +1085 -0
- package/public/js/about.js +112 -0
- package/public/js/agents.js +1141 -0
- package/public/js/app.js +1386 -0
- package/public/js/arkanoid.js +806 -0
- package/public/js/blockanoid.js +347 -0
- package/public/js/blockout.js +347 -0
- package/public/js/blockpack.js +428 -0
- package/public/js/blockscene3d.js +2830 -0
- package/public/js/breakout.js +224 -0
- package/public/js/charts.js +635 -0
- package/public/js/depthchart.js +315 -0
- package/public/js/details3d.js +4342 -0
- package/public/js/doom.js +31 -0
- package/public/js/dosaudio.js +48 -0
- package/public/js/dosgame.js +389 -0
- package/public/js/dosio.js +186 -0
- package/public/js/dospc.js +1353 -0
- package/public/js/dosworker.js +196 -0
- package/public/js/explorer.js +405 -0
- package/public/js/feepalette.js +149 -0
- package/public/js/fmt.js +162 -0
- package/public/js/goggles.js +886 -0
- package/public/js/kiosk.js +41 -0
- package/public/js/login.js +88 -0
- package/public/js/markets.js +395 -0
- package/public/js/mining.js +1416 -0
- package/public/js/panels.js +970 -0
- package/public/js/pricechart.js +189 -0
- package/public/js/quake.js +20 -0
- package/public/js/settings.js +1096 -0
- package/public/js/soundcard.js +459 -0
- package/public/js/tetris.js +226 -0
- package/public/js/tetrust.js +356 -0
- package/public/js/tetsound.js +175 -0
- package/public/js/theme.js +235 -0
- package/public/js/wolf3d.js +22 -0
- package/public/js/x86.js +1978 -0
- package/public/login.html +33 -0
- package/scripts/blockfile-measure.js +156 -0
- package/scripts/browser-check.mjs +286 -0
- package/scripts/check.js +173 -0
- package/scripts/decode-check.js +81 -0
- package/scripts/doc-counts.js +109 -0
- package/scripts/donate-qr.py +23 -0
- package/scripts/dos-bench.js +56 -0
- package/scripts/fake-node.js +534 -0
- package/scripts/index-bench.js +216 -0
- package/scripts/index-benchmark.js +117 -0
- package/scripts/index-build.js +40 -0
- package/scripts/live-render-check.mjs +89 -0
- package/scripts/manage-users.js +132 -0
- package/scripts/motion-check.mjs +138 -0
- package/scripts/pool-map.js +157 -0
- package/scripts/setup.js +432 -0
- package/scripts/shots.mjs +278 -0
- package/scripts/smoke.sh +327 -0
- package/scripts/tls.js +31 -0
- package/scripts/ui.js +174 -0
- package/server/auth/sessions.js +221 -0
- package/server/auth/users.js +243 -0
- package/server/chain/blockfile.js +234 -0
- package/server/chain/index/build.js +210 -0
- package/server/chain/index/heights.js +36 -0
- package/server/chain/index/live.js +276 -0
- package/server/chain/index/rows.js +145 -0
- package/server/chain/index/store.js +154 -0
- package/server/chain/index/worker.js +109 -0
- package/server/chain/tx.js +310 -0
- package/server/collect/gbt.js +229 -0
- package/server/collect/logparse.js +765 -0
- package/server/collect/logtail.js +189 -0
- package/server/collect/markets.js +333 -0
- package/server/collect/mining.js +333 -0
- package/server/collect/monitor.js +2545 -0
- package/server/collect/network.js +295 -0
- package/server/collect/nextblock.js +275 -0
- package/server/collect/sync.js +386 -0
- package/server/config.js +644 -0
- package/server/http/api.js +1319 -0
- package/server/http/explorer.js +418 -0
- package/server/http/games.js +77 -0
- package/server/http/server.js +420 -0
- package/server/http/sse.js +176 -0
- package/server/http/static.js +212 -0
- package/server/main.js +673 -0
- package/server/netinfo.js +253 -0
- package/server/rpc/allowlist.js +130 -0
- package/server/rpc/client.js +414 -0
- package/server/store/audit.js +148 -0
- package/server/store/history.js +220 -0
- package/server/store/ledger.js +290 -0
- package/server/store/ring.js +173 -0
- package/server/tls/selfsigned.js +160 -0
- package/server/util/fmt.js +29 -0
- package/systemd/blockyard.service +102 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 BobClawblaw and contributors
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
CHANGED
|
@@ -1,6 +1,193 @@
|
|
|
1
|
-
#
|
|
1
|
+
# BlockYard
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
A live, multi-user web monitor and block explorer for
|
|
4
|
+
[Bitcoin Core](https://github.com/bitcoin/bitcoin).
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Point it at your node and open a browser: live charts, a 3D block-space viewer,
|
|
7
|
+
a block / transaction / address explorer, exchange prices with order-book depth, and a
|
|
8
|
+
kiosk view for a wall screen. No dependencies to install, no CDN, no telemetry, no outbound
|
|
9
|
+
connection but to your node out of the box, and read-only toward your node by default.
|
|
10
|
+
|
|
11
|
+
**This is 100% machine-generated code, directed by a human operator.** Every line of the
|
|
12
|
+
server, the browser app, the 3D engine, the tests and these documents was written by an AI
|
|
13
|
+
under a human's direction, and all auditing has been performed by AI and is published in this
|
|
14
|
+
repository ([docs/SECURITY-AUDIT.md](docs/SECURITY-AUDIT.md), [docs/SECURITY-AUDIT-2026-09-14.md](docs/SECURITY-AUDIT-2026-09-14.md), [docs/DEFECTS.md](docs/DEFECTS.md),
|
|
15
|
+
[docs/MEASUREMENTS.md](docs/MEASUREMENTS.md)). It is **experimental pre-release software: expect
|
|
16
|
+
bugs.**
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
## Highlights
|
|
21
|
+
|
|
22
|
+
| | |
|
|
23
|
+
|---|---|
|
|
24
|
+
| **Block space, in 3D.** The next block's worth of the mempool as a board of glowing tiles: area is vbytes, colour is feerate. Refreshes are choreographed — blocks lift, travel in collision-free lanes and land under gravity — and the board comes alive at rest with **34 idle effects**, from ripples and light cycles to a lightning ball, ball lightning, a UFO's tractor beam, Missile Command, fireworks, code rain and a demoscene plasma. Two viewer modes: **Simple** (the richest few hundred transactions as cubes) and **Detailed** (every transaction in the block). |  |
|
|
25
|
+
| **A board you can tune.** Neon-tube blocks, a metallic sheen or a chrome finish that mirrors a horizon, a movable lamp, a touch of perspective, a spiral galaxy behind the board, and a switch for every one of the 34 effects — in a tabbed settings panel. Stored on the server (`config/blockyard.json`), so every screen sees the same board; they change how things are *drawn*, never what is measured. |  |
|
|
26
|
+
| **An explorer that looks the part.** Search a height, block hash, txid or address. Transaction pages with fee, fee rate and dollar value, feature badges, a flow diagram from inputs to outputs, and links to where every coin came from and went. **Address pages with full history and balance** — Bitcoin Core has no address index, so BlockYard builds its own from the node's block files (**a few hours** on first start, 124 GB) and keeps it current as blocks arrive. |  |
|
|
27
|
+
| **Markets.** Five exchanges' public prices: a 3D candle chart with a neon price line, a precise flat candlestick chart, an exchange table, and a bitcoinity-style order-book depth chart with change bars. Off until you tick **Enable market polling** — it is the one thing that talks to anyone but your node — and, once on, fetched by the server only while someone is looking. |  |
|
|
28
|
+
| **Kiosk.** The 3D markets board, a price panel and the block-space board side by side, full screen with one click. |  |
|
|
29
|
+
| **Tetrust, Blockout and Blockanoid.** Three playable games built on the same 3D engine — trust, but verify. Tetrust is Tetris: the well is the block-space board and the music is synthesised in the browser. Blockout is Breakout, where the wall is made of block-space stones and the bat follows your mouse. Blockanoid is Arkanoid: a different wall every level, silver bricks that take more than one hit, gold that takes none, and capsules that fall out of what you break — laser, wide, catch, slow, three balls, a life. All three pause when you look away and keep high scores per browser. And **Wolfenstein 3D**, **DOOM** and **Quake**: the real shareware `WOLF3D.EXE` (1992), `DOOM.EXE` (1993) and `QUAKE.EXE` (1996), unmodified, on a PC emulated in the browser — processor in real and protected mode, FPU, DOS and both extenders, VGA and Sound Blaster written from scratch, still with no dependencies. So if anyone asks *"well, can it run DOOM?"*, the answer is an emphatic **"Naturally. What sort of AI slop generator do you take me for?"** |  |
|
|
30
|
+
|
|
31
|
+
Also on board: a sync viewer with an honest ETA, Block flow (projected blocks, the block
|
|
32
|
+
being built, recent blocks), mempool and fee charts, a peer table, bandwidth, the node's
|
|
33
|
+
event stream, a provenance table for every figure, a read-only RPC console behind a
|
|
34
|
+
default-deny allowlist, and a tabbed **Display settings** panel (the gear) that tunes every
|
|
35
|
+
board without a reload and picks the layout's colours — light or dark, the shipped look, Mono,
|
|
36
|
+
Nous, GitHub, Catppuccin, or nine colours of your own.
|
|
37
|
+
|
|
38
|
+
## Quick start
|
|
39
|
+
|
|
40
|
+
You need **Node.js 22 or newer** and a running **Bitcoin Core 25.0 or later** with `server=1`
|
|
41
|
+
and `txindex=1`, **on the same machine** — BlockYard reads the node's block files to build the
|
|
42
|
+
explorer's address index, and a node on another machine is not supported. Without `txindex` the
|
|
43
|
+
explorer cannot look a confirmed transaction up by id; everything else works without it (see
|
|
44
|
+
[Requirements](docs/INSTALL.md#1-requirements)). Plan for disk: the index is about **125 GB**, on
|
|
45
|
+
top of the node's own ~875 GB of block files.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
git clone https://github.com/BobClawblaw/blockyard.git
|
|
49
|
+
cd blockyard
|
|
50
|
+
npm test # optional: 945 unit tests, all built in
|
|
51
|
+
npm run setup # reads the node's bitcoin.conf, checks the node, writes config/local.json
|
|
52
|
+
npm start # builds the address index in the background (a few hours); open https://127.0.0.1:21000
|
|
53
|
+
# and sign in as admin with the password the first start prints once
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`npm run setup` asks for the node's data directory, reads its `bitcoin.conf` for the rest,
|
|
57
|
+
proves the credentials, the chain, `txindex`, the block files and how fast the node answers,
|
|
58
|
+
writes `config/local.json`, and offers to start BlockYard there and then. The address index is
|
|
59
|
+
built **by BlockYard itself, in the background**, the first time it starts, and **it takes a few
|
|
60
|
+
hours** — about two on the default four workers on NVMe, longer on spinning disks (30 minutes on
|
|
61
|
+
16 workers) — with progress on the Overview and a notification when it is done; every other page
|
|
62
|
+
works meanwhile, and address pages fill in once it finishes. Step by step for macOS and Linux: **[docs/GETTING-STARTED.md](docs/GETTING-STARTED.md)**.
|
|
63
|
+
To try it first without a node: `npm run dev` runs against a built-in fake one on port 18088.
|
|
64
|
+
To check a setup again later: `npm run check`.
|
|
65
|
+
|
|
66
|
+
**Why the same machine?** Running BlockYard elsewhere and reading a node over RPC alone was
|
|
67
|
+
tried (2026-09-13) and abandoned: the charts filled in, but the explorer could not be made to
|
|
68
|
+
work in real time over RPC — Core has no address index, and the one RPC that can answer a
|
|
69
|
+
balance holds the node's RPC thread for tens of seconds per query. The address data has to be
|
|
70
|
+
rebuilt from the block files and stored locally, the way mempool.space's `electrs` does it, so
|
|
71
|
+
BlockYard lives next to the node. See
|
|
72
|
+
[It runs on the node's machine](docs/INSTALL.md#it-runs-on-the-nodes-machine).
|
|
73
|
+
|
|
74
|
+
The full walkthrough — service install, network exposure, accounts, TLS, a reverse proxy —
|
|
75
|
+
is in **[docs/INSTALL.md](docs/INSTALL.md)**.
|
|
76
|
+
|
|
77
|
+
## Documentation
|
|
78
|
+
|
|
79
|
+
| document | what it covers |
|
|
80
|
+
|---|---|
|
|
81
|
+
| [Getting started](docs/GETTING-STARTED.md) | macOS or Linux, from a command prompt: Core settings, Node 22, `npm run setup`, the background index build, running it |
|
|
82
|
+
| [Install](docs/INSTALL.md) | requirements, first run, systemd service, exposure, accounts, TLS, reverse proxy, updating |
|
|
83
|
+
| [Configuration](docs/CONFIGURATION.md) | every config key and environment variable, with examples |
|
|
84
|
+
| [User guide](docs/USER-GUIDE.md) | a tour of every tab and panel, and how to read them |
|
|
85
|
+
| [API](docs/API.md) | the JSON HTTP API and the Server-Sent Events stream |
|
|
86
|
+
| [Architecture](docs/ARCHITECTURE.md) | server, RPC lane, collectors, browser app and the 3D engine |
|
|
87
|
+
| [Security & privacy](docs/SECURITY.md) | the access model, hardening, and every outbound connection |
|
|
88
|
+
| [Troubleshooting](docs/TROUBLESHOOTING.md) | the problems people actually hit, and the fixes |
|
|
89
|
+
| [Contributing](CONTRIBUTING.md) | development setup, tests, and the project's rules |
|
|
90
|
+
| [Changelog](CHANGELOG.md) | release history |
|
|
91
|
+
|
|
92
|
+
Deeper reference material: [docs/RULES.md](docs/RULES.md) (the rules, each with the defect
|
|
93
|
+
that produced it), [docs/MEASUREMENTS.md](docs/MEASUREMENTS.md) (the node measurements the
|
|
94
|
+
design rests on) and [docs/DEFECTS.md](docs/DEFECTS.md) (known limits).
|
|
95
|
+
|
|
96
|
+
## Design principles
|
|
97
|
+
|
|
98
|
+
- **Read-only by default.** The monitor never writes to your node unless you enable
|
|
99
|
+
individual actions, with accounts on and a typed confirmation per call.
|
|
100
|
+
- **A good guest.** Every request goes through one serialized, prioritised, batched lane,
|
|
101
|
+
so the monitor never opens a burst of parallel calls against your node's RPC threads.
|
|
102
|
+
It would rather skip a poll than slow your node down.
|
|
103
|
+
- **Honest data.** A missing figure is shown as missing, never as zero; stale data looks
|
|
104
|
+
stale; inferred numbers are labelled as inferences; every figure's source is listed on
|
|
105
|
+
the Node & RPC page.
|
|
106
|
+
- **Zero dependencies.** Node built-ins on the server; vanilla ES modules and hand-written
|
|
107
|
+
canvas rendering in the browser. No build step, no CDN, nothing fetched from third
|
|
108
|
+
parties by your browser.
|
|
109
|
+
|
|
110
|
+
## Security at a glance
|
|
111
|
+
|
|
112
|
+
- **Hardened out of the box** — it listens on `127.0.0.1` only and requires sign-in: the
|
|
113
|
+
first start creates an `admin` account and prints its password once. Accounts, roles,
|
|
114
|
+
sessions, CSRF protection and a per-user audit trail are on. Reach it from another machine
|
|
115
|
+
over an SSH tunnel, or bind a LAN address (`BLOCKYARD_BIND`) when you decide the LAN may
|
|
116
|
+
see it; open, read-only access with no account is a choice (`BLOCKYARD_AUTH=0`), announced
|
|
117
|
+
at boot.
|
|
118
|
+
- **HTTPS by default** — the first start makes the monitor its own certificate (no
|
|
119
|
+
dependencies: the X.509 is written by hand), and every listener serves it; a certificate of
|
|
120
|
+
your own with `BLOCKYARD_TLS_CERT` / `BLOCKYARD_TLS_KEY`, or `BLOCKYARD_TLS=0` behind a
|
|
121
|
+
proxy that terminates TLS.
|
|
122
|
+
- **Where it listens is your decision** — `127.0.0.1`, a LAN address, a VPN address, or
|
|
123
|
+
several.
|
|
124
|
+
- **No outbound connections out of the box**: a fresh install talks to nothing but your node.
|
|
125
|
+
The one exception is opt-in — a checkbox, **Display settings → Markets & Price → Enable
|
|
126
|
+
market polling**, turns on the exchange feed for the Markets and Kiosk tabs, Overview's price
|
|
127
|
+
line and the explorer's dollar figures, and even then the server asks the exchanges only while
|
|
128
|
+
someone is looking. `BLOCKYARD_MARKETS=0` removes the feed so that no checkbox can turn it on.
|
|
129
|
+
|
|
130
|
+
Details in [docs/SECURITY.md](docs/SECURITY.md). To report a vulnerability, see
|
|
131
|
+
[SECURITY.md](SECURITY.md).
|
|
132
|
+
|
|
133
|
+
## Development
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npm run dev # fake node doing a simulated sync, port 18088
|
|
137
|
+
npm run setup # interactive install: read bitcoin.conf, check the node, write config/local.json
|
|
138
|
+
npm run check # the same checks (every call timed) against every configured node; exits 1 on a FAIL
|
|
139
|
+
npm test # 945 unit tests (node:test, no dependencies)
|
|
140
|
+
npm run smoke # boots the real server and checks the HTTP contract
|
|
141
|
+
npm run counts:fix # keep the documented test count in step with the suite
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the project's rules (CSP, canvas, privacy,
|
|
145
|
+
RPC etiquette) and [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for how it fits together.
|
|
146
|
+
|
|
147
|
+
## Status
|
|
148
|
+
|
|
149
|
+
Version **0.1.0** — the first minor release, two days after the initial 0.0.9, and pre-release
|
|
150
|
+
software: the word is meant literally. Published 2026-09-16: on [npm](https://www.npmjs.com/package/blockyard)
|
|
151
|
+
as `blockyard`, as a [GitHub release](https://github.com/BobClawblaw/blockyard/releases/tag/v0.1.0),
|
|
152
|
+
and announced on
|
|
153
|
+
[bitcointalk](https://bitcointalk.org/index.php?topic=5594141.msg67144312) — questions, bug
|
|
154
|
+
reports and reviews are welcome there and in [issues](https://github.com/BobClawblaw/blockyard/issues).
|
|
155
|
+
It ships **hardened**: bound to this machine, sign-in on, HTTPS with a certificate it makes itself,
|
|
156
|
+
and **zero telemetry** — no outbound connection to anyone but your node until you tick the market
|
|
157
|
+
polling switch yourself.
|
|
158
|
+
The test suite is
|
|
159
|
+
comprehensive (945 tests, plus a live smoke run), the monitoring side is solid, and the
|
|
160
|
+
explorer's biggest gap is closed: **address history and balances**, which Bitcoin Core cannot
|
|
161
|
+
answer at any setting, now come from an **address index BlockYard builds itself** from the
|
|
162
|
+
node's block and undo files and keeps current as blocks arrive. It is checked against the node
|
|
163
|
+
(every balance equal to `scantxoutset`, to the satoshi) and costs a few hours on the default four
|
|
164
|
+
workers (~30 minutes on 16) and 124 GB of disk, built in the background the first time BlockYard starts and paced so the node's
|
|
165
|
+
RPC stays responsive; without one, the address page says *not indexed* rather than showing a
|
|
166
|
+
zero. An address's unspent outputs are listed too (for a history of up to 100 transactions).
|
|
167
|
+
What it does not yet have: an address's mempool transactions.
|
|
168
|
+
|
|
169
|
+
Everything here was written by an AI directed by a human, and audited by AI:
|
|
170
|
+
[docs/SECURITY-AUDIT.md](docs/SECURITY-AUDIT.md) and
|
|
171
|
+
[docs/SECURITY-AUDIT-2026-09-14.md](docs/SECURITY-AUDIT-2026-09-14.md) are the audits, findings
|
|
172
|
+
and remediation included. The test suite runs in CI on Ubuntu, macOS and Windows (Node 22 and 24);
|
|
173
|
+
a real install has been done on macOS (Core 29.1) and Linux, and Windows has only the test suite.
|
|
174
|
+
[docs/DEFECTS.md](docs/DEFECTS.md) lists five open items, honestly stated, with the
|
|
175
|
+
measurements behind each. Read it before deploying: several are node-capability limits
|
|
176
|
+
rather than bugs, and knowing which is which matters.
|
|
177
|
+
|
|
178
|
+
## Acknowledgements
|
|
179
|
+
|
|
180
|
+
The block-space view and the explorer are inspired by the look of
|
|
181
|
+
[mempool.space](https://mempool.space); the markets tab by
|
|
182
|
+
[bitcoinity.org](https://data.bitcoinity.org). Market data comes from the public APIs of
|
|
183
|
+
Coinbase, Kraken, Bitstamp, Bitfinex and OKX. The mining-pool labels shipped in
|
|
184
|
+
`config/pool-map.json` are mempool.space's curated
|
|
185
|
+
[mining-pools](https://github.com/mempool/mining-pools) list (MIT, 151 pools).
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
Apache License 2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE). The block-space packer and feerate palette are an original implementation (public/js/blockpack.js, public/js/feepalette.js), inspired by the look of mempool.space but containing none of its code.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
<sub>If BlockYard is useful to you: `bc1q249cv27lc2q7y0x53vkczgfvvgsjzhwxwv42gc`</sub>
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
## Supported versions
|
|
4
|
+
|
|
5
|
+
| version | supported |
|
|
6
|
+
|---|---|
|
|
7
|
+
| 0.0.9 | yes |
|
|
8
|
+
| anything else | no (never released) |
|
|
9
|
+
|
|
10
|
+
## Reporting a vulnerability
|
|
11
|
+
|
|
12
|
+
Please report security problems **privately**, not in a public issue:
|
|
13
|
+
|
|
14
|
+
1. On GitHub, open the repository's **Security** tab and choose **Report a vulnerability**
|
|
15
|
+
(private vulnerability reporting), or
|
|
16
|
+
2. contact the maintainer through their GitHub profile and ask for a private channel.
|
|
17
|
+
|
|
18
|
+
Include what you found, the version or commit, how to reproduce it, and the impact you
|
|
19
|
+
expect. If you have a fix in mind, describe it — but please do not open a public pull request
|
|
20
|
+
for an unpatched vulnerability.
|
|
21
|
+
|
|
22
|
+
What to expect:
|
|
23
|
+
|
|
24
|
+
- an acknowledgement within a few days;
|
|
25
|
+
- an assessment and, if confirmed, a fix and a release with credit to you (unless you prefer
|
|
26
|
+
otherwise);
|
|
27
|
+
- coordinated disclosure once a fixed release is available.
|
|
28
|
+
|
|
29
|
+
## Scope
|
|
30
|
+
|
|
31
|
+
In scope: the monitor's server and browser code in this repository — authentication and
|
|
32
|
+
sessions, the RPC allowlist and node-write gates, the HTTP API, the CSP and other headers, and
|
|
33
|
+
anything that could leak node data or credentials.
|
|
34
|
+
|
|
35
|
+
Out of scope: vulnerabilities in the Bitcoin node itself (report those to the node's project),
|
|
36
|
+
in Node.js, or in the exchanges whose public APIs the Markets tab reads; and deployments that
|
|
37
|
+
deliberately expose an open (no-accounts) monitor to untrusted networks — that is a
|
|
38
|
+
configuration choice described in [docs/SECURITY.md](docs/SECURITY.md).
|
package/bin/blockyard.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// THE COMMAND, for an install from npm (`npm install -g blockyard`):
|
|
3
|
+
//
|
|
4
|
+
// blockyard setup ask where the node is, check it, write the config, build the index
|
|
5
|
+
// blockyard start run the monitor
|
|
6
|
+
// blockyard check the same checks as setup, any time
|
|
7
|
+
// blockyard index-build build the address index by hand (--out <dir> [--workers N])
|
|
8
|
+
// blockyard users manage accounts (list / create / passwd / role)
|
|
9
|
+
//
|
|
10
|
+
// A global install lives wherever npm puts packages, which is nowhere to keep a config or 124 GB
|
|
11
|
+
// of index; so unless the environment says otherwise, this command keeps everything under
|
|
12
|
+
// ~/.blockyard: local.json (the config), data/ (state, and the index at data/index). A checkout
|
|
13
|
+
// run with `npm run …` keeps config/ and data/ inside the checkout, as before, because it does
|
|
14
|
+
// not come through here.
|
|
15
|
+
import path from 'node:path';
|
|
16
|
+
import os from 'node:os';
|
|
17
|
+
import { fileURLToPath } from 'node:url';
|
|
18
|
+
|
|
19
|
+
const home = process.env.BLOCKYARD_HOME ?? path.join(os.homedir(), '.blockyard');
|
|
20
|
+
process.env.BLOCKYARD_CONFIG ??= path.join(home, 'local.json');
|
|
21
|
+
process.env.BLOCKYARD_DATA ??= path.join(home, 'data');
|
|
22
|
+
|
|
23
|
+
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
24
|
+
const COMMANDS = {
|
|
25
|
+
setup: 'scripts/setup.js',
|
|
26
|
+
check: 'scripts/check.js',
|
|
27
|
+
start: 'server/main.js',
|
|
28
|
+
'index-build': 'scripts/index-build.js',
|
|
29
|
+
users: 'scripts/manage-users.js',
|
|
30
|
+
tls: 'scripts/tls.js',
|
|
31
|
+
};
|
|
32
|
+
const cmd = process.argv[2];
|
|
33
|
+
if (!COMMANDS[cmd]) {
|
|
34
|
+
const version = JSON.parse((await import('node:fs')).readFileSync(path.join(root, 'package.json'), 'utf8')).version;
|
|
35
|
+
process.stdout.write(`BlockYard ${version}\n\n blockyard setup ask where the node is, check it, write the config, build the index\n blockyard start run the monitor\n blockyard check the same checks as setup, any time\n blockyard index-build build the address index by hand (--out <dir> [--workers N])\n blockyard users manage accounts\n blockyard tls remake this monitor's own HTTPS certificate (--san to add names)\n\nconfig ${process.env.BLOCKYARD_CONFIG}\ndata ${process.env.BLOCKYARD_DATA}\n`);
|
|
36
|
+
process.exit(cmd ? 2 : 0);
|
|
37
|
+
}
|
|
38
|
+
// the scripts decide "am I being run directly?" by comparing argv[1] to their own path, so hand
|
|
39
|
+
// them the path they expect rather than this file's
|
|
40
|
+
process.argv.splice(1, 2, path.join(root, COMMANDS[cmd]));
|
|
41
|
+
await import(path.join(root, COMMANDS[cmd]));
|