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/endorsement cooldown #33

Merged
merged 4 commits into from
Dec 20, 2024
Merged

Feat/endorsement cooldown #33

merged 4 commits into from
Dec 20, 2024

Conversation

victorkl400
Copy link
Contributor

Upgrade X2EarnApps to Version 3, XAllocationVoting to version 4, XAllocationPool to version 4, and X2EarnRewardsPool to version 5

Added new endorsement cooldown feature to X2EarnApps, in which vechain nodes enter a cooldown period after endorsing an XApp.


When going live with this feature on mainnet the cooldown period will be 1 round. i.e if a node endorses and app in round 25 they will not be able to change their endorsement till round 26.


Updated XAllocationVoting, XAllocationPool and X2EarnRewardsPool to use version 3 of X2EarnApps interface.

Changes 🚀

  • Upgraded Contract(s):
    • X2EarnApps.sol to version 3
    • XAllocationVoting.sol to version 4
    • XAllocationPool.sol to version 4
    • X2EarnRewardsPool.sol to version 5

Storage Changes 📦

  • X2EarnApps:
    • Added _endorsementRound to store latest round Vechain Node endorsed an XApp.
    • Added _cooldownPeriod to store cooldown period in terms of rounds.
    • Added _xAllocationVotingGovernor to store XAllocationVoting address.

New Features 🚀

  • X2EarnApps:
    • Added checkCooldown() to check if a vechain node is currently in cooldown period, this is a public function that is also used inside endorseApp() and unendorseApp().
    • Added getXAllocationVotingGovernor() to get the address of the XAllocationVoting contract.
    • Added cooldownPeriod() to get the cooldown period in rounds.
    • Added setXAllocationVotingGovernor() to set XAllocationVoting address.
    • Added updateCooldownPeriod() to update cooldown period.

@victorkl400 victorkl400 self-assigned this Dec 18, 2024
@victorkl400 victorkl400 requested a review from a team as a code owner December 18, 2024 20:35
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.73%. Comparing base (f463f13) to head (f317227).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #33   +/-   ##
=======================================
  Coverage   93.73%   93.73%           
=======================================
  Files          55       55           
  Lines        3513     3513           
  Branches      781      781           
=======================================
  Hits         3293     3293           
  Misses        220      220           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Agilulfo1820 Agilulfo1820 merged commit 2557822 into main Dec 20, 2024
9 checks passed
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