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

Feat/fio rewards 1416 #1426

Merged
merged 7 commits into from
Jul 29, 2024
Merged

Feat/fio rewards 1416 #1426

merged 7 commits into from
Jul 29, 2024

Conversation

Torresmorah
Copy link
Collaborator

@Torresmorah Torresmorah commented Jul 29, 2024

Estimate the rewards of the day for the FIO blockchain

What does this PR do?

  • Resolve FIO BP Rewards #1416
  • In the BP worker avoid to override rewards on FIO blockchain
  • Add a new worker that queries the fio.treasury contract tables to get the rewards that the BP can claim before the end of the day
  • In the EOS based networks the minimum rewards are 100 tokens but in FIO that limit is not present

Note

How the row if deleted when the BP claims the rewards, if there is no row for a paid producer the previous value in the DB is used

Steps to test

  1. Run the project locally with the FIO blockchain configuration
  2. Review the logs to check if the worker is running
  3. Go to the producers page and check that producers has rewards

Screenshots

image
image
image
image

@Torresmorah Torresmorah added enhancement New feature or request backend labels Jul 29, 2024
@Torresmorah Torresmorah self-assigned this Jul 29, 2024
Copy link

@hoji-ai hoji-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • Updated the HAPI_EOS_API_NETWORK_NAME in deploy-fio-testnet.yaml from fio-testnet to fio
  • Added FIO rewards synchronization logic in fio.service.js
  • Modified getProducers function to exclude reward calculations for certain configurations
  • Integrated fio.service in various parts of the application including services/index.js and producers.worker.js.
  • Updated existing methods to handle FIO specific logic
  • Updated frontend filters and hooks to accommodate new reward logic for FIO network

Review

Reviewed the changes related to the fio.service.js and its associated files, including configuration for FIO rewards synchronization. Identified a potential issue with the network name change in the deployment workflow.

.github/workflows/deploy-fio-testnet.yaml Show resolved Hide resolved
Copy link
Collaborator

@xavier506 xavier506 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xavier506 xavier506 merged commit 482c709 into dev Jul 29, 2024
4 checks passed
@xavier506 xavier506 deleted the feat/fio-rewards-1416 branch July 29, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FIO BP Rewards
2 participants