Closed
Description
I came across a block (88458) on evmos that triggers an Input not in int53 range
error.
I'm running @cosmjs/tendermint-rpc 0.31.0
Here's a simple reproduction:
import assert from "assert";
import { Tendermint34Client } from "@cosmjs/tendermint-rpc";
const TENDERMINT_RPC_URL = process.env.TENDERMINT_RPC_URL;
assert.ok(TENDERMINT_RPC_URL);
const main = async () => {
const heights = [88457, 88458];
const client = await Tendermint34Client.connect(TENDERMINT_RPC_URL);
for (const height of heights) {
console.log({height})
const blockResults = await client.blockResults(height);
console.log("OK")
}
};
main();
Executed with:
node_modules/.bin/ts-node src/cosmos-int53-range-error.ts
Output was:
{ height: 88457 }
OK
{ height: 88458 }
Error: Input not in int53 range: 168139200000000000
at new Int53 (/project/node_modules/@cosmjs/math/src/integers.ts:137:13)
at Function.fromString (/project/node_modules/@cosmjs/math/src/integers.ts:122:12)
at apiToSmallInt (/project/node_modules/@cosmjs/tendermint-rpc/src/inthelpers.ts:12:70)
at decodeTxData (/project/node_modules/@cosmjs/tendermint-rpc/src/tendermint34/adaptor/responses.ts:161:29)
at Array.map (<anonymous>)
at decodeBlockResults (/project/node_modules/@cosmjs/tendermint-rpc/src/tendermint34/adaptor/responses.ts:298:39)
at decodeBlockResults (/project/node_modules/@cosmjs/tendermint-rpc/src/tendermint34/adaptor/responses.ts:844:12)
at Tendermint34Client.doCall (/project/node_modules/@cosmjs/tendermint-rpc/src/tendermint34/tendermint34client.ts:344:12)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
These are some pretty old blocks so I've attached /block_results?height=88457
and /block_results?height=88458
in case you don't have access to an archive node.
block_results?height=88457.txt
block_results?height=88458.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels