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

Adds Arbitrum's sequencer healthy check. #180

Merged
merged 5 commits into from
Feb 15, 2024
Merged

Conversation

magnetto90
Copy link
Contributor

@magnetto90 magnetto90 commented Feb 14, 2024

@magnetto90 magnetto90 marked this pull request as ready for review February 15, 2024 14:26
* @return True if the SequencerOracle is up and the grace period passed, false otherwise
*/
function isUpAndGracePeriodPassed() external view returns (bool) {
(, int256 answer,, uint256 lastUpdateTimestamp,) = sequencerOracle.latestRoundData();
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we are using the lastUpdatedTimestamp field (timestamp of when the round was updated), which is what AAVE is doing as well.

However, in the Chainlink docs, the startedAt (timestamp of when the round started) timestamp is used instead.

I think both implementations should be correct.

Copy link
Member

Choose a reason for hiding this comment

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

From ArbitrumSequencerUptimeFeed.sol - latestRoundData() we see that both variables are actually the same.
Conceptually, we should use the one that's higher.

@TomasCImach TomasCImach merged commit 1842c00 into staging Feb 15, 2024
4 checks passed
@TomasCImach TomasCImach deleted the s/sequencer-checker branch February 15, 2024 16:47
@magnetto90 magnetto90 added the ToB label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants