Commit Graph
101 Commits
Author SHA1 Message Date
grenadeandClaude Opus 5 ad670842b3 fix: say which block is missing instead of "e is not an object"
deploy / deploy-web (push) Successful in 7s
deploy / build (push) Successful in 2m36s
Diagnosed. It is not the Quantus header layout and it is not the header patch —
it is a missing null check in papi, surfacing through three layers of minified
code.

`archive.header$` in @polkadot-api/observable-client is

    const header$ = (blockHash) => rawHeader$(blockHash).pipe(map(blockHeader[1]))

with no guard, and `archive_v1_header` answers `{"result": null}` for any hash
the node does not know — a normal answer, not a fault. scale-ts then reaches
`new DataView(null)`. V8 words that "First argument to DataView constructor must
be an ArrayBuffer"; Firefox words the identical error "e is not an object",
which mentions neither blocks nor headers nor the node.

The trigger is a chain switch. The block list still holds the previous chain's
hashes, every one is fetched from the new client, chainHead reports them
unpinned, and the archive returns null for each — hence a burst of identical
errors, one per listed block, milliseconds apart, then silence. Harmless: the
list refreshes a moment later. It just said nothing a reader could act on.

Reproduced deliberately (switch Quantus -> Heisenberg -> Quantus) rather than
waiting for it, and confirmed in the browser before and after:

    before  fetch header failed TypeError: e is not an object
    after   fetch header failed Error: no block header: the node does not know this block

The null check lives in the patched decoder because that is the narrowest place
we control that sees the value. The real fix belongs upstream in
observable-client, where `header$` should not map a null result through a codec
at all.

Refs #4

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012uDUodEcRbBwNRi3UCmw8f
2026-09-16 10:36:58 +03:00
grenadeandClaude Opus 5 84f60959d9 fix: decode Quantus block headers, which is what was actually broken
The console rendered nothing against Quantus and I had reported tier 3 as
working on the strength of a unit-level test. It was not working. This is the
fault.

`qp_header::Header` is not `sp_runtime::generic::Header`. `number` is a plain
u32 where Substrate writes a Compact, and a `zk_tree_root: H256` sits between
`extrinsics_root` and `digest` — deliberately, so the ZK root has a fixed offset
in the header preimage that miners cannot shift by manipulating the digest.

Reading a Quantus header as a Substrate one consumes 2 bytes where 4 were
written. Every field after shifts, and the digest vector eventually reads a byte
that is not a known DigestItem index, which surfaces three layers away as
`TypeError: innerDecoder is not a function`. papi retried the subfollow forever,
`runtime$` never emitted, and the page stayed blank.

The patched codec carries both layouts and picks by **round trip**: a layout is
right only if decoding and re-encoding reproduces the input byte for byte, which
also catches a short read, trailing bytes and a non-canonical compact. Trying
them in a fixed order and taking the first that survives is deterministic;
choosing by inspecting a byte would not be.

Pinned per version rather than by bare package name, unlike the signers-common
patch: four copies of substrate-bindings resolve in this tree and blockHeader.js
is not identical across majors — a bare-name key fails the whole install trying
to patch 0.19.0 and 0.6.0.

Two things this cost, both recorded because they are the kind that recur:

  - My first attempt replaced the codec with a bare [enc, dec] pair, which
    dropped scale-ts's `inner`. This console's own block.state.ts does
    `blockHeader.inner.digests.inner`, so that module threw while evaluating,
    `createRoot().render()` never ran, and the page was blank with nothing in
    the UI — the same symptom as the bug, from the opposite cause. The patch now
    copies the original codec and overrides only the decoder.
  - The Poseidon block hash is NOT a second blocker, which I had claimed on #1
    and #4 without checking. `getHasherFromHeader` returns a function that
    throws rather than throwing, and only the extrinsic Analyzer page consumes
    `hasher$`. Everything else works without it.

Verified in a browser this time, not by unit test: against mainnet the console
renders live data — Finalized 53,989, Best 54,089, block time — advancing, and
matching what the node reports. Polkadot still decodes through the same patched
codec, and garbage is refused rather than mis-read.

Residual: four "fetch header failed TypeError: e is not an object" on first load,
from the per-block detail fetch, not recurring since. Not diagnosed.

Refs #1, #4

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012uDUodEcRbBwNRi3UCmw8f
2026-09-16 09:37:55 +03:00
grenadeandClaude Opus 5 933ffecc8f feat: accept the Quantus signature type, and list Quantus chains
## The check that fired before code that would have worked

