The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
Error: Value must not be null
at assertSet (/Users/segfaultd/dev/orbit-codes/bridge/node_modules/@cosmjs/tendermint-rpc/src/comet38/encodings.ts:17:11)
at assertArray (/Users/segfaultd/dev/orbit-codes/bridge/node_modules/@cosmjs/tendermint-rpc/src/comet38/encodings.ts:72:3)
at decodeCommit (/Users/segfaultd/dev/orbit-codes/bridge/node_modules/@cosmjs/tendermint-rpc/src/comet38/adaptor/responses.ts:491:28)
at decodeBlock (/Users/segfaultd/dev/orbit-codes/bridge/node_modules/@cosmjs/tendermint-rpc/src/comet38/adaptor/responses.ts:795:50)
at decodeBlockResponse (/Users/segfaultd/dev/orbit-codes/bridge/node_modules/@cosmjs/tendermint-rpc/src/comet38/adaptor/responses.ts:811:12)
at decodeBlock (/Users/segfaultd/dev/orbit-codes/bridge/node_modules/@cosmjs/tendermint-rpc/src/comet38/adaptor/responses.ts:849:12)
at Comet38Client.doCall (/Users/segfaultd/dev/orbit-codes/bridge/node_modules/@cosmjs/tendermint-rpc/src/comet38/comet38client.ts:347:12)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at BlockService.sync (/Users/segfaultd/dev/orbit-codes/bridge/src/features/block/services/block.service.ts:129:25)
at BlocksController.getByHeight (/Users/segfaultd/dev/orbit-codes/bridge/src/features/block/http/controllers/blocks.controller.ts:39:23)
Introduction
Using tendermint RPC, it is impossible to query the height 1 when the last_commit (genesis) signatures object is null. That's the case on a Rollapp implementation, which has no builtin validator set. It fails to decode the block, because it expects here to be an array https://github.com/cosmos/cosmjs/blob/main/packages/tendermint-rpc/src/comet38/adaptor/responses.ts#L491
Stack trace
Block structure
Proposed fix
Can we make that check optional, or at least give it a default empty array in case of empty signatures prop ?
Used versions