Skip to content

Conversation

@iuwqyir
Copy link
Contributor

@iuwqyir iuwqyir commented Mar 13, 2025

TL;DR

Added Kafka publisher functionality to stream blockchain data to external systems.

What changed?

  • Added a new Publisher module that can stream blocks, transactions, traces, and events to Kafka topics
  • Implemented configuration options for the publisher in the root command flags
  • Added serialization methods for blockchain data models
  • Integrated the publisher with the Committer and ReorgHandler to publish data during normal processing and reorgs
  • Added filtering capabilities for transactions and events based on addresses and topics

How to test?

  1. Enable the publisher with the --publisher-enabled flag
  2. Configure Kafka broker(s) with --publisher-brokers
  3. Enable specific data types with their respective flags:
    • --publisher-blocks-enabled
    • --publisher-transactions-enabled
    • --publisher-traces-enabled
    • --publisher-events-enabled
  4. Set topic names and filters as needed
  5. Verify data is being published to the configured Kafka topics

Why make this change?

This change enables real-time streaming of blockchain data to external systems via Kafka, allowing for more flexible data processing pipelines and integration with other applications. The publisher can be used to build real-time analytics, monitoring systems, or to feed data into other databases or processing frameworks.

Copy link
Contributor Author

iuwqyir commented Mar 13, 2025

@iuwqyir iuwqyir marked this pull request as ready for review March 13, 2025 23:17
@iuwqyir iuwqyir force-pushed the 03-14-publishing_blockchain_data branch 2 times, most recently from a27e343 to 887e568 Compare March 17, 2025 12:16
@iuwqyir iuwqyir force-pushed the 03-13-return_block_data_when_deleting_it branch from 1f71d1d to 0072cf9 Compare March 17, 2025 12:16
@iuwqyir iuwqyir force-pushed the 03-14-publishing_blockchain_data branch from 887e568 to ecc19c6 Compare March 17, 2025 12:21
@iuwqyir iuwqyir force-pushed the 03-13-return_block_data_when_deleting_it branch from 0072cf9 to edaf37c Compare March 18, 2025 10:15
@iuwqyir iuwqyir force-pushed the 03-14-publishing_blockchain_data branch 3 times, most recently from 8c4c75b to 010ac72 Compare March 18, 2025 12:50
@iuwqyir iuwqyir force-pushed the 03-14-publishing_blockchain_data branch from 010ac72 to 5cb5e17 Compare March 18, 2025 13:07
@iuwqyir iuwqyir force-pushed the 03-14-publishing_blockchain_data branch from 5cb5e17 to dbacf04 Compare March 18, 2025 13:17
@iuwqyir iuwqyir force-pushed the 03-14-publishing_blockchain_data branch from dbacf04 to ceba902 Compare March 18, 2025 13:30
@iuwqyir iuwqyir force-pushed the 03-14-publishing_blockchain_data branch 5 times, most recently from 0175811 to bea3a93 Compare March 18, 2025 22:49
@iuwqyir iuwqyir force-pushed the 03-13-return_block_data_when_deleting_it branch from edaf37c to 5504a56 Compare March 18, 2025 22:49
@iuwqyir iuwqyir force-pushed the 03-14-publishing_blockchain_data branch 2 times, most recently from c00c7e7 to 418fd31 Compare March 19, 2025 12:13
@iuwqyir iuwqyir force-pushed the 03-13-return_block_data_when_deleting_it branch 2 times, most recently from 5f0b375 to b6cb3db Compare March 19, 2025 12:15
@iuwqyir iuwqyir force-pushed the 03-14-publishing_blockchain_data branch from 418fd31 to 24fa867 Compare March 19, 2025 12:15
@iuwqyir iuwqyir changed the base branch from 03-13-return_block_data_when_deleting_it to graphite-base/176 March 19, 2025 12:30
@iuwqyir iuwqyir force-pushed the 03-14-publishing_blockchain_data branch from 24fa867 to 2072101 Compare March 19, 2025 12:31
@graphite-app graphite-app bot changed the base branch from graphite-base/176 to main March 19, 2025 12:31
@iuwqyir iuwqyir force-pushed the 03-14-publishing_blockchain_data branch from 2072101 to bc9fd3f Compare March 19, 2025 12:31
@iuwqyir iuwqyir merged commit 498b306 into main Mar 19, 2025
5 checks passed
@iuwqyir iuwqyir deleted the 03-14-publishing_blockchain_data branch March 19, 2025 12:37
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

Successfully merging this pull request may close these issues.

3 participants