streamingfast / substreams

Powerful Blockchain streaming data engine, based on StreamingFast Firehose technology.
Apache License 2.0
159 stars 45 forks source link

Subtreams with solana fail in production-mode #208

Closed gfrancqu closed 10 months ago

gfrancqu commented 1 year ago

Hi,

I have issue running my substreams in production mode, in development mode everything is fine: substreams run -e mainnet.sol.streamingfast.io:443 substreams.yaml map_block -s 184275999 -t +1000 work like a charm and the 1000 blocks take a few seconds to be parsed

When I add the production mode It crash after hanging a while after the first block:

substreams run -e mainnet.sol.streamingfast.io:443 substreams.yaml map_block -s 184275999 -t +1000 --production-mode

Connected (trace ID )
Progress messages received: 0 (0/sec)   <------THIS STAY AT 0
Backprocessing history up to requested target block 184275999:
(hit 'm' to switch mode)

----------- BLOCK #184,275,999 (EKRhttnWpcMSm9PbtYnLTbPimmZZQVRja7NLWWfu1Bpw) ---------------
{
  "@module": "map_block",
  "@block": 184275999,
  "@type": "sf.substreams.sink.files.v1.Lines",
  "@data": {
    "lines": ["test"]
  }
}

<----------- HANG ON THIS PART FOR A WHILE

Error: rpc error: code = Internal desc = stream terminated by RST_STREAM with error code: INTERNAL_ERROR

the substreams I'm running is the following:

#[substreams::handlers::map]
fn map_block(block: sol::v1::Block) -> Result<Lines, substreams::errors::Error> {
    return Ok(Lines {
        lines: vec![String::from("test")],
    });

source code can be found here: https://github.com/gfrancqu/substreams-test/blob/master/src/lib.rs

I'm using a source build of substreams: substreams version dev (Commit 8459560, Built 2023-04-20T14:16:33Z)

jubeless commented 10 months ago

A lot of Solana fixes have been done since then. We would be interested to know if this is still an issue? If it is re-open the issue!