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

2024-04-26 - sync with src repo #8

Merged
merged 270 commits into from
Apr 26, 2024
Merged

2024-04-26 - sync with src repo #8

merged 270 commits into from
Apr 26, 2024

Conversation

istoril
Copy link
Collaborator

@istoril istoril commented Apr 26, 2024

No description provided.

k1rill-fedoseev and others added 30 commits February 29, 2024 09:54
* Fix no function clause matching in Integer.parse/2

* Changelog
…t-env-vars

Add env vars for NFT sanitize migration
Stream blocks without internal transactions in reverse order
…_24_6-compatibility

Docker-compose 2.24.6 compatibility
* Add tsvector index on smart_contracts.name

* Changelog
* Transaction page L1 fields

* Path fix

* Reduce the number of files from 19 to 5 in logs rotate config

* Customize optimism-goerli deployment

* Optimism branding

* Remove testnet logo text. OG uses customized label

* Fix Circles theme

* L1 tx fields fix for Optimism BedRock update

* Remove redundant line

* Add gas_price handling for elixir_to_params and change function ordering

* Remove l1TxOrigin handling for another version of RPC

* Add GA

* Fix realtime fetcher test

* Update Changelog

* Fix internal transactions processing for non-consensus blocks

* Lose consensus only for consensus=true blocks

* Fix handling transaction RPC responses without some fields

* Fix tests except for indexer module

