Skip to content

The evm tool failed to dump the correct address #26945

@last-las

Description

@last-las

System information

Geth version: Erszbat(v1.11.5)
OS & Version: Linux

Steps to reproduce the behaviour

After make all, run following command:

./build/bin/evm --dump --code 600060006000f0600060006009f06c63ffffffff6000526004601cf3600052600d60006000f0 --sender 0x71660c4005ba85c37ccec55d0c4493e66fe775d3 --receiver 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 --value 0 run

Expected behaviour

geth version: v1.10.21

Dump following info:

{
    "root": "a7330b1fbb702ae9b10d3e6d37a39255c9351a19841bd54be4f04bc549330b93",
    "accounts": {
        "0x14d8508446f0786f5154b75b746fe3fe04962bb4": {
            "balance": "0",
            "nonce": 1,
            "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
            "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
            "key": "0xc36daef8aefc43de60e819ebec2f14dcd549ec19b53c98e594d7b909e80eac84"
        },
        "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": {
            "balance": "0",
            "nonce": 2,
            "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
            "codeHash": "0x3f9fba186ea61f95eb98cd0e709dd82d8f6971137d2bf56c016cc2853b76c92a",
            "code": "0x600060006000f0600060006009f06c63ffffffff6000526004601cf3600052600d60006000f0",
            "key": "0x7b5855bb92cd7f3f78137497df02f6ccb9badda93d9782e0f230c807ba728be0"
        },
        "0xc0fa401b022e4512921457f114d917cd08a1ea9b": {
            "balance": "0",
            "nonce": 1,
            "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
            "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
            "key": "0x775619ae9c207dfa4e82230a7d4ef0b0a97d738f18cb02dc22726b390f0d4ecf"
        }
    }
}

Actual behaviour

geth version: v1.11.5

{
    "root": "a7330b1fbb702ae9b10d3e6d37a39255c9351a19841bd54be4f04bc549330b93",
    "accounts": {
        "0x0000000000000000000000000000000000000000": {
            "balance": "0",
            "nonce": 1,
            "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
            "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
            "key": "0xc36daef8aefc43de60e819ebec2f14dcd549ec19b53c98e594d7b909e80eac84"
        }
    }
}

Details

The addrBytes here is always nil thus there is always one account(0x00..0) been dumped.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions