github hiero-ledger/hiero-json-rpc-relay v0.81.0

3 hours ago

Overview

v0.81.0 adds the newPendingTransactions WebSocket subscription. debug_traceTransaction with prestateTracer now reads the Mirror Node prestate endpoint, so it returns only the storage slots a transaction actually touched. Transactions rejected before consensus now come back from eth_getTransactionReceipt as a -32003 error. The release fixes an eth_getTransactionCount race right after eth_sendRawTransaction, detects contract deployments on block-stream Mirror Nodes, and resolves gas prices for blocks older than the first EVM fee schedule. On the operations side, logs are quieter, per-method metric labels are bounded, Redis transaction-pool metrics are cheaper, and the block gas limit and Redis command timeout can be configured. The example projects under tools/ and dapp-example/ have been removed from the repository.

Before upgrading, review the breaking changes below. Log levels, prestateTracer output and several error responses have changed, and correct child-record detection needs Mirror Node v0.166.0+.

⚠️ Breaking Changes

Review all items below and update your log pipelines, tracing consumers and error handling before upgrading.

Item Before After Notes
Per-request logs Every request (including HTTP 200) and every eth_call logged at info Successful requests and eth_call details logged at debug; non-200 requests stay at info Failed RPC calls now log their params at error, so a failure can be reproduced without logging the params of every request. (#5949)
debug_traceTransaction with prestateTracer Storage of every slot of each touched contract; balances in tinybars; onlyTopCall honoured Only the storage slots the transaction read or wrote; balances in weibars; onlyTopCall ignored Uses the Mirror Node contracts/results/{id}/prestate endpoint (Mirror Node v0.165.0+ with hiero.mirror.web3.api.prestate.enabled). If the endpoint answers 501, the relay remembers that and falls back to the previous contract-state reconstruction. (#5945)
eth_getTransactionReceipt for transactions rejected before consensus (e.g. INVALID_SIGNATURE, WRONG_NONCE) null, because the record was mistaken for a child record -32003 error carrying the Hedera status and failure detail Answered from a single Mirror Node lookup instead of polling the full retry window. (#5804)
Child contract-record detection Heuristic: no Ethereum nonce and no signature Mirror Node child flag (Mirror Node v0.166.0+) On older Mirror Nodes no record is treated as a child, so HAPI-submitted CONTRACTCALL/CONTRACTCREATE records are no longer misclassified. (#5804)
r / s on synthetic transactions "0x" "0x0" (#5804)
eth_sendRawTransaction aborted by the client HTTP 500 HTTP 499 The abort error is no longer wrapped into a generic internal error. (#5971, #5972)

New configuration

  • BLOCK_GAS_LIMIT (default 150000000) - block gas limit reported for blocks at HAPI 0.69.0 or later. Earlier blocks still report 30000000. (#5924)
  • METRICS_UNKNOWN_METHOD_LABELS_MAX (default 100, must be between 0 and 999) - how many distinct unknown method names get their own label in the per-method metrics. The rest, plus oversized or malformed names, share an unknown label. (#5909)
  • REDIS_COMMAND_TIMEOUT_MS (default 5000) - maximum time a Redis command waits to be sent, for example while the client reconnects, before it fails. A command that has already been sent keeps waiting for its reply. (#5967, #5973)

Highlights

  • newPendingTransactions subscription - eth_subscribe("newPendingTransactions") streams the hashes of transactions entering the relay's pending pool. Pass true as the second param, as in Geth, to get full transactions. Requires ENABLE_TX_POOL=true, ENABLE_NONCE_ORDERING=true and DISABLE_MN_PRECHECKS_ON_TX_SENDING=false; otherwise the subscription is rejected as an unsupported method. (#5950)
  • Accurate prestateTracer - returns exactly the accounts and storage slots the transaction touched, as they were before it ran. That is what you need to replay a transaction in an empty EVM. (#5945)
  • Pre-consensus rejections surfaced - eth_getTransactionReceipt reports -32003 with the Hedera status for transactions the network rejected before consensus. With TX_STATUS_TRACING on, it also includes the Hedera transaction id. (#5804)
  • Configurable block gas limit via BLOCK_GAS_LIMIT. (#5924)
  • Bounded metric labels - caller-supplied method names can no longer grow the Prometheus registry without limit. (#5909)

Bug fixes

  • eth_getTransactionCount could return a stale nonce right after eth_sendRawTransaction. A pooled transaction is now removed as confirmed as soon as the Mirror Node or a receipt reflects it. The synchronous send path waits for that cleanup, and the confirmed count can no longer be incremented twice for the same transaction; on Redis this is done atomically with a Lua script. (#5894)
  • On block-stream Mirror Nodes, contract deployments were not detected, which affected contractAddress and to on receipts and block transactions. Deployments are now detected from the transaction's records. (#5900)
  • An abandoned request could leave an unhandled promise rejection behind in the Mirror Node client. (#5942)
  • Gas-price lookups for blocks recorded before the network's first EthereumTransaction fee schedule (mainnet before block 36,401,332, testnet before block 2,425) failed with Failed to retrieve gas price from network fees. They now fall back to the earliest recorded price: 110 tinybars on mainnet, 71 on testnet. (#5969, #5974)
  • prestateTracer reported balances in tinybars instead of weibars. (#5945)

Security & operations

  • Redis transaction-pool metrics no longer run KEYS or read the whole pool. Active addresses are tracked in a sorted-set index, and pool size is read with SCARD. (#5967, #5973)
  • Per-request logs moved to debug, and failed requests now log their params. (#5949)
  • Per-method metric labels are bounded. (#5909)
  • npm package metadata: added the repository field and an .npmignore. (#5976, #5979)
  • The protobufjs override is now scoped to @grpc/proto-loader. (#5915)
  • Docker base image digests bumped. (#5912)
  • Notable dependency bumps: mocha 11 → 12 (dev) (#5854), @octokit/core 6 → 7 (dev) (#5791), follow-redirects 1.16.0 → 1.16.1 (#5903).

Testing & CI

  • Network versions bumped to consensus node v0.78.0 and Mirror Node v0.166.0-rc1. (#5804)
  • HTTP vs WebSocket transport parity tests added. (#5891)
  • Codecov configuration revisited. (#5929)
  • Dependabot updates grouped into weekly PRs, and CODEOWNERS updated for them. (#5955, #5960)
  • envsubst installed for the chart-testing-action cosign step. (#5917)

What's Changed

  • chore(release): Bump versions for v0.81.0-SNAPSHOT by @swirlds-automation in #5888
  • feat: fix eth_getTransactionCount race condition by @natanasow in #5894
  • fix: detect contract deployments on block-stream mirror nodes by @tgntr in #5900
  • feat: bump versions by @natanasow in #5912
  • build(deps): scope protobufjs override to @grpc/proto-loader by @tgntr in #5915
  • test: add HTTP vs WebSocket transport parity tests by @tgntr in #5891
  • build(deps): install envsubst for chart-testing-action cosign step by @tgntr in #5917
  • feat: make the block gas limit configurable via BLOCK_GAS_LIMIT by @tgntr in #5924
  • build(deps): bump the minor-and-patch-actions-weekly group across 1 directory with 11 updates by @dependabot[bot] in #5928
  • build(deps): bump follow-redirects from 1.16.0 to 1.16.1 by @dependabot[bot] in #5903
  • build(deps-dev): bump @octokit/core from 6.1.6 to 7.0.8 by @dependabot[bot] in #5791
  • build(deps-dev): bump mocha from 11.8.0 to 12.0.3 by @dependabot[bot] in #5854
  • feat: bound the "method" label set on per-method metrics by @tgntr in #5909
  • feat: clean up relay by @natanasow in #5880
  • feat: unhandled rejection is left behind when the request is abandoned by @natanasow in #5942
  • feat: revisit codecov by @natanasow in #5929
  • feat: move per-request logs to debug and log params only on error by @tgntr in #5949
  • feat: add newPendingTransactions WebSocket subscription by @tgntr in #5950
  • fix: return only the touched storage slots from prestateTracer by @ValentinVPK in #5945
  • chore: group Dependabot updates into weekly PRs by @tgntr in #5955
  • chore(deps): Update CODEOWNERS for dependabot updates by @rbarker-dev in #5960
  • feat: pre-consensus rejected transactions are not shown as -32003 error in eth_getTransactionReceipt by @natanasow in #5804
  • feat: cherry-pick add INSUFFICIENT_PAYER_BALANCE in hedera specific statuses array (#5966) to 0.81 by @natanasow in #5968
  • feat: cherry-pick populated aborted request as 499 instead of 500 to 0.81 by @natanasow in #5972
  • feat: cherry-pick optimize Redis usage in txpool metrics and add configurable com… by @natanasow in #5973
  • fix: cherry-pick use the earliest recorded gas price for blocks to 0.81 by @natanasow in #5974
  • ci(publish): cherry-pick add repo config to package.json and add .npmignore (#5976) to 0.81 by @rbarker-dev in #5979

Full Changelog: v0.80.3...v0.81.0

Don't miss a new hiero-json-rpc-relay release

NewReleases is sending notifications on new releases.