-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat: APIv2 endpoints for Arbitrum messages and batches #9963
Merged
vbaranov
merged 15 commits into
feature/arbitrum/bridge
from
feature/arbitrum/bridge-api
May 22, 2024
Merged
feat: APIv2 endpoints for Arbitrum messages and batches #9963
vbaranov
merged 15 commits into
feature/arbitrum/bridge
from
feature/arbitrum/bridge-api
May 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 tasks
varasev
reviewed
May 16, 2024
"originator_address" => msg.originator_address, | ||
"originating_tx_hash" => msg.originating_tx_hash, | ||
"origination_timestamp" => msg.origination_timestamp, | ||
"originating_tx_blocknum" => msg.originating_tx_blocknum, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor suggestion: maybe rename originating
to origination
for these fields to unify naming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in f4d1ce7
varasev
reviewed
May 16, 2024
varasev
reviewed
May 16, 2024
vbaranov
approved these changes
May 22, 2024
vbaranov
pushed a commit
that referenced
this pull request
May 27, 2024
* Initial version of x-level messages indexer * fixes for cspell and credo * new state of x-level messages * Monitoring of new L1-to-L2 messages on L1 * new batches discovery * fetcher workers in separate modules * proper name * Fix for responses without "id", e.g. "Too Many Requests" * update DB with new batches and corresponding data * update DB with confirmed blocks * fixes for cspell and credo * tracking commitments confirmations for L1 to L2 messages * Proper usign of max function * tracking completion of L2 to L1 messages * catchup historical messages to L2 * incorrect version of committed file * catchup historical messages from L2 and completion of L1-to-L2 messages * historical batches catchup * status for historical l2-to-l1 messages * address matching issue * catchup historical executions of L2-to-L1 messages * db query to find unconfirmed blocks gaps * first changes to catchup historical confirmations * finalized catchup of historical confirmations * 4844 blobs support * fix for the issue with multiple confirmations * limit amount of batches to handle at once * Use latest L1 block by fetchers if start block is not configured * merge issue fix * missed file * historical messages discovery * reduce logs severity * first iteration to improve documentation for new functionality * second iteration to improve documentation for new functionality * third iteration to improve documentation for new functionality * fourth iteration to improve documentation for new functionality * fifth iteration to improve documentation for new functionality * final iteration to improve documentation for new functionality * merge issues addressed * code review issues addressed * code review issues addressed * fix merge issue * raising exception in the case of DB inconsistency * fix formatting issue * termination case for RollupMessagesCatchup * code review comments addressed * code review comments addressed * consistency in primary keys * dialyzer fix * code review comments addressed * missed doc comment * code review comments addressed * updated indices creation as per code review comments * fix merge issue * configuration of intervals as time variables * TODO added to reflect improvement ability * database fields refactoring * association renaming * feat: APIv2 endpoints for Arbitrum messages and batches (#9963) * Arbitrum related info in Transaction and Block views * Views to get info about batches and messages * usage of committed for batches instead of confirmed * merge issues addressed * changes after merge * formatting issue fix * code review comment addressed * associations and fields in api response renamed * format issue addressed * feat: Arbitrum-specific fields in the block and transaction API endpoints (#10067) * Arbitrum related info in Transaction and Block views * Views to get info about batches and messages * usage of committed for batches instead of confirmed * merge issues addressed * changes after merge * formatting issue fix * block and transaction views extended * code review comment addressed * associations and fields in api response renamed * format issue addressed * fix credo issue * fix tests issues * ethereumjsonrpc test fail investigation * test issues fixes
vbaranov
added a commit
that referenced
this pull request
May 29, 2024
* fix: Add healthcheck endpoints for indexer-only setup (#10076) * fix: Update Vyper inner compilers list to support all compilers (#10091) Increases the number of items retrieved for Vyper releases to 100. Allows to get the oldest vyper compilers when using internal verification (i.e., sc_verifier is disabled) When not set, the default number of items retrieved is 30, which is less than total number of currently existing releases (46). This makes the oldest compilers unavailable when using vyper verificaiton method. Should fix the failing `/api/v2/smart-contracts/{address_hash}/verification/via/vyper-code success verification` test * Fix certified flag in the search API v2 endpoint (#10094) * Update CHANGELOG for 6.6.0 * Remove custom release CI for Immutable * feat: implement fetch_first_trace for Geth (#10087) * feat: implement fetch_first_trace for Geth * chore: add missing doc & spec * Update CHANGELOG * Fix GA pre-release && release workflows * Improve response of address API to return multiple implementations for Diamond proxy (#10113) * Update CHANGELOG * Indexer/API separated images for Redstone * chore: Bump ecto_sql from 3.11.1 to 3.11.2 updated-dependencies: - dependency-name: ecto_sql dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: indexer for cross level messages on Arbitrum (#9312) * Initial version of x-level messages indexer * fixes for cspell and credo * new state of x-level messages * Monitoring of new L1-to-L2 messages on L1 * new batches discovery * fetcher workers in separate modules * proper name * Fix for responses without "id", e.g. "Too Many Requests" * update DB with new batches and corresponding data * update DB with confirmed blocks * fixes for cspell and credo * tracking commitments confirmations for L1 to L2 messages * Proper usign of max function * tracking completion of L2 to L1 messages * catchup historical messages to L2 * incorrect version of committed file * catchup historical messages from L2 and completion of L1-to-L2 messages * historical batches catchup * status for historical l2-to-l1 messages * address matching issue * catchup historical executions of L2-to-L1 messages * db query to find unconfirmed blocks gaps * first changes to catchup historical confirmations * finalized catchup of historical confirmations * 4844 blobs support * fix for the issue with multiple confirmations * limit amount of batches to handle at once * Use latest L1 block by fetchers if start block is not configured * merge issue fix * missed file * historical messages discovery * reduce logs severity * first iteration to improve documentation for new functionality * second iteration to improve documentation for new functionality * third iteration to improve documentation for new functionality * fourth iteration to improve documentation for new functionality * fifth iteration to improve documentation for new functionality * final iteration to improve documentation for new functionality * merge issues addressed * code review issues addressed * code review issues addressed * fix merge issue * raising exception in the case of DB inconsistency * fix formatting issue * termination case for RollupMessagesCatchup * code review comments addressed * code review comments addressed * consistency in primary keys * dialyzer fix * code review comments addressed * missed doc comment * code review comments addressed * updated indices creation as per code review comments * fix merge issue * configuration of intervals as time variables * TODO added to reflect improvement ability * database fields refactoring * association renaming * feat: APIv2 endpoints for Arbitrum messages and batches (#9963) * Arbitrum related info in Transaction and Block views * Views to get info about batches and messages * usage of committed for batches instead of confirmed * merge issues addressed * changes after merge * formatting issue fix * code review comment addressed * associations and fields in api response renamed * format issue addressed * feat: Arbitrum-specific fields in the block and transaction API endpoints (#10067) * Arbitrum related info in Transaction and Block views * Views to get info about batches and messages * usage of committed for batches instead of confirmed * merge issues addressed * changes after merge * formatting issue fix * block and transaction views extended * code review comment addressed * associations and fields in api response renamed * format issue addressed * fix credo issue * fix tests issues * ethereumjsonrpc test fail investigation * test issues fixes * --- (#10096) updated-dependencies: - dependency-name: phoenix_ecto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * hide chain specific fields behind Map.get (#10131) * fix: Hotfix for Indexer.Fetcher.Optimism.WithdrawalEvent and EthereumJSONRPC.Receipt (#10130) * fix: Hotfix for Indexer.Fetcher.Optimism.WithdrawalEvent * Small refactoring * Small refactoring * Consider nil in game_index * Add empty handler for Optimism Fjord tx receipt fields --------- Co-authored-by: POA <33550681+poa@users.noreply.github.com> * fix: missing nil case for revert reason (#10136) * fix: Add missing preloads to tokens endpoints --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Qwerty5Uiop <105209995+Qwerty5Uiop@users.noreply.github.com> Co-authored-by: Rim Rakhimov <rimrakhimov@gmail.com> Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com> Co-authored-by: Kirill Fedoseev <kirill@blockscout.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexander Kolotov <alexandr.kolotov@gmail.com> Co-authored-by: varasev <33550681+varasev@users.noreply.github.com> Co-authored-by: POA <33550681+poa@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This PR is continuation of work to support Arbitrum related entities in the BlockScout and depends on the changes introduced in #9312. It implements new API endpoints:
api/v2/arbitrum/batches
: Provides minimal details about all batches.api/v2/arbitrum/batches/{batch_number}
: Offers complete details about a specific batch.api/v2/arbitrum/batches/count
: Returns the number of indexed batches.api/v2/arbitrum/messages/to-rollup
: Provides details about all L1-to-L2 messages.api/v2/arbitrum/messages/to-rollup/count
: Returns the number of L1-to-L2 messages.api/v2/arbitrum/messages/from-rollup
: Provides details about all L2-to-L1 messages.api/v2/arbitrum/messages/from-rollup/count
: Returns the number of L2-to-L1 messages.api/v2/blocks/arbitrum-batch/{batch_number}
: Allows retrieval of all blocks included in a batch.api/v2/transactions/arbitrum-batch/{batch_number}
: Allows retrieval of all transactions included in a batch.api/v2/main-page/arbitrum/messages/to-rollup
: Provides details about the latest 6 relayed L1-to-L2 messages.api/v2/main-page/arbitrum/batches/latest-number
: Returns the latest sealed batch number.api/v2/main-page/arbitrum/batches/committed
: Provides minimal details about the latest 10 committed batches.The
api/v2/transactions/{tx_hash}
endpoint has been extended to include a "arbitrum" element, offering additional information about associated batches and cross-chain messages:and the
/api/v2/blocks/{block_number}
endpoint has been extended with the following element:Changelog
Enhancements
BlockScoutWeb.API.V2.ArbitrumController
.BlockScoutWeb.API.V2.ArbitrumView
.BlockScoutWeb.API.V2.BlockController
andBlockScoutWeb.API.V2.TransactionController
are made to allow getting items included in a batch.Explorer.Chain.Arbitrum.Reader
has been extended with the functions to read corresponding items from the database.Checklist for your Pull Request (PR)
master
in the Version column. Changes will be reflected in this table: https://docs.blockscout.com/for-developers/information-and-settings/env-variables.