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(proxyd): prevent banning out-of-sync backend #5694

Merged
merged 3 commits into from
May 15, 2023

Conversation

felipe-op
Copy link
Member

Description

This change relaxes the ban logic in case of a backend that is syncing.

Our current default ban time is 5min, and sync may need only a few seconds.

On 2023-05-11 we observed a 1-block depth reorg which caused alchemy to get banned because it reported out of sync when fetching blocks.

{"backend":"alchemy","lvl":"warn","msg":"backend banned - not in sync","t":"2023-05-11T13:29:17.970613807Z"}

{"blockHash":"0x6e18493498040a4edc3d3fa755be422731124fc9d34f1f807ffcb229044413ae","blockNum":"0x890c41","lvl":"warn","msg":"backend broke consensus","name":"alchemy","proposedBlockHash":"0x159b0327000e4c7eec00aee78e548888a3b0187055a8cabd7b524c3d05053e94","proposedBlockNum":"0x890c41","t":"2023-05-11T13:23:29.424361286Z"}

Tests

Added ban checks.

Invariants

n/a

Additional context

This is part of the project Consensus Aware RPC Proxy: https://www.notion.so/oplabs/Consensus-Aware-RPC-Proxy-0138e029af814e4cbca2740c7888e02d

Metadata

TODOs

@changeset-bot
Copy link

changeset-bot bot commented May 11, 2023

⚠️ No Changeset found

Latest commit: 25dd1ce

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented May 11, 2023

Deploy Preview for opstack-docs canceled.

Name Link
🔨 Latest commit 25dd1ce
🔍 Latest deploy log https://app.netlify.com/sites/opstack-docs/deploys/64628a1c5e5a1200076d365a

@felipe-op felipe-op requested a review from mslipper May 11, 2023 22:42
@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Merging #5694 (d7033e6) into develop (1382586) will increase coverage by 0.19%.
The diff coverage is n/a.

❗ Current head d7033e6 differs from pull request most recent head 25dd1ce. Consider uploading reports for the commit 25dd1ce to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5694      +/-   ##
===========================================
+ Coverage    38.91%   39.10%   +0.19%     
===========================================
  Files          312      287      -25     
  Lines        25176    24431     -745     
  Branches       116        0     -116     
===========================================
- Hits          9797     9554     -243     
+ Misses       14483    13981     -502     
  Partials       896      896              
Flag Coverage Δ
bedrock-go-tests 39.10% <ø> (+<0.01%) ⬆️
common-ts-tests ?
dtl-tests ?
fault-detector-tests ?

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

see 28 files with indirect coverage changes

@felipe-op felipe-op marked this pull request as ready for review May 15, 2023 19:37
@felipe-op felipe-op requested a review from a team as a code owner May 15, 2023 19:37
@mergify
Copy link
Contributor

mergify bot commented May 15, 2023

This PR has been added to the merge queue, and will be merged soon.

@mergify
Copy link
Contributor

mergify bot commented May 15, 2023

This PR is next in line to be merged, and will be merged as soon as checks pass.

@mergify
Copy link
Contributor

mergify bot commented May 15, 2023

This PR is next in line to be merged, and will be merged as soon as checks pass.

@OptimismBot OptimismBot merged commit 06933ea into develop May 15, 2023
8 of 9 checks passed
@OptimismBot OptimismBot deleted the felipe/prevent-ban-out-of-sync branch May 15, 2023 19:42
@mergify mergify bot removed the on-merge-train label May 15, 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