`getSignerType` pulls the extrinsic's `Address` and `Signature` types **out of
the metadata** — the runtime-as-oracle approach, and better than polkadot-js,
which hardcodes `ExtrinsicSignature: 'MultiSignature'` in a type definition file.
Then it threw the answer away:

    if (signature.type !== "enum" || ["Ecdsa", "Ed25519", "Sr25519"].some(...))
      throw unkownSignerType();

Quantus's `DilithiumSignatureScheme` carries `Dilithium87` and `Dilithium65`, so
this raised `Unkown signer` and nothing downstream ever ran. Asking the runtime
and then not believing it is the trap this whole port exists to avoid.

Everything past that point was already correct: `createV4Tx` concatenates and
compact-prefixes and never asserts a signature size, and the address prefix is
the `MultiAddress::Id` variant index read from metadata. The name whitelist only
separated the Substrate shape from the Ethereum one, and the Ethereum arm one
line above already decides that structurally. So the patch drops the names and
keeps `signature.type !== "enum"`.

pnpm `patchedDependencies`, keyed on the package name rather than a version, so
it reaches all fifteen resolved copies in the tree — the nested ones under
pjs-signer, ledger-signer, raw-tx-creator and polkadot-api itself are what
actually run.

## Evidence

Byte-for-byte against the quantus/extension#7 tier-1 harness, same call, same
nonce, same signature:

    papi assembled 7300 bytes
    IDENTICAL to the tier-1 harness

That is the corroboration this repo exists for. polkadot-api shares no code with
the five polkadot-js forks, so until now our stack had only agreed with itself.

Also verified the patch is load-bearing and narrow:

  - the unpatched copy still in the store raises `Unkown signer` on the same
    inputs, so the check really was the blocker
  - Polkadot metadata still takes the Substrate path, and still gets its `01`
    variant byte prepended when a caller names a signing type

## Networks

Quantus, Heisenberg and Planck, with the endpoints verified reachable on
2026-09-15, and Quantus as the default. The Substrate networks stay: a signature
that works on both is the only evidence that the patch widened a check rather
than broke one.

Refs #1, #3. Closes quantus/extension#7's cross-tier comparison.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012uDUodEcRbBwNRi3UCmw8f
2026-09-15 22:16:40 +03:00
Victor Oliva ed2fd05ebe fix: multisig signer when "any rpc" is selected (#184)
* chore: update dependencies

# Conflicts:
#	package.json
#	pnpm-lock.yaml

* chore: replace custom HOLLAR setup with paraspell's default one

* fix: multisig signer when "any rpc" is selected
2026-09-08 10:34:11 +02:00
Victor Oliva 4302a02c60 chore: update dependencies (#183) 2026-09-02 08:34:25 +02:00
Carlo SalaandVictor Oliva 2dec1477a8 migrate to polkadot-api v3 🎉🚀 (#156)
Co-authored-by: Victor Oliva <olivarra1@gmail.com>
2026-08-24 12:50:13 +02:00
Alex BeanandCarlo Sala 77daa11a3b feat: add paseo-bulletin support (#174)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2026-07-21 11:50:41 +02:00
Victor Oliva ed2e59c938 chore: update dependencies (#175) 2026-07-20 17:13:57 +02:00
Victor Oliva 90d73af567 chore: update dependencies (#173) 2026-07-08 14:24:00 +02:00
Victor Oliva 640ec4dabf chore: update dependencies (#169)
* chore: update dependencies

* fix: disable new block if block is smaller

* update hydration endpoints
2026-07-03 15:23:34 +02:00
Victor Oliva 61be47c722 feat: validate and dry-run transactions (#162)
* refactor: break down SubmitTx into separate files

* add validate transaction, start dry run

* add dry run

* fix worker getting stuck after forklift is disposed

* handle rejections in promiseWithTeardown
2026-06-26 22:07:36 +02:00
Victor Oliva d7ec471a14 feat: new chain metrics page (#159)
* playground

* playground tx and weights

* vibe UI

* chart improvements

* wip fix ai slop

* wip fix ai slop

* fix ai slop on charts

* subscribe to main state

* show blocks in chronological order, fix performance issue on startup

* update node health

* add connected peers chart

* fix unused locals
2026-06-23 13:25:57 +02:00
Victor Oliva 0c7528efc2 chore: change teleport text labels (#158)
* update deps

* chore: change teleport text labels
2026-06-15 16:25:33 +02:00
Victor Oliva 0a97404be2 feat: teleport integration with Paraspell ✨ (#153)
* integrate teleport with paraspell

* add some style

* finish up styles

* format token decimals, token input component

* fill in genesis to paraspell map

* add link to paraspell, fix invalid address on destination chain check

* codesplit teleport page

* add button to setup wallet

* chore: update dependencies

* add hash params state

* remove console logs, remove support for negative values in token input
2026-06-11 11:32:44 +02:00
Victor Oliva b2f625ba1d chore: update dependencies (#151) 2026-06-01 14:42:29 +02:00
Victor Oliva 5db31bd94d feat: make account display and inputs copyable 2026-05-13 14:13:36 +02:00
Victor Oliva d56697828d feat: add multisig/proxy accounts 2026-04-29 17:31:46 +02:00
Victor Oliva c81274f14b chore: update dependencies 2026-04-29 13:06:41 +02:00
Victor Oliva 74b01d321e chore: update dependencies (#131) 2026-04-16 12:12:01 +02:00
Victor Oliva f4698067d5 chore: add caret polkadot-api dependency 2026-04-10 08:56:51 +02:00
Victor Oliva 5c94358f7c chore: update dependencies 2026-04-09 16:51:52 +02:00
Victor Oliva 59d6305479 chore: update dependencies 2026-04-08 09:48:38 +02:00
Victor Oliva 3bade56842 chore: update dependencies 2026-03-17 11:03:14 +01:00
Victor Oliva 473eb011c8 feat: add thousands separators to view and edit components 2026-03-12 15:57:52 +01:00
Victor Oliva 7e8f1b5645 fix: use CFixedBytes for react builder 2026-03-09 11:14:05 +01:00
Carlo Sala 58640a590d migrate to v2 (#118) 2026-03-05 16:18:58 +01:00
Josep M Sobrepere d9428a8d9c Revert "migrate to v2 (#118)"
This reverts commit d4fe0b546e.
2026-03-04 16:43:20 +01:00
Carlo Sala d4fe0b546e migrate to v2 (#118) 2026-03-01 07:23:44 +01:00
Carlo Sala 358199dc2a chore: update deps (#117) 2026-01-23 11:30:47 +01:00
Victor Oliva 1b23278c92 update dependencies 2025-11-20 23:50:01 +01:00
Josep M Sobrepere cd8c63400a update dependencies 2025-11-16 01:03:03 -03:00
Victor Oliva fc04a6441a feat: monaco editor + json schema for rpc_methods 2025-11-15 08:24:19 -03:00
Victor Oliva e756e08872 chore: update deps 2025-11-11 19:15:37 -03:00
Josep M Sobrepere f64dea31e8 update deps 2025-11-08 20:45:47 +01:00
Victor Oliva fe6ef1cd81 change webhid to webusb, update polkahub 2025-11-07 17:59:52 +01:00
Victor Oliva cd969be20a update to released polkahub, add more contrast to input components 2025-11-06 17:41:54 +01:00
Victor Oliva 7f9b4ad9ae replace account input with AddressInput, fix polkadot vault 2025-11-06 09:11:17 +01:00
Victor Oliva 7adfb9e3aa refactor: migrate accounts to polkahub 2025-11-05 19:56:34 +01:00
Carlo Sala d96885f74e chore: update deps 2025-10-14 17:49:47 +03:00
Josep M Sobrepere e5785b5a10 patch papi 2025-09-23 22:42:15 +02:00
Josep M Sobrepere ec18347c97 upgrade to papi 1.18.0 (#84) 2025-09-21 11:30:21 +02:00
Josep M Sobrepere d6bbc24f9d chore: upgrade papi (#82) 2025-09-06 07:56:32 +02:00
Josep M Sobrepere b407071e03 update papi (#81) 2025-09-01 08:28:29 +02:00
Victor Oliva cad45ae0be chore: update dependencies 2025-08-31 08:51:02 +08:00
Carlo Sala 0541cb7e39 chore: update deps 2025-08-25 09:14:58 +08:00
Carlo Sala f5d8d5f862 chore: update deps 2025-07-17 15:31:41 +02:00
Josep M Sobrepere e74ca383ee feat: BitSeq components and update deps (#69) 2025-07-17 15:28:58 +02:00
Josep M SobrepereandCarlo Sala 884c172755 Cs extrinsic (#68)
* add tx-utils

* wip

* finish it

---------

Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2025-07-01 14:47:18 +02:00
Josep M Sobrepere 8d06111f30 chore: upgrade deps 2025-06-17 10:51:09 +02:00
Carlo Sala 7a60fd7035 feat: add eth address identicon (#55) 2025-06-04 11:34:48 +02:00