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

Starting a new PoA network with maximumEmptySteps fails with Stage 5 block verification failed -> InvalidStateRoot #10641

Closed
roderik opened this issue May 10, 2019 · 2 comments
Labels
A3-stale 🍃 Pull request did not receive any updates in a long time. No review needed at this stage. Close it. F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust. P5-sometimesoon 🌲 Issue is worth doing soon.

Comments

@roderik
Copy link

roderik commented May 10, 2019

  • Parity Ethereum version: Parity-Ethereum/v2.5.0-beta-b52ac20-20190408/x86_64-linux-gnu/rustc1.33.0
  • Operating system: Docker
  • Installation: Docker
  • Fully synchronized: syncing issues
  • Network: new Aura PoA network
  • Restarted: yes

I'm setting up a new PoA network (of which I already have two running without issues) but I want to stop too many empty blocks from being mined.

Using the following chain spec and a completely empty start scenario, I cannot get a second node to agree that they are the same chain and sync.

{
  "name": "MintPerfNet",
  "engine": {
    "authorityRound": {
      "params": {
        "stepDuration": "3",
        "maximumUncleCountTransition": 0,
        "maximumUncleCount": 0,
        "emptyStepsTransition": 0,
        "maximumEmptySteps": 5,
        "blockReward": "0xDE0B6B3A7640000",
        "validators": {
          "multi": {
            "0": {
              "list": [
                "0x00e706c66844123e36caa65596cb0cee87e9148b",
                "0x009b9dac6c1924a8b93116a4fa99f8c56c18b373"
              ]
            }
          }
        }
      }
    }
  },
  "params": {
    "gasLimitBoundDivisor": "0x400",
    "maximumExtraDataSize": "0x20",
    "minGasLimit": "0x1388",
    "networkID": "0x2325",
    "eip140Transition": "0x0",
    "eip211Transition": "0x0",
    "eip214Transition": "0x0",
    "eip658Transition": "0x0"
  },
  "genesis": {
    "seal": {
      "authorityRound": {
        "step": "0x0",
        "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
      }
    },
    "difficulty": "0x20000",
    "gasLimit": "0x5F5E100"
  },
  "accounts": {
    "0x0000000000000000000000000000000000000001": {
      "balance": "1",
      "builtin": {
        "name": "ecrecover",
        "pricing": { "linear": { "base": 3000, "word": 0 } }
      }
    },
    "0x0000000000000000000000000000000000000002": {
      "balance": "1",
      "builtin": {
        "name": "sha256",
        "pricing": { "linear": { "base": 60, "word": 12 } }
      }
    },
    "0x0000000000000000000000000000000000000003": {
      "balance": "1",
      "builtin": {
        "name": "ripemd160",
        "pricing": { "linear": { "base": 600, "word": 120 } }
      }
    },
    "0x0000000000000000000000000000000000000004": {
      "balance": "1",
      "builtin": {
        "name": "identity",
        "pricing": { "linear": { "base": 15, "word": 3 } }
      }
    },
    "0x0000000000000000000000000000000000000005": {
      "builtin": {
        "name": "modexp",
        "activate_at": "0x0",
        "pricing": { "modexp": { "divisor": 20 } }
      }
    },
    "0x0000000000000000000000000000000000000006": {
      "builtin": {
        "name": "alt_bn128_add",
        "activate_at": "0x0",
        "pricing": { "linear": { "base": 500, "word": 0 } }
      }
    },
    "0x0000000000000000000000000000000000000007": {
      "builtin": {
        "name": "alt_bn128_mul",
        "activate_at": "0x0",
        "pricing": { "linear": { "base": 40000, "word": 0 } }
      }
    },
    "0x0000000000000000000000000000000000000008": {
      "builtin": {
        "name": "alt_bn128_pairing",
        "activate_at": "0x0",
        "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } }
      }
    },
    "0x00e706c66844123e36caa65596cb0cee87e9148b": {
      "balance": "1606938044258990275541962092341162602522202993782792835301376"
    },
    "0x009b9dac6c1924a8b93116a4fa99f8c56c18b373": {
      "balance": "1606938044258990275541962092341162602522202993782792835301376"
    },
    "0x002be3076c9b8d304922b29639b9f486c8643af8": {
      "balance": "1606938044258990275541962092341162602522202993782792835301376"
    },
    "0x0065c7c895af2f707c6cfaafca8d9cec6538e08f": {
      "balance": "1606938044258990275541962092341162602522202993782792835301376"
    }
  }
}

It errors out on node 2 with Stage 5 block verification failed -> InvalidStateRoot, see below.

When I start the network without

        "emptyStepsTransition": 0,
        "maximumEmptySteps": 5,

I can connect all the nodes together and they sync as expected.

I also tried to do this, and then add it back in from block 150. All nodes were upgraded before 150 and syncing until 149. From 150 on the nodes that did not mine the block, the same error below occurred.

        "emptyStepsTransition": 150,
        "maximumEmptySteps": 5,
ethereum_1              | 2019-05-10 09:33:06 UTC Stage 5 block verification failed for #150 (0x3979…ad7c)
ethereum_1              | Error: Error(Block(InvalidStateRoot(Mismatch { expected: 0x8897b4d0449f9d3e3ea6c78638255d828869fa211a2bd75076d67ed51c2fa395, found: 0x40fae8dff1247b36b6c701ff61c3e341aa7d92e42773861fa8a787b9b81ea80a })), State { next_error: None, backtrace: InternalBacktrace { backtrace: Some(stack backtrace:
ethereum_1              |    0:     0x5593df7684cd - <no info>
ethereum_1              |    1:     0x5593df766d92 - <no info>
ethereum_1              |    2:     0x5593df4b7c38 - <no info>
ethereum_1              |    3:     0x5593df4b7f65 - <no info>
ethereum_1              |    4:     0x5593def3db46 - <no info>
ethereum_1              |    5:     0x5593dee7cc6f - <no info>
ethereum_1              |    6:     0x5593ded83470 - <no info>
ethereum_1              |    7:     0x5593de7a8a10 - <no info>
ethereum_1              |    8:     0x5593dee384b9 - <no info>
ethereum_1              |    9:     0x5593dedfe278 - <no info>
ethereum_1              |   10:     0x5593dee0058c - <no info>
ethereum_1              |   11:     0x5593dee279ca - <no info>
ethereum_1              |   12:     0x5593def65f0d - <no info>
ethereum_1              |   13:     0x5593df7e2539 - <no info>
ethereum_1              |   14:     0x5593dee6cb7e - <no info>
ethereum_1              |   15:     0x5593df7e18ad - <no info>
ethereum_1              |   16:     0x7f441cce46b9 - <no info>
ethereum_1              |   17:     0x7f441c80441c - <no info>
ethereum_1              |   18:                0x0 - <no info>) } })
ethereum_1              | 2019-05-10 09:33:06 UTC 
ethereum_1              | Bad block detected: Error(Block(InvalidStateRoot(Mismatch { expected: 0x8897b4d0449f9d3e3ea6c78638255d828869fa211a2bd75076d67ed51c2fa395, found: 0x40fae8dff1247b36b6c701ff61c3e341aa7d92e42773861fa8a787b9b81ea80a })), State { next_error: None, backtrace: InternalBacktrace { backtrace: Some(stack backtrace:
ethereum_1              |    0:     0x5593df7684cd - <no info>
ethereum_1              |    1:     0x5593df766d92 - <no info>
ethereum_1              |    2:     0x5593df4b7c38 - <no info>
ethereum_1              |    3:     0x5593df4b7f65 - <no info>
ethereum_1              |    4:     0x5593def3db46 - <no info>
ethereum_1              |    5:     0x5593dee7cc6f - <no info>
ethereum_1              |    6:     0x5593ded83470 - <no info>
ethereum_1              |    7:     0x5593de7a8a10 - <no info>
ethereum_1              |    8:     0x5593dee384b9 - <no info>
ethereum_1              |    9:     0x5593dedfe278 - <no info>
ethereum_1              |   10:     0x5593dee0058c - <no info>
ethereum_1              |   11:     0x5593dee279ca - <no info>
ethereum_1              |   12:     0x5593def65f0d - <no info>
ethereum_1              |   13:     0x5593df7e2539 - <no info>
ethereum_1              |   14:     0x5593dee6cb7e - <no info>
ethereum_1              |   15:     0x5593df7e18ad - <no info>
ethereum_1              |   16:     0x7f441cce46b9 - <no info>
ethereum_1              |   17:     0x7f441c80441c - <no info>
ethereum_1              |   18:                0x0 - <no info>) } })
ethereum_1              | RLP: f903bdf903b8a0e6714f2b962d91b6c1fbf7694d70bef6a2d53e055d450b5476b17fa9123f941ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479400e706c66844123e36caa65596cb0cee87e9148ba08897b4d0449f9d3e3ea6c78638255d828869fa211a2bd75076d67ed51c2fa395a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090fffffffffffffffffffffffffffffffe819684052f83c080845cd545529fde830205008f5061726974792d457468657265756d86312e33332e30826c69841ef1c1c6b841b7e17357ef8274aff183a3603a67117ede8b0692b19da0c335558c65cbbffb5f650e60307155d5f9fca9222d0ca51406220298e1cd66f8bbd8da6ad837ceddfa00f90172f848b841f415cd69438473cce436396648ec93904696dea907903d3b6ba295668f57890510943f607b7503b6efcd50c1b7ae71e783488ba6ee4e2980b22c4c0c0717967d00841ef1c1c1f848b841c7e1dee405989967737b3c783dec11a341e604f3c741e0c43fa5b0e972e7e84666492ca151c99a3419797de626df1e7f0756cdde275bb0e2bdb58f575392bbe001841ef1c1c2f848b84167acd69fd3a176043cda6452927835e456fc000516c52817224f21f4977d43f12187b1ebfd1cfd99a5e1488853e0d93109210d164151e15352876886c599ef8700841ef1c1c3f848b8417601fa7e4b6463c2c9e7ddb0564a2a6f2b20eb93496749eb3bb09c4d98dcd6b5669506c0c5be878d2f904cd9ff512a0c13eb76cd19673a705306611f32fe2c7901841ef1c1c4f848b841c36b6ba62f297c0cdca78bc0ddbf885f2ba226b04e113b18bba60cfdcfeb6190060a3d31e4f40615c218f65ac1fe859d29d5df2ea50a01a77e7d8c5936eb3c1d00841ef1c1c5c0c0
ethereum_1              | Header: Header { parent_hash: 0xe6714f2b962d91b6c1fbf7694d70bef6a2d53e055d450b5476b17fa9123f941e, timestamp: 1557480786, number: 150, author: 0x00e706c66844123e36caa65596cb0cee87e9148b, transactions_root: 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421, uncles_hash: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347, extra_data: [222, 131, 2, 5, 0, 143, 80, 97, 114, 105, 116, 121, 45, 69, 116, 104, 101, 114, 101, 117, 109, 134, 49, 46, 51, 51, 46, 48, 130, 108, 105], state_root: 0x8897b4d0449f9d3e3ea6c78638255d828869fa211a2bd75076d67ed51c2fa395, receipts_root: 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421, log_bloom: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, gas_used: 0, gas_limit: 87000000, difficulty: 340282366920938463463374607431768211454, seal: [[132, 30, 241, 193, 198], [184, 65, 183, 225, 115, 87, 239, 130, 116, 175, 241, 131, 163, 96, 58, 103, 17, 126, 222, 139, 6, 146, 177, 157, 160, 195, 53, 85, 140, 101, 203, 191, 251, 95, 101, 14, 96, 48, 113, 85, 213, 249, 252, 169, 34, 45, 12, 165, 20, 6, 34, 2, 152, 225, 205, 102, 248, 187, 216, 218, 106, 216, 55, 206, 221, 250, 0], [249, 1, 114, 248, 72, 184, 65, 244, 21, 205, 105, 67, 132, 115, 204, 228, 54, 57, 102, 72, 236, 147, 144, 70, 150, 222, 169, 7, 144, 61, 59, 107, 162, 149, 102, 143, 87, 137, 5, 16, 148, 63, 96, 123, 117, 3, 182, 239, 205, 80, 193, 183, 174, 113, 231, 131, 72, 139, 166, 238, 78, 41, 128, 178, 44, 76, 12, 7, 23, 150, 125, 0, 132, 30, 241, 193, 193, 248, 72, 184, 65, 199, 225, 222, 228, 5, 152, 153, 103, 115, 123, 60, 120, 61, 236, 17, 163, 65, 230, 4, 243, 199, 65, 224, 196, 63, 165, 176, 233, 114, 231, 232, 70, 102, 73, 44, 161, 81, 201, 154, 52, 25, 121, 125, 230, 38, 223, 30, 127, 7, 86, 205, 222, 39, 91, 176, 226, 189, 181, 143, 87, 83, 146, 187, 224, 1, 132, 30, 241, 193, 194, 248, 72, 184, 65, 103, 172, 214, 159, 211, 161, 118, 4, 60, 218, 100, 82, 146, 120, 53, 228, 86, 252, 0, 5, 22, 197, 40, 23, 34, 79, 33, 244, 151, 125, 67, 241, 33, 135, 177, 235, 253, 28, 253, 153, 165, 225, 72, 136, 83, 224, 217, 49, 9, 33, 13, 22, 65, 81, 225, 83, 82, 135, 104, 134, 197, 153, 239, 135, 0, 132, 30, 241, 193, 195, 248, 72, 184, 65, 118, 1, 250, 126, 75, 100, 99, 194, 201, 231, 221, 176, 86, 74, 42, 111, 43, 32, 235, 147, 73, 103, 73, 235, 59, 176, 156, 77, 152, 220, 214, 181, 102, 149, 6, 192, 197, 190, 135, 141, 47, 144, 76, 217, 255, 81, 42, 12, 19, 235, 118, 205, 25, 103, 58, 112, 83, 6, 97, 31, 50, 254, 44, 121, 1, 132, 30, 241, 193, 196, 248, 72, 184, 65, 195, 107, 107, 166, 47, 41, 124, 12, 220, 167, 139, 192, 221, 191, 136, 95, 43, 162, 38, 176, 78, 17, 59, 24, 187, 166, 12, 253, 207, 235, 97, 144, 6, 10, 61, 49, 228, 244, 6, 21, 194, 24, 246, 90, 193, 254, 133, 157, 41, 213, 223, 46, 165, 10, 1, 167, 126, 125, 140, 89, 54, 235, 60, 29, 0, 132, 30, 241, 193, 197]], hash: Some(0x3979d00a5c56ee6efe89a673051d3ae4acf1d62ccd9c49de9cee79682c08ad7c) }
ethereum_1              | Uncles: 
ethereum_1              | Transactions:
ethereum_1              | 
ethereum_1              | 2019-05-10 09:33:25 UTC    3/25 peers    156 KiB chain 408 bytes db  0 bytes queue   43 KiB sync  RPC:  0 conn,    3 req/s,   67 µs```
@jam10o-new jam10o-new added F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust. labels May 10, 2019
@jam10o-new jam10o-new added this to the 2.6 milestone May 10, 2019
@roderik
Copy link
Author

roderik commented Jun 2, 2019

Hi all, just wanted to touch base on this issue and see if we can get it assigned?

@jam10o-new jam10o-new added the P5-sometimesoon 🌲 Issue is worth doing soon. label Jun 2, 2019
@ordian ordian modified the milestones: 2.6, 2.7 Jul 12, 2019
@aawaken
Copy link

aawaken commented Dec 5, 2019

Hello! Any updates on this? Is it already fixed in 2.6?

@adria0 adria0 added the A3-stale 🍃 Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 27, 2020
@adria0 adria0 closed this as completed Jul 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A3-stale 🍃 Pull request did not receive any updates in a long time. No review needed at this stage. Close it. F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust. P5-sometimesoon 🌲 Issue is worth doing soon.
Projects
None yet
Development

No branches or pull requests

5 participants