-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Put error in last call for STOP opcode #8413
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5b4d971
to
88dc72e
Compare
vbaranov
approved these changes
Sep 8, 2023
** (FunctionClauseError) no function clause matching in EthereumJSONRPC.Geth.Call.elixir_to_internal_transaction_params/1
The following arguments were given to EthereumJSONRPC.Geth.Call.elixir_to_internal_transaction_params/1:
# 1
%{
"blockNumber" => 2836634,
"callType" => "stop",
"createdContractAddressHash" => "0x",
"createdContractCode" => "0x",
"from" => "0x0000000000000000000000000000000000000000",
"gas" => 0,
"gasUsed" => 21000,
"index" => 0,
"init" => "0x",
"input" => "0x",
"output" => "0x",
"to" => "0x",
"traceAddress" => [],
"transactionHash" => "0xcbbf23c54bcacf25f22f6aa2635283fcc9fdb30c3145db2301ff911dfb9924eb",
"transactionIndex" => 8,
"type" => "stop",
"value" => 0
}
Attempted function clauses (showing 6 out of 6):
defp elixir_to_internal_transaction_params(%{
"blockNumber" => block_number,
"transactionIndex" => transaction_index,
"transactionHash" => transaction_hash,
"index" => index,
"traceAddress" => trace_address,
"type" => "call" = type,
"callType" => call_type,
"from" => from_address_hash,
"to" => to_address_hash,
"gas" => gas,
"input" => input,
"error" => error,
"value" => value
}) when call_type === "call" or call_type === "callcode" or call_type === "delegatecall"
defp elixir_to_internal_transaction_params(%{
"blockNumber" => block_number,
"transactionIndex" => transaction_index,
"transactionHash" => transaction_hash,
"index" => index,
"traceAddress" => trace_address,
"type" => "call" = type,
"callType" => call_type,
"from" => from_address_hash,
"to" => to_address_hash,
"gas" => gas,
"gasUsed" => gas_used,
"input" => input,
"output" => output,
"value" => value
}) when call_type === "call" or call_type === "callcode" or call_type === "delegatecall"
defp elixir_to_internal_transaction_params(%{
"blockNumber" => block_number,
"transactionIndex" => transaction_index,
"transactionHash" => transaction_hash,
"index" => index,
"traceAddress" => trace_address,
"type" => "call" = type,
"callType" => "staticcall" = call_type,
"from" => from_address_hash,
"to" => to_address_hash,
"input" => input,
"gas" => gas,
"gasUsed" => gas_used,
"value" => 0 = value
} = params)
defp elixir_to_internal_transaction_params(%{
"blockNumber" => block_number,
"transactionIndex" => transaction_index,
"transactionHash" => transaction_hash,
"index" => index,
"traceAddress" => trace_address,
"type" => type,
"from" => from_address_hash,
"error" => error,
"gas" => gas,
"init" => init,
"value" => value
}) when type === "create" or type === "create2"
defp elixir_to_internal_transaction_params(%{
"blockNumber" => block_number,
"transactionIndex" => transaction_index,
"transactionHash" => transaction_hash,
"index" => index,
"traceAddress" => trace_address,
"type" => type,
"from" => from_address_hash,
"createdContractAddressHash" => created_contract_address_hash,
"gas" => gas,
"gasUsed" => gas_used,
"init" => init,
"createdContractCode" => created_contract_code,
"value" => value
}) when type === "create" or type === "create2"
defp elixir_to_internal_transaction_params(%{
"blockNumber" => block_number,
"transactionIndex" => transaction_index,
"transactionHash" => transaction_hash,
"index" => index,
"traceAddress" => trace_address,
"type" => "selfdestruct" = type,
"from" => from_address_hash,
"to" => to_address_hash,
"gas" => gas,
"gasUsed" => gas_used,
"value" => value
})
(ethereum_jsonrpc 5.2.2) lib/ethereum_jsonrpc/geth/call.ex:321: EthereumJSONRPC.Geth.Call.elixir_to_internal_transaction_params/1
(elixir 1.14.5) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
(ethereum_jsonrpc 5.2.2) lib/ethereum_jsonrpc/geth.ex:224: EthereumJSONRPC.Geth.debug_trace_transaction_response_to_internal_transactions_params/2
(elixir 1.14.5) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
(ethereum_jsonrpc 5.2.2) lib/ethereum_jsonrpc/geth.ex:165: EthereumJSONRPC.Geth.debug_trace_transaction_responses_to_internal_transactions_params/3
iex:6: (file) Also, it seems that we need to handle |
0246781
to
220eb33
Compare
vbaranov
approved these changes
Sep 12, 2023
e3ea4a6
to
65e0df4
Compare
sl1depengwyn
requested changes
Sep 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
** (FunctionClauseError) no function clause matching in Explorer.Chain.InternalTransaction.type_changeset/3
The following arguments were given to Explorer.Chain.InternalTransaction.type_changeset/3:
# 1
#Ecto.Changeset<
action: nil,
changes: %{block_number: 2836634, type: :stop},
errors: [],
data: #Explorer.Chain.InternalTransaction<>,
valid?: true
>
# 2
%{
block_number: 2836634,
error: "execution stopped",
from_address_hash: "0x0000000000000000000000000000000000000000",
gas: 0,
index: 0,
input: "0x",
trace_address: [],
transaction_hash: "0xcbbf23c54bcacf25f22f6aa2635283fcc9fdb30c3145db2301ff911dfb9924eb",
transaction_index: 8,
type: "stop"
}
# 3
:stop
Attempted function clauses (showing 4 out of 4):
defp type_changeset(changeset, attrs, :call)
defp type_changeset(changeset, attrs, type) when type === :create or type === :create2
defp type_changeset(changeset, attrs, :selfdestruct)
defp type_changeset(changeset, _, nil)
(explorer 5.2.2) lib/explorer/chain/internal_transaction.ex:440: Explorer.Chain.InternalTransaction.type_changeset/3
(elixir 1.14.5) lib/stream.ex:612: anonymous fn/4 in Stream.map/2
(elixir 1.14.5) lib/enum.ex:4751: Enumerable.List.reduce/3
(elixir 1.14.5) lib/stream.ex:1813: Enumerable.Stream.do_each/4
(elixir 1.14.5) lib/enum.ex:4307: Enum.reduce/3
(explorer 5.2.2) lib/explorer/chain/import.ex:163: Explorer.Chain.Import.runner_changes_list/2
(elixir 1.14.5) lib/stream.ex:612: anonymous fn/4 in Stream.map/2
(elixir 1.14.5) lib/enum.ex:4751: Enumerable.List.reduce/3
(elixir 1.14.5) lib/stream.ex:1813: Enumerable.Stream.do_each/4
(elixir 1.14.5) lib/enum.ex:4307: Enum.reduce/3
(explorer 5.2.2) lib/explorer/chain/import.ex:130: Explorer.Chain.Import.all/1
(indexer 5.2.2) lib/indexer/fetcher/internal_transaction.ex:253: Indexer.Fetcher.InternalTransaction.import_internal_transaction/2
(indexer 5.2.2) lib/indexer/fetcher/internal_transaction.ex:223: Indexer.Fetcher.InternalTransaction.safe_import_internal_transaction/2
iex:4: (file)
iex(4)> 2023-09-14T16:26:12.834 application=explorer [warning] Failed to fetch genesis data. Chain spec path is not set.```
d720ca7
to
d390a9e
Compare
vbaranov
approved these changes
Sep 15, 2023
e5c12c6
to
47918c3
Compare
sl1depengwyn
approved these changes
Sep 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog
Put error in last call on STOP operations + fixed
REVERT
in call tracer calls parser