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

Sync with origin #48

Merged
merged 153 commits into from
Jul 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
fe9000c
feat: Diamond proxy (EIP-2535) support (#10034)
vbaranov May 9, 2024
18ef2c0
chore: Update outdated links to ETH JSON RPC Specification in docstri…
kevinam99 May 10, 2024
fb4fde6
feat: MUD API support (#9869)
k1rill-fedoseev May 10, 2024
3ecb555
chore: Add support of Blast-specific L1 OP withdrawal events (#10049)
varasev May 10, 2024
2dd9649
feat: Improve retry NFT fetcher (#10027)
nikitosing May 13, 2024
6fa60b4
chore: remove `has_methods` from `/addresses` (#10051)
fedor-ivn May 13, 2024
6682065
refactor: test database config (#9662)
fedor-ivn May 13, 2024
d066b0e
fix: Fix Unknown UID bug at smart-contract verification (#9986)
nikitosing May 13, 2024
06c2dde
chore: Bump ex_doc from 0.32.1 to 0.32.2 (#10061)
dependabot[bot] May 13, 2024
47cd3d2
chore: Bump redix from 1.5.0 to 1.5.1 (#10059)
dependabot[bot] May 14, 2024
ce934ec
chore: Bump credo from 1.7.5 to 1.7.6 (#10060)
dependabot[bot] May 14, 2024
b377ba5
refactor: Refactor get_additional_sources/4 -> get_additional_sources…
vbaranov May 14, 2024
621024c
fix: vyper contracts re-verificaiton (#10053)
rimrakhimov May 14, 2024
def8a1a
feat: Clone with immutable arguments proxy pattern (#10039)
vbaranov May 14, 2024
5bbf68e
fix: Disallow batched queries in GraphQL endpoint (#10050)
vbaranov May 14, 2024
64b55fa
chore: Update hackney pool size: add new fetchers accounting (#9941)
nikitosing May 14, 2024
fcc5ff2
feat: Blueprint contracts support (#10058)
rimrakhimov May 14, 2024
2e4e2ec
fix: Separate indexer setup (#10032)
Qwerty5Uiop May 14, 2024
379e81a
feat: Add optional retry of NFT metadata fetch in Indexer.Fetcher.Tok…
nikitosing May 14, 2024
4d4f355
fix: Eliminate from_address_hash == #{address_hash} clause for transa…
vbaranov May 15, 2024
7f6ee61
fix: Rework revert_reason (#9212)
k1rill-fedoseev May 15, 2024
88394ff
6.6.0
vbaranov May 15, 2024
8265c9d
fix: Add healthcheck endpoints for indexer-only setup (#10076)
Qwerty5Uiop May 17, 2024
77203a3
fix: Update Vyper inner compilers list to support all compilers (#10091)
rimrakhimov May 20, 2024
22c106a
Fix certified flag in the search API v2 endpoint (#10094)
vbaranov May 20, 2024
8580be2
Update CHANGELOG for 6.6.0
vbaranov May 20, 2024
77f313a
Remove custom release CI for Immutable
vbaranov May 20, 2024
2151248
feat: implement fetch_first_trace for Geth (#10087)
k1rill-fedoseev May 22, 2024
8493441
Update CHANGELOG
vbaranov May 22, 2024
c6c9a0c
Fix GA pre-release && release workflows
vbaranov May 22, 2024
3e551ba
Improve response of address API to return multiple implementations fo…
vbaranov May 23, 2024
fff614d
Update CHANGELOG
vbaranov May 23, 2024
d782239
Indexer/API separated images for Redstone
vbaranov May 23, 2024
bf3f321
chore: Bump ecto_sql from 3.11.1 to 3.11.2
dependabot[bot] May 27, 2024
35c885d
feat: indexer for cross level messages on Arbitrum (#9312)
akolotov May 27, 2024
5a568f0
--- (#10096)
dependabot[bot] May 27, 2024
5c4cb10
hide chain specific fields behind Map.get (#10131)
akolotov May 27, 2024
dc44b18
fix: Hotfix for Indexer.Fetcher.Optimism.WithdrawalEvent and Ethereum…
varasev May 28, 2024
f0f83d2
fix: missing nil case for revert reason (#10136)
k1rill-fedoseev May 28, 2024
67a9668
Explicit message on token balance update error (#10129)
vbaranov May 29, 2024
ba664fa
fix: Add missing preloads to tokens endpoints (#10072)
nikitosing May 29, 2024
e269294
feat: Add window between balance fetch retries for missing balanceOf …
Qwerty5Uiop May 29, 2024
016881a
refactor: Remove hardcoded numResults from fetch_pending_transactions…
MASDXI May 30, 2024
d3e15d3
chore(deps-dev): bump @babel/core in /apps/block_scout_web/assets (#1…
dependabot[bot] Jun 3, 2024
034bc18
fix: Fix Retry NFT fetcher (#10146)
nikitosing Jun 3, 2024
13c027f
chore(deps-dev): bump eslint-plugin-promise (#10168)
dependabot[bot] Jun 3, 2024
80cb860
chore(deps): bump core-js in /apps/block_scout_web/assets (#10175)
dependabot[bot] Jun 3, 2024
064761b
chore(deps): bump sweetalert2 in /apps/block_scout_web/assets (#10171)
dependabot[bot] Jun 3, 2024
f2737ec
chore(deps): bump mixpanel-browser in /apps/block_scout_web/assets (#…
dependabot[bot] Jun 3, 2024
bf32aab
chore(deps-dev): bump css-minimizer-webpack-plugin (#10173)
dependabot[bot] Jun 3, 2024
ba402c1
chore(deps): bump solc from 0.8.25 to 0.8.26 in /apps/explorer (#10177)
dependabot[bot] Jun 3, 2024
f3092af
chore(deps): bump @amplitude/analytics-browser (#10176)
dependabot[bot] Jun 3, 2024
2dc1dbe
chore(deps-dev): bump @babel/preset-env in /apps/block_scout_web/asse…
dependabot[bot] Jun 3, 2024
67b708f
chore(deps): bump chart.js in /apps/block_scout_web/assets (#10169)
dependabot[bot] Jun 3, 2024
0e7f09a
fix: Add a separate db url for events listener (#10164)
Qwerty5Uiop Jun 3, 2024
ba49416
fix: Move auth routes to general router (#10153)
Qwerty5Uiop Jun 3, 2024
a072be3
chore: Return is verified=true for verified minimal proxy pattern (#1…
vbaranov Jun 5, 2024
59170c0
chore: Exclude write methods from read tabs (#10111)
vbaranov Jun 6, 2024
646a343
chore: Refactor PendingTransactionsSanitizer to use batched requests …
Qwerty5Uiop Jun 6, 2024
b5780d3
fix: Add the ability to allow empty traces (#10200)
Qwerty5Uiop Jun 6, 2024
d9586c2
fix: Resolve flaky address_controller test for web
vbaranov Jun 6, 2024
3e77a35
feat: Add Fee column to Internal transactions CSV export (#10204)
nikitosing Jun 6, 2024
c77180c
Fix flaky test
vbaranov Jun 6, 2024
80a8e3b
fix: Filter WETH transfers in indexer + migration to delete historica…
nikitosing Jun 6, 2024
44bee1e
feat: Set dynamic ttl of cache modules derived from MapCache (#10109)
vbaranov Jun 6, 2024
85a5100
fix: excessive logging for Arbitrum batches confirmations (#10205)
akolotov Jun 7, 2024
a8e2e12
feat: Batch read methods requests (#10192)
nikitosing Jun 7, 2024
eddaead
feat: Add feature toggle for WETH filtering (#10208)
nikitosing Jun 7, 2024
3bea0e8
perf: replace individual queries with ecto preload (#10203)
sl1depengwyn Jun 7, 2024
653f912
feat: Push relevant entries to the front of bound queue (#10193)
Qwerty5Uiop Jun 7, 2024
e29f3e2
feat: Get ERC-1155 token name from contractURI getter fallback (#10187)
vbaranov Jun 7, 2024
b8730cd
feat: Adding Mobula price source (#9971)
xyeuu Jun 7, 2024
d0ec50e
feat(ci): use remote arm64 builder (#9468)
k1rill-fedoseev Jun 7, 2024
5992623
fixed the field name (#10216)
akolotov Jun 10, 2024
2f20ff6
chore(deps): bump remote_ip from 1.1.0 to 1.2.0 (#10224)
dependabot[bot] Jun 10, 2024
8c03e73
chore(deps): bump cldr_utils from 2.25.0 to 2.26.0 (#10223)
dependabot[bot] Jun 10, 2024
e0b43fd
chore(deps-dev): bump wallaby from 0.30.6 to 0.30.7 (#10221)
dependabot[bot] Jun 10, 2024
e292873
fix: Fix unknown UID bug (#10226)
nikitosing Jun 11, 2024
d231ca6
fix: Replace empty arg names with argN (#9748)
nikitosing Jun 11, 2024
3cc6222
fix: ERC-1155 tokens metadata retrieve (#10231)
Qwerty5Uiop Jun 11, 2024
854a81b
fix: cannot truncate chardata (#10227)
sl1depengwyn Jun 11, 2024
a8e7ada
chore(deps-dev): bump benchee from 1.3.0 to 1.3.1 (#10222)
dependabot[bot] Jun 11, 2024
68ca0ed
fix: add proxy_implementations preloads (#10225)
sl1depengwyn Jun 11, 2024
569cb8b
fix: add smart contracts preloads to from_address (#10236)
sl1depengwyn Jun 11, 2024
e02dde7
feat: Advanced Filters (#9769)
sl1depengwyn Jun 12, 2024
aaed915
Fix nil abi issue in get_naive_implementation_abi and get_master_copy…
vbaranov Jun 12, 2024
c31f937
fix: batch transactions view recovered and support of proofs through …
akolotov Jun 12, 2024
4297704
feat: API endpoint to re-fetch token instance metadata (#10097)
vbaranov Jun 13, 2024
57293ec
6.7.0
vbaranov Jun 13, 2024
ce9ecfa
fix: Fix possible unknown UID bug (#10240)
nikitosing Jun 13, 2024
366aaca
Update CHANGELOG
vbaranov Jun 13, 2024
6a269b1
fix: pipe through api_v2_no_forgery_protect POST requests in SmartCo…
vbaranov Jun 14, 2024
9448ccb
fix: proper hex-encoded transaction hash recognition in ZkSync batche…
akolotov Jun 17, 2024
454edb0
fix: advanced filter contract creation transaction (#10257)
sl1depengwyn Jun 17, 2024
4f0cc81
feat: Chain & explorer Prometheus metrics (#10063)
vbaranov Jun 17, 2024
d3a7496
fix: add preloads to summary and tokens endpoints (#10259)
sl1depengwyn Jun 17, 2024
a600119
Update CHANGELOG
vbaranov Jun 17, 2024
ed5e3e3
fix: add preloads for tx summary endpoint (#10261)
sl1depengwyn Jun 17, 2024
74f0eb3
Merge branch 'master' of https://github.com/blockscout/blockscout int…
pustovalov Jun 17, 2024
fdfea14
fix: `getsourcecode` in API v1 for verified proxy (#10273)
fedor-ivn Jun 18, 2024
aa7f970
Update CHANGELOG
vbaranov Jun 18, 2024
18c41a0
Fix ci setup repo error (#10277)
alik-agaev Jun 19, 2024
33bf9ea
feat: Public metrics toggler (#10279)
vbaranov Jun 19, 2024
40e1bca
Update CHANGELOG
vbaranov Jun 19, 2024
ae2e137
Pre-release workflow for Arbitrum
vbaranov Jun 19, 2024
0209f3d
Update CHANGELOG
vbaranov Jun 19, 2024
e187299
fix: set timeout in seconds (#10283)
k1rill-fedoseev Jun 20, 2024
da082cc
Update CHANGELOG
vbaranov Jun 20, 2024
d534902
Disable weekly_active_addresses_number metric because it affects DB p…
vbaranov Jun 20, 2024
8cb56f7
Speed-up query execution for weekly_new_token_transfers_number_query …
vbaranov Jun 20, 2024
726bc84
fix: add token instances preloads (#10288)
sl1depengwyn Jun 20, 2024
acd3940
Update CHANGELOG
vbaranov Jun 20, 2024
3ae9c96
fix: token instance preload (#10297)
sl1depengwyn Jun 21, 2024
5789382
fix: update `ex_abi` to fix type decoder for huge lists (#10294)
fedor-ivn Jun 21, 2024
7c08ba0
fix: missing onlyTopCall option on some geth networks (#10309)
k1rill-fedoseev Jun 25, 2024
d950c14
fix: Fix bridged tokens (#10318)
nikitosing Jun 25, 2024
1bbe70e
fix: Fix to_string error (#10319)
nikitosing Jun 25, 2024
dfba569
6.7.1 (#10325)
nikitosing Jun 26, 2024
a28a508
proper handling of transactions without gas_used_for_l1 (#10333)
akolotov Jun 28, 2024
2da2756
chore(deps): bump con_cache from 1.0.0 to 1.1.0 (#10266)
dependabot[bot] Jul 1, 2024
dfa5199
chore(deps-dev): bump wallaby from 0.30.7 to 0.30.9 (#10265)
dependabot[bot] Jul 1, 2024
d78f9de
chore(deps): bump ex_cldr from 2.38.1 to 2.39.2 (#10315)
dependabot[bot] Jul 1, 2024
de284ba
chore(deps-dev): bump braces in /apps/block_scout_web/assets (#10249)
dependabot[bot] Jul 1, 2024
c6cfa74
chore(deps): bump tesla from 1.9.0 to 1.11.1 (#10343)
dependabot[bot] Jul 1, 2024
b8efe6e
fix: flaky market test (#10262)
sl1depengwyn Jul 1, 2024
4e7465d
chore(deps-dev): bump credo from 1.7.6 to 1.7.7 (#10269)
dependabot[bot] Jul 1, 2024
1348636
chore(deps): bump logger_json from 5.1.4 to 6.0.3 (#10270)
dependabot[bot] Jul 1, 2024
5a94fe2
chore(deps-dev): bump ex_doc from 0.32.2 to 0.34.1 (#10314)
dependabot[bot] Jul 1, 2024
686fcee
chore: Don't execute update query for empty list (#10344)
Qwerty5Uiop Jul 1, 2024
e73a2f6
chore(deps): bump dataloader from 1.0.11 to 2.0.0 (#10267)
dependabot[bot] Jul 1, 2024
18c0a61
Revert "chore(deps): bump logger_json from 5.1.4 to 6.0.3 (#10270)" (…
vbaranov Jul 1, 2024
7fe5bb9
chore: bump elixir to 1.16.3 and Erlang OTP to 26.2.5.1 (#9256)
k1rill-fedoseev Jul 1, 2024
d457f9c
chore(deps-dev): bump postcss in /apps/block_scout_web/assets (#10360)
dependabot[bot] Jul 2, 2024
7dcd71f
chore(deps-dev): bump webpack in /apps/block_scout_web/assets (#10359)
dependabot[bot] Jul 2, 2024
a6893d5
chore(deps-dev): bump @babel/preset-env in /apps/block_scout_web/asse…
dependabot[bot] Jul 2, 2024
6165d78
chore(deps): bump mixpanel-browser in /apps/block_scout_web/assets (#…
dependabot[bot] Jul 2, 2024
492acfe
chore(deps): bump sweetalert2 in /apps/block_scout_web/assets (#10356)
dependabot[bot] Jul 2, 2024
11e146a
chore(deps-dev): bump css-loader in /apps/block_scout_web/assets (#10…
dependabot[bot] Jul 2, 2024
b4d35de
chore(deps-dev): bump sass-loader in /apps/block_scout_web/assets (#1…
dependabot[bot] Jul 2, 2024
2ab51fc
chore(deps): bump ex_abi from `243892a` to `44b9f9b` (#10316)
dependabot[bot] Jul 2, 2024
f2345c7
chore(deps-dev): bump @babel/core in /apps/block_scout_web/assets (#1…
dependabot[bot] Jul 2, 2024
b74cd94
chore(deps-dev): bump ex_machina from 2.7.0 to 2.8.0 (#10351)
dependabot[bot] Jul 2, 2024
69a819a
fix: public metrics enabling (#10365)
vbaranov Jul 2, 2024
8bbe2c9
chore(deps-dev): bump eslint-plugin-promise (#10353)
dependabot[bot] Jul 2, 2024
f67801e
fix: reth compatibility (#10335)
k1rill-fedoseev Jul 2, 2024
c20ce8d
fix: Add rescue on tx revert reason fetching (#10366)
nikitosing Jul 2, 2024
893689e
Merge branch 'master' of https://github.com/blockscout/blockscout int…
pustovalov Jul 2, 2024
1015bfd
fix: Fix slow internal transactions query (#10346)
nikitosing Jul 2, 2024
54538a3
fix: Apply Ecto set explicit ssl_opts: [verify: :verify_none] to all …
vbaranov Jul 2, 2024
f1a8b7e
6.7.2
vbaranov Jul 2, 2024
ea9f6e5
fix: simplify query for weekly_deployed_smart_contracts_number public…
vbaranov Jul 3, 2024
944f91d
Warning: negative steps are not supported
pustovalov Jul 4, 2024
e5f7271
Merge branch 'master' of https://github.com/blockscout/blockscout int…
pustovalov Jul 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: proper hex-encoded transaction hash recognition in ZkSync batche…
…s status checker (blockscout#10255)

* proper hex-encoded transaction hash recognition

* mix format

---------

Co-authored-by: Viktor Baranov <[email protected]>
akolotov and vbaranov authored Jun 17, 2024
commit 9448ccb7c883129125a95175b96dc3e2965d878a
70 changes: 36 additions & 34 deletions apps/indexer/lib/indexer/fetcher/zksync/utils/rpc.ex
Original file line number Diff line number Diff line change
@@ -4,7 +4,8 @@ defmodule Indexer.Fetcher.ZkSync.Utils.Rpc do
"""

import EthereumJSONRPC, only: [json_rpc: 2, quantity_to_integer: 1]
import Indexer.Fetcher.ZkSync.Utils.Logging, only: [log_error: 1]

alias Indexer.Helper, as: IndexerHelper

@zero_hash "0000000000000000000000000000000000000000000000000000000000000000"
@zero_hash_binary <<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>>
@@ -200,7 +201,8 @@ defmodule Indexer.Fetcher.ZkSync.Utils.Rpc do

error_message = &"Cannot call zks_getL1BatchDetails. Error: #{inspect(&1)}"

{:ok, resp} = repeated_call(&json_rpc/2, [req, json_rpc_named_arguments], error_message, @rpc_resend_attempts)
{:ok, resp} =
IndexerHelper.repeated_call(&json_rpc/2, [req, json_rpc_named_arguments], error_message, @rpc_resend_attempts)

transform_batch_details_to_map(resp)
end
@@ -219,11 +221,7 @@ defmodule Indexer.Fetcher.ZkSync.Utils.Rpc do
@spec fetch_tx_by_hash(binary(), EthereumJSONRPC.json_rpc_named_arguments()) :: map()
def fetch_tx_by_hash(raw_hash, json_rpc_named_arguments)
when is_binary(raw_hash) and is_list(json_rpc_named_arguments) do
hash =
case raw_hash do
"0x" <> _ -> raw_hash
_ -> "0x" <> Base.encode16(raw_hash)
end
hash = prepare_tx_hash(raw_hash)

req =
EthereumJSONRPC.request(%{
@@ -234,7 +232,8 @@ defmodule Indexer.Fetcher.ZkSync.Utils.Rpc do

error_message = &"Cannot call eth_getTransactionByHash for hash #{hash}. Error: #{inspect(&1)}"

{:ok, resp} = repeated_call(&json_rpc/2, [req, json_rpc_named_arguments], error_message, @rpc_resend_attempts)
{:ok, resp} =
IndexerHelper.repeated_call(&json_rpc/2, [req, json_rpc_named_arguments], error_message, @rpc_resend_attempts)

resp
end
@@ -253,11 +252,7 @@ defmodule Indexer.Fetcher.ZkSync.Utils.Rpc do
@spec fetch_tx_receipt_by_hash(binary(), EthereumJSONRPC.json_rpc_named_arguments()) :: map()
def fetch_tx_receipt_by_hash(raw_hash, json_rpc_named_arguments)
when is_binary(raw_hash) and is_list(json_rpc_named_arguments) do
hash =
case raw_hash do
"0x" <> _ -> raw_hash
_ -> "0x" <> Base.encode16(raw_hash)
end
hash = prepare_tx_hash(raw_hash)

req =
EthereumJSONRPC.request(%{
@@ -268,7 +263,8 @@ defmodule Indexer.Fetcher.ZkSync.Utils.Rpc do

error_message = &"Cannot call eth_getTransactionReceipt for hash #{hash}. Error: #{inspect(&1)}"

{:ok, resp} = repeated_call(&json_rpc/2, [req, json_rpc_named_arguments], error_message, @rpc_resend_attempts)
{:ok, resp} =
IndexerHelper.repeated_call(&json_rpc/2, [req, json_rpc_named_arguments], error_message, @rpc_resend_attempts)

resp
end
@@ -289,7 +285,8 @@ defmodule Indexer.Fetcher.ZkSync.Utils.Rpc do

error_message = &"Cannot call zks_L1BatchNumber. Error: #{inspect(&1)}"

{:ok, resp} = repeated_call(&json_rpc/2, [req, json_rpc_named_arguments], error_message, @rpc_resend_attempts)
{:ok, resp} =
IndexerHelper.repeated_call(&json_rpc/2, [req, json_rpc_named_arguments], error_message, @rpc_resend_attempts)

quantity_to_integer(resp)
end
@@ -318,7 +315,12 @@ defmodule Indexer.Fetcher.ZkSync.Utils.Rpc do
error_message = &"Cannot call eth_getBlockByNumber. Error: #{inspect(&1)}"

{:ok, responses} =
repeated_call(&json_rpc/2, [requests_list, json_rpc_named_arguments], error_message, @rpc_resend_attempts)
IndexerHelper.repeated_call(
&json_rpc/2,
[requests_list, json_rpc_named_arguments],
error_message,
@rpc_resend_attempts
)

responses
end
@@ -347,7 +349,12 @@ defmodule Indexer.Fetcher.ZkSync.Utils.Rpc do
error_message = &"Cannot call zks_getL1BatchDetails. Error: #{inspect(&1)}"

{:ok, responses} =
repeated_call(&json_rpc/2, [requests_list, json_rpc_named_arguments], error_message, @rpc_resend_attempts)
IndexerHelper.repeated_call(
&json_rpc/2,
[requests_list, json_rpc_named_arguments],
error_message,
@rpc_resend_attempts
)

responses
end
@@ -377,27 +384,22 @@ defmodule Indexer.Fetcher.ZkSync.Utils.Rpc do
error_message = &"Cannot call zks_getL1BatchBlockRange. Error: #{inspect(&1)}"

{:ok, responses} =
repeated_call(&json_rpc/2, [requests_list, json_rpc_named_arguments], error_message, @rpc_resend_attempts)
IndexerHelper.repeated_call(
&json_rpc/2,
[requests_list, json_rpc_named_arguments],
error_message,
@rpc_resend_attempts
)

responses
end

defp repeated_call(func, args, error_message, retries_left) do
case apply(func, args) do
{:ok, _} = res ->
res

{:error, message} = err ->
retries_left = retries_left - 1

if retries_left <= 0 do
log_error(error_message.(message))
err
else
log_error("#{error_message.(message)} Retrying...")
:timer.sleep(3000)
repeated_call(func, args, error_message, retries_left)
end
# Converts a transaction hash represented as binary to a hexadecimal string
@spec prepare_tx_hash(binary()) :: binary()
defp prepare_tx_hash(raw_hash) do
case raw_hash do
"0x" <> <<_::binary-size(64)>> -> raw_hash
_ -> "0x" <> Base.encode16(raw_hash, case: :lower)
end
end
end