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

Set up DiscoveryIndexer #11

Merged
merged 8 commits into from
Sep 18, 2023
Merged

Set up DiscoveryIndexer #11

merged 8 commits into from
Sep 18, 2023

Conversation

michalsidzej
Copy link
Contributor

@michalsidzej michalsidzej commented Sep 18, 2023

Resolves L2B-2154

This PR introduces new .env variables:

ETHERSCAN_API_KEY=

#-----OPTIONAL-----

CLOCK_INTERVAL_MS=

Using @l2beat/discovery required ethers degradation to 5.7.2.

Right now Discovery takes ~20 seconds locally, should be a bit faster on the server.

@linear
Copy link

linear bot commented Sep 18, 2023

L2B-2154 Set up DiscoveryIndexer

Context

The DiscoveryIndexer runs Discovery on LayerZero on Ethereum only, gets updates from the contracts and updates the data in our DB if there are any changes, no history is needed.

We'll use the discovery package from l2beat/tools

If it takes too long (more than 12 sec), it's fine if we run it on the latest block (not on every block).

@vercel
Copy link

vercel bot commented Sep 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lz-monitoring-frontend ✅ Ready (Inspect) Visit Preview Sep 18, 2023 0:03am

packages/backend/.env.example Outdated Show resolved Hide resolved
packages/libs/src/ChainId.ts Outdated Show resolved Hide resolved
packages/backend/src/indexers/DiscoveryIndexer.test.ts Outdated Show resolved Hide resolved
@sdlyy
Copy link
Member

sdlyy commented Sep 18, 2023

Also sanity check:

Please take a look at EthereumDiscoveryModule.ts:50. We've hard-coded the block we should start from there. We should either make it configurable or, I don't know 😅

@michalsidzej
Copy link
Contributor Author

Also sanity check:

Please take a look at EthereumDiscoveryModule.ts:50. We've hard-coded the block we should start from there. We should either make it configurable or, I don't know 😅

e43542e

@michalsidzej michalsidzej merged commit 99c648b into main Sep 18, 2023
4 checks passed
@michalsidzej michalsidzej deleted the feat/discovery-indexer branch September 18, 2023 12:04
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.

2 participants