streamingfast / substreams-rs

9 stars 3 forks source link

RPC Call fails with "assertion failed: 4 * 8 >= slice.len()" #9

Closed electricddev closed 1 year ago

electricddev commented 1 year ago

The following call fails with a fatal error. In my case the substream encountered the error at block 7566906.

pub fn token_uri_erc721(contract_address: Vec<u8>, token_id: BigInt) -> Option<String> {
    crate::abi::erc721::functions::TokenUri { token_id }.call(contract_address)
}

The error message returned is:

Error: rpc error: code = Internal desc = step new irr: handler step new: execute modules: running executor "store_erc721_metadata": execute module: execute: execute: store wasm call: block 7566907: module "store_erc721_metadata": wasm execution failed: panic in the wasm: "assertion failed: 4 * 8 >= slice.len()" at /home/.cargo/registry/src/github.com-1ecc6299db9ec823/primitive-types-0.11.1/src/lib.rs:38:1
maoueh commented 1 year ago

Can you also provide sample value that fails for token_id and for contract_address so we can re-produce easily.

electricddev commented 1 year ago

Token id is 115792089237316195423570985008687907837957278154198333183605726673483560124417

contract address 0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d or in bytes vec![248, 126, 49, 73, 47, 175, 154, 145, 176, 46, 224, 222, 170, 213, 13, 81, 213, 109, 93, 77]

colindickson commented 1 year ago

@electricddev this has been fixed in substreams-ethereum version 0.9.0. Please update your substreams to use this version.

Thank you for the bug report!