From 26170d3d44d8bc6abd01f578aa1207d24c0828df Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 8 Jan 2020 13:52:25 +0300 Subject: [PATCH 1/3] utf8 copy tx input tooltip --- CHANGELOG.md | 1 + .../templates/transaction/overview.html.eex | 1 + apps/block_scout_web/priv/gettext/default.pot | 17 +++++++++-------- .../priv/gettext/en/LC_MESSAGES/default.po | 17 +++++++++-------- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b13d14555e..7209b4c034 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - [#2918](https://github.com/poanetwork/blockscout/pull/2918) - Add tokenID for tokentx API action explicitly ### Fixes +- [#2938](https://github.com/poanetwork/blockscout/pull/2938) - utf8 copy tx input tooltip - [#2934](https://github.com/poanetwork/blockscout/pull/2934) - RSK release 1.2.0 breaking changes support - [#2933](https://github.com/poanetwork/blockscout/pull/2933) - Get rid of deadlock in the query to address_current_token_balance table - [#2932](https://github.com/poanetwork/blockscout/pull/2932) - fix duplicate websocket connection diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex index 68f6fe98b8..d2ed2c8339 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex @@ -144,6 +144,7 @@ data-clipboard-text="<%= @transaction.input %>" data-placement="top" data-toggle="tooltip" + title='<%= gettext("Copy Txn Input") %>' style="display: none;" > diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 27513a79b2..e49e104647 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -13,7 +13,7 @@ msgstr[0] "" msgstr[1] "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:193 +#: lib/block_scout_web/templates/transaction/overview.html.eex:194 msgid " Token Transfer" msgstr "" @@ -646,8 +646,8 @@ msgstr "" #: lib/block_scout_web/templates/layout/app.html.eex:32 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 #: lib/block_scout_web/templates/transaction/_tile.html.eex:29 -#: lib/block_scout_web/templates/transaction/overview.html.eex:180 -#: lib/block_scout_web/templates/transaction/overview.html.eex:215 +#: lib/block_scout_web/templates/transaction/overview.html.eex:181 +#: lib/block_scout_web/templates/transaction/overview.html.eex:216 #: lib/block_scout_web/views/wei_helpers.ex:78 msgid "Ether" msgstr "" @@ -999,7 +999,7 @@ msgid "License ID" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:243 +#: lib/block_scout_web/templates/transaction/overview.html.eex:244 msgid "Limit" msgstr "" @@ -1538,7 +1538,7 @@ msgid "Use the search box to find a hosted network, or select from the list of a msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:237 +#: lib/block_scout_web/templates/transaction/overview.html.eex:238 msgid "Used" msgstr "" @@ -1568,8 +1568,8 @@ msgid "Validator Info" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:180 -#: lib/block_scout_web/templates/transaction/overview.html.eex:215 +#: lib/block_scout_web/templates/transaction/overview.html.eex:181 +#: lib/block_scout_web/templates/transaction/overview.html.eex:216 msgid "Value" msgstr "" @@ -1745,7 +1745,7 @@ msgid "Decimals" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:233 +#: lib/block_scout_web/templates/transaction/overview.html.eex:234 msgid "Gas" msgstr "" @@ -1793,6 +1793,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/transaction/overview.html.eex:134 +#: lib/block_scout_web/templates/transaction/overview.html.eex:147 msgid "Copy Txn Input" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 27513a79b2..e49e104647 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -13,7 +13,7 @@ msgstr[0] "" msgstr[1] "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:193 +#: lib/block_scout_web/templates/transaction/overview.html.eex:194 msgid " Token Transfer" msgstr "" @@ -646,8 +646,8 @@ msgstr "" #: lib/block_scout_web/templates/layout/app.html.eex:32 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 #: lib/block_scout_web/templates/transaction/_tile.html.eex:29 -#: lib/block_scout_web/templates/transaction/overview.html.eex:180 -#: lib/block_scout_web/templates/transaction/overview.html.eex:215 +#: lib/block_scout_web/templates/transaction/overview.html.eex:181 +#: lib/block_scout_web/templates/transaction/overview.html.eex:216 #: lib/block_scout_web/views/wei_helpers.ex:78 msgid "Ether" msgstr "" @@ -999,7 +999,7 @@ msgid "License ID" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:243 +#: lib/block_scout_web/templates/transaction/overview.html.eex:244 msgid "Limit" msgstr "" @@ -1538,7 +1538,7 @@ msgid "Use the search box to find a hosted network, or select from the list of a msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:237 +#: lib/block_scout_web/templates/transaction/overview.html.eex:238 msgid "Used" msgstr "" @@ -1568,8 +1568,8 @@ msgid "Validator Info" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:180 -#: lib/block_scout_web/templates/transaction/overview.html.eex:215 +#: lib/block_scout_web/templates/transaction/overview.html.eex:181 +#: lib/block_scout_web/templates/transaction/overview.html.eex:216 msgid "Value" msgstr "" @@ -1745,7 +1745,7 @@ msgid "Decimals" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:233 +#: lib/block_scout_web/templates/transaction/overview.html.eex:234 msgid "Gas" msgstr "" @@ -1793,6 +1793,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/transaction/overview.html.eex:134 +#: lib/block_scout_web/templates/transaction/overview.html.eex:147 msgid "Copy Txn Input" msgstr "" From 4cb31f20737ab20b08b0f4520433dcffcd1de527 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 10 Jan 2020 14:21:06 +0300 Subject: [PATCH 2/3] Upgrade Circle CI postgres Docker image --- .circleci/config.yml | 8 ++++---- CHANGELOG.md | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 50b28b631b..f93c373f73 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -345,7 +345,7 @@ jobs: # PGUSER: postgres # ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Geth.HTTPWebSocket" # ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Geth" - # - image: circleci/postgres:10.3-alpine + # - image: circleci/postgres:10.10-alpine # environment: # # Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database # POSTGRES_DB: explorer_test @@ -399,7 +399,7 @@ jobs: # PGUSER: postgres # ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Geth.Mox" # ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox" - # - image: circleci/postgres:10.3-alpine + # - image: circleci/postgres:10.10-alpine # environment: # # Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database # POSTGRES_DB: explorer_test @@ -453,7 +453,7 @@ jobs: # PGUSER: postgres # ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Parity.HTTPWebSocket" # ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Parity" - # - image: circleci/postgres:10.3-alpine + # - image: circleci/postgres:10.10-alpine # environment: # # Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database # POSTGRES_DB: explorer_test @@ -507,7 +507,7 @@ jobs: PGUSER: postgres ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Parity.Mox" ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox" - - image: circleci/postgres:10.3-alpine + - image: circleci/postgres:10.10-alpine environment: # Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database POSTGRES_DB: explorer_test diff --git a/CHANGELOG.md b/CHANGELOG.md index b13d14555e..76f6358dac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - [2910](https://github.com/poanetwork/blockscout/pull/2910) - Reorganize queries and indexes for internal_transactions table ### Chore +- [#2947](https://github.com/poanetwork/blockscout/pull/2947) - Upgrade Circle CI postgres Docker image - [#2896](https://github.com/poanetwork/blockscout/pull/2896) - Disable Parity websockets tests From e1b8ff59c27efbb0fc95b661ace2fe8be751e3a6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2020 14:02:42 +0300 Subject: [PATCH 3/3] Prevent filling pending_block_operations table for RSK variant --- CHANGELOG.md | 2 +- .../explorer/chain/import/runner/blocks.ex | 42 ++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b13d14555e..f90788beaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ ## Current ### Features -- [#2835](https://github.com/poanetwork/blockscout/pull/2835), [#2871](https://github.com/poanetwork/blockscout/pull/2871), [#2872](https://github.com/poanetwork/blockscout/pull/2872), [#2886](https://github.com/poanetwork/blockscout/pull/2886), [#2925](https://github.com/poanetwork/blockscout/pull/2925), [#2936](https://github.com/poanetwork/blockscout/pull/2936) - Add "block_hash" to logs, token_transfers and internal transactions and "pending blocks operations" approach +- [#2835](https://github.com/poanetwork/blockscout/pull/2835), [#2871](https://github.com/poanetwork/blockscout/pull/2871), [#2872](https://github.com/poanetwork/blockscout/pull/2872), [#2886](https://github.com/poanetwork/blockscout/pull/2886), [#2925](https://github.com/poanetwork/blockscout/pull/2925), [#2936](https://github.com/poanetwork/blockscout/pull/2936), [#2949](https://github.com/poanetwork/blockscout/pull/2949) - Add "block_hash" to logs, token_transfers and internal transactions and "pending blocks operations" approach - [#2926](https://github.com/poanetwork/blockscout/pull/2926) - API endpoint: sum balances except burnt address - [#2918](https://github.com/poanetwork/blockscout/pull/2918) - Add tokenID for tokentx API action explicitly diff --git a/apps/explorer/lib/explorer/chain/import/runner/blocks.ex b/apps/explorer/lib/explorer/chain/import/runner/blocks.ex index 3190c1abae..ddce8d0200 100644 --- a/apps/explorer/lib/explorer/chain/import/runner/blocks.ex +++ b/apps/explorer/lib/explorer/chain/import/runner/blocks.ex @@ -310,25 +310,29 @@ defmodule Explorer.Chain.Import.Runner.Blocks do end defp new_pending_operations(repo, nonconsensus_hashes, hashes, %{timeout: timeout, timestamps: timestamps}) do - sorted_pending_ops = - nonconsensus_hashes - |> MapSet.new() - |> MapSet.union(MapSet.new(hashes)) - |> Enum.sort() - |> Enum.map(fn hash -> - %{block_hash: hash, fetch_internal_transactions: true} - end) - - Import.insert_changes_list( - repo, - sorted_pending_ops, - conflict_target: :block_hash, - on_conflict: PendingBlockOperation.default_on_conflict(), - for: PendingBlockOperation, - returning: true, - timeout: timeout, - timestamps: timestamps - ) + if Application.get_env(:explorer, :json_rpc_named_arguments)[:variant] == EthereumJSONRPC.RSK do + {:ok, []} + else + sorted_pending_ops = + nonconsensus_hashes + |> MapSet.new() + |> MapSet.union(MapSet.new(hashes)) + |> Enum.sort() + |> Enum.map(fn hash -> + %{block_hash: hash, fetch_internal_transactions: true} + end) + + Import.insert_changes_list( + repo, + sorted_pending_ops, + conflict_target: :block_hash, + on_conflict: PendingBlockOperation.default_on_conflict(), + for: PendingBlockOperation, + returning: true, + timeout: timeout, + timestamps: timestamps + ) + end end defp delete_address_token_balances(_, [], _), do: {:ok, []}