-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Transaction actions indexer #6582
Conversation
@nikitosing I finished working on the reviewers' comments. Now you can review as well. Thanks |
apps/block_scout_web/lib/block_scout_web/templates/transaction/_actions_uniswap.html.eex
Outdated
Show resolved
Hide resolved
@varasev Can you please fix failing tests? |
Do you mean the following one?
I can't reproduce it locally for some reason 🤔 Trying to run:
Am I missing something? |
This reverts commit 3ed043d.
All is good. There were blinking tests. All are green after a manual restart. |
I added |
Motivation
This is a part of #6289. The corresponding changes for the new UI are added in blockscout/frontend#434.
Changelog
This PR contains the following features and changes:
This PR adds support of one protocol yet (Uniswap V3). Other protocols will be added in the next PRs.
Indexing of tx actions runs with
realtime
andcatchup
block fetchers (ifDISABLE_INDEXER
is nottrue
andINDEXER_TX_ACTIONS_ENABLE
istrue
).There is also a separate
transaction_action
fetcher for historical blocks which only runs ifINDEXER_TX_ACTIONS_ENABLE
env variable istrue
and the block range is defined (see env variables description below). We need it for the case when we need to index tx actions for historical (already indexed) blocks of the chain or reindex tx actions for the defined block range (in case we found a bug in tx action indexer and need to reindex the actions for some blocks and/or protocols).Also, the PR adds 5 new environment variables:
INDEXER_TX_ACTIONS_ENABLE
(defaults tofalse
) - enables transaction actions indexer.INDEXER_TX_ACTIONS_MAX_TOKEN_CACHE_SIZE
(defaults to 100000) - sets a maximum number of items in an internal cache of tx actions indexing process (to limit memory consumption).INDEXER_TX_ACTIONS_REINDEX_FIRST_BLOCK
- defines the first block of a block range for historical indexing or reindexing of tx actions.INDEXER_TX_ACTIONS_REINDEX_LAST_BLOCK
- defines the last block of a block range for historical indexing or reindexing of tx actions. Cannot exceed the last block of a chain.INDEXER_TX_ACTIONS_REINDEX_PROTOCOLS
(defaults to empty string) - defines comma-separated names of protocols which should be indexed or reindexed on historical blocks defined by the range. Example:uniswap_v3,zkbob
- only these protocols will be indexed or reindexed for the defined block range. If the value is empty string (or not defined), all supported protocols will be indexed/reindexed. This option is not applicable torealtime
andcatchup
fetcher (it always indexes all supported protocols).Checklist for your Pull Request (PR)
CHANGELOG.md
with this PRsharelock.md
for tx actions indexer docs#101master
in the Version column. Changes will be reflected in this table: https://docs.blockscout.com/for-developers/information-and-settings/env-variables.