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

fix: set and hardcode minimum L2 curation to 1 GRT, enforce it in all cases, allow sub-epoch collect (OZ H-01) #874

Closed

Conversation

pcarranzav
Copy link
Member

No description provided.

@pcarranzav pcarranzav requested review from tmigone and Maikol November 2, 2023 16:46
Copy link

openzeppelin-code bot commented Nov 2, 2023

fix: set and hardcode minimum L2 curation to 1 GRT, enforce it in all cases, allow sub-epoch collect (OZ H-01)

Generated at commit: 37e35e563970172e1090ae444b612e95a8a2f167

🚨 Vulnerabilities Summary

Process Issues Results
Contract Inspector note
low
critical
high
Total
32
18
1
1
52
Dependency Checker low
note
Total
1
23
24

For more details view the full report in OpenZeppelin Code

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3882b35) 92.59% compared to head (37e35e5) 92.62%.

Additional details and impacted files
@@                        Coverage Diff                        @@
##           pcv/require-epoch-for-collect     #874      +/-   ##
=================================================================
+ Coverage                          92.59%   92.62%   +0.02%     
=================================================================
  Files                                 47       47              
  Lines                               2364     2372       +8     
  Branches                             432      434       +2     
=================================================================
+ Hits                                2189     2197       +8     
  Misses                               175      175              
Flag Coverage Δ
unittests 92.62% <100.00%> (+0.02%) ⬆️

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

Files Coverage Δ
contracts/curation/Curation.sol 100.00% <100.00%> (ø)
contracts/l2/curation/L2Curation.sol 100.00% <100.00%> (ø)
contracts/l2/discovery/L2GNS.sol 100.00% <100.00%> (ø)
contracts/staking/Staking.sol 98.11% <100.00%> (-0.01%) ⬇️

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

Copy link
Member

@Maikol Maikol left a comment

Choose a reason for hiding this comment

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

Looks good to me. Do we want to update the graph.network.yml configs with the updated minimumCurationDeposit values?

@pcarranzav pcarranzav changed the title fix: set and hardcode minimum L2 curation to 1 GRT, enforce it in all cases, allow sub-epoch collect fix: set and hardcode minimum L2 curation to 1 GRT, enforce it in all cases, allow sub-epoch collect (OZ H-01) Nov 9, 2023

// Get the amount of tokens to refund based on returned signal
uint256 tokensOut = signalToTokens(_subgraphDeploymentID, _signalIn);

if (previousCuratorSignal > _signalIn) {
Copy link
Contributor

Choose a reason for hiding this comment

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

pedantic nit, this could be previousCuratorSignal != _signalIn and save a little gas. Though not sure how you feel about code readability.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, but yeah for now I'll leave it like this for readability

@pcarranzav pcarranzav closed this Dec 6, 2023
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.

None yet

3 participants