Bug Report
Command
Error
BeeResponseError: socket hang up
method: 'get',
url: 'rchash/9/db4de188507aaf43ba79147344ef5373743e4a7490aab2c4c0b0677b50655f1d/db4de188507aaf43ba79147344ef5373743e4a7490aab2c4c0b0677b50655f1d',
statusText: 'ECONNRESET'
Description
The utility rchash command constructs its API call using the full 64-character overlay address for both anchor_01 and anchor_02 parameters. According to the Bee API documentation, the anchor parameters should only contain the first 4 hex digits of the overlay address (sufficient to cover the storage depth prefix bits). Bee appears to reject the oversized anchor values with a connection reset.
The correct URL for depth 9 and overlay starting with db4d should be something like:
Instead, the CLI is constructing:
rchash/9/db4de188507aaf43ba79147344ef5373743e4a7490aab2c4c0b0677b50655f1d/db4de188507aaf43ba79147344ef5373743e4a7490aab2c4c0b0677b50655f1d
Expected Behavior
The command should:
- Fetch the node's overlay address from
/addresses
- Truncate it to the appropriate prefix length (first 4 hex digits / enough to cover
depth bits)
- Pass the truncated value as both anchor parameters
Environment
- swarm-cli: installed via
npm -g @ethersphere/swarm-cli
- bee-js: bundled version (from error trace:
@ethersphere/bee-js/dist/cjs/modules/rchash.js)
- Node.js: v24.7.0
- OS: macOS (Homebrew install)
Bug Report
Command
Error
Description
The
utility rchashcommand constructs its API call using the full 64-character overlay address for bothanchor_01andanchor_02parameters. According to the Bee API documentation, the anchor parameters should only contain the first 4 hex digits of the overlay address (sufficient to cover the storage depth prefix bits). Bee appears to reject the oversized anchor values with a connection reset.The correct URL for depth 9 and overlay starting with
db4dshould be something like:Instead, the CLI is constructing:
Expected Behavior
The command should:
/addressesdepthbits)Environment
npm -g @ethersphere/swarm-cli@ethersphere/bee-js/dist/cjs/modules/rchash.js)