Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blockResults got decodeConsensusParams error with Chihuahua #1543

Closed
jiqiang90 opened this issue Jan 13, 2024 · 4 comments · Fixed by subquery/subql-cosmos#220 · May be fixed by #1546
Closed

blockResults got decodeConsensusParams error with Chihuahua #1543

jiqiang90 opened this issue Jan 13, 2024 · 4 comments · Fixed by subquery/subql-cosmos#220 · May be fixed by #1546

Comments

@jiqiang90
Copy link

jiqiang90 commented Jan 13, 2024

Hi, I'm using Tendermint37Client trying to get blockResults for chihuahua network, and got error

Error: Value must not be undefined
    at assertSet (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/encodings.js:12:15)
    at assertObject (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/encodings.js:84:5)
    at decodeConsensusParams (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js:119:63)
    at may (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/encodings.js:118:64)
    at decodeBlockResults (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js:135:47)
    at decodeBlockResults (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js:385:16)
    at Tendermint37Client.doCall (/Users/jiatwork/subql4/chihuahua-test/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/tendermint37client.js:309:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

To reproduce this:

import {Tendermint37Client} from "@cosmjs/tendermint-rpc"


async function fetchBlockResult(): Promise<void>{
    const tendermintClient = await Tendermint37Client.connect("https://chihuahua-rpc.publicnode.com:443");
    const result = await tendermintClient.blockResults(10925390)
    console.log(result);
}

fetchBlockResult();

No problem with https://chihuahua-rpc.publicnode.com/block_results?height=10925390
Please point out If I haven't done this correctly. Thank you.

@jiqiang90 jiqiang90 changed the title get blockResults got decodeConsensusParams error with Chihuahua blockResults got decodeConsensusParams error with Chihuahua Jan 13, 2024
@jiqiang90
Copy link
Author

Hi guys, we are blocking by this issue, anyone could help please.

@hoangdv2429
Copy link

If the team don't mind then can I work on this ? something is wrong with https://github.com/decentrio/cosmjs/blob/3d61cde23f31713db0910a65a79d377a7720c71c/packages/tendermint-rpc/src/tendermint37/adaptor/responses.ts#L369-L392

@jiqiang90
Copy link
Author

If the team don't mind then can I work on this ? something is wrong with https://github.com/decentrio/cosmjs/blob/3d61cde23f31713db0910a65a79d377a7720c71c/packages/tendermint-rpc/src/tendermint37/adaptor/responses.ts#L369-L392

Thank @hoangdv2429 really appreciate

@hoangdv2429
Copy link

@jiqiang90 you can apply the fix directly to the library in the node_modules and it'll temporally fix the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants