external-adapters-js
external-adapters-js copied to clipboard
bugfix for polling blocks in l2 sequencer health ea
Description
There is a bug in the L2 Sequencer health EA where the EA does not correctly correctly check that the L2 network's block height is growing. The issue was the current block number was not correctly stored in the EA's state as it was reset whenever checkOptimisticRollupBlockHeight
is called. The fix for this was to assign an instance of checkOptimisticRollupBlockHeight
to Metis, Optimism and Arbitrum so that the current block number is saved and can be compared to the next block number when the next request comes in.
Changes
- Add unit tests to make sure that the blocks are correctly polled.
- Assign an instance of
checkOptimisticRollupBlockHeight
to each EVM chain being checked (Metis, Arbitrum and Optimism).
Steps to Test
- Write unit tests to make sure that stale blocks are correctly identified over time.
Quality Assurance
- [x] If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant
<ADAPTER_PACKAGE>/schemas/env.json
and<ADAPTER_PACKAGE>/README.md
- [x] If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant
infra-k8s
configuration file. - [x] If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant
adapter-secrets
configuration file or update the soak testing blacklist. - [x] If a new adapter was made, or a new endpoint was added, update the
test-payload.json
file with relevant requests. - [x] The branch naming follows git flow (
feature/x
,chore/x
,release/x
,hotfix/x
,fix/x
) or is created from Clubhouse/Shortcut - [x] This is related to a maximum of one Clubhouse/Shortcut story or GitHub issue
- [x] Types are safe (avoid TypeScript/TSLint features like any and disable, instead use more specific types)
- [x] All code changes have 100% unit and integration test coverage. If testing is not applicable or too difficult to justify doing, the reasoning should be documented explicitly in the PR.
⚠️ No Changeset found
Latest commit: d6477e26070f3d821678a11a80cd7ff3beb24048
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