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

W35 upstream merge #369

Merged
merged 62 commits into from
Sep 6, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
3c555b4
Search results page
vbaranov Aug 6, 2021
7554083
Merge pull request #4489 from blockscout/vb-search-results
vbaranov Aug 13, 2021
9a1a61b
Fix routes: add NETWORK_PATH variable to current_path
vbaranov Aug 15, 2021
0ceeb8b
Merge pull request #4513 from blockscout/vb-routes-fix-2
vbaranov Aug 16, 2021
f4da248
Add DB migrations step into Docker start script
vbaranov Aug 16, 2021
3f96ee6
Merge pull request #4516 from blockscout/vb-add-db-migrations-step-to…
vbaranov Aug 16, 2021
c01737e
Change order of transations in block's view
nikitosing Aug 17, 2021
5b6ae19
Fix test
nikitosing Aug 17, 2021
fc012a4
Merge pull request #4523 from blockscout/np-change-txs-order
vbaranov Aug 17, 2021
acdf5af
Uncataloged token transfers query performance improvement
vbaranov Aug 18, 2021
ec6dccb
Merge pull request #4525 from blockscout/vb-uncataloged-token-transfe…
vbaranov Aug 18, 2021
3fba4f6
Indexer update: refactor coin balance daily fetcher
vbaranov Aug 18, 2021
1c0cf8c
Merge pull request #4527 from blockscout/vb-daily-coin-balances-fix
vbaranov Aug 19, 2021
15e3231
Add transaction's index
nikitosing Aug 17, 2021
b8d244e
Merge pull request #4524 from blockscout/np-add-tx-index
vbaranov Aug 19, 2021
a7c67ba
Update txn page tooltips
nikitosing Aug 17, 2021
da4fd89
Merge pull request #4521 from blockscout/np-update-tooltip
vbaranov Aug 19, 2021
60704cf
Add arbitrum support
Jul 27, 2021
10e25fc
CHANGELOG
Aug 19, 2021
d43ec82
Merge pull request #4531 from twt--/arbitrum
vbaranov Aug 20, 2021
88bd0c0
Use token_symbol helper when no symbol exists for a given token in ad…
rkachowski Aug 19, 2021
81fbe8a
Merge pull request #4534 from celo-org/upstream/bugfix/unnamed_tokens
vbaranov Aug 20, 2021
d39d4e5
Mix format
vbaranov Aug 20, 2021
94b7005
Eliminate multiple Updates of the same token in mint/burn token trans…
vbaranov Aug 20, 2021
ba5e4da
Merge pull request #4535 from blockscout/vb-tt-updater-fix
vbaranov Aug 20, 2021
1fee2d8
Search for metadata.json file in sourcify response.
rkachowski Aug 20, 2021
5e77171
Access token type from token object.
rkachowski Aug 20, 2021
574b48f
Merge pull request #4537 from celo-org/upstream/bugfix/sourcify_metad…
vbaranov Aug 20, 2021
4ae9189
Merge branch 'master' into upstream/bugfix/token_balance_fetch
rkachowski Aug 20, 2021
2bf1d0c
Merge pull request #4538 from celo-org/upstream/bugfix/token_balance_…
vbaranov Aug 20, 2021
7b4e027
Indexer performance update: deduplicate tokens in indexer token trans…
vbaranov Aug 23, 2021
1105da8
Merge pull request #4542 from blockscout/vb-tt-transform-tokens-dedup
vbaranov Aug 23, 2021
e9c0925
Add skip_metadata flag for token if indexer failed to get any of [nam…
vbaranov Aug 23, 2021
510e51f
con_cache update up to 1.0
vbaranov Aug 24, 2021
af6a446
Merge pull request #4550 from blockscout/vb-con_cache-update
vbaranov Aug 25, 2021
29b97b2
Optimise github actions (#363)
rkachowski Aug 23, 2021
55d330b
Merge pull request #4552 from celo-org/upstream/feature/optimise_gith…
vbaranov Aug 25, 2021
39a6790
Explicit mix compile before running tests.
rkachowski Aug 26, 2021
b2ebc82
Add this branch for ci tests.
rkachowski Aug 26, 2021
4ad1dd7
Revert "Add this branch for ci tests."
rkachowski Aug 26, 2021
36b1e61
Merge pull request #4558 from celo-org/upstream/bugfix/mix_compile_tests
vbaranov Aug 26, 2021
56cefe0
Skip genesis block for requesting of trace_block API endpoint
vbaranov Aug 25, 2021
6a20558
Rework Block Details page
nikitosing Aug 18, 2021
1b14369
Merge pull request #4553 from blockscout/vb-trace-block-skip-genesis-…
vbaranov Aug 26, 2021
bf54b91
Allign eye icon
nikitosing Aug 27, 2021
e12cae5
Merge pull request #4528 from blockscout/np-rework-block-details
vbaranov Aug 27, 2021
6d7d6e6
Allign copy button to the end of line
nikitosing Aug 18, 2021
9985be3
Merge pull request #4540 from blockscout/np-allign-copy-btns
vbaranov Aug 27, 2021
8e3a9c2
Allign token transfers in tx to table
nikitosing Aug 18, 2021
2f5a1ac
Fix width of table
nikitosing Aug 27, 2021
61b32fa
Merge pull request #4568 from blockscout/np-allign-token-transfers
vbaranov Aug 27, 2021
b0ed567
Merge branch 'master' into vb-indexer-reduce-tokens-update
vbaranov Aug 27, 2021
062b743
Merge pull request #4544 from blockscout/vb-indexer-reduce-tokens-update
vbaranov Aug 27, 2021
40b1c7f
Remove comment with the submission date from contracts
nikitosing Aug 25, 2021
f277d86
Merge pull request #4569 from blockscout/np-del-comment-in-src
vbaranov Aug 27, 2021
db6c8ab
Blockscout 3.7.3
vbaranov Aug 27, 2021
2a723f4
Update CHANGELOG.md
vbaranov Aug 27, 2021
e54f260
W35 upstream merge
carterqw2 Aug 31, 2021
4abd691
Fixed tests
carterqw2 Aug 31, 2021
687a12d
Removed duplicates in .dialyzer-ignore
carterqw2 Sep 2, 2021
4aec4e0
Merge branch 'master' into carterqw2/w35-upstream-merge
carterqw2 Sep 3, 2021
5055b79
Merge branch 'master' into carterqw2/w35-upstream-merge
carterqw2 Sep 6, 2021
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Current

### Features
- [#4531](https://github.com/blockscout/blockscout/pull/4531) - Add Arbitrum support
- [#4524](https://github.com/blockscout/blockscout/pull/4524) - Add index position of transaction in the block
- [#4489](https://github.com/blockscout/blockscout/pull/4489) - Search results page
- [#4475](https://github.com/blockscout/blockscout/pull/4475) - Tx page facelifting
Expand Down
47 changes: 47 additions & 0 deletions apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/arbitrum.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
defmodule EthereumJSONRPC.Arbitrum do
@moduledoc """
Ethereum JSONRPC methods that are only supported by [Arbitrum L2]https://github.com/OffchainLabs/arbitrum).
"""

@behaviour EthereumJSONRPC.Variant

@doc """
Block reward contract beneficiary fetching is not supported currently for Arbitrum L2.

To signal to the caller that fetching is not supported, `:ignore` is returned.
"""
@impl EthereumJSONRPC.Variant
def fetch_beneficiaries(_block_range, _json_rpc_named_arguments), do: :ignore

@doc """
Internal transaction fetching is not currently supported for Arbitrum L2.

To signal to the caller that fetching is not supported, `:ignore` is returned.
"""
@impl EthereumJSONRPC.Variant
def fetch_internal_transactions(_transactions_params, _json_rpc_named_arguments), do: :ignore

@doc """
Internal transaction fetching is not currently supported for Arbitrum L2.

To signal to the caller that fetching is not supported, `:ignore` is returned.
"""
@impl EthereumJSONRPC.Variant
def fetch_block_internal_transactions(_block_range, _json_rpc_named_arguments), do: :ignore

@doc """
Pending transaction fetching is not supported currently for Arbitrum L2.

To signal to the caller that fetching is not supported, `:ignore` is returned.
"""
@impl EthereumJSONRPC.Variant
def fetch_pending_transactions(_json_rpc_named_arguments), do: :ignore

@doc """
Traces are not supported currently for Arbitrum L2.

To signal to the caller that fetching is not supported, `:ignore` is returned.
"""
@impl EthereumJSONRPC.Variant
def fetch_first_trace(_transactions_params, _json_rpc_named_arguments), do: :ignore
end
6 changes: 6 additions & 0 deletions apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex
Original file line number Diff line number Diff line change
Expand Up @@ -505,4 +505,10 @@ defmodule EthereumJSONRPC.Block do
defp entry_to_elixir({"transactions" = key, transactions}) do
{key, Transactions.to_elixir(transactions)}
end

# Arbitrum fields
defp entry_to_elixir({"l1BlockNumber", _}) do
{:ignore, :ignore}
end

end
5 changes: 5 additions & 0 deletions apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ defmodule EthereumJSONRPC.Receipt do
:ignore
end

# Arbitrum fields
defp entry_to_elixir({key, _}) when key in ~w(returnData returnCode feeStats l1BlockNumber) do
:ignore
end

defp entry_to_elixir({key, value}) do
{:error, {:unknown_key, %{key: key, value: value}}}
end
Expand Down
20 changes: 20 additions & 0 deletions apps/explorer/config/dev/arbitrum.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use Mix.Config

config :explorer,
json_rpc_named_arguments: [
transport: EthereumJSONRPC.HTTP,
transport_options: [
http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545",
http_options: [recv_timeout: :timer.minutes(1), timeout: :timer.minutes(1), hackney: [pool: :ethereum_jsonrpc]]
],
variant: EthereumJSONRPC.Arbitrum
],
subscribe_named_arguments: [
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("ETHEREUM_JSONRPC_WS_URL")
],
variant: EthereumJSONRPC.Arbitrum
]
20 changes: 20 additions & 0 deletions apps/explorer/config/prod/arbitrum.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use Mix.Config

config :explorer,
json_rpc_named_arguments: [
transport: EthereumJSONRPC.HTTP,
transport_options: [
http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"),
http_options: [recv_timeout: :timer.minutes(1), timeout: :timer.minutes(1), hackney: [pool: :ethereum_jsonrpc]]
],
variant: EthereumJSONRPC.Arbitrum
],
subscribe_named_arguments: [
transport: EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("ETHEREUM_JSONRPC_WS_URL")
],
variant: EthereumJSONRPC.Arbitrum
]
13 changes: 13 additions & 0 deletions apps/explorer/config/test/arbitrum.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use Mix.Config

config :explorer,
json_rpc_named_arguments: [
transport: EthereumJSONRPC.Mox,
transport_options: [],
variant: EthereumJSONRPC.Arbitrum
],
subscribe_named_arguments: [
transport: EthereumJSONRPC.Mox,
transport_options: [],
variant: EthereumJSONRPC.Arbitrum
]
2 changes: 1 addition & 1 deletion apps/explorer/lib/explorer/chain.ex
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ defmodule Explorer.Chain do
json_rpc_named_arguments = Application.fetch_env!(:indexer, :json_rpc_named_arguments)
variant = Keyword.fetch!(json_rpc_named_arguments, :variant)

if variant == EthereumJSONRPC.Ganache do
if variant == EthereumJSONRPC.Ganache || variant == EthereumJSONRPC.Arbitrum do
true
else
with {:transactions_exist, true} <- {:transactions_exist, Repo.exists?(Transaction)},
Expand Down
26 changes: 26 additions & 0 deletions apps/indexer/config/dev/arbitrum.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
use Mix.Config

config :indexer,
block_interval: :timer.seconds(5),
json_rpc_named_arguments: [
transport:
if(System.get_env("ETHEREUM_JSONRPC_TRANSPORT", "http") == "http",
do: EthereumJSONRPC.HTTP,
else: EthereumJSONRPC.IPC
),
transport_options: [
http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545",
http_options: [recv_timeout: :timer.minutes(1), timeout: :timer.minutes(1), hackney: [pool: :ethereum_jsonrpc]]
],
variant: EthereumJSONRPC.Arbitrum
],
subscribe_named_arguments: [
transport:
System.get_env("ETHEREUM_JSONRPC_WS_URL") && System.get_env("ETHEREUM_JSONRPC_WS_URL") !== "" &&
EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("ETHEREUM_JSONRPC_WS_URL")
]
]
26 changes: 26 additions & 0 deletions apps/indexer/config/prod/arbitrum.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
use Mix.Config

config :indexer,
block_interval: :timer.seconds(5),
json_rpc_named_arguments: [
transport:
if(System.get_env("ETHEREUM_JSONRPC_TRANSPORT", "http") == "http",
do: EthereumJSONRPC.HTTP,
else: EthereumJSONRPC.IPC
),
transport_options: [
http: EthereumJSONRPC.HTTP.HTTPoison,
url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545",
http_options: [recv_timeout: :timer.minutes(5), timeout: :timer.minutes(5), hackney: [pool: :ethereum_jsonrpc]]
],
variant: EthereumJSONRPC.Arbitrum
],
subscribe_named_arguments: [
transport:
System.get_env("ETHEREUM_JSONRPC_WS_URL") && System.get_env("ETHEREUM_JSONRPC_WS_URL") !== "" &&
EthereumJSONRPC.WebSocket,
transport_options: [
web_socket: EthereumJSONRPC.WebSocket.WebSocketClient,
url: System.get_env("ETHEREUM_JSONRPC_WS_URL")
]
]
8 changes: 8 additions & 0 deletions apps/indexer/config/test/arbitrum.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use Mix.Config

config :indexer,
json_rpc_named_arguments: [
transport: EthereumJSONRPC.Mox,
transport_options: [],
variant: EthereumJSONRPC.Arbitrum
]