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: support for vyper dispatcher in selector detection #542

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Jon-Becker
Copy link
Owner

Motivation

Closes #280 #281

Solution

@Jon-Becker Jon-Becker linked an issue Dec 22, 2024 that may be closed by this pull request
Copy link
Contributor

Benchmark for 1ea505d

Click to view benchmark
Test Base PR %
heimdall_cfg/complex 14.0±0.37ms 14.5±0.73ms +3.57%
heimdall_cfg/simple 2.2±0.06ms 2.2±0.04ms 0.00%
heimdall_decoder/seaport 39.4±0.78µs 43.2±5.75µs +9.64%
heimdall_decoder/transfer 2.6±0.16µs 2.8±0.28µs +7.69%
heimdall_decoder/uniswap 11.4±0.36µs 12.3±0.89µs +7.89%
heimdall_decompiler/abi_complex 58.5±0.53ms 73.2±4.29ms +25.13%
heimdall_decompiler/abi_simple 2.2±0.01ms 2.4±0.03ms +9.09%
heimdall_decompiler/sol_complex 70.8±0.60ms 87.7±5.22ms +23.87%
heimdall_decompiler/sol_simple 2.7±0.03ms 3.1±0.98ms +14.81%
heimdall_decompiler/yul_complex 63.5±4.12ms 75.0±3.72ms +18.11%
heimdall_decompiler/yul_simple 2.5±0.02ms 2.6±0.06ms +4.00%
heimdall_disassembler/complex 991.4±29.27µs 1013.2±40.56µs +2.20%
heimdall_disassembler/simple 47.0±1.30µs 53.3±6.65µs +13.40%
heimdall_vm/erc20_transfer 335.1±6.17µs 344.3±12.46µs +2.75%
heimdall_vm/fib 851.2±6.02µs 849.3±10.17µs -0.22%
heimdall_vm/ten_thousand_hashes 5.4±0.06s 4.9±0.06s -9.26%

);

fn is_push(op: u8) -> bool {
op >= 0x60 && op <= 0x7f
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: manual `RangeInclusive::contains` implementation
 --> crates/vm/src/ext/selectors.rs:9:5
  |
9 |     op >= 0x60 && op <= 0x7f
  |     ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x60..=0x7f).contains(&op)`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
  = note: `#[warn(clippy::manual_range_contains)]` on by default

Copy link
Contributor

Benchmark for 9128061

Click to view benchmark
Test Base PR %
heimdall_cfg/complex 14.1±0.32ms 14.8±0.34ms +4.96%
heimdall_cfg/simple 2.2±0.02ms 2.3±0.02ms +4.55%
heimdall_decoder/seaport 39.8±3.00µs 42.6±6.09µs +7.04%
heimdall_decoder/transfer 3.0±0.20µs 3.0±0.31µs 0.00%
heimdall_decoder/uniswap 11.5±0.20µs 12.3±1.62µs +6.96%
heimdall_decompiler/abi_complex 58.3±0.69ms 55.9±1.06ms -4.12%
heimdall_decompiler/abi_simple 2.2±0.03ms 2.1±0.07ms -4.55%
heimdall_decompiler/sol_complex 67.9±0.76ms 70.6±1.80ms +3.98%
heimdall_decompiler/sol_simple 2.7±0.05ms 2.7±0.04ms 0.00%
heimdall_decompiler/yul_complex 62.4±0.74ms 62.0±3.50ms -0.64%
heimdall_decompiler/yul_simple 2.4±0.02ms 2.3±0.10ms -4.17%
heimdall_disassembler/complex 1015.0±40.03µs 952.8±29.92µs -6.13%
heimdall_disassembler/simple 50.9±2.61µs 45.7±2.83µs -10.22%
heimdall_vm/erc20_transfer 347.9±9.25µs 337.4±12.21µs -3.02%
heimdall_vm/fib 856.8±24.42µs 842.6±6.64µs -1.66%
heimdall_vm/ten_thousand_hashes 4.9±0.08s 5.4±0.16s +10.20%

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.

update resolve_entry_point logic to support vyper update get_resolved_selectors logic to support vyper, huff
1 participant