* Add Optimism BedRock support (Txn Batches, Output Roots, Deposits, Withdrawals) (blockscout#6980)

* Add op_output_roots table

* Add OptimismOutputRoots runner

* Add initial code for output roots fetcher

* Add checks to init function

* Partially add logs and L1 reorgs handling

* Add reorgs handling

* Add RPC retries

* Write output roots to database

* Log output roots handling

* Update indexer README

* Add API v2 for Optimism Output Roots

* Add op_withdrawals table

* Add OptimismWithdrawals runner

* Prepare realtime optimism withdrawals fetching

* Add realtime optimism withdrawals fetching

* Define checks in init function

* log.first_topic can be nil

* Show total count of output roots in API v2

* Add msg_nonce gaps filler

* Refactoring

* Intermediate refactoring

* Add historical withdrawals handling and refactor

* Finish op_withdrawals table filling

* Small refactoring

* Add op_withdrawal_events table

* Add OptimismWithdrawalEvents runner

* Add OptimismWithdrawalEvent fetcher

* Update indexer README

* Add API v2 for Optimism Withdrawals

* Add env variables to common-blockscout.env and Makefile

* Set `from` as address object instead of just address hash for withdrawal

* mix format

* Add op_transaction_batches table

* Add OptimismTxnBatches runner

* Add a draft for OptimismTxnBatch fetcher

* Add a draft for OptimismTxnBatch

* Extend a draft for OptimismTxnBatch

* Extend OptimismTxnBatch

* Finish OptimismTxnBatch (without reorgs handling yet)

* Optimize OptimismTxnBatch fetcher

* Remove duplicated txn batches

* Add zlib_inflate_handler for empty case

* Add reorgs handling for txn batches

* Fix reorgs handling for txn batches

* Small refactor

* Finish Indexer.Fetcher.OptimismTxnBatch (without refactoring yet)

* Apply new ex_rlp version

* Add API v2 for Optimism Txn Batches

* Add env variables to common-blockscout.env and Makefile

* Refactor OptimismTxnBatch fetcher for mix credo

* Replace binary_slice with binary_part function to run with Elixir 1.13

* Update changelog

* Update indexer readme

* Rename op_withdrawals.l2_tx_hash field to l2_transaction_hash

* Rename l1_tx_hash fields to l1_transaction_hash

* Rename *tx* fields to *transaction* fields

* Rename env variables

* Rename env variables

* Add an indexer helper

* Add an indexer helper

* Small refactoring

* Fix tx_count for txn batches view

* Use EthereumJSONRPC.Block.ByHash instead of the raw call

* Infinity timeout for blocks query

* Small refactoring

* Refactor init function for two modules

* Small refactoring

* Rename l1_transaction_timestamp field to l1_timestamp

* Rename withdrawal_hash field to hash

* Refactor for decode_data function

* Refactor for mix credo

* Add INDEXER_OPTIMISM_L1_BATCH_BLOCKS_CHUNK_SIZE env and small refactoring

* Add INDEXER_OPTIMISM_L1_BATCH_BLOCKS_CHUNK_SIZE env to other files

* Add an index for l1_block_number field

* Add an index for l1_block_number field

* Remove redundant :ok

* Use faster way to count rows in a table

* Refactor reorgs monitor functions

* Clarify frame structure

* Reduce storage consumption for optimism transaction batches

* Reuse CacheHelper.estimated_count_from function

* Bedrock optimism deposits (blockscout#6993)

* Create `op_deposits` table

* Add OptimismDeposit runner

* WIP Fetcher

* Finish fetcher

* Integrate deposits into APIv2

* Add envs

* Fix requests

* Remove debug

* Update envs names

* Rename `tx` -> `transaction`

* Reuse `decode_data/2`

* Fix review

* Add `uninstall_filter`

* Fix formatting

* Switch to realtime mode more carefully

* Fix review

Allow nil in timestamp
Add progress logging
Improve check_interval calculation

* Fix logging and env

* Fix Association.NotLoaded error

* Replace switching to realtime mode log

* Remove excess start_block

* Fix reorg logging

* Fix `from_block` > `to_block` and add realtime logging

* Fix block boundaries

---------

Co-authored-by: POA <33550681+poa@users.noreply.github.com>

* mix format

* Return total count of L2 entity by a separate API request

* Filter by consensus blocks

* Parallelize tx count operation and small refactoring

* Use read replica for L2 entities in API

* Parse block_number and tx_hash for Optimism Deposits module

* Return page_size back to 50

* Small fixes and refactoring

* Update apps/block_scout_web/lib/block_scout_web/api_router.ex

Co-authored-by: Maxim Filonov <53992153+sl1depengwyn@users.noreply.github.com>

* Small optimization

* Use ecto association instead of explicit join for txn batches

* Refactoring

* Use Stream inspead of Enum

* Small refactoring

* Add assoc for transaction batches in OptimismFrameSequence

* Use common reorg monitor for Optimism modules

* Rename Explorer.Helpers to Explorer.Helper

* Don't start an optimism module unless the main optimism module is not started

* Don't start reorg monitor for optimism modules when it is not needed

* Small refactoring

* Remove debug broadcasting

* Add Optimism BedRock Deposits to the main page in API (blockscout#7200)

* Add Optimism BedRock Deposits to the main page in API

* Update changelog

* Pass the number of deposits instead of only one item per once

---------

Co-authored-by: POA <33550681+poa@users.noreply.github.com>

* Refactor for credo

* Output L1 fields in API v2 for transaction page

* Update changelog

* Use helper

* Refactor Indexer.Fetcher.Optimism

* Fix l1_timestamp issue in OptimismTxnBatch fetcher

* Reset Logger metadata before Indexer.Transform.OptimismWithdrawals.parse function finishes

* Fix IDs ordering in remove_duplicates function of Indexer.Fetcher.OptimismTxnBatch

* Consider rewriting of the first frame in Indexer.Fetcher.OptimismTxnBatch

* Fix Indexer.Fetcher.OptimismTxnBatch (consider chunking)

* Fix Indexer.Fetcher.OptimismTxnBatch

* Fix handling invalid frame sequences in Indexer.Fetcher.OptimismTxnBatch

* Read Optimism finalization period from a smart contract

* Fixes for dialyzer

* Fix for EthereumJSONRPC tests

* Fixes for Explorer tests

* Fixes for Explorer tests

* Fix of block/realtime/fetcher_test.exs

* mix format and small fixes for block_scout_web tests

* Reset GA cache

* Fix handling nil in PendingBlockOperation.estimated_count()

---------

Co-authored-by: POA <33550681+poa@users.noreply.github.com>
Co-authored-by: Maxim Filonov <53992153+sl1depengwyn@users.noreply.github.com>

* Fix autocomplete

* Fix merging conflicts

* Add exit handler to Indexer.Fetcher.OptimismWithdrawal

* Fix transactions ordering in Indexer.Fetcher.OptimismTxnBatch

* Update changelog

* Refactor to fix credo

* Mix credo fix

* Fix transaction batches module for L2 OP stack (blockscout#7827)

* Fix mixed transactions handling in Indexer.Fetcher.OptimismTxnBatch

* Ignore duplicated frame

* Update changelog

* Add sorting to the future frames list

* Change list order

---------

Co-authored-by: POA <33550681+poa@users.noreply.github.com>

* Remove unused aliases

* Ignore previously handled frame by OP transaction batches module (blockscout#8122)

* Ignore duplicated frame

* Update changelog

---------

Co-authored-by: POA <33550681+poa@users.noreply.github.com>

* Return alias for Explorer.Chain.Cache.Helper in chain.ex

* Ignore invalid frame by OP transaction batches module (blockscout#8208)

* Update changelog

* Ignore invalid frame

* Update changelog

---------

Co-authored-by: POA <33550681+poa@users.noreply.github.com>

* Fix Indexer.Fetcher.OptimismTxnBatch

* Fix API v2 for OP Withdrawals

* Refactor optimism fetchers init

* Add log for switching from fallback url

* Fix for Indexer.Fetcher.OptimismTxnBatch

* Add OP withdrawal status to transaction page in API (blockscout#8702)

* Add OP withdrawal status to transaction page in API

* Update changelog

* Small refactoring

* Update .dialyzer-ignore

---------

Co-authored-by: POA <33550681+poa@users.noreply.github.com>

* Add start pause to `Indexer.Fetcher.OptimismTxnBatch`

* Small refactor of `Indexer.Fetcher.OptimismTxnBatch`

* Consider consensus block only when retrieving OP withdrawal transaction status (blockscout#8811)

* Consider consensus block only when retrieving OP withdrawal transaction status

* Update changelog

* Clear GA cache

---------

Co-authored-by: POA <33550681+poa@users.noreply.github.com>

* Hotfix for optimism_withdrawal_transaction_status function

* Return all OP Withdrawals bound to L2 transaction

* Try to import config

* Remove unused functions from Explorer.Chain

* Refactor for mix credo

* Fix order of proxy standards: 1167, 1967

* Fixes in Optimism due to changed log topics type

* Fix for EthereumJSONRPC tests

* Clear GA cache and update cspell.json

* Fix indexer tests

* Return current exchange rate in api/v2/stats

* Fix log decoding bug

* Temp disable build of image for arm64

* Rewrite Indexer.Fetcher.OptimismTxnBatch module

* Add handling of span batches

* Add support of latest block for Optimism modules

* Update changelog and spelling

* Rewrite Indexer.Fetcher.OptimismTxnBatch module

* Add handling of span batches

* Add support of latest block for Optimism modules

* Refactoring

* Partially add specs and docs for public functions

* Refactoring

* add an entry to CHANEGELOG.md

* apply review (use origin entity instead of joined entity in with tx status)

* Fixes after rebase

* Remove old UI sustomizations

* Optimism chain type

* Change structure of folders

* Fixes after review

* Fix CHANGELOG

* Fixes after 2nd review

* Process 3d review: add tests for fee/2 function

* Process 4th review

* Review fix: move Op related functions from chain.ex

* Review fix: make OptimismFinalizationPeriod configurable

* Process review comment

* System.get_env("CHAIN_TYPE") => Application.get_env(:explorer, :chain_type)

---------

Co-authored-by: POA <33550681+poa@users.noreply.github.com>
Co-authored-by: Qwerty5Uiop <alex000010@bk.ru>
Co-authored-by: varasev <33550681+varasev@users.noreply.github.com>
Co-authored-by: Maxim Filonov <53992153+sl1depengwyn@users.noreply.github.com>
Co-authored-by: rlgns98kr <rlgns98kr@gmail.com>
* Remove `transactionLogIndex` from `eth_getLogs` response

* Fix missing `0x` prefix for `blockNumber`, `logIndex`, `transactionIndex` in `eth_getLogs` response

* Fix logs pagination test

* Fix docs for `index` field in chain log

* Update smart contract ABI wiki link

* Add regression test for missing `0x` in `eth_getLogs`
…lockscout#9490)

* feat: add blob tx count and filter to block view

* chore: changelog
* Add stability validators

* Process review comments

* Fix tests
* Add new ETH JSON RPC methods

* Add new ETH JSON RPC API methods; Add ETH_JSON_RPC_MAX_BATCH_SIZE env

* Process review comments
Bumps [logger_json](https://github.com/Nebo15/logger_json) from 5.1.3 to 5.1.4.
- [Release notes](https://github.com/Nebo15/logger_json/releases)
- [Commits](Nebo15/logger_json@5.1.3...5.1.4)

---
updated-dependencies:
- dependency-name: logger_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [credo](https://github.com/rrrene/credo) from 1.7.4 to 1.7.5.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](rrrene/credo@v1.7.4...v1.7.5)

---
updated-dependencies:
- dependency-name: credo
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [floki](https://github.com/philss/floki) from 0.35.4 to 0.36.0.
- [Release notes](https://github.com/philss/floki/releases)
- [Changelog](https://github.com/philss/floki/blob/main/CHANGELOG.md)
- [Commits](philss/floki@v0.35.4...v0.36.0)

---
updated-dependencies:
- dependency-name: floki
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [postgrex](https://github.com/elixir-ecto/postgrex) from 0.17.4 to 0.17.5.
- [Release notes](https://github.com/elixir-ecto/postgrex/releases)
- [Changelog](https://github.com/elixir-ecto/postgrex/blob/master/CHANGELOG.md)
- [Commits](elixir-ecto/postgrex@v0.17.4...v0.17.5)

---
updated-dependencies:
- dependency-name: postgrex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [phoenix_ecto](https://github.com/phoenixframework/phoenix_ecto) from 4.4.3 to 4.5.0.
- [Changelog](https://github.com/phoenixframework/phoenix_ecto/blob/main/CHANGELOG.md)
- [Commits](phoenixframework/phoenix_ecto@v4.4.3...v4.5.0)

---
updated-dependencies:
- dependency-name: phoenix_ecto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [ueberauth](https://github.com/ueberauth/ueberauth) from 0.10.7 to 0.10.8.
- [Release notes](https://github.com/ueberauth/ueberauth/releases)
- [Changelog](https://github.com/ueberauth/ueberauth/blob/master/CHANGELOG.md)
- [Commits](ueberauth/ueberauth@v0.10.7...v0.10.8)

---
updated-dependencies:
- dependency-name: ueberauth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.9 to 7.24.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.24.0/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [chart.js](https://github.com/chartjs/Chart.js) from 4.4.1 to 4.4.2.
- [Release notes](https://github.com/chartjs/Chart.js/releases)
- [Commits](chartjs/Chart.js@v4.4.1...v4.4.2)

---
updated-dependencies:
- dependency-name: chart.js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md)
- [Commits](webpack-contrib/mini-css-extract-plugin@v2.8.0...v2.8.1)

---
updated-dependencies:
- dependency-name: mini-css-extract-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [postcss-loader](https://github.com/webpack-contrib/postcss-loader) from 8.1.0 to 8.1.1.
- [Release notes](https://github.com/webpack-contrib/postcss-loader/releases)
- [Changelog](https://github.com/webpack-contrib/postcss-loader/blob/master/CHANGELOG.md)
- [Commits](webpack-contrib/postcss-loader@v8.1.0...v8.1.1)

---
updated-dependencies:
- dependency-name: postcss-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Qwerty5Uiop and others added 29 commits April 18, 2024 12:34
Signed-off-by: TechVest <techdashen@qq.com>
…API v2 endpoint (blockscout#9806)

* Return days in coin-balance-history-by-day API v2 endpoint

* Actualize test
* Add game_index field to op_withdrawal_events db table

* Draft for dispute games indexer

* Add extra data indexing into Indexer.Fetcher.Optimism.DisputeGame

* Add game statuses fetching into Indexer.Fetcher.Optimism.DisputeGame

* Almost final Indexer.Fetcher.Optimism.DisputeGame

* Setting constant values in Indexer.Fetcher.Optimism.DisputeGame

* Extend Optimism Withdrawal statuses

* Add API for Optimism dispute games

* Handle a case of non-existent game

* Add specs and docs

* DisputeGame fetcher waits infinitely until OptimismPortal is updated

* Fix spelling

* Small refactoring

---------

Co-authored-by: POA <33550681+poa@users.noreply.github.com>
* Improve performance of token page transfers tab

* mix format

* Separate index creation and deletion to defferent migrations

* Rename migration
* Enhance index for token holders list

* Separate index creation and deletion to different migrations
…query conditions (blockscout#9912)

* fix: Adjust unfetched_address_token_balances_index to fit all bound query conditions

* Rewrite indexes in Ecto meta-language

* mix format
* Paging function edge cases fix

* Process other edge cases of zeros in pagination function input

* Update apps/explorer/lib/explorer/chain.ex

Co-authored-by: Qwerty5Uiop <105209995+Qwerty5Uiop@users.noreply.github.com>

* Update apps/explorer/lib/explorer/chain.ex

Co-authored-by: Qwerty5Uiop <105209995+Qwerty5Uiop@users.noreply.github.com>

* Fix tests

* Process review comment

* fix formatting

---------

Co-authored-by: Qwerty5Uiop <105209995+Qwerty5Uiop@users.noreply.github.com>
* Certified smart-contracts

* Prioritize certified smart-contracts in the search

* Refactoring: remove CustomContractsHelper

* Return certified in the list and in the search

* mix format

* Fix tests

* Process review comment
* fix: Fix metadata preload

* Add regression test
…lockscout#9779)

* feat: Add ENS category to search result; Add ENS to check-redirect

* Fix missed type in search result

* Add @SPEC and @doc
"This update involves replacing the old Twitter icon with the new 'X' icon from Font Awesome."

Co-authored-by: bishalghimire1 <80529795+bishalghimire1@users.noreply.github.com>
* fix: Fix incorrect image_url parsing from NFT meta

* Add regression test
@istoril istoril merged commit f685584 into cryptonomic0n Apr 26, 2024
55 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet