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

feat(decompile): resolve external calls, simplify internal logic around external calls #507

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Jon-Becker
Copy link
Owner

Motivation

Closes #206

Solution

@Jon-Becker Jon-Becker marked this pull request as draft October 12, 2024 20:29
Copy link
Contributor

Benchmark for ec053eb

Click to view benchmark
Test Base PR %
heimdall_cfg/complex 14.1±2.12ms 14.1±0.80ms 0.00%
heimdall_cfg/simple 2.1±0.04ms 2.2±0.03ms +4.76%
heimdall_decoder/seaport 38.4±1.53µs 39.5±0.67µs +2.86%
heimdall_decoder/transfer 2.9±0.18µs 2.9±0.23µs 0.00%
heimdall_decoder/uniswap 11.4±0.35µs 11.3±0.43µs -0.88%
heimdall_decompiler/abi_complex 59.4±0.53ms 59.7±0.66ms +0.51%
heimdall_decompiler/abi_simple 2.2±0.01ms 2.2±0.01ms 0.00%
heimdall_decompiler/sol_complex 69.1±0.65ms 69.8±0.73ms +1.01%
heimdall_decompiler/sol_simple 2.6±0.20ms 2.6±0.01ms 0.00%
heimdall_decompiler/yul_complex 61.6±0.60ms 62.4±0.90ms +1.30%
heimdall_decompiler/yul_simple 2.3±0.01ms 2.3±0.01ms 0.00%
heimdall_disassembler/complex 876.6±20.05µs 884.1±29.45µs +0.86%
heimdall_disassembler/simple 42.7±1.05µs 42.8±1.62µs +0.23%
heimdall_vm/erc20_transfer 333.1±8.13µs 342.8±28.63µs +2.91%
heimdall_vm/fib 817.7±8.38µs 853.1±46.87µs +4.33%
heimdall_vm/ten_thousand_hashes 5.1±0.07s 4.7±0.08s -7.84%

Copy link
Contributor

Benchmark for 6fb4104

Click to view benchmark
Test Base PR %
heimdall_cfg/complex 15.5±0.87ms 14.9±0.58ms -3.87%
heimdall_cfg/simple 2.3±0.10ms 2.3±0.14ms 0.00%
heimdall_decoder/seaport 43.0±4.12µs 44.4±4.91µs +3.26%
heimdall_decoder/transfer 2.9±0.13µs 3.2±0.56µs +10.34%
heimdall_decoder/uniswap 12.4±0.78µs 12.4±1.54µs 0.00%
heimdall_decompiler/abi_complex 62.0±3.55ms 63.5±1.86ms +2.42%
heimdall_decompiler/abi_simple 2.3±0.08ms 2.4±0.04ms +4.35%
heimdall_decompiler/sol_complex 71.2±1.18ms 75.3±3.94ms +5.76%
heimdall_decompiler/sol_simple 2.7±0.03ms 2.7±0.03ms 0.00%
heimdall_decompiler/yul_complex 64.6±3.09ms 68.0±2.95ms +5.26%
heimdall_decompiler/yul_simple 2.5±0.06ms 2.5±0.06ms 0.00%
heimdall_disassembler/complex 1008.1±43.30µs 1031.1±66.71µs +2.28%
heimdall_disassembler/simple 50.0±4.09µs 50.2±2.99µs +0.40%
heimdall_vm/erc20_transfer 360.5±17.18µs 366.1±22.93µs +1.55%
heimdall_vm/fib 842.0±27.48µs 894.3±36.32µs +6.21%
heimdall_vm/ten_thousand_hashes 5.2±0.15s 5.2±0.10s 0.00%

Copy link
Contributor

Benchmark for 9897338

Click to view benchmark
Test Base PR %
heimdall_cfg/complex 14.8±0.83ms 15.6±1.40ms +5.41%
heimdall_cfg/simple 2.3±0.10ms 2.2±0.14ms -4.35%
heimdall_decoder/seaport 45.8±5.43µs 45.4±6.62µs -0.87%
heimdall_decoder/transfer 2.9±0.37µs 3.0±0.39µs +3.45%
heimdall_decoder/uniswap 13.2±2.99µs 12.7±1.62µs -3.79%
heimdall_decompiler/abi_complex 67.0±3.36ms 64.0±3.03ms -4.48%
heimdall_decompiler/abi_simple 2.4±0.09ms 2.4±0.04ms 0.00%
heimdall_decompiler/sol_complex 80.4±3.95ms 73.9±3.53ms -8.08%
heimdall_decompiler/sol_simple 2.8±0.17ms 2.7±0.11ms -3.57%
heimdall_decompiler/yul_complex 74.3±6.21ms 67.6±4.16ms -9.02%
heimdall_decompiler/yul_simple 2.6±0.22ms 2.4±0.14ms -7.69%
heimdall_disassembler/complex 1081.3±127.53µs 1037.7±91.37µs -4.03%
heimdall_disassembler/simple 54.6±14.59µs 50.7±4.31µs -7.14%
heimdall_vm/erc20_transfer 354.8±18.75µs 361.0±27.68µs +1.75%
heimdall_vm/fib 846.6±44.95µs 827.4±18.54µs -2.27%
heimdall_vm/ten_thousand_hashes 5.3±0.06s 5.3±0.14s 0.00%

Copy link
Contributor

github-actions bot commented Nov 4, 2024

Benchmark for 9915c0c

Click to view benchmark
Test Base PR %
heimdall_cfg/complex 15.4±0.84ms 14.7±0.29ms -4.55%
heimdall_cfg/simple 2.2±0.05ms 2.3±0.04ms +4.55%
heimdall_decoder/seaport 41.5±3.31µs 39.7±1.70µs -4.34%
heimdall_decoder/transfer 3.1±0.36µs 2.7±0.26µs -12.90%
heimdall_decoder/uniswap 12.2±1.46µs 11.5±0.73µs -5.74%
heimdall_decompiler/abi_complex 70.0±4.00ms 68.2±7.19ms -2.57%
heimdall_decompiler/abi_simple 2.5±0.24ms 2.6±0.34ms +4.00%
heimdall_decompiler/sol_complex 84.4±5.44ms 83.8±12.09ms -0.71%
heimdall_decompiler/sol_simple 2.9±0.20ms 3.6±0.10ms +24.14%
heimdall_decompiler/yul_complex 72.7±7.02ms 64.3±3.37ms -11.55%
heimdall_decompiler/yul_simple 2.4±0.03ms 2.3±0.01ms -4.17%
heimdall_disassembler/complex 1085.8±151.61µs 1001.7±105.10µs -7.75%
heimdall_disassembler/simple 55.3±8.36µs 50.7±7.40µs -8.32%
heimdall_vm/erc20_transfer 379.3±38.77µs 363.3±36.18µs -4.22%
heimdall_vm/fib 885.1±46.61µs 885.0±25.09µs -0.01%
heimdall_vm/ten_thousand_hashes 5.5±0.14s 5.5±0.14s 0.00%

Copy link
Contributor

github-actions bot commented Nov 7, 2024

Benchmark for 6c7dad5

Click to view benchmark
Test Base PR %
heimdall_cfg/complex 14.7±0.21ms 14.6±0.92ms -0.68%
heimdall_cfg/simple 2.2±0.01ms 2.3±0.03ms +4.55%
heimdall_decoder/seaport 41.8±3.67µs 42.6±2.98µs +1.91%
heimdall_decoder/transfer 2.7±0.24µs 3.0±0.29µs +11.11%
heimdall_decoder/uniswap 11.8±0.71µs 12.2±0.93µs +3.39%
heimdall_decompiler/abi_complex 64.9±1.33ms 60.6±0.93ms -6.63%
heimdall_decompiler/abi_simple 2.4±0.08ms 2.3±0.04ms -4.17%
heimdall_decompiler/sol_complex 76.1±1.90ms 78.4±1.41ms +3.02%
heimdall_decompiler/sol_simple 2.7±0.03ms 3.5±0.05ms +29.63%
heimdall_decompiler/yul_complex 66.8±3.28ms 63.1±1.67ms -5.54%
heimdall_decompiler/yul_simple 2.4±0.06ms 2.3±0.02ms -4.17%
heimdall_disassembler/complex 1009.2±85.85µs 944.9±61.79µs -6.37%
heimdall_disassembler/simple 49.3±3.54µs 45.7±2.90µs -7.30%
heimdall_vm/erc20_transfer 369.9±31.61µs 354.9±14.13µs -4.06%
heimdall_vm/fib 871.8±12.00µs 875.5±12.91µs +0.42%
heimdall_vm/ten_thousand_hashes 5.4±0.25s 5.0±0.14s -7.41%

Copy link
Contributor

Benchmark for 2d8e2e4

Click to view benchmark
Test Base PR %
heimdall_cfg/complex 14.1±0.12ms 16.4±1.44ms +16.31%
heimdall_cfg/simple 2.2±0.04ms 2.3±0.10ms +4.55%
heimdall_decoder/seaport 40.3±1.98µs 41.7±2.95µs +3.47%
heimdall_decoder/transfer 2.9±0.34µs 2.8±0.17µs -3.45%
heimdall_decoder/uniswap 11.8±0.59µs 12.1±1.04µs +2.54%
heimdall_decompiler/abi_complex 61.8±1.82ms 69.0±3.93ms +11.65%
heimdall_decompiler/abi_simple 2.3±0.01ms 2.4±0.05ms +4.35%
heimdall_decompiler/sol_complex 70.2±0.39ms 92.2±5.21ms +31.34%
heimdall_decompiler/sol_simple 2.6±0.01ms 4.1±0.42ms +57.69%
heimdall_decompiler/yul_complex 63.0±0.56ms 67.4±6.78ms +6.98%
heimdall_decompiler/yul_simple 2.4±0.03ms 2.4±0.09ms 0.00%
heimdall_disassembler/complex 926.1±62.16µs 1049.1±105.07µs +13.28%
heimdall_disassembler/simple 46.6±3.14µs 52.8±5.89µs +13.30%
heimdall_vm/erc20_transfer 345.2±8.60µs 378.5±29.37µs +9.65%
heimdall_vm/fib 852.9±12.60µs 861.6±37.64µs +1.02%
heimdall_vm/ten_thousand_hashes 5.3±0.11s 5.2±0.05s -1.89%

Copy link
Contributor

Benchmark for 8aa3eb0

Click to view benchmark
Test Base PR %
heimdall_cfg/complex 14.3±0.10ms 14.9±0.87ms +4.20%
heimdall_cfg/simple 2.2±0.01ms 2.2±0.10ms 0.00%
heimdall_decoder/seaport 40.4±1.11µs 41.6±2.24µs +2.97%
heimdall_decoder/transfer 2.8±0.23µs 3.0±0.26µs +7.14%
heimdall_decoder/uniswap 11.5±0.51µs 11.8±1.13µs +2.61%
heimdall_decompiler/abi_complex 61.0±7.10ms 60.1±0.44ms -1.48%
heimdall_decompiler/abi_simple 2.2±0.01ms 2.3±0.01ms +4.55%
heimdall_decompiler/sol_complex 70.1±0.49ms 77.3±0.68ms +10.27%
heimdall_decompiler/sol_simple 2.6±0.02ms 3.5±0.07ms +34.62%
heimdall_decompiler/yul_complex 63.7±0.61ms 65.3±1.04ms +2.51%
heimdall_decompiler/yul_simple 2.4±0.01ms 2.4±0.01ms 0.00%
heimdall_disassembler/complex 913.0±27.19µs 945.6±28.44µs +3.57%
heimdall_disassembler/simple 44.4±1.12µs 46.0±2.15µs +3.60%
heimdall_vm/erc20_transfer 336.9±11.41µs 343.5±11.25µs +1.96%
heimdall_vm/fib 829.8±10.61µs 857.0±8.21µs +3.28%
heimdall_vm/ten_thousand_hashes 5.2±0.13s 5.2±0.07s 0.00%

Copy link
Contributor

Benchmark for 3ecd9e1

Click to view benchmark
Test Base PR %
heimdall_cfg/complex 13.7±0.06ms 14.4±0.06ms +5.11%
heimdall_cfg/simple 2.1±0.01ms 2.2±0.13ms +4.76%
heimdall_decoder/seaport 40.1±1.38µs 39.0±0.96µs -2.74%
heimdall_decoder/transfer 2.9±0.22µs 2.7±0.16µs -6.90%
heimdall_decoder/uniswap 11.4±0.36µs 11.3±0.32µs -0.88%
heimdall_decompiler/abi_complex 57.9±0.40ms 58.2±0.30ms +0.52%
heimdall_decompiler/abi_simple 2.3±0.01ms 2.3±0.02ms 0.00%
heimdall_decompiler/sol_complex 69.7±0.45ms 76.8±0.42ms +10.19%
heimdall_decompiler/sol_simple 2.6±0.01ms 3.4±0.03ms +30.77%
heimdall_decompiler/yul_complex 62.4±0.50ms 62.0±0.46ms -0.64%
heimdall_decompiler/yul_simple 2.3±0.01ms 2.3±0.01ms 0.00%
heimdall_disassembler/complex 908.1±19.46µs 899.9±19.18µs -0.90%
heimdall_disassembler/simple 44.4±2.19µs 44.3±1.06µs -0.23%
heimdall_vm/erc20_transfer 351.4±11.00µs 345.5±7.63µs -1.68%
heimdall_vm/fib 841.9±8.00µs 829.9±7.78µs -1.43%
heimdall_vm/ten_thousand_hashes 5.0±0.04s 4.7±0.12s -6.00%

Copy link
Contributor

Benchmark for 8b244a5

Click to view benchmark
Test Base PR %
heimdall_cfg/complex 13.7±0.09ms 13.7±0.07ms 0.00%
heimdall_cfg/simple 2.0±0.01ms 2.1±0.01ms +5.00%
heimdall_decoder/seaport 33.2±0.67µs 32.6±0.86µs -1.81%
heimdall_decoder/transfer 3.4±0.20µs 3.5±0.22µs +2.94%
heimdall_decoder/uniswap 10.6±0.33µs 10.4±0.22µs -1.89%
heimdall_decompiler/abi_complex 55.9±0.47ms 51.8±0.30ms -7.33%
heimdall_decompiler/abi_simple 2.0±0.01ms 2.2±0.01ms +10.00%
heimdall_decompiler/sol_complex 63.6±0.57ms 67.3±0.38ms +5.82%
heimdall_decompiler/sol_simple 2.3±0.01ms 3.4±0.02ms +47.83%
heimdall_decompiler/yul_complex 57.8±0.63ms 54.2±0.37ms -6.23%
heimdall_decompiler/yul_simple 2.1±0.01ms 2.3±0.01ms +9.52%
heimdall_disassembler/complex 742.5±12.85µs 769.9±21.38µs +3.69%
heimdall_disassembler/simple 37.0±1.60µs 38.1±1.04µs +2.97%
heimdall_vm/erc20_transfer 277.6±5.37µs 346.5±15.17µs +24.82%
heimdall_vm/fib 689.3±6.07µs 744.6±15.26µs +8.02%
heimdall_vm/ten_thousand_hashes 524.4±30.20ms 513.6±4.61ms -2.06%

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 this pull request may close these issues.

Further Resolving of Message Calls Within Functions
1 participant