Closed chamorin closed 1 year ago
You should be good with substreams-sink-kv inject mainnet.eth.streamingfast.io:443 "badger3://badger_data.db" substreams.yaml --listen-addr=":9000"
now. I release 2.1.0 which contains this breaking change.
Let me know.
Thanks for the update 👍
However, when I run the command I get this error:
ERRO (sink-kv) unable to setup sinker: sink module is required in sink config
What's the sink config?
It's a Substreams manifest that defines some information so that a sinker can pick it up automatically from the manifest:
specVersion: v0.1.0
package:
name: "substreams_eth_block_meta"
version: v0.4.0
imports:
sink_kv: https://github.com/streamingfast/substreams-sink-kv/releases/download/v0.1.2/substreams-sink-kv-v0.1.2.spkg
blockmeta: https://github.com/streamingfast/substreams-eth-block-meta/releases/download/v0.4.1/substreams-eth-block-meta-v0.4.1.spkg
sink:
module: blockmeta:kv_out
type: sf.substreams.sink.kv.v1.GenericService
This one for example has a sink
config that defines what the sink should call (in this case defines a sink of type sf.substreams.sink.kv.v1.GenericService
and the module to be sinked is blockmeta:kv_out
).
If your substreams.yaml/spkg
don't have a sink
config (like https://github.com/streamingfast/substreams-eth-block-meta/releases/download/v0.4.1/substreams-eth-block-meta-v0.4.1.spkg
), use the flag -m kv_out
to specify which module to sink.
Getting unknown shorthand flag: 'm' in -m
what's the replacement for the -m
flag?
I tried --module
but it returns me the same error:
ERRO (sink-kv) unable to setup sinker: sink module is required in sink config
My bad it was an issue on my side (I wasn't using the right substream). However, when I try to run the command:
substreams-sink-kv inject mainnet.eth.streamingfast.io:443 "badger3://badger_data.db" substreams.yaml --listen-addr=":9000"
with the wasm example I get this error:
ERRO (sink-kv) Flag "api-prefix" does not exist
Can you give me the exact command and in which folder you are?
Also provide me with:
which substreams-sink-kv
substreams-sink-kv --version
Please also run those command in the same directory that is causing you some problem.
I'm using substreams-sink-kv version 2.1.1
, it's located in my /usr/local/bin/
and the folder in which I'm running this command:
substreams-sink-kv inject mainnet.eth.streamingfast.io:443 "badger3://badger_data.db" substreams.yaml --listen-addr=":9000"
is this: substreams-sink-kv/examples/wasm-query-service
, from the wasm example
Downloaded release 2.1.2
and tried it with the same command and in the same folder as above but I'm getting this error:
ERRO (sink-kv) unable to retrieve cursor: invalid cursor
Is there something missing to my command?
Yeah I noticed the same, clearing the database seems to do the trick. But this means there is something fishy and the cursor is invalid somehow.
I'll need to dig that deeper. Closing this one since the original issue is good now.
rm -rf "./badger_data.db"
When I run this command from the wasm-query-service example:
I'm getting this error:
Also, the command example is:
substreams-sink-kv inject -e mainnet.eth.streamingfast.io:443 "badger3://$(pwd)/badger_data.db" substreams.yaml
but the-e
option is no longer working and was replaced by--endpoint
I'm using
substreams-sink-kv version 2.0.0