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

Filter Out Failed Blocks in grpc2kafka Configuration #433

Open
mohsen-vybenetwork opened this issue Oct 4, 2024 · 3 comments
Open

Filter Out Failed Blocks in grpc2kafka Configuration #433

mohsen-vybenetwork opened this issue Oct 4, 2024 · 3 comments

Comments

@mohsen-vybenetwork
Copy link

mohsen-vybenetwork commented Oct 4, 2024

Hi Team,

We just realized that we are receiving all blocks, including failed blocks with data. For example, in our Kafka, we have data for both of these blocks: 293553856 and 293553861, where 293553861 is a failed block. Is there a way to filter these out?

I noticed that we have a filter_by_commitment option in the configuration, but I'm unsure how to use it in the grpc2kafka JSON config. Could you provide guidance on how to set this up?

293553861 (failed block, not real)
293553856 (valid block, real)

This is my config for TX and I want to know is there a way to get only finalized blocks?

"request": {
            "blocks": {
                "client": {
                    "include_transactions":true,
                    "include_accounts": false
                }
 }
@fanatid
Copy link
Collaborator

fanatid commented Oct 5, 2024

grpc2kafka was moved to https://github.com/rpcpool/yellowstone-grpc-kafka

In addition to blocks you need to set commitment: "finalized", i.e. something like:

"request": {
            "blocks": {
                "client": {
                    "include_transactions":true,
                    "include_accounts": false
                },
"commitment": "finalized"
 }

but I'd not recommend stream blocks, sometimes we are not able to construct them in the plugin, stream finalized transactions instead of blocks would be the preferred way.

@mohsen-vybenetwork
Copy link
Author

@fanatid Thank you for your response and advice. You are awesome. Could you please provide a sample config for the transactions stream with filtering for failed transactions? Does it include blocktime? The only reason we stream blocks is to have blocktime associated with the slot.

@fanatid
Copy link
Collaborator

fanatid commented Oct 5, 2024

No, transactions don't provide block time but you can subscribe on block meta too, and fill time after receiving block meta.

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

2 participants