-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Bug Report
Command
swarm-cli utility rchash
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:
rchash/9/db4d/db4d
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
depthbits) - 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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels