zksync-era icon indicating copy to clipboard operation
zksync-era copied to clipboard

feat(api): Support combined HTTP / WS server

Open slowli opened this issue 10 months ago • 0 comments

What ❔

  • Supports combined HTTP / WS server bound to a single port.
  • Allows configuring RPC namespaces for WS.

Why ❔

Improves UX for node operators.

Is this a breaking change?

  • [ ] Yes
  • [x] No

Operational changes

  • HTTP / WS server is combined automatically if api.web3_json_rpc.{http_port, ws_port} are equal.
  • RPC namespaces for WS are represented via new api.web3_json_rpc.ws_api_namespaces param. api.web3_json_rpc.api_namespaces is still used if the new param is not set.

Checklist

  • [x] PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • [x] Tests for the changes have been added / updated.
  • [x] Documentation comments have been added / updated.
  • [x] Code has been formatted via zkstack dev fmt and zkstack dev lint.

slowli avatar Jun 25 '25 12:06 slowli