streamingfast / substreams-hivemapper

Apache License 2.0
0 stars 1 forks source link

Problem with address_lookup_tables #1

Closed gabrielfior closed 10 months ago

gabrielfior commented 11 months ago

I wasn't able to run substreams-hivemapper]$ substreams run substreams.yaml map_holders -e mainnet.sol.streamingfast.io:443 -t +1000 because of a few errors. I did a few changes (see https://github.com/gabrielfior/substreams-hivemapper/commit/f72baf28049afb9a05697f876acc9ac1525e49b5) and I now get a different error:

$substreams run substreams.yaml map_outputs -e mainnet.sol.streamingfast.io:443 -t +1000
Connected (trace ID e3db7830a2071cad757f6db326baeff5)
Progress messages received: 0 (0/sec)
Backprocessing history up to requested target block 154656000:
(hit 'm' to switch mode)

Error: rpc error: code = Unknown desc = rpc error: code = Internal desc = step new irr: handler step new: execute modules: applying executor results "map_outputs": execute: maps wasm call: block 154656004: module "map_outputs": general wasm execution failed: call: expected 2 params, but passed 3
Error: read manifest "substreams.yaml": unable to get package: failed validation: module validation failed: module "map_outputs": store input named "address_lookup_tables:store_address_lookup_tables" not found

Any guidance much appreciated!

Eduard-Voiculescu commented 11 months ago

Hey @gabrielfior, thanks for flagging this issue.

We have found an issue with the address table lookup substreams (making it impossible to resolve addresses) and we have realized that we need to change the solona firehose blocks and add the address table lookups accounts inside the blocks.

We are currently working on reprocessing the blocks. Once that is done, you will be able to run this substreams out of the box without any changes.

gabrielfior commented 10 months ago

Hey @Eduard-Voiculescu any updates on this?

Eduard-Voiculescu commented 10 months ago

Hey @gabrielfior,

We have had a couple of issues with reprocessing, notably some issues with solana blocks at 224m block height. We have rerun another reprocessing, I will update here when we have it running!

Eduard-Voiculescu commented 10 months ago

Hey @gabrielfior,

I have updated the substreams-solana rust crate which you can import with

substreams-solana = { git = "https://github.com/streamingfast/substreams-solana", branch = "master" }

in your Cargo.toml file.

Once you have that imported, you can get the resolved accounts like this: https://github.com/streamingfast/substreams-hivemapper/blob/develop/src/lib.rs#L18

Just so you know, if you update the crate, you will also need to add this dependency:

substreams-solana-program-instructions = “0.1”

in your Cargo.toml. We have decoupled the program instructions (decoding of TokenInstructions) from thesubstreams-solana crate.

So if you do any TokenInstruction::unpack(…) in your Substreams, you will simply need to update your import in your rust files with this line:

use substreams_solana_program_instructions::{
    token_instruction_2022::TokenInstruction
};
gabrielfior commented 10 months ago

Thanks @Eduard-Voiculescu, I applied the changes above and am now able to fetch data.

Eduard-Voiculescu commented 10 months ago

Nice! Happy to hear that it works