Skip to content

Bradbury preset default endpoint lacks gen_*; please document the right endpoint or have the SDK refuse/error clearly #238

Open

Description

@pz-human-owner

Pinned versions

Artifact Pin
npm package genlayer-js@2.0.0-rc.2 (dist-tag rc as observed 2026-11-06T04:18:04Z; not treated as permanent)
npm tarball sha256 2a8c848d4f061655bb9a176352b4a2fd6123c12c9e4cb7c88fbf381e4867b962
Git tag v2.0.0-rc.2 → annotated tag object cbf850c98226e1ffe050976916178d001d905163 → commit 3814f73b8193f9c8021b7dc133e8e9e35495bb97
Source preset src/chains/testnetBradbury.ts blob a4deca3f1c2163fd9ce38883188d07869c7cf74b — L5 TESTNET_JSON_RPC_URL = "https://rpc.testnet-chain.genlayer.com"; chain export uses that constant in rpcUrls.default.http (same file, export block ~L5336–L5342; large ABI-inlined file)
Published dist (same package) dist/chunk-TESL5CSL.js L12897 / L18224–18230 (bundled mirror of the preset URL)
Docs (networks) genlayerlabs/genlayer-docs commit c4a09c85efe8b1209642e46817c97cd0f1c772eb (2026-10-19), path pages/developers/networks.mdx, blob 07fe0e9b4d3e948ae717bb3cc307ae9dc40334b4
Related prior art (not a duplicate of this report) Closed PR #236 intentionally pointed testnetBradbury at the Phase 2 chain RPC; closed PR #145 / #147 show earlier Bradbury presets used GenLayer node hosts that spoke gen_call. No open issue found titled specifically for “default Bradbury RPC lacks gen_call” in a quick search (2026-11-06); please close as duplicate if one exists.

Summary

With genlayer-js@2.0.0-rc.2, constructing createClient({ chain: testnetBradbury }) with no endpoint override selects https://rpc.testnet-chain.genlayer.com. A read-only Intelligent Contract call through the SDK (readContract → JSON-RPC gen_call) posts to that URL and receives -32601 (the method gen_call does not exist/is not available).

pages/developers/networks.mdx (pinned above) states that Intelligent-contract methods such as gen_call require a GenLayer node RPC and that the Conduit chain RPC does not provide them. The Bradbury table lists GenLayer Chain RPC as https://rpc.testnet-chain.genlayer.com and GenLayer RPC as “Use the Phase 2 node RPC published in the release announcement, or your own qualified node” — i.e. not a URL in the lines quoted from networks.mdx.

Ask (primary): please document the correct Bradbury GenLayer node endpoint for SDK Intelligent Contract reads, and/or make the SDK refuse or error clearly when testnetBradbury is used for gen_* without a suitable node endpoint (so defaults cannot silently hit a chain RPC that lacks gen_*).
Not asking: that this report invent or hardcode a replacement public node URL.

SDK-path reproduction (read-only; no keys, no transactions)

// genlayer-js@2.0.0-rc.2
import { createClient } from 'genlayer-js';
import { testnetBradbury } from 'genlayer-js/chains';

const client = createClient({ chain: testnetBradbury }); // no endpoint override
await client.readContract({
  address: '0x0000000000000000000000000000000000000001',
  functionName: 'get_value',
  args: [],
});

Observed (2026-11-06T04:35:01.294Z → 04:35:01.395Z):

  • Client chain.rpcUrls.default.http[0] = https://rpc.testnet-chain.genlayer.com
  • Instrumented fetch destination URL = https://rpc.testnet-chain.genlayer.com (same host; no alternate transport observed)
  • Request method = gen_call (params include "type":"read", dummy to, empty-ish calldata)
  • HTTP 200, JSON-RPC error code -32601, message the method gen_call does not exist/is not available
  • Client throws MethodNotFoundRpcError (viem) with that detail

Companion: getContractSchema on the same client first hits gen_getContractCode on the same URL with the same -32601 (2026-11-06T04:34:37.387Z). Full request/response logs available on request.

createClient’s optional endpoint field is documented in this package’s dist/index.d.ts (ClientConfig.endpoint?: string; JSDoc “Custom RPC endpoint URL”). Treat any example createClient({ chain: testnetBradbury, endpoint: ... }) syntax as provisional to that typedef — not as a claim that a specific public Bradbury node URL is approved.

Curl contrast (same host the SDK selected; not a substitute for the SDK repro above)

At 2026-11-06T04:18:16Z, plain JSON-RPC against https://rpc.testnet-chain.genlayer.com:

  • eth_chainId → "0x107d" (4221)
  • eth_blockNumber → live tip
  • gen_call → -32601 method not available

Optional identity check (same UTC window / 2026-11-06T04:20:06Z): eth_getBlockByNumber("0x0") hash 0x17d89764d4f4f963158fc4c5e8f2cb670c2837740b35f37081c12860c3df97e4, which is the Phase 2 genesis hash published in networks.mdx (same pinned file). Included only as a cited match against that docs string — not as a stand-alone “matched” claim without reference.

Other hosts (observations only; not recommended replacements)

Host When observed (UTC) eth_chainId / genesis gen_call / gen_* note
https://studio.genlayer.com/api 2026-11-06T04:18:35Z Studionet (0xf22f earlier) Typed gen_call returned -32001 contract-not-found (different error than -32601). Different network from Bradbury 4221 — does not establish Bradbury compatibility or a successful Bradbury read.
https://studio-dev.genlayer.com/api 2026-11-06T04:18:36Z Studio-dev Same class of -32001 on dummy address. Different network.
https://rpc-bradbury.genlayer.com 2026-11-06T04:34:01Z–04:34:02Z 0x107d; genesis hash same Phase 2 string as above Accepts gen_call (returns execution/validation errors, not -32601). Not listed as Bradbury GenLayer RPC in the quoted networks.mdx lines. Do not treat as the official documented node URL until maintainers say so.

Wording constraint: “not listed in the networks.mdx lines quoted above” is the strongest claim this report makes about public Bradbury GenLayer RPC publication. A release-announcement URL was not located in this pass; if one exists, please point to it.

Expected

  1. Document which Bradbury GenLayer node RPC developers should pass (or how to obtain the Phase 2 node RPC the docs mention), or
  2. Have the SDK refuse / error clearly when Intelligent Contract methods would otherwise target a chain RPC that lacks gen_* under the default testnetBradbury preset.

A replacement public URL in the SDK default is optional and should come from maintainers — this report does not invent one.

Out of scope / not claimed

  • Bradbury consensus broken.
  • That Studio hosts prove Bradbury gen_* success.
  • That rpc-bradbury.genlayer.com is the supported Phase 2 GenLayer node RPC (observation only).
  • Permanent npm dist-tag behavior beyond the recorded observation time.

AI disclosure: drafted with ATLAS Prime-GrokBot; reviewed by Claude, ChatGPT and Grok; reviewed and approved by @pz-human-owner before posting.

Activity

  1. ygd58 commented on Nov 6, 2026

    @ygd58

    A live check that may help with the endpoint question (2026-11-06, run from a server in Europe, plain JSON-RPC over HTTPS, User-Agent: curl/8.5.0). I did not use the SDK, only the two methods in question:

    Method https://rpc.testnet-chain.genlayer.com https://rpc-bradbury.genlayer.com
    eth_chainId 0x107d 0x107d
    eth_blockNumber 0x35e72 0x35e72
    net_version "4221" "4221"
    gen_call with params: [{}] -32601, the method gen_call does not exist/is not available -32602, invalid transaction type '': must be 'read', 'write', or 'deploy'

    So the chain RPC answers -32601 for gen_call, as in this report, while rpc-bradbury.genlayer.com knows the method and only rejects the empty parameters. Both report the same chain id and the same block height at the same moment.

    What this does not show: I did not run a successful gen_call read against a deployed contract on either URL, and I cannot tell whether rpc-bradbury.genlayer.com is the endpoint the maintainers intend to publish for Phase 2, or a gateway that is kept for compatibility. That is for the maintainers to confirm. I am only reporting which of the two URLs implements gen_* today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions