Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

PoA: Several authority nodes fork blockchain #1075

Closed
dmitrychepel opened this issue May 11, 2016 · 3 comments
Closed

PoA: Several authority nodes fork blockchain #1075

dmitrychepel opened this issue May 11, 2016 · 3 comments
Labels
F2-bug 🐞 The client fails to follow expected behavior. Z8-wontfix 🙅‍♀️ Issue is in principle valid, but this project will not address it. Closer should explain why.

Comments

@dmitrychepel
Copy link

Setup own environment with two "parity" nodes that was setup as authority nodes and use PoA.
Send transactions to both nodes.
As result I see two forks of blockchain.
Sometimes nodes do resolve blockchain conflict. in this situation some transactions could be lost.
In the logs I see following entry:
2016-05-11 15:40:11 WARN:ethminer::miner: prepare_sealing: ERROR: could not import internally sealed block. WTF?

@gavofyork gavofyork added the F2-bug 🐞 The client fails to follow expected behavior. label May 12, 2016
@gavofyork
Copy link
Contributor

looks like a bug with the syncing code, since restarting one of the nodes will make them resync properly.

to reproduce:

cargo run -- account new --datadir /tmp/node0 # = KEY0
cargo run -- account new --datadir /tmp/node1 # = KEY1
cargo run -- --jsonrpc-port 8545 --ipc-off --webapp-port 8080 --unlock KEY0 --password WHATEVER --chain chain.json --author KEY0 --datadir /tmp/node0 --port 30300 --bootnodes enode://[email protected]:30301
cargo run -- --jsonrpc-port 8546 --ipc-off --webapp-port 8081 --unlock KEY1 --password WHATEVER --chain chain.json --author KEY1 --datadir /tmp/node1 --port 30301 --bootnodes enode://[email protected]:30300

then executing in the JS env of http://localhost:8080:

web3.eth.defaultAccount = "KEY0"
web3.eth.sendTransaction({to: "KEY1", value: 1})

and in http://localhost:8081:

web3.eth.defaultAccount = "KEY1"
web3.eth.sendTransaction({to: "KEY0", value: 1})

with chain.json:

{
    "name": "TestAuthority",
    "engine": {
        "BasicAuthority": {
            "params": {
                "gasLimitBoundDivisor": "0x0400",
                "durationLimit": "0x0d",
                "authorities" : ["KEY0", "KEY1"]
            }
        }
    },
    "params": {
        "accountStartNonce": "0x0100000",
        "maximumExtraDataSize": "0x20",
        "minGasLimit": "0x1388",
        "networkID" : "0x69"
    },
    "genesis": {
        "seal": {
            "generic": {
                "fields": 1,
                "rlp": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"
            }
        },
        "difficulty": "0x20000",
        "author": "0x0000000000000000000000000000000000000000",
        "timestamp": "0x00",
        "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "extraData": "0x",
        "gasLimit": "0x2fefd8"
    },
    "accounts": {}
}

@arkpar arkpar self-assigned this May 16, 2016
@gavofyork
Copy link
Contributor

gavofyork commented May 22, 2016

might with a bit better now that #1095 is in...

@gavofyork gavofyork added the P9-somedaymaybe 🌞 Issue might be worth doing eventually. label May 31, 2016
@arkpar arkpar removed the P9-somedaymaybe 🌞 Issue might be worth doing eventually. label Jun 24, 2016
@arkpar arkpar added this to the 1.3 Civility milestone Jun 24, 2016
@gavofyork gavofyork modified the milestone: 1.4 ??? Jun 25, 2016
@arkpar arkpar removed their assignment Jul 29, 2016
@gavofyork gavofyork added the Z8-wontfix 🙅‍♀️ Issue is in principle valid, but this project will not address it. Closer should explain why. label Aug 1, 2016
@gavofyork
Copy link
Contributor

we'll be adding a much better PoA algorithm in the mid-term, so will be deprecating the existing one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. Z8-wontfix 🙅‍♀️ Issue is in principle valid, but this project will not address it. Closer should explain why.
Projects
None yet
Development

No branches or pull requests

3 participants