diff --git a/.github/workflows/deploy-subspace.yml b/.github/workflows/deploy-subspace.yml index 5ace2190f782..346ed7ba4c46 100644 --- a/.github/workflows/deploy-subspace.yml +++ b/.github/workflows/deploy-subspace.yml @@ -62,7 +62,6 @@ jobs: cache-to: type=gha,mode=max tags: ghcr.io/${{ github.repository_owner }}/blockscout-backend:${{ env.TAG_NAME }} platforms: | - linux/arm64 linux/amd64 build-args: | CACHE_EXCHANGE_RATES_PERIOD= diff --git a/apps/explorer/config/dev/filecoin.exs b/apps/explorer/config/dev/filecoin.exs index 24c09c10194f..ea75c71dc462 100644 --- a/apps/explorer/config/dev/filecoin.exs +++ b/apps/explorer/config/dev/filecoin.exs @@ -14,16 +14,11 @@ config :explorer, http: EthereumJSONRPC.HTTP.HTTPoison, url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:1234/rpc/v1", fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), -<<<<<<<< HEAD:apps/explorer/config/dev/arbitrum.exs - method_to_url: [ - eth_call: ConfigHelper.eth_call_url("http://localhost:8545") -======== fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_eth_call_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_ETH_CALL_URL"), method_to_url: [ eth_call: ConfigHelper.eth_call_url("http://localhost:1234/rpc/v1"), trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:1234/rpc/v1" ->>>>>>>> master:apps/explorer/config/dev/filecoin.exs ], http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] ], diff --git a/apps/explorer/config/prod/filecoin.exs b/apps/explorer/config/prod/filecoin.exs index 729af6368934..00c056dbe6dd 100644 --- a/apps/explorer/config/prod/filecoin.exs +++ b/apps/explorer/config/prod/filecoin.exs @@ -14,16 +14,11 @@ config :explorer, http: EthereumJSONRPC.HTTP.HTTPoison, url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), -<<<<<<<< HEAD:apps/explorer/config/prod/arbitrum.exs - method_to_url: [ - eth_call: ConfigHelper.eth_call_url() -======== fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_eth_call_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_ETH_CALL_URL"), method_to_url: [ eth_call: ConfigHelper.eth_call_url(), trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") ->>>>>>>> master:apps/explorer/config/prod/filecoin.exs ], http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] ], diff --git a/apps/explorer/lib/explorer/chain/import/runner/zksync/batch_transactions.ex b/apps/explorer/lib/explorer/chain/import/runner/zksync/batch_transactions.ex index 65092dc5e92a..720519a10093 100644 --- a/apps/explorer/lib/explorer/chain/import/runner/zksync/batch_transactions.ex +++ b/apps/explorer/lib/explorer/chain/import/runner/zksync/batch_transactions.ex @@ -1,23 +1,13 @@ -<<<<<<<< HEAD:apps/explorer/lib/explorer/chain/import/runner/polygon_zkevm/batch_transactions.ex -defmodule Explorer.Chain.Import.Runner.PolygonZkevm.BatchTransactions do - @moduledoc """ - Bulk imports `t:Explorer.Chain.PolygonZkevm.BatchTransaction.t/0`. -======== defmodule Explorer.Chain.Import.Runner.ZkSync.BatchTransactions do @moduledoc """ Bulk imports `t:Explorer.Chain.ZkSync.BatchTransaction.t/0`. ->>>>>>>> master:apps/explorer/lib/explorer/chain/import/runner/zksync/batch_transactions.ex """ require Ecto.Query alias Ecto.{Changeset, Multi, Repo} alias Explorer.Chain.Import -<<<<<<<< HEAD:apps/explorer/lib/explorer/chain/import/runner/polygon_zkevm/batch_transactions.ex - alias Explorer.Chain.PolygonZkevm.BatchTransaction -======== alias Explorer.Chain.ZkSync.BatchTransaction ->>>>>>>> master:apps/explorer/lib/explorer/chain/import/runner/zksync/batch_transactions.ex alias Explorer.Prometheus.Instrumenter @behaviour Import.Runner @@ -31,11 +21,7 @@ defmodule Explorer.Chain.Import.Runner.ZkSync.BatchTransactions do def ecto_schema_module, do: BatchTransaction @impl Import.Runner -<<<<<<<< HEAD:apps/explorer/lib/explorer/chain/import/runner/polygon_zkevm/batch_transactions.ex - def option_key, do: :polygon_zkevm_batch_transactions -======== def option_key, do: :zksync_batch_transactions ->>>>>>>> master:apps/explorer/lib/explorer/chain/import/runner/zksync/batch_transactions.ex @impl Import.Runner @spec imported_table_row() :: %{:value_description => binary(), :value_type => binary()} @@ -56,21 +42,12 @@ defmodule Explorer.Chain.Import.Runner.ZkSync.BatchTransactions do |> Map.put_new(:timeout, @timeout) |> Map.put(:timestamps, timestamps) -<<<<<<<< HEAD:apps/explorer/lib/explorer/chain/import/runner/polygon_zkevm/batch_transactions.ex - Multi.run(multi, :insert_polygon_zkevm_batch_transactions, fn repo, _ -> - Instrumenter.block_import_stage_runner( - fn -> insert(repo, changes_list, insert_options) end, - :block_referencing, - :polygon_zkevm_batch_transactions, - :polygon_zkevm_batch_transactions -======== Multi.run(multi, :insert_zksync_batch_transactions, fn repo, _ -> Instrumenter.block_import_stage_runner( fn -> insert(repo, changes_list, insert_options) end, :block_referencing, :zksync_batch_transactions, :zksync_batch_transactions ->>>>>>>> master:apps/explorer/lib/explorer/chain/import/runner/zksync/batch_transactions.ex ) end) end @@ -82,11 +59,7 @@ defmodule Explorer.Chain.Import.Runner.ZkSync.BatchTransactions do {:ok, [BatchTransaction.t()]} | {:error, [Changeset.t()]} def insert(repo, changes_list, %{timeout: timeout, timestamps: timestamps} = _options) when is_list(changes_list) do -<<<<<<<< HEAD:apps/explorer/lib/explorer/chain/import/runner/polygon_zkevm/batch_transactions.ex - # Enforce PolygonZkevm.BatchTransaction ShareLocks order (see docs: sharelock.md) -======== # Enforce ZkSync.BatchTransaction ShareLocks order (see docs: sharelock.md) ->>>>>>>> master:apps/explorer/lib/explorer/chain/import/runner/zksync/batch_transactions.ex ordered_changes_list = Enum.sort_by(changes_list, & &1.hash) {:ok, inserted} = diff --git a/apps/explorer/lib/explorer/chain/zksync/batch_transaction.ex b/apps/explorer/lib/explorer/chain/zksync/batch_transaction.ex index 3df5c2163b9f..ef3cfb0af8e5 100644 --- a/apps/explorer/lib/explorer/chain/zksync/batch_transaction.ex +++ b/apps/explorer/lib/explorer/chain/zksync/batch_transaction.ex @@ -1,41 +1,26 @@ -<<<<<<<< HEAD:apps/explorer/lib/explorer/chain/polygon_zkevm/batch_transaction.ex -defmodule Explorer.Chain.PolygonZkevm.BatchTransaction do - @moduledoc "Models a list of transactions related to a batch for zkEVM." -======== defmodule Explorer.Chain.ZkSync.BatchTransaction do @moduledoc "Models a list of transactions related to a batch for ZkSync." ->>>>>>>> master:apps/explorer/lib/explorer/chain/zksync/batch_transaction.ex use Explorer.Schema alias Explorer.Chain.{Hash, Transaction} -<<<<<<<< HEAD:apps/explorer/lib/explorer/chain/polygon_zkevm/batch_transaction.ex - alias Explorer.Chain.PolygonZkevm.TransactionBatch -======== alias Explorer.Chain.ZkSync.TransactionBatch ->>>>>>>> master:apps/explorer/lib/explorer/chain/zksync/batch_transaction.ex @required_attrs ~w(batch_number hash)a + @type t :: %__MODULE__{ + batch_number: non_neg_integer(), + batch: %Ecto.Association.NotLoaded{} | TransactionBatch.t() | nil, + hash: Hash.t(), + l2_transaction: %Ecto.Association.NotLoaded{} | Transaction.t() | nil + } + @primary_key false -<<<<<<<< HEAD:apps/explorer/lib/explorer/chain/polygon_zkevm/batch_transaction.ex - typed_schema "polygon_zkevm_batch_l2_transactions" do - belongs_to(:batch, TransactionBatch, foreign_key: :batch_number, references: :number, type: :integer, null: false) -======== schema "zksync_batch_l2_transactions" do belongs_to(:batch, TransactionBatch, foreign_key: :batch_number, references: :number, type: :integer) belongs_to(:l2_transaction, Transaction, foreign_key: :hash, primary_key: true, references: :hash, type: Hash.Full) ->>>>>>>> master:apps/explorer/lib/explorer/chain/zksync/batch_transaction.ex - - belongs_to(:l2_transaction, Transaction, - foreign_key: :hash, - primary_key: true, - references: :hash, - type: Hash.Full, - null: false - ) - timestamps(null: false) + timestamps() end @doc """ diff --git a/apps/indexer/config/dev/filecoin.exs b/apps/indexer/config/dev/filecoin.exs index 41254e86654d..65fab05db094 100644 --- a/apps/indexer/config/dev/filecoin.exs +++ b/apps/indexer/config/dev/filecoin.exs @@ -19,16 +19,11 @@ config :indexer, http: EthereumJSONRPC.HTTP.HTTPoison, url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:1234/rpc/v1", fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), -<<<<<<<< HEAD:apps/indexer/config/dev/arbitrum.exs - method_to_url: [ - eth_call: ConfigHelper.eth_call_url("http://localhost:8545") -======== fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_eth_call_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_ETH_CALL_URL"), method_to_url: [ eth_call: ConfigHelper.eth_call_url("http://localhost:1234/rpc/v1"), trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || "http://localhost:1234/rpc/v1" ->>>>>>>> master:apps/indexer/config/dev/filecoin.exs ], http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] ], diff --git a/apps/indexer/config/prod/filecoin.exs b/apps/indexer/config/prod/filecoin.exs index 26ef8e0318ac..fc62d266cc13 100644 --- a/apps/indexer/config/prod/filecoin.exs +++ b/apps/indexer/config/prod/filecoin.exs @@ -19,16 +19,11 @@ config :indexer, http: EthereumJSONRPC.HTTP.HTTPoison, url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"), fallback_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_HTTP_URL"), -<<<<<<<< HEAD:apps/indexer/config/prod/arbitrum.exs - method_to_url: [ - eth_call: ConfigHelper.eth_call_url("http://localhost:8545") -======== fallback_trace_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_TRACE_URL"), fallback_eth_call_url: System.get_env("ETHEREUM_JSONRPC_FALLBACK_ETH_CALL_URL"), method_to_url: [ eth_call: ConfigHelper.eth_call_url(), trace_block: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") ->>>>>>>> master:apps/indexer/config/prod/filecoin.exs ], http_options: [recv_timeout: timeout, timeout: timeout, hackney: hackney_opts] ],