Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
- remove arm64 in CI workflow
- minor fixes
  • Loading branch information
DaMandal0rian committed May 6, 2024
1 parent be2badc commit cd3578b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 71 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy-subspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
5 changes: 0 additions & 5 deletions apps/explorer/config/dev/filecoin.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
],
Expand Down
5 changes: 0 additions & 5 deletions apps/explorer/config/prod/filecoin.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
],
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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()}
Expand All @@ -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
Expand All @@ -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} =
Expand Down
31 changes: 8 additions & 23 deletions apps/explorer/lib/explorer/chain/zksync/batch_transaction.ex
Original file line number Diff line number Diff line change
@@ -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 """
Expand Down
5 changes: 0 additions & 5 deletions apps/indexer/config/dev/filecoin.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
],
Expand Down
5 changes: 0 additions & 5 deletions apps/indexer/config/prod/filecoin.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
],
Expand Down

0 comments on commit cd3578b

Please sign in to comment.