Skip to content

DevP2P protocol eth/68 Getblockheaders field overflow causes abnormal response #13931

@1033309821

Description

@1033309821

System information

Erigon version: erigon version 2.60.10-4dbe3432

OS & Version: Linux

Expected behaviour

During the EL client network layer differential test, it was found that geth and erigon did not check the skip field when processing the Getblockheaders message in the eth/68 protocol, resulting in a strange Blockheaders message being responded to, and 1024 identical Blockheaders were repeatedly returned. Other clients simply did not return any message.Moreover, the reverse process of the query would be caused by the excessive skip, so is the reverse field still needed?
In addition, when we fuzzy the Getblockheaders message, the Geth client will continue to output the "ERROR[12-25]11:29:30.7 Failed to read headers from freezer err="out of bounds" log information.

Actual behaviour

I think it should not return the message like other EL clients.

Backtrace

"Request": {
            "RequestId": 1392,
            "Origin": {
                "Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
                "Number": 2944
            },
            "Amount": 5524,
            "Skip": 18446744073709551615,
            "Reverse": true
        },
        "Response": {
            "RequestId": 1392,
            "BlockHeadersRequest": [
                {
                    "parentHash": "0xc26f8dd4ba0399c20addf53138120cbc1d60d3fb246d6a602ed90a126b66b298",
                    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
                    "miner": "0x8943545177806ed17b9f23f0a21ee5948ecaa776",
                    "stateRoot": "0x36597f31e1561a030994f7ebf5920cb55475ac9dd3f5471aa1d5e1457b55f44c",
                    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
                    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
                    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
                    "difficulty": "0x0",
                    "number": "0xb80",
                    "gasLimit": "0x1c9c380",
                    "gasUsed": "0x0",
                    "timestamp": "0x67b5c60a",
                    "extraData": "0xd883010e0d846765746888676f312e32332e34856c696e7578",
                    "mixHash": "0xd4e0f62fa97c907400c0846dd298c4619d4a95a7ee57c1739aa333a88184604c",
                    "nonce": "0x0000000000000000",
                    "baseFeePerGas": "0x7",
                    "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
                    "blobGasUsed": "0x0",
                    "excessBlobGas": "0x0",
                    "parentBeaconBlockRoot": "0x3c3bba824e33b1e0778c147d632580961b8310efb47e37018862585070ff25e3",
                    "requestsRoot": null,
                    "hash": "0xd4c795259629137f4ae069eaaa5cd41be33c8c96ccb172410148c998856cb30a"
                },
                {
                    "parentHash": "0xc26f8dd4ba0399c20addf53138120cbc1d60d3fb246d6a602ed90a126b66b298",
                    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
                    "miner": "0x8943545177806ed17b9f23f0a21ee5948ecaa776",
                    "stateRoot": "0x36597f31e1561a030994f7ebf5920cb55475ac9dd3f5471aa1d5e1457b55f44c",
                    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
                    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
                    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
                    "difficulty": "0x0",
                    "number": "0xb80",
                    "gasLimit": "0x1c9c380",
                    "gasUsed": "0x0",
                    "timestamp": "0x67b5c60a",
                    "extraData": "0xd883010e0d846765746888676f312e32332e34856c696e7578",
                    "mixHash": "0xd4e0f62fa97c907400c0846dd298c4619d4a95a7ee57c1739aa333a88184604c",
                    "nonce": "0x0000000000000000",
                    "baseFeePerGas": "0x7",
                    "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
                    "blobGasUsed": "0x0",
                    "excessBlobGas": "0x0",
                    "parentBeaconBlockRoot": "0x3c3bba824e33b1e0778c147d632580961b8310efb47e37018862585070ff25e3",
                    "requestsRoot": null,
                    "hash": "0xd4c795259629137f4ae069eaaa5cd41be33c8c96ccb172410148c998856cb30a"
                },

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions