Consensys/quorum

Istanbul-tools not allowing a transaction to be added

Luker501 opened this issue · 5 comments

System information

Geth version: geth version
Version: 1.7.2-stable
Git Commit: 4342438
Quorum Version: 2.0.2

OS & Version: Windows/Linux/OSX
Architecture: amd64
Network Id: 1
Go Version: go1.10.3
Operating System: linux

Branch, Commit Hash or Release: git status
See above

Expected behaviour

After following https://github.com/jpmorganchase/quorum/wiki/From-Scratch to create a Quorum network with multiple nodes, you should be able to add a transaction to the blockchain, but you cannot

Actual behaviour

The nodes will connect and start creating blocks, but no transaction can be placed on the chain. An error of invalid sender will always be returned. See here for further info: https://ethereum.stackexchange.com/questions/69043/invalid-sender-when-using-quorum

Steps to reproduce the behaviour

following https://github.com/jpmorganchase/quorum/wiki/From-Scratch to create a Quorum network with multiple validator nodes (I did 4).

Backtrace

[backtrace]

Note that I solved this issue by analysing the 7-node example and realising that the config section of the genesis file needs to have

"eip150Block": 2,
       "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
       "eip155Block": 0,
       "eip158Block": 3,
       "byzantiumBlock": 1,
       "istanbul": {
           "epoch": 30000,
           "policy": 0
       },
       "isQuorum": true

but istanbul setup generates different numbers. Note that I am not sure exactly what parameter allows me to add transactions but it is one of the above.

So I believe that istanbul-tools needs to be changes so that the correct parameters are generated in the first place.

istanbul-tools is generic for ethereum, so it doesn't generate a genesis specific to quorum, and some hand-crafting is expected. For example, the 'isQuorum' flag has to be added. Taking a istanbul-genesis.json copy from quorum-examples is a good solution.
Having said that, I just generated a genesis.json using istanbul-tools and it worked fine with quorum. The only change I had to make was to change extraData to have the correct validator node addresses.

However, I suggest you reach out to the istanbul-tools team on their github if you believe there is an issue with istanbul-tools.

Closing this ticket now, since you managed to resolve your issue.

Re-opening, so that Jitu can investigate why the failing genesis didn't work. Pasted here from stackexchange for completeness:

{
    "config": {
        "chainId": 20,
        "eip150Block": 1,
        "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "eip155Block": 1,
        "eip158Block": 1,
        "byzantiumBlock": 1,
        "istanbul": {
            "epoch": 30000,
            "policy": 0
        },
        "isQuorum": true
    },
    "nonce": "0x0",
    "timestamp": "0x5c9e3793",
    "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000f89af854947f2fb27d5bf950b3845e6a83161afcae1cf0823e94d7427ce2ebdbfbcf9a80c628df51af118faea25894965d1690307a389e5ac9c3a2abc6972786e01f8194d2209c0a0549cf4458764bf11433a6fe4054c730b8410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0",
    "gasLimit": "0xe0000000",
    "difficulty": "0x1",
    "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
    "coinbase": "0x0000000000000000000000000000000000000000",
    "alloc": {
        "7f2fb27d5bf950b3845e6a83161afcae1cf0823e": {
            "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
        },
        "965d1690307a389e5ac9c3a2abc6972786e01f81": {
            "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
        },
        "d2209c0a0549cf4458764bf11433a6fe4054c730": {
            "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
        },
        "d7427ce2ebdbfbcf9a80c628df51af118faea258": {
            "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
        },
        "6f42aa5c4b9ca57d264395f4eaa8b653bb83047e": {
            "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
        },
        "5449199af0e2c3d59b35ebabb926a2dae6e2fba4": {
            "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
        },
        "5449199af0e2c3d59b35ebabb926a2dae6e2fba4": {
            "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
        },
        "6aa89d734ea689c05baa5833459e768dfb6cb54d": {
            "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
        }
    },
    "number": "0x0",
    "gasUsed": "0x0",
    "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

Hi @Luker501, it looks like you are using a version of geth just before EIP155 changes were merged in and that was causing the invalid sender error message.

I was able to reproduce the issue you were having when I checked out quorum code for the commit version 4342438. Notice that the commit is from August 3rd 2018, where as EIP155 changes were merged in after that as part of PR #502. If you use a later version, you will have this issue. with your prior configuration