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

rpc poller crashes on startup #71

Open
matthewdarwin opened this issue Aug 7, 2024 · 0 comments
Open

rpc poller crashes on startup #71

matthewdarwin opened this issue Aug 7, 2024 · 0 comments

Comments

@matthewdarwin
Copy link

With the following config

reader-node-arguments: "fetch rpc https://lb.drpc.org/ogrpc?network=solana&dkey=xxxxxxxxxxxx --state-dir=/var/lib/firehose"

The RPC poller crashes on startup.

2024-08-07T14:54:09.923Z INFO (firesol) fetched block {"block_num": 0, "block_hash": "4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZAMdL4VZHirAn"}
2024-08-07T14:54:09.923Z WARN (firesol) unable to load cursor file, initializing a new forkdb {"start_block": "#0 (4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZAMdL4VZHirAn)", "lib": "#0 (4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZAMdL4VZHirAn)", "error": "unable to open cursor file /var/lib/dfuse/cursor.json: open /var/lib/dfuse/cursor.json: no such file or directory"}
2024-08-07T14:54:09.923Z INFO (firesol) about to fetch block {"block_to_fetch": 0}
2024-08-07T14:54:09.923Z INFO (firesol) requesting block {"block_num": 0}
2024-08-07T14:54:09.923Z INFO (firesol) checking if block is available {"request_block_num": 0, "latest_confirmed_slot": 0}
2024-08-07T14:54:09.923Z INFO (firesol) optimistically fetching block {"block_num": 0}
2024-08-07T14:54:09.923Z INFO (firesol) checking if block is available {"request_block_num": 1, "latest_confirmed_slot": 0}
2024-08-07T14:54:09.923Z INFO (firesol) fetching block {"block_num": 0}
2024-08-07T14:54:09.923Z INFO (firesol) fetching block {"block_num": 0, "latest_finalized_slot": 0, "latest_confirmed_slot": 0}
2024-08-07T14:54:10.211Z INFO (firesol) fetched block {"block_num": 0, "block_hash": "4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZAMdL4VZHirAn"}
2024-08-07T14:54:10.225Z INFO (firesol) block was optimistically polled {"block_num": 0}
2024-08-07T14:54:10.225Z INFO (firesol) processing block {"block": "#0 (4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZAMdL4VZHirAn)", "lib_num": 0}
panic: runtime error: index out of range [-1]
goroutine 1 [running]:
github.com/streamingfast/firehose-core/blockpoller.(*BlockPoller).saveState(0xc000b95c00, {0x2b7ac40, 0x0, 0x0?})
#011/local/golang/pkg/github.com/streamingfast/[email protected]/blockpoller/state_file.go:60 +0x96c
github.com/streamingfast/firehose-core/blockpoller.(*BlockPoller).processBlock(0xc000b95c00, 0xc000ab7800, 0xc000dba960)
#011/local/golang/pkg/github.com/streamingfast/[email protected]/blockpoller/poller.go:180 +0x979
github.com/streamingfast/firehose-core/blockpoller.(*BlockPoller).run(0xc000b95c00, {0x1e4b380?, 0xc000d955a8?}, 0xa)
#011/local/golang/pkg/github.com/streamingfast/[email protected]/blockpoller/poller.go:134 +0x305
github.com/streamingfast/firehose-core/blockpoller.(*BlockPoller).Run(0xc000b95c00, {0x1e4de10, 0x2b7ac40}, 0x0, 0xa)
#011/local/golang/pkg/github.com/streamingfast/[email protected]/blockpoller/poller.go:88 +0x278
github.com/streamingfast/firehose-solana/cmd/firesol/rpc.NewFetchCmd.fetchRunE.func2(0xc00063f808, {0xc000a95200, 0x2, 0x17db4a2?})
#011/tmp/build.1722876007.1686892/firehose-solana/cmd/firesol/rpc/fetcher.go:67 +0x7e7
github.com/spf13/cobra.(*Command).execute(0xc00063f808, {0xc000a95170, 0x3, 0x3})
#011/local/golang/pkg/github.com/spf13/[email protected]/command.go:940 +0x882
github.com/spf13/cobra.(*Command).ExecuteC(0x2b000a0)
#011/local/golang/pkg/github.com/spf13/[email protected]/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
#011/local/golang/pkg/github.com/spf13/[email protected]/command.go:992
main.main()
#011/tmp/build.1722876007.1686892/firehose-solana/cmd/firesol/main.go:31 +0x1a

Setting the start block to 1 makes it work.
Default start block should be 1?

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

No branches or pull requests

1 participant