Skip to content

Watcher: l1 vs l2 blocksToFetch#1404

Merged
tynes merged 1 commit intodevelopfrom
matt/watcher-l1-l2-blocksToFetch
Sep 22, 2021
Merged

Watcher: l1 vs l2 blocksToFetch#1404
tynes merged 1 commit intodevelopfrom
matt/watcher-l1-l2-blocksToFetch

Conversation

@gigamesh
Copy link
Copy Markdown
Contributor

@gigamesh gigamesh commented Aug 31, 2021

The Watcher utility currently has a single blocksToFetch for both layers, which isn't ideal because L2 has much faster block times. This PR defines l1BlocksToFetch and l2BlocksToFeth

Note - I'm not sure why it added all the change set stuff. Feel free to remove if needed.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 31, 2021

🦋 Changeset detected

Latest commit: 8da0450

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@eth-optimism/core-utils Minor
@eth-optimism/batch-submitter Patch
@eth-optimism/contracts Patch
@eth-optimism/data-transport-layer Patch
@eth-optimism/message-relayer Patch
@eth-optimism/replica-healthcheck Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions bot added A-ts-packages A-pkg-core-utils Area: packages/core-utils labels Aug 31, 2021
@gigamesh gigamesh force-pushed the matt/watcher-l1-l2-blocksToFetch branch from f6f199b to 6ac7d0a Compare August 31, 2021 21:47
@gigamesh gigamesh requested review from K-Ho and snario and removed request for snario August 31, 2021 21:48
@tynes tynes force-pushed the matt/watcher-l1-l2-blocksToFetch branch from 6ac7d0a to 8d4a5ad Compare September 21, 2021 21:02
@tynes
Copy link
Copy Markdown
Contributor

tynes commented Sep 21, 2021

I've updated this PR with a rebase and a minor changeset. Also addressed t11s' comments

@tynes tynes force-pushed the matt/watcher-l1-l2-blocksToFetch branch from 8d4a5ad to 3c31643 Compare September 21, 2021 22:14
@tynes
Copy link
Copy Markdown
Contributor

tynes commented Sep 21, 2021

Updated in a way to make it backwards compatible

@tynes tynes force-pushed the matt/watcher-l1-l2-blocksToFetch branch 2 times, most recently from 336c973 to 647cd98 Compare September 21, 2021 23:09
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 21, 2021

Codecov Report

Merging #1404 (8da0450) into develop (3492792) will decrease coverage by 0.17%.
The diff coverage is 16.66%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1404      +/-   ##
===========================================
- Coverage    76.47%   76.29%   -0.18%     
===========================================
  Files           81       81              
  Lines         3018     3029      +11     
  Branches       463      463              
===========================================
+ Hits          2308     2311       +3     
- Misses         710      718       +8     
Flag Coverage Δ
batch-submitter 60.99% <ø> (ø)
contracts 86.05% <ø> (ø)
core-utils 66.40% <16.66%> (-1.76%) ⬇️
data-transport-layer 37.86% <ø> (ø)
message-relayer 72.22% <ø> (ø)

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

Impacted Files Coverage Δ
packages/core-utils/src/watcher.ts 8.19% <16.66%> (+4.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3492792...8da0450. Read the comment docs.

Adds new config options to the watcher to allow it to upgrade in
a non breaking way. New config options include setting a global
`pollForPending` and `blocksToFetch`. It is also possible to
specify the number of blocks to fetch on each `Layer`.

The event ids are precomputed and held as globals instead of computed
on the fly each time.
@tynes tynes force-pushed the matt/watcher-l1-l2-blocksToFetch branch from 647cd98 to 8da0450 Compare September 21, 2021 23:32
@tynes tynes merged commit 0aea323 into develop Sep 22, 2021
@tynes tynes deleted the matt/watcher-l1-l2-blocksToFetch branch September 22, 2021 20:48
theochap pushed a commit that referenced this pull request Dec 10, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-pkg-core-utils Area: packages/core-utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants