Skip to content
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

[Bug]: cached bytecode is invalid when decompile the same address with different chain #158

Closed
2 tasks done
justforfunya opened this issue Oct 9, 2023 · 1 comment · Fixed by #159
Closed
2 tasks done
Assignees

Comments

@justforfunya
Copy link

justforfunya commented Oct 9, 2023

Component

Decompile Module

Version

heimdall 0.6.1

Please check the following

  • This is not a duplicate issue
  • I have checked the wiki and tried troubleshooting the issue

Operating System

Linux

Command used to produce the issue

bsc chain
x@x:/tmp/a$ /home/user/.bifrost/bin/heimdall disassemble 0xa88d48a4c6d8dd6a166a71cc159a2c588fa882bb --rpc-url http://192.168.0.x:8546 -vv
debug: found cached bytecode for '0xa88d48a4c6d8dd6a166a71cc159a2c588fa882bb' .
info: disassembled 20210 bytes successfully.
debug: disassembly completed in 3 ms.

eth chain
x@x:/tmp/a$ /home/user/.bifrost/bin/heimdall disassemble 0xa88d48a4c6d8dd6a166a71cc159a2c588fa882bb --rpc-url http://192.168.0.x:8545 -vv
debug: found cached bytecode for '0xa88d48a4c6d8dd6a166a71cc159a2c588fa882bb' .
info: disassembled 20210 bytes successfully.
debug: disassembly completed in 2 ms.

the about cmd will produce the same result.

I don't think it's necessary to use cache ,because the bytecode can be redeployed once the contract destructed.

by the way ,I think it's very usefull to have an output dir option as with older version.

Describe the issue you are facing

the about cmd will produce the same result.

I don't think it's necessary to use cache ,because the bytecode can be redeployed once the contract destructed.

by the way ,I think it's very usefull to have an output dir option as with older version.

@Jon-Becker
Copy link
Owner

Jon-Becker commented Oct 9, 2023

Gotcha. I'll make cache take into account the chain you're querying. ALso, as a temporary solution, you can always clear your cache with

heimdall cache clean

I'll also look into re-adding the output flags to the CLI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants