From 658daf698a7340c0f906fcffc845916f179a1931 Mon Sep 17 00:00:00 2001 From: igneum-josh <337424239+igneum-josh@users.noreply.github.com> Date: Mon, 5 Oct 2026 20:35:40 +0100 Subject: [PATCH] Explorer pages: /explorer, /block/, /address/, the search router, a local preview server, CI Fed by /api/explorer from the observer's tables. Latest blocks (hash, number, DAA, blue score, miner, txs, proof records, time); a block's header, parents, children, mergeset, coinbase outputs, EVM transactions, shards, checkpoint and certificate; an address's blocks, what they earned, vote keys and balance (eth_getBalance when EXPLORER_EVM_RPC is set). Same tokens as live.html. vercel.json rewrites /block/:id and /address/:addr; the footer links the explorer; the link checker skips template literals and resolves /api/ to its function. node tools/site-serve.mjs previews the site with the functions in-process. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/ci.yml | 5 + site/404.html | 1 + site/address.html | 297 +++++++++++++++++++++++++++++++ site/api/explorer.mjs | 152 ++++++++++++++++ site/bench.html | 1 + site/block.html | 330 +++++++++++++++++++++++++++++++++++ site/build.mjs | 4 +- site/evidence.html | 1 + site/explorer.html | 347 +++++++++++++++++++++++++++++++++++++ site/faucet.html | 1 + site/index.html | 1 + site/lib/explorer.mjs | 90 ++++++++++ site/lib/explorer.test.mjs | 58 +++++++ site/litepaper.html | 1 + site/live.html | 1 + site/metamask.html | 1 + site/miner.html | 1 + site/miners.html | 1 + site/partials/footer.html | 1 + site/vercel.json | 23 ++- site/wallet.html | 1 + tools/ci/link-check.mjs | 8 +- tools/site-serve.mjs | 44 +++++ 23 files changed, 1356 insertions(+), 14 deletions(-) create mode 100644 site/address.html create mode 100644 site/api/explorer.mjs create mode 100644 site/block.html create mode 100644 site/explorer.html create mode 100644 site/lib/explorer.mjs create mode 100644 site/lib/explorer.test.mjs create mode 100644 tools/site-serve.mjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea5ce0451..9879a98b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,11 @@ jobs: run: bash tools/ci/no-secrets-check.sh --self-test && bash tools/ci/no-secrets-check.sh - name: faucet unit tests (validation, the daily limits, the signed transaction; keccak, RLP and secp256k1 vectors) run: node --test site/api/faucet.test.mjs + - name: explorer and public stats unit tests (search router, formatters, emission rule against the node's own test values, the documented API fields from a fixture) + run: node --test site/lib/explorer.test.mjs site/lib/emission.test.mjs site/api/public-stats.test.mjs + - name: public stats API answers with the documented fields (the live site; master only, the endpoints exist there after the merge) + if: github.ref == 'refs/heads/master' + run: node tools/ci/public-api-check.mjs https://igneum.network - name: ship tool self-test (version bump, the dl-both and public manifest helpers) run: node tools/ship-app.mjs --self-test - name: relay unit tests (parsers, secret compare, the wake endpoint) diff --git a/site/404.html b/site/404.html index 321532bd4..076e9b219 100644 --- a/site/404.html +++ b/site/404.html @@ -172,6 +172,7 @@ p{margin:0;color:var(--ink-2);max-width:52ch}