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

Feature Request: Webhook Integration for Custom Miners and Validators #294

Open
muhmad-f-k opened this issue Oct 7, 2024 · 0 comments
Open

Comments

@muhmad-f-k
Copy link

muhmad-f-k commented Oct 7, 2024

Feature Request: Webhook Integration for Custom Scraper for Miners and Validators

Description

I've encountered challenges when trying to optimize and integrate custom miners into the current system. To make it easier for miners and validators, I propose adding webhook functionality. This would allow miners to connect their private scrapers without needing to modify or rework any of the subnet's code.

Proposal

Implement a webhook option for miners, allowing them to run external scrapers while still connecting to the subnet without running a built-in miner. Validators and miners could then start their node with the following example command:

pm2 start python -- ./neurons/miner.py --wallet.name your-wallet --wallet.hotkey your-hotkey --webhook 0.0.0.0 --webhookport 12345

This command would start the webhook without running any local miner, allowing external miners to send data through the webhook and receive requests to validate miners' data.

Scraper Details Validators

Reddit

Push to custom miner through webhook: A url with requestId and source id = 1 (Reddit) is provided.

Miner responds with:

  • requestId
  • id
  • url
  • username
  • communityName
  • body
  • createdAt
  • dataType
  • title
  • parentId

Twitter

Push to custom miner through webhook: A url with requestId and source id = 2 (Twitter) is provided.

Miner responds with:

  • requestId
  • username
  • text
  • url
  • timestamp
  • tweet_hashtags

Scraper Details Miners

Miner Data Insertion

  • Reddit: Miners can push data in batches through the webhook (e.g., batch of 5000), which will be added to the database.

    • Fields: id, url, username, communityName, body, createdAt, dataType, title, parentId, source
  • Twitter: Miners can push data in batches through the webhook (e.g., batch of 5000), which will be added to the database.

    • Fields: username, text, url, timestamp, tweet_hashtags, source
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