From 6b95ed5420341368c32e16e14e2e6c6e3c135a33 Mon Sep 17 00:00:00 2001 From: pasqu4le Date: Thu, 6 Jun 2019 15:12:29 +0200 Subject: [PATCH 01/16] Use big updates instead of Multi transactions in BlocksTransactionsMismatch temporary fetcher --- .../temporary/blocks_transactions_mismatch.ex | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex b/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex index 49b33b7c44..dc3a31c4c6 100644 --- a/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex +++ b/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex @@ -13,7 +13,6 @@ defmodule Indexer.Temporary.BlocksTransactionsMismatch do import Ecto.Query - alias Ecto.Multi alias EthereumJSONRPC.Blocks alias Explorer.Chain.Block alias Explorer.Repo @@ -23,7 +22,7 @@ defmodule Indexer.Temporary.BlocksTransactionsMismatch do @defaults [ flush_interval: :timer.seconds(3), - max_batch_size: 10, + max_batch_size: 50, max_concurrency: 1, task_supervisor: Indexer.Temporary.BlocksTransactionsMismatch.TaskSupervisor, metadata: [fetcher: :blocks_transactions_mismatch] @@ -99,17 +98,26 @@ defmodule Indexer.Temporary.BlocksTransactionsMismatch do Map.has_key?(found_blocks_map, to_string(block.hash)) end) - {:ok, _} = - found_blocks_data - |> Enum.reduce(Multi.new(), fn {block, trans_num}, multi -> - changes = %{ - refetch_needed: false, - consensus: found_blocks_map[to_string(block.hash)] == trans_num - } - - Multi.update(multi, block.hash, Block.changeset(block, changes)) + {matching_blocks_data, unmatching_blocks_data} = + Enum.split_with(found_blocks_data, fn {block, trans_num} -> + found_blocks_map[to_string(block.hash)] == trans_num end) - |> Repo.transaction() + + unless Enum.empty?(matching_blocks_data) do + hashes = Enum.map(matching_blocks_data, fn {block, _trans_num} -> block.hash end) + + Block + |> where([block], block.hash in ^hashes) + |> Repo.update_all(set: [refetch_needed: false]) + end + + unless Enum.empty?(unmatching_blocks_data) do + hashes = Enum.map(unmatching_blocks_data, fn {block, _trans_num} -> block.hash end) + + Block + |> where([block], block.hash in ^hashes) + |> Repo.update_all(set: [refetch_needed: false, consensus: false]) + end if Enum.empty?(missing_blocks_data) do :ok From 05fe7d91e843a76d091af40a1f28882b4066ae54 Mon Sep 17 00:00:00 2001 From: pasqu4le Date: Thu, 6 Jun 2019 15:32:46 +0200 Subject: [PATCH 02/16] add changelog entry and credo ignore --- CHANGELOG.md | 1 + .../lib/indexer/temporary/blocks_transactions_mismatch.ex | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d991f32f29..af13e1847d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Current ### Features +- [#2109](https://github.com/poanetwork/blockscout/pull/2109) - use bigger updates instead of `Multi` transactions in BlocksTransactionsMismatch ### Fixes - [#2103](https://github.com/poanetwork/blockscout/pull/2103) - ui issues for all themes diff --git a/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex b/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex index dc3a31c4c6..486789f675 100644 --- a/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex +++ b/apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex @@ -29,6 +29,7 @@ defmodule Indexer.Temporary.BlocksTransactionsMismatch do ] @doc false + # credo:disable-for-next-line Credo.Check.Design.DuplicatedCode def child_spec([init_options, gen_server_options]) when is_list(init_options) do {state, mergeable_init_options} = Keyword.pop(init_options, :json_rpc_named_arguments) From bdf7ce593bcb1efe83a4ff64e3a2048584dacb9c Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Fri, 7 Jun 2019 14:52:58 +0300 Subject: [PATCH 03/16] fix map interpolation in logger --- apps/indexer/lib/indexer/block/realtime/fetcher.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/indexer/lib/indexer/block/realtime/fetcher.ex b/apps/indexer/lib/indexer/block/realtime/fetcher.ex index 8778677f33..d8ea3bf93f 100644 --- a/apps/indexer/lib/indexer/block/realtime/fetcher.ex +++ b/apps/indexer/lib/indexer/block/realtime/fetcher.ex @@ -68,6 +68,7 @@ defmodule Indexer.Block.Realtime.Fetcher do @impl GenServer def handle_continue({:init, subscribe_named_arguments}, %__MODULE__{subscription: nil} = state) do timer = schedule_polling() + {:noreply, %__MODULE__{state | timer: timer} |> subscribe_to_new_heads(subscribe_named_arguments)} end @@ -140,7 +141,7 @@ defmodule Indexer.Block.Realtime.Fetcher do %__MODULE__{state | subscription: subscription} {:error, reason} -> - Logger.debug(fn -> ["Could not connect to websocket: ", reason, ". Continuing with polling."] end) + Logger.debug(fn -> ["Could not connect to websocket: #{inspect(reason)}. Continuing with polling."] end) state end end From 1f413cf9b61443afb11c1ac52c7ff873e72fd0c1 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Fri, 7 Jun 2019 14:55:40 +0300 Subject: [PATCH 04/16] add CHANGELOG entry --- CHANGELOG.md | 1 + apps/indexer/lib/indexer/block/realtime/fetcher.ex | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24bc41eeec..efacd1a239 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - [#2096](https://github.com/poanetwork/blockscout/pull/2096) - RSK theme fixes - [#2093](https://github.com/poanetwork/blockscout/pull/2093) - detect token transfer type for deprecated erc721 spec - [#2108](https://github.com/poanetwork/blockscout/pull/2108) - fixe uncle fetching without full transactions +- [#2119](https://github.com/poanetwork/blockscout/pull/2119) - fix map logging ### Chore diff --git a/apps/indexer/lib/indexer/block/realtime/fetcher.ex b/apps/indexer/lib/indexer/block/realtime/fetcher.ex index d8ea3bf93f..28887223b3 100644 --- a/apps/indexer/lib/indexer/block/realtime/fetcher.ex +++ b/apps/indexer/lib/indexer/block/realtime/fetcher.ex @@ -68,7 +68,6 @@ defmodule Indexer.Block.Realtime.Fetcher do @impl GenServer def handle_continue({:init, subscribe_named_arguments}, %__MODULE__{subscription: nil} = state) do timer = schedule_polling() - {:noreply, %__MODULE__{state | timer: timer} |> subscribe_to_new_heads(subscribe_named_arguments)} end From ffadae33067218ab69da0a55ba3705a2c8954cf8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 7 Jun 2019 16:58:26 +0300 Subject: [PATCH 05/16] binding of 404 page --- apps/block_scout_web/lib/block_scout_web/controller.ex | 5 +++-- .../controllers/page_not_found_controller.ex | 8 ++++++++ apps/block_scout_web/lib/block_scout_web/router.ex | 2 ++ .../templates/page_not_found/index.html.eex | 4 ++-- .../lib/block_scout_web/views/page_not_found.ex | 5 +++++ 5 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/controllers/page_not_found_controller.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/views/page_not_found.ex diff --git a/apps/block_scout_web/lib/block_scout_web/controller.ex b/apps/block_scout_web/lib/block_scout_web/controller.ex index fe2851c197..7f0d148d67 100644 --- a/apps/block_scout_web/lib/block_scout_web/controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controller.ex @@ -12,8 +12,9 @@ defmodule BlockScoutWeb.Controller do def not_found(conn) do conn |> put_status(:not_found) - |> put_view(BlockScoutWeb.ErrorView) - |> render("404.html") + |> put_view(BlockScoutWeb.PageNotFoundView) + |> Phoenix.Controller.render(:index) + |> halt() end def unprocessable_entity(conn) do diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/page_not_found_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/page_not_found_controller.ex new file mode 100644 index 0000000000..e453e5463b --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/controllers/page_not_found_controller.ex @@ -0,0 +1,8 @@ +defmodule BlockScoutWeb.PageNotFoundController do + use BlockScoutWeb, :controller + + def index(conn, _params) do + conn + |> render("index.html") + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/router.ex b/apps/block_scout_web/lib/block_scout_web/router.ex index aa19725811..48a5c8f8da 100644 --- a/apps/block_scout_web/lib/block_scout_web/router.ex +++ b/apps/block_scout_web/lib/block_scout_web/router.ex @@ -245,5 +245,7 @@ defmodule BlockScoutWeb.Router do get("/chain_blocks", ChainController, :chain_blocks, as: :chain_blocks) get("/api_docs", APIDocsController, :index) + + get("/:page", PageNotFoundController, :index) end end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/page_not_found/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/page_not_found/index.html.eex index 6850c2deb2..d91690ea9e 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/page_not_found/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/page_not_found/index.html.eex @@ -4,8 +4,8 @@ Page Not Found
-

Lorem Ipsum Dolor

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

+

Page not found

+

The requested path was not found on BlockScout.

Back Home
diff --git a/apps/block_scout_web/lib/block_scout_web/views/page_not_found.ex b/apps/block_scout_web/lib/block_scout_web/views/page_not_found.ex new file mode 100644 index 0000000000..3be507f8bb --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/page_not_found.ex @@ -0,0 +1,5 @@ +defmodule BlockScoutWeb.PageNotFoundView do + use BlockScoutWeb, :view + + @dialyzer :no_match +end \ No newline at end of file From 6948938ad84d44a0191aa7fb3e2ea7e2fb49fc2d Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 7 Jun 2019 17:00:06 +0300 Subject: [PATCH 06/16] mix format --- .../block_scout_web/lib/block_scout_web/views/page_not_found.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/views/page_not_found.ex b/apps/block_scout_web/lib/block_scout_web/views/page_not_found.ex index 3be507f8bb..b5a18f0434 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/page_not_found.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/page_not_found.ex @@ -2,4 +2,4 @@ defmodule BlockScoutWeb.PageNotFoundView do use BlockScoutWeb, :view @dialyzer :no_match -end \ No newline at end of file +end From 1f6bf070e6a16243ee6fc36ce34ec1996c8f3a20 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 7 Jun 2019 17:11:07 +0300 Subject: [PATCH 07/16] Add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24bc41eeec..b1f9758d58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features ### Fixes +- [#2121](https://github.com/poanetwork/blockscout/pull/2121) - Binding of 404 page - [#2113](https://github.com/poanetwork/blockscout/pull/2113) - renewed logos for rsk, dai, blockscout; themes color changes for lukso; error images for lukso - [#2112](https://github.com/poanetwork/blockscout/pull/2112) - themes color improvements, dropdown color issue - [#2110](https://github.com/poanetwork/blockscout/pull/2110) - themes colors issues, ui issues From 728b0d34191cbaaba2903e8514905e267576e457 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Fri, 7 Jun 2019 22:39:38 +0300 Subject: [PATCH 08/16] fix coin percentage view --- .../lib/block_scout_web/templates/address/_tile.html.eex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_tile.html.eex index 270450c2c0..c2e62e2004 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_tile.html.eex @@ -39,7 +39,7 @@ - <% if @total_supply do %> + <%= if @total_supply do %> (<%= balance_percentage(@address, @total_supply) %>) <% end %> From f096b0f7e61ff6fddb10e283ef076294246f4cf2 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Fri, 7 Jun 2019 22:44:06 +0300 Subject: [PATCH 09/16] add CHANGELOG entry --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a847de3b1d..f6b3821cfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ - [#2090](https://github.com/poanetwork/blockscout/pull/2090) - updated some ETC theme colors - [#2096](https://github.com/poanetwork/blockscout/pull/2096) - RSK theme fixes - [#2093](https://github.com/poanetwork/blockscout/pull/2093) - detect token transfer type for deprecated erc721 spec -- [#2108](https://github.com/poanetwork/blockscout/pull/2108) - fixe uncle fetching without full transactions +- [#2108](https://github.com/poanetwork/blockscout/pull/2108) - fix uncle fetching without full transactions +- [#2123](https://github.com/poanetwork/blockscout/pull/2123) - fix coin percentage view ### Chore From a4bbdb5c1309132e5ceecedd156912b28e147033 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 10 Jun 2019 09:31:09 +0300 Subject: [PATCH 10/16] empty commit to trigger ci --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6b3821cfe..bef3b36b03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ - [#2096](https://github.com/poanetwork/blockscout/pull/2096) - RSK theme fixes - [#2093](https://github.com/poanetwork/blockscout/pull/2093) - detect token transfer type for deprecated erc721 spec - [#2108](https://github.com/poanetwork/blockscout/pull/2108) - fix uncle fetching without full transactions -- [#2123](https://github.com/poanetwork/blockscout/pull/2123) - fix coin percentage view +- [#2123](https://github.com/poanetwork/blockscout/pull/2123) - fix coins percentage view ### Chore From 46b1b55c88be7fe57eaddc4c8f7aface9d67aa53 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 10 Jun 2019 10:27:47 +0300 Subject: [PATCH 11/16] bump cache version --- .circleci/config.yml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 53e5680e78..6ddd50902c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,30 +33,30 @@ jobs: - restore_cache: keys: - - v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} - - v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} - - v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} + - v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} + - v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} + - v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} - run: mix deps.get - restore_cache: keys: - - v7-npm-install-{{ .Branch }}-{{ checksum "apps/block_scout_web/assets/package-lock.json" }} - - v7-npm-install-{{ .Branch }} - - v7-npm-install + - v8-npm-install-{{ .Branch }}-{{ checksum "apps/block_scout_web/assets/package-lock.json" }} + - v8-npm-install-{{ .Branch }} + - v8-npm-install - run: command: npm install working_directory: "apps/explorer" - save_cache: - key: v3-npm-install-{{ .Branch }}-{{ checksum "apps/explorer/package-lock.json" }} + key: v4-npm-install-{{ .Branch }}-{{ checksum "apps/explorer/package-lock.json" }} paths: "apps/explorer/node_modules" - save_cache: - key: v3-npm-install-{{ .Branch }} + key: v4-npm-install-{{ .Branch }} paths: "apps/explorer/node_modules" - save_cache: - key: v3-npm-install + key: v4-npm-install paths: "apps/explorer/node_modules" - run: @@ -64,13 +64,13 @@ jobs: working_directory: "apps/block_scout_web/assets" - save_cache: - key: v7-npm-install-{{ .Branch }}-{{ checksum "apps/block_scout_web/assets/package-lock.json" }} + key: v8-npm-install-{{ .Branch }}-{{ checksum "apps/block_scout_web/assets/package-lock.json" }} paths: "apps/block_scout_web/assets/node_modules" - save_cache: - key: v7-npm-install-{{ .Branch }} + key: v8-npm-install-{{ .Branch }} paths: "apps/block_scout_web/assets/node_modules" - save_cache: - key: v7-npm-install + key: v8-npm-install paths: "apps/block_scout_web/assets/node_modules" - run: mix compile @@ -83,17 +83,17 @@ jobs: # `deps` needs to be cached with `_build` because `_build` will symlink into `deps` - save_cache: - key: v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} + key: v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} paths: - deps - _build - save_cache: - key: v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} + key: v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} paths: - deps - _build - save_cache: - key: v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} + key: v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} paths: - deps - _build @@ -191,9 +191,9 @@ jobs: - restore_cache: keys: - - v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} - - v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} - - v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} + - v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} + - v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} + - v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} - run: name: Unpack PLT cache @@ -213,15 +213,15 @@ jobs: cp ~/.mix/dialyxir*.plt plts/ - save_cache: - key: v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} + key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} paths: - plts - save_cache: - key: v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} + key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} paths: - plts - save_cache: - key: v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} + key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} paths: - plts From 68489a20fbd642ee402ab76a11ab13eec8c24382 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 10 Jun 2019 11:06:50 +0300 Subject: [PATCH 12/16] return old cache versions --- .circleci/config.yml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6ddd50902c..53e5680e78 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,30 +33,30 @@ jobs: - restore_cache: keys: - - v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} - - v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} - - v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} + - v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} + - v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} + - v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} - run: mix deps.get - restore_cache: keys: - - v8-npm-install-{{ .Branch }}-{{ checksum "apps/block_scout_web/assets/package-lock.json" }} - - v8-npm-install-{{ .Branch }} - - v8-npm-install + - v7-npm-install-{{ .Branch }}-{{ checksum "apps/block_scout_web/assets/package-lock.json" }} + - v7-npm-install-{{ .Branch }} + - v7-npm-install - run: command: npm install working_directory: "apps/explorer" - save_cache: - key: v4-npm-install-{{ .Branch }}-{{ checksum "apps/explorer/package-lock.json" }} + key: v3-npm-install-{{ .Branch }}-{{ checksum "apps/explorer/package-lock.json" }} paths: "apps/explorer/node_modules" - save_cache: - key: v4-npm-install-{{ .Branch }} + key: v3-npm-install-{{ .Branch }} paths: "apps/explorer/node_modules" - save_cache: - key: v4-npm-install + key: v3-npm-install paths: "apps/explorer/node_modules" - run: @@ -64,13 +64,13 @@ jobs: working_directory: "apps/block_scout_web/assets" - save_cache: - key: v8-npm-install-{{ .Branch }}-{{ checksum "apps/block_scout_web/assets/package-lock.json" }} + key: v7-npm-install-{{ .Branch }}-{{ checksum "apps/block_scout_web/assets/package-lock.json" }} paths: "apps/block_scout_web/assets/node_modules" - save_cache: - key: v8-npm-install-{{ .Branch }} + key: v7-npm-install-{{ .Branch }} paths: "apps/block_scout_web/assets/node_modules" - save_cache: - key: v8-npm-install + key: v7-npm-install paths: "apps/block_scout_web/assets/node_modules" - run: mix compile @@ -83,17 +83,17 @@ jobs: # `deps` needs to be cached with `_build` because `_build` will symlink into `deps` - save_cache: - key: v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} + key: v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} paths: - deps - _build - save_cache: - key: v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} + key: v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} paths: - deps - _build - save_cache: - key: v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} + key: v7-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} paths: - deps - _build @@ -191,9 +191,9 @@ jobs: - restore_cache: keys: - - v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} - - v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} - - v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} + - v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} + - v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} + - v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} - run: name: Unpack PLT cache @@ -213,15 +213,15 @@ jobs: cp ~/.mix/dialyxir*.plt plts/ - save_cache: - key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} + key: v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} paths: - plts - save_cache: - key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} + key: v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} paths: - plts - save_cache: - key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} + key: v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} paths: - plts From 4506bc432f9a8c2e14ff9a513fb725a3f3d23836 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 10 Jun 2019 11:25:40 +0300 Subject: [PATCH 13/16] change chromedriver version --- bin/install_chrome_headless.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install_chrome_headless.sh b/bin/install_chrome_headless.sh index 9721e84ea3..d27bb6f9d8 100755 --- a/bin/install_chrome_headless.sh +++ b/bin/install_chrome_headless.sh @@ -1,6 +1,6 @@ export DISPLAY=:99.0 sh -e /etc/init.d/xvfb start -export CHROMEDRIVER_VERSION=`curl -s http://chromedriver.storage.googleapis.com/LATEST_RELEASE` +export CHROMEDRIVER_VERSION=74.0.3729.6 curl -L -O "http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip" unzip chromedriver_linux64.zip sudo chmod +x chromedriver From 7e855d7015ad201d0e6f4402a3948f56b1a7f125 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 10 Jun 2019 11:36:15 +0300 Subject: [PATCH 14/16] add CHANGELOG entry --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a847de3b1d..3bc60bfbe1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ - [#2093](https://github.com/poanetwork/blockscout/pull/2093) - detect token transfer type for deprecated erc721 spec - [#2108](https://github.com/poanetwork/blockscout/pull/2108) - fixe uncle fetching without full transactions +### Chore +- [#2127](https://github.com/poanetwork/blockscout/pull/2127) - use previouse chromedriver version + ### Chore ## 2.0.0-beta From ebf2d4f44c73c23a6c65b92f66870363fdb6084a Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 10 Jun 2019 13:43:54 +0300 Subject: [PATCH 15/16] credo test fix --- apps/block_scout_web/lib/block_scout_web/controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controller.ex b/apps/block_scout_web/lib/block_scout_web/controller.ex index 7f0d148d67..ea2ac19363 100644 --- a/apps/block_scout_web/lib/block_scout_web/controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controller.ex @@ -13,7 +13,7 @@ defmodule BlockScoutWeb.Controller do conn |> put_status(:not_found) |> put_view(BlockScoutWeb.PageNotFoundView) - |> Phoenix.Controller.render(:index) + |> Controller.render(:index) |> halt() end From ac64f843214d70c4af3168261fdd6565dd297c4d Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 10 Jun 2019 13:52:31 +0300 Subject: [PATCH 16/16] Mix credo test fix update --- apps/block_scout_web/lib/block_scout_web/controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controller.ex b/apps/block_scout_web/lib/block_scout_web/controller.ex index ea2ac19363..cf545f5260 100644 --- a/apps/block_scout_web/lib/block_scout_web/controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controller.ex @@ -13,7 +13,7 @@ defmodule BlockScoutWeb.Controller do conn |> put_status(:not_found) |> put_view(BlockScoutWeb.PageNotFoundView) - |> Controller.render(:index) + |> render(:index) |> halt() end