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

Remove special casing of first add #86

Merged
merged 10 commits into from
Dec 13, 2024
Merged

Conversation

ZenGround0
Copy link
Contributor

Closes #

  • Remove special casing of first add
  • Handle first add in next proving period
  • Update PDP service to support this behavior
  • Update deadline calculator functions to return useful values when state not yet initialized
  • Support graceful stopping of PDP Service accounting when all roots are removed

@ZenGround0 ZenGround0 force-pushed the feat/first-add-ur-not-special branch from c2de7f2 to c9fc9e5 Compare December 12, 2024 14:36
Copy link
Collaborator

@aarshkshah1992 aarshkshah1992 left a comment

Choose a reason for hiding this comment

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

@ZenGround0 Left first round of comments. Will do one more round once you address these.

@@ -388,6 +384,8 @@ contract PDPVerifier is Initializable, UUPSUpgradeable, OwnableUpgradeable {
uint256 challengeEpoch = nextChallengeEpoch[setId];
require(block.number >= challengeEpoch, "premature proof");
require(proofs.length > 0, "empty proof");
require(challengeEpoch != NO_CHALLENGE_SCHEDULED, "no challenge scheduled");
require(proofSetOwner[setId] == msg.sender, "only the owner can prove possession");
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ZenGround0 This check already exists above and is a duplicate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks

Copy link
Collaborator

@aarshkshah1992 aarshkshah1992 left a comment

Choose a reason for hiding this comment

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

@ZenGround0 Lgtm. Just need to fix the duplicate check for owner in provePossesion in the PDPVerifier contract.

@ZenGround0 ZenGround0 merged commit 9e7eee9 into main Dec 13, 2024
1 check 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