GithubHelp home page GithubHelp logo

Wrong example in doc about ityfuzz HOT 2 CLOSED

jf-li00 avatar jf-li00 commented on September 27, 2024
Wrong example in doc

from ityfuzz.

Comments (2)

jf-li00 avatar jf-li00 commented on September 27, 2024

I printed the EvmArgs parsed from cli args in evm_main and there's an intresting phenomenon.
With the -o arg(the current version in the doc):

EvmArgs {
    target: "none",
    fetch_tx_data: false,
    proxy_address: "http://localhost:5001/data",
    constructor_args: "",
    target_type: None,
    chain_type: None,
    onchain_block_number: None,
    onchain_url: None,
    onchain_chain_id: None,
    onchain_explorer_url: None,
    onchain_chain_name: None,
    onchain_etherscan_api_key: None,
    onchain_storage_fetching: "onebyone",
    concolic: false,
    concolic_caller: false,
    concolic_timeout: 1000,
    concolic_num_threads: 0,
    flashloan: false,
    panic_on_bug: false,
    detectors: "high_confidence",
    replay_file: None,
    work_dir: "work_dir",
    write_relationship: false,
    run_forever: false,
    seed: 1667840158231589000,
    sha3_bypass: false,
    only_fuzz: "",
    base_path: "",
    spec_id: "Latest",
    onchain_builder: "",
    onchain_replacements_file: "",
    builder_artifacts_url: "",
    builder_artifacts_file: "",
    offchain_config_url: "",
    offchain_config_file: "",
    load_corpus: "",
    setup_file: "",
    deployment_script: "",
    force_abi: "",
    base_directory: "",
    build_command: [
        "-o",
        "-t",
        "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "--onchain-block-number",
        "0",
        "-c",
        "ETH",
        "--onchain-etherscan-api-key",
        <Etherscan API Key>,
        "-f",
    ],
}

Without -o arg (The version I fixed):

EvmArgs {
    target: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    fetch_tx_data: false,
    proxy_address: "http://localhost:5001/data",
    constructor_args: "",
    target_type: None,
    chain_type: Some(
        "ETH",
    ),
    onchain_block_number: Some(
        0,
    ),
    onchain_url: None,
    onchain_chain_id: None,
    onchain_explorer_url: None,
    onchain_chain_name: None,
    onchain_etherscan_api_key: Some(
          <Etherscan API Key>,
    ),
    onchain_storage_fetching: "onebyone",
    concolic: false,
    concolic_caller: false,
    concolic_timeout: 1000,
    concolic_num_threads: 0,
    flashloan: true,
    panic_on_bug: false,
    detectors: "high_confidence",
    replay_file: None,
    work_dir: "work_dir",
    write_relationship: false,
    run_forever: false,
    seed: 1667840158231589000,
    sha3_bypass: false,
    only_fuzz: "",
    base_path: "",
    spec_id: "Latest",
    onchain_builder: "",
    onchain_replacements_file: "",
    builder_artifacts_url: "",
    builder_artifacts_file: "",
    offchain_config_url: "",
    offchain_config_file: "",
    load_corpus: "",
    setup_file: "",
    deployment_script: "",
    force_abi: "",
    base_directory: "",
    build_command: [],
}

It seems that all the args goes to the last build_command array.

Then I looked up the definition of EvmArgs, and foud build_command has a type of Vec<String>. So I guess the -o arg is not recognized by the EvmArgs struct and somehow it falls back to the build_command vector, which makes all other args placed in the build_command
image

from ityfuzz.

jf-li00 avatar jf-li00 commented on September 27, 2024

And I found that in backtesting.md which stores several examples to launch ityfuzz have the same problem. I looked the commit(20c10b3) that introduced those example, and saw a member of EvmArgs called onchain:
image
I guess maybe the -o arg is onchain for short and that arg is now decrypted. When I try those commands in backtesting.md, I encountered the same problem I mentioned above, so I removed all the -o arg in backtesting.md to fix the problem. But I don't know if there's any further impact on the document due to the decryption of the onchain arg.

from ityfuzz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.