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: relative timestamps #47

Merged
merged 22 commits into from
Oct 17, 2024
Merged

feat: relative timestamps #47

merged 22 commits into from
Oct 17, 2024

Conversation

0xShaito
Copy link
Member

🤖 Linear

Closes GRT-215

Copy link

linear bot commented Oct 17, 2024

@0xShaito 0xShaito changed the title feat/relative timestamps feat: relative timestamps Oct 17, 2024
@0xShaito 0xShaito requested review from ashitakah and xorsal October 17, 2024 14:43
@ashitakah ashitakah merged commit 175bcd5 into dev Oct 17, 2024
7 checks passed
@ashitakah ashitakah deleted the feat/relative-timestamps branch October 17, 2024 15:01
Comment on lines -60 to -65
// Revert if the request is finalized before the response deadline
vm.expectRevert(IBondedResponseModule.BondedResponseModule_TooEarlyToFinalize.selector);
_arbitrateDispute(_disputeId, IOracle.DisputeStatus.Won);

// Pass the response deadline
vm.roll(block.number + responseDeadline);
Copy link
Member

Choose a reason for hiding this comment

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

This could still be tested in case that disputeDeadline were less than what's left of responseDeadline at that moment.

Comment on lines 151 to +152
// Pass the dispute window
vm.roll(block.number + responseDisputeWindow - responseDeadline);
vm.warp(oracle.disputeCreatedAt(_disputeId) + disputeDeadline + 1);
Copy link
Member

Choose a reason for hiding this comment

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

Pass the dispute window or pass the dispute deadline?

Also, bear in mind whether they should be computed from the response creation timestamp or the dispute creation timestamp.

Comment on lines 144 to +145
// Pass the response deadline
vm.roll(block.number + responseDeadline);
vm.warp(oracle.responseCreatedAt(_responseId) + responseDeadline);
Copy link
Member

Choose a reason for hiding this comment

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

// Pass the response deadline, but not the dispute deadline

Also, shouldn't it add the responseDeadline to requestCreatedAt?

Copy link
Member Author

Choose a reason for hiding this comment

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

100%

Comment on lines 52 to +53
// Do not pass the dispute deadline
vm.warp(disputeDeadline);
vm.warp(_responseCreation + disputeDisputeWindow - 1);
Copy link
Member

Choose a reason for hiding this comment

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

Do not pass the dispute deadline or do not pass the dispute window?

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.

4 participants