8000 Messages for unknown calls · Issue #342 · a16z/halmos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Messages for unknown calls #342
Closed
Closed
@daejunpark

Description

@daejunpark

Currently, the message generation for calls to known and unknown addresses is inconsistent, with the message for known calls being correct. It would be better to factor out the message generation and use the same message for both types of calls.

Message for known calls:

halmos/src/halmos/sevm.py

Lines 1579 to 1586 in f7ff1f8

message = Message(
target=to if op in [EVM.CALL, EVM.STATICCALL] else ex.this,
caller=caller if op != EVM.DELEGATECALL else ex.caller(),
value=fund if op != EVM.DELEGATECALL else ex.callvalue(),
data=arg,
is_static=(ex.context.message.is_static or op == EVM.STATICCALL),
call_scheme=op,
)

Message for unknown calls:

halmos/src/halmos/sevm.py

Lines 1776 to 1782 in f7ff1f8

message=Message(
target=to,
caller=caller,
value=fund,
data=ex.st.memory.slice(arg_loc, arg_loc + arg_size),
call_scheme=op,
),

This issue isn't critical because the message for unknown calls is used only for tracing purposes, and most unknown calls use the CALL scheme. However, the trace information could be incorrect or confusing if there are unknown calls via DELEGATECALL.

Note: the message generation code is updated by PR #336, but this issue is orthogonal, and can be fixed after merging the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0