Skip to content

op-batcher: syncActions is aware of safe=unsafe edge case#13292

Merged
sebastianst merged 10 commits intodevelopfrom
gk/sync-actions-fix2
Dec 9, 2024
Merged

op-batcher: syncActions is aware of safe=unsafe edge case#13292
sebastianst merged 10 commits intodevelopfrom
gk/sync-actions-fix2

Conversation

@geoknee
Copy link
Copy Markdown
Contributor

@geoknee geoknee commented Dec 6, 2024

Follow up to #13287 with some more tests and edge case awareness.

Also avoiding use of "oldest unsafe block" in cases where there may not be any unsafe blocks. Preferring "next safe block" instead.

@geoknee geoknee requested review from a team as code owners December 6, 2024 17:13
@geoknee geoknee requested a review from sebastianst December 6, 2024 17:13
@geoknee geoknee added the A-op-batcher Area: op-batcher label Dec 6, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 23.07692% with 20 lines in your changes missing coverage. Please review.

Project coverage is 42.23%. Comparing base (bb6f500) to head (12b0ca0).
Report is 20 commits behind head on develop.

Files with missing lines Patch % Lines
op-batcher/batcher/sync_actions.go 23.07% 17 Missing and 3 partials ⚠️

❗ There is a different number of reports uploaded between BASE (bb6f500) and HEAD (12b0ca0). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (bb6f500) HEAD (12b0ca0)
cannon-go-tests-32 1 0
cannon-go-tests-64 1 0
contracts-bedrock-tests 1 0
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #13292       +/-   ##
============================================
- Coverage    77.73%   42.23%   -35.51%     
============================================
  Files          169      757      +588     
  Lines         9760    68054    +58294     
  Branches       849        0      -849     
============================================
+ Hits          7587    28743    +21156     
- Misses        1957    36919    +34962     
- Partials       216     2392     +2176     
Flag Coverage Δ
cannon-go-tests-32 ?
cannon-go-tests-64 ?
contracts-bedrock-tests ?

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

Files with missing lines Coverage Δ
op-batcher/batcher/sync_actions.go 26.80% <23.07%> (ø)

... and 925 files with indirect coverage changes

and fix behaviour so we don't try to fetch unsafe blocks if there aren't any, even when there are blocks in state
@sebastianst sebastianst enabled auto-merge December 9, 2024 14:37
@sebastianst sebastianst added this pull request to the merge queue Dec 9, 2024
Merged via the queue into develop with commit 53034d2 Dec 9, 2024
@sebastianst sebastianst deleted the gk/sync-actions-fix2 branch December 9, 2024 14:47
sigma pushed a commit that referenced this pull request Dec 19, 2024
* add additional test case for computeSyncActions

* fixup test

* check for unsafe = safe edge case & replace oldestUnsafeBlock with nextSafeBlock

* add test case for no progress and safe=unsafe

* refine log

* rename variable

* harmonize log ordering and labels

* tighten up test behaviour for expectedLogs

* add test case: no progress + unsafe=safe + blocks in state

and fix behaviour so we don't try to fetch unsafe blocks if there aren't any, even when there are blocks in state

* typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-op-batcher Area: op-batcher

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants