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: dont issue rewards to allos less than one epoch old #1103

Merged
merged 3 commits into from
Feb 11, 2025

Conversation

tmigone
Copy link
Contributor

@tmigone tmigone commented Feb 10, 2025

Changes:

  • Added an additional condition to qualify for indexing rewards, the allocation must be at least 1 epoch old.
  • Bit of magic to ensure contract is less than 24kB
    • Removed isStaleAllocation() functionality (to be added back after transition period)
    • Removed isActiveAllocation() requirement from IRewardsIssuer

@tmigone tmigone changed the base branch from main to horizon February 10, 2025 19:51
@tmigone tmigone changed the title Tmigone/allo min duration feat: dont issue rewards to allos less than one epoch old Feb 10, 2025
@tmigone tmigone force-pushed the tmigone/allo-min-duration branch from 02d3cc7 to 7cd08cb Compare February 10, 2025 20:01
@tmigone tmigone requested a review from Maikol February 10, 2025 20:01
Copy link

openzeppelin-code bot commented Feb 10, 2025

feat: dont issue rewards to allos less than one epoch old

Generated at commit: f6923b9beeb5e766867217e3a4922189b5089f4c

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
2
4
0
15
39
60
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

Signed-off-by: Tomás Migone <[email protected]>
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.55%. Comparing base (51976ec) to head (f6923b9).
Report is 4 commits behind head on horizon.

Additional details and impacted files
@@             Coverage Diff             @@
##           horizon    #1103      +/-   ##
===========================================
- Coverage    92.65%   92.55%   -0.11%     
===========================================
  Files           47       47              
  Lines         2437     2430       -7     
  Branches       440      438       -2     
===========================================
- Hits          2258     2249       -9     
- Misses         179      181       +2     
Flag Coverage Δ
unittests 92.55% <100.00%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@tmigone tmigone merged commit d0060b1 into horizon Feb 11, 2025
7 of 8 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.

2 participants