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(gas_price_service_v1): ensure that the algo updater is synced to l2 block height #2504

Merged
merged 5 commits into from
Dec 24, 2024

Conversation

rymnc
Copy link
Member

@rymnc rymnc commented Dec 17, 2024

Linked Issues/PRs

  • none

Description

We didn't have this check in the uninitialized_task__init__if_metadata_behind_l2_height_then_sync test, which caused us to miss the duped algo updater.

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

After merging, notify other teams

[Add or remove entries as needed]

@rymnc rymnc self-assigned this Dec 17, 2024
@rymnc rymnc added the no changelog Skip the CI check of the changelog modification label Dec 17, 2024

// then
// no panic
// sleep to allow the service to sync
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
Copy link
Contributor

Choose a reason for hiding this comment

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

personally I'm not a fan of sleep of sleeps to wait for a condition to happen, but this is orthogonal to the PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, but with tokio time I can accept it since tokio auto-advances time when all futures are pending.

(Reference https://docs.rs/tokio/latest/tokio/time/fn.pause.html)


// then
// no panic
// sleep to allow the service to sync
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, but with tokio time I can accept it since tokio auto-advances time when all futures are pending.

(Reference https://docs.rs/tokio/latest/tokio/time/fn.pause.html)

@rymnc rymnc merged commit c4a42dc into chore/add-tests-for-v1-gas-service Dec 24, 2024
31 checks passed
@rymnc rymnc deleted the test/gas-price-db-oos branch December 24, 2024 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Skip the CI check of the changelog modification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants