19 Commits
Author SHA1 Message Date
zeekayandHanzo Dev 0ec2f91a9b The fallback L1 list names only chains with an explorer
With no P-Chain to read, the overview draws its L1 cards from KNOWN_L1_CHAINS,
which still linked SPC and Pars to explorer names that do not resolve.


Co-authored-by: Hanzo Dev <[email protected]>
2026-09-23 16:36:40 -07:00
zeekayandClaude Opus 5.5 e57351a54c The explorer lists only chains that have an explorer
SPC, Pars and Osage have no explorer and no public node, the devnet has no
explorer, and the Hanzo testnet explorer has no DNS name. Their registry entries
put links to names that do not resolve on every page (the "SPC L1" and "Pars L1"
cards, the chain switcher, the network selector), and the Pars entry sent a
node request to api.pars.network on every page load that failed with 502.

The P-Chain still lists SPC and Pars; their cards render without a link.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-23 16:08:09 -07:00
zeekay e47a1993c4 the validators page counts every network, not just this one
Zoo and Hanzo run as L2s on the primary network, Pars and Osage as their own
L1s, so "how many validators secure Lux" is a question about all of them. The
Validators page answered with this chain's 6 while the landing page said 21 —
same word, two quantities, one site, and no way for a reader to tell which
question either was answering.

Both numbers were right. The page now shows every network with its own count
beside the total, and says how many answered so a partial sum is never read as
the whole. A network that cannot be read is still listed: dropping it would make
it look like a network with no validators.

The stake beside the landing-page total names its network now. Stake stays
primary-only — each network bonds its own currency and the sum of two currencies
is not a quantity — so leaving it unlabelled next to an all-network validator
count invited reading the two as one ratio.
2026-08-10 21:31:16 -07:00
zeekayandHanzo Dev a3caebadf2 search: the icon sat on the placeholder, and validators counted one L1 of four
The magnifying glass was drawn over the leading "S" of the placeholder. The
cause is not the search bar: @luxfi/ui's InputGroup measures its adornments
correctly and then throws the measurement away, because the clone is guarded on
`displayName === 'FieldInput'` — a component that does not exist in the package
— and the props it would have set (`ps`/`pe`) are Chakra style props that the
Tailwind/gui Input spreads onto the DOM and ignores. Both halves are leftovers
of the Chakra→Tailwind port, so EVERY InputGroup in the app is unpadded; the
header is just the one you look at every day. Patched at the primitive
(patches/@[email protected]) rather than hand-tuning padding at one call
site: the offset is the measured width of the actual adornment, so it stays
right when the adornment changes, and FilterInput / revoke's SearchInput / the
showcase are fixed by the same change. Measured at 1440x900: the icon overlapped
the text by 24px and the kbd chip by 52px; both are now 0.

The measurement also moves to a layout effect and stops blanking value and
placeholder on first render. That blanking was inert while the guard swallowed
the clone; with the clone live it flips the field from controlled to
uncontrolled on mount, which React warns about and which can eat a keystroke.

ClearButton spread `className` over its own visibility classes, so a caller
passing one clobbered `invisible` — the header showed a clear button on an empty
field. Merged instead, at the component.

Placeholder is now "Search or ask anything", and Cmd/Ctrl-K opens an assistant.
Nothing in this repo, @luxfi/ui or @hanzo/gui ships a command palette or chat
(no cmdk, no palette, one dialog primitive), so this is the smallest thing that
works: the existing Dialog, one global listener, and a server-side proxy that
holds the credential. The key is deliberately not NEXT_PUBLIC_, so a deployment
without one gets a dialog that says exactly that instead of failing silently.
Off unless NEXT_PUBLIC_AI_ASSISTANT_ENABLED is set — Ctrl+K is the browser's
address-bar shortcut and claiming it to show an error would be worse than not
claiming it.

Validators read 5 on a network running 20. useCurrentValidators asks ONE
P-Chain, the one this deployment points at, but Lux, Hanzo, Zoo and Pars are
each sovereign L1s with their own P-Chain and their own validator set — measured
2026-08-06, five each, with four disjoint NodeID sets. The registry gains the
node origin per chain; absence of it is the signal that a chain has no publicly
reachable node (SPC and Osage are in-cluster only), and those are reported
`unavailable` rather than counted as zero. Stake is deliberately NOT summed:
each chain bonds its own currency.

The proxy resolves `?chain=` through the registry and never from the request, so
it cannot be pointed at an arbitrary origin. The new envs are registered with
the envs-validator and documented in ENVS.md — the schema rejects unknown
NEXT_PUBLIC_* variables and runs at container start, so an undeclared one stops
the pod from booting.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-06 19:17:01 -07:00
zeekayandHanzo Dev 521e47ab47 fix(explore): a failed validator read printed 0, not "unknown"
/validators reported "0 validators / 0 LUX staked" about a network running
five with 2,500,000,000 LUX bonded. Measured now against the live P-Chain:

  POST https://api.lux.network/ext/bc/P platform.getCurrentValidators
    -> 5 validators, sum(weight) 2500000000000000000 nLUX = 2,500,000,000 LUX

(P-chain figures are nLUX, 1e9 — and the rows carry `weight`, not
`stakeAmount`, which is why the reader already falls back.)

useCurrentValidators returns a ZEROED ValidatorStats when the query fails,
and a zeroed stat is indistinguishable from a chain with no validators.
NetworkOverview and NetworkStats each guarded against that with their own
copy of `!isError && validatorCount > 0`; ValidatorsPage and
ValidatorsDashboard had no guard at all, so they rendered the zeros —
"Validators (0)", "Delegators (0)", "0 LUX Total Stake" — as if measured.

The question "did the read answer?" now has exactly one answer, computed
where the read happens: the hook exports `isKnown`. The two ad-hoc copies
are gone and the two unguarded surfaces use it, showing an em dash and
naming the method that did not answer.

Also restores module resolution. 258bd1a48 dropped `baseUrl: "."` from
tsconfig on the grounds that `paths` already covered it — but `paths` was
`{}`, so baseUrl alone was resolving every absolute import in the repo
("configs/app", "lib/api/pchain", "ui/..."). Without it tsc could not
resolve a single one. `"*": ["./*"]` is the same rule in the form TS7
accepts: tsc goes from thousands of TS2307 to 1.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-27 14:32:37 -07:00
zeekay 2abb742d55 feat(explore): fee burn + staking rewards panel, from one balance
creditTxFee credits floor(fee/2) to the fee reward vault 0x0100..0002 and leaves
the rest credited to no account at all. The vault has no code and no key, so its
balance only grows, and it is BOTH counters at once: rewards accrued exactly, and
supply burned to within one wei per transaction. One eth_getBalance is the whole
data set — no indexer, no event log, no receipts. That is the panel.

Reads are one batched JSON-RPC round trip (vault balance, coinbase balance, head
block, eth_getChainConfig), polled every 30s.

Decimals: the divisor is 10^18, NOT 10^9. nLUX is the P-Chain staking unit; this
is a C-Chain EVM balance from eth_getBalance, i.e. wei, and it goes through the
one canonical path (NativeCoinValue -> config.chain.currency.decimals). Pinned by
a test against live mainnet: the coinbase holds 3867543864740765677447 wei =
3,867.54 LUX. At 10^9 it would print 3.87 trillion LUX, about double the supply.
Same class of bug as 1b6e86a16, one billion times larger.

Honest about the zero. Mainnet's config has no feeSplitTimestamp, so the split has
never fired and nothing is deflationary. The panel says exactly that, tags itself
"Not active", and shows where the fees really go: the coinbase 0x0100..0000, which
has no code and no key either, so its 3,867 LUX is stranded, not burned.

Two traps the tests pin:
  - The gate reads the HEAD BLOCK's timestamp, mirroring IsFeeSplit(blockTime).
    Devnet's feeSplitTimestamp has passed in wall-clock terms while its C-Chain
    sits at height 0 — wall clock would report a burn that never happened.
  - Burn is zero before activation, never the raw vault balance. The vault is a
    plain account; anyone can transfer into it, and calling that "burned" invents
    the deflation this panel exists to report honestly. Unverifiable state prints
    a dash, never a zero.

It lives on the home overview, not /stats: guards.stats 404s the whole /stats
route when the stats microservice is not configured, and burn is a chain fact that
owes nothing to an indexer. Not gated on the primary network either — it reads
whichever chain it is pointed at and reports that chain's own state.

Chart: the vault balance sampled once per new block, deduplicated on block number
and capped at 240 points. There is no cheaper honest source — the nodes prune, so
eth_getBalance one block back already answers "missing trie node", and
api-explore.lux.network serves 404 for every path including /.

next.config.js: `next dev` runs Turbopack, which never read the webpack() block, so
every `import Icon from 'icons/*.svg'` resolved to a static-image object and React
threw "Element type is invalid ... but got: object" — Hint, ChartWidget,
toolkit/next/link and BackToButton all import SVGs directly, so the dev server had
been rendering an error page instead of the app. Same loader, declared for both
bundlers.

Verified against live mainnet 96369 in a real browser, not by HTTP status:
  panel renders "Not active", "LUX burned 0", "Staking rewards accrued 0",
  "Held by the fee coinbase 3,867.5496 LUX", "read at block #1,098,193";
  exactly one batched RPC call carrying all four methods; 0px mobile overflow.
The active and scheduled branches, which mainnet cannot exercise, were driven with
a stubbed RPC: "Active" copy, both counters at the vault balance, coinbase card
correctly hidden, and the chart drawing after three samples.

17 unit tests, 288 in the suite, all green. Typecheck unchanged at 223
pre-existing errors, none in these files.
2026-07-27 12:25:48 -07:00
zeekay 3849ae2407 fix(lux): nLUX is 10^9, not 10^6 — every LUX figure was 1000x too large
LUX_DECIMALS was 6 in four separate files, each dividing a value the code
itself names nanoLux. Nano is 10^-9. Every staking and balance figure the Lux
explorer rendered was inflated by 1000.

The validators page reported 2,500,000,000,000 LUX staked — against a total
supply of ~2T. An impossible number, and it is reached from lux.cloud's own
"View on explorer" link: an investor reads 2.5B on the dashboard, clicks
through, and sees 2.5T. lux.cloud was right; this was wrong.

Verified against live chain state (platform.getCurrentValidators):
  500000000000000000  nLUX -> 500,000,000 LUX   per validator
  2500000000000000000 nLUX -> 2,500,000,000 LUX total across 5

Four copies of one constant, so the bug shipped four times:
  ui/validators/lux/utils.ts · ui/chains/ChainDetailPage.tsx
  ui/pages/NetworkOverview.tsx · ui/stats/lux/NetworkStats.tsx
Each still owns its own copy; they should share one, which is the follow-up.

Typecheck shows no new errors in these files (the existing _app.tsx and *.pw.tsx
failures predate this change).
2026-07-26 20:11:27 -07:00
zeekayandHanzo Dev 498d6bb61b NetworkOverview: stop reporting an outage on a healthy network
The header showed "0.0% UPTIME" and "0/5 CONNECTED" beside 5 active validators.
Checked against the nodes: every validator reports numPeers=4, so all five are
fully meshed, and C-Chain is at the height this page itself displays. The
network is healthy — those two metrics were fabricated.

platform.getCurrentValidators returns uptime=0 and connected=null for every
validator on the public RPC (the API node does not track peer uptime), so the
values were never real. ValidatorsDashboard.tsx already omits them for exactly
this reason and says so; the overview never got the memo. Removed from both
places they appeared, reasoning recorded inline.

Worst kind of wrong: a glance at explore.lux.network read as an outage while
the chain was at tip.

Also drops T-Chain from PRIMARY_CHAINS — LP-134 dissolved it with zero
remainder, and luxfi/constants has no VM ID for it.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-25 15:55:48 -07:00
zooqueen c605b213cd fix(explorer): brand explorers show ONLY their own chain; primary-network panels are Lux-only
isPrimaryNetworkExplorer() (getCurrentChain().vm==='EVM') gates the homepage's
validator metrics strip + the Chain-Health grid (15 primary-network chains +
cross-L1 list). Lux primary explorer (explore.lux.network +test/+dev) shows them
all; brand L2 explorers (Hanzo/Zoo/SPC/Pars) show only Hero + Stats + their own
latest blocks/txns. (Blockscout references already brand-driven via NETWORK_NAME.)
2026-06-23 08:39:07 -07:00
zeekay 3813d03918 feat: explorer FE — stateless SSR, chain selector, localnet, registry cleanup 2026-03-01 18:00:00 -08:00
zeekay 284d506593 feat: OIDC login via lux.id, full-width layout, P-chain stats fix
- Add Sign in button to TopBar with OIDC flow to lux.id
- Merge settings (color theme, identicon, address format) into user menu popover
- Remove duplicate user profile from HeroBanner
- Full-width stacked blocks/transactions layout on homepage
- Fix P-chain stats: CSP connect-src allows base origin for SDK calls
- Fix connected count: infer from uptime when field missing
- Fix dark mode popover background
- Enable OIDC in .env.production (lux.id, client: explore)
2026-03-01 20:34:00 -08:00
zeekay da79f9e711 feat: rename @blockscout to @luxfi, monochrome theme, horizontal blocks
- Rename all @blockscout/* npm packages to @luxfi/* aliases (150+ files)
- Override blue accent colors to gray for monochrome theme
- Fix dropdown/menu/popover fonts to use Geist Sans
- Change Latest Blocks to horizontal scrolling layout
- Show dashes instead of zeros for validator stats on error
- Fix GHA deploy step to use correct deployment name
2026-03-02 12:28:15 -08:00
zeekay 1affde5938 feat: horizontal blocks layout, stats grid, network overview fallback chains
- LatestBlocks: full-width layout instead of fixed 280px sidebar
- Stats: 4-column grid on desktop, 2-column on mobile
- NetworkOverview: fallback known L1 chains when P-chain API unreachable
- NetworkOverview: expose isError from useCurrentValidators
- P-chain hooks: add retry:2 for resilience
- UserProfile: use address_hash instead of id for display
- Replace middleware.ts with proxy.ts (unused in production Docker)
- Add toolkit/chakra/separator re-export
- tsconfig: jsx react-jsx, formatting cleanup
- dev.sh: disable turbopack (stability)
2026-03-02 10:36:17 -08:00
zeekay ddb1fa2cd9 unify all sql images to :latest (PG18)
Single version policy: ghcr.io/hanzoai/sql:latest everywhere.
No version pinning, no backwards compat, always latest stable.
2026-03-01 21:09:09 -08:00
zeekay 08cddc0fcb brand: remove all Blockscout branding, replace with Lux Explorer
- Gas tracker FAQ: Blockscout → Lux Explorer
- Chain config web3/chains.ts: explorer name → Lux Explorer
- Auth screens: Blockscout account → Lux account
- Contract verification: Blockscout supports → Lux Explorer supports
- API docs: Blockscout core API → Lux Explorer Core API
- Rewards/merits: Blockscout Merits → Lux Explorer Rewards
- Marketplace disclaimer and integration icons
- Address verification: [email protected] → [email protected]
- Chart export filenames: Blockscout chart/stats → Lux Explorer
- OTEL service name: blockscout_frontend → lux_explorer_frontend
- Dev container: blockscout dev → lux explorer dev
2026-02-27 22:17:37 -08:00
zeekay 2c4fcde2d2 feat: multichain explorer pages, chain switcher, indexer integration
- Network Overview homepage with P-chain stats and chain cards
- Chain detail page with validator info and indexer stats
- Chain switcher dropdown in top bar
- A-chain AI client with indexer API integration
- D-chain DEX data hook with live indexer fallback
- E2E tests for all 5 live explorer instances
- Test transaction sender script
- Remove verbose comments, section dividers, and console.log scaffolding
2026-02-27 10:46:56 -08:00
zeekay 8c1f6b438b feat: update all chain definitions to 14 primary network chains
Add D-Chain (DexVM), G-Chain (GraphVM), I-Chain (IdentityVM),
O-Chain (OracleVM), R-Chain (RelayVM) to match ~/work/lux/node
vms_allvms.go. Fix VM names: ThresholdVM, BridgeVM, KeyVM.
Update chain count from 9 to 14 across all pages.
2026-02-26 11:10:12 -08:00
zeekay 2e8885d7de feat: redesign homepage, add chain switcher and chain detail page
- Redesign NetworkOverview homepage with Blockscout Stats, LatestBlocks,
  and LatestTxs alongside P-chain network stats and chain cards
- Add ChainSwitcher dropdown to TopBar for switching between C-Chain,
  Zoo, Hanzo, SPC, and Pars explorer instances
- Create /chains/[slug] chain detail page with chain info, validators,
  subnet chains, and stats (modeled after Avalanche L1 Details)
- Make ChainsPage rows clickable with links to chain detail pages
- Register /chains/[slug] route in all metadata/analytics files
2026-02-26 09:57:59 -08:00
zeekay 3c8d48e0e0 feat: unified multi-chain explorer with Network Overview, Chains, and Validators pages
- Replace single-chain homepage with Network Overview showing P-chain stats,
  primary chains (C/P/X/A/B/Q/T/Z/K), and L1 subnet chains
- Add Chains directory page with Primary Network / L1-L2-L3 tabs
- Add Validators page with Dashboard, Validators list, and Delegators tabs
- Add P-chain API hooks (useCurrentValidators, useBlockchains, useSubnets)
- Apply monochrome theme: replace all blue/purple/cyan/teal with gray
- Add Geist Mono font support
- Add Chains and Validators to navigation sidebar
- Update route types, metadata, analytics, and cspell for new pages
2026-02-25 22:53:10 -08:00