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

Create mocked Claim Publisher #479

Open
4 tasks
Tracked by #375
GMKrieger opened this issue Jun 25, 2024 · 0 comments
Open
4 tasks
Tracked by #375

Create mocked Claim Publisher #479

GMKrieger opened this issue Jun 25, 2024 · 0 comments
Labels
#feat:claimer Feature: claimer
Milestone

Comments

@GMKrieger
Copy link
Contributor

GMKrieger commented Jun 25, 2024

📚 Context

The claim-publisher is the penultimate step on the node cycle. It collects the claim information from the database, then manipulates it to send it to Rust component, the Dispatcher, that will then send it to the blockchain.

It is imperative that the Claim Publisher follows the rules defined on the previous versions of the Node (1.x.x) for interacting with Redis, as the Claimer component is legacy from that versions.

✔️ Solution

Create a new sub-package of node called claimpublisher with two sequential tasks: collect claim information from the database, send it to Redis and the listen to the Redis for the update when the claim is mined by the Rust Claimer.

  1. Collect claim information from the database
    The validator will process inputs and publish the claims and proofs on the database at the end of every epoch. The Claim Publisher needs gather this information after its published, guaranteeing it's not getting anything duplicate or, in case there's no claim, not getting anything at all.

  2. Send it to Redis
    The information needs to be treated so that it matches the specs of the Rust Claimer, and then posted on Redis for publication on the chain.

  3. Listen to Claimer response
    The Claimer will put on Redis the information when the claim is mined, and the Claim Publisher needs to catch this information and update the database.

📈 Subtasks

  • Create the necessary types
  • Create a mock repository interface
  • Implement the main logic
  • Test the main logic with mocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#feat:claimer Feature: claimer
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant