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

Parity panics on networkID: 0? #8345

Closed
shisoft opened this issue Apr 10, 2018 · 8 comments · Fixed by #9815
Closed

Parity panics on networkID: 0? #8345

shisoft opened this issue Apr 10, 2018 · 8 comments · Fixed by #9815
Labels
F1-panic 🔨 The client panics and exits without proper error handling. M2-config 📂 Chain specifications and node configurations. P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Milestone

Comments

@shisoft
Copy link

shisoft commented Apr 10, 2018

I'm running:

  • Which Parity version?: Parity/v1.9.5-stable-ff821da-20180321/x86_64-linux-gnu/rustc1.24.1
  • How installed?: deb in docker
  • Are you fully synchronized?: yes
  • Which network are you connected to?: Private AuthorityRound engine
  • Did you try to restart the node?: yes

I am getting this panic on an account defined in chain spec. The account was created in a placeholder chain spec through command line and then copy to the actual authority chain key folder before started.

This happened every time I tried to transfer balance to another account and parity wallet asked me to sign the transaction.

When I tring to repeat this, it occurs all the time.

Error in question:
panicked at 'Transaction was signed by AccountsProvider; it never produces invalid signatures; qed: Ethkey(InvalidSignature)'

@Tbaut Tbaut added P5-sometimesoon 🌲 Issue is worth doing soon. F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M2-config 📂 Chain specifications and node configurations. labels Apr 10, 2018
@Tbaut Tbaut added this to the 1.11 milestone Apr 10, 2018
@Tbaut
Copy link
Contributor

Tbaut commented Apr 10, 2018

The steps to reproduce your issue aren't clear to me. Could you please describe your setup and provide your chain spec ?

@debris
Copy link
Collaborator

debris commented Apr 10, 2018

It was already reported in #7302

@shisoft
Copy link
Author

shisoft commented Apr 10, 2018

My chain spec is.

The account 0x25dc526a6cd43059979101867d0f250344c8ffb6 is the one cause this panic.

{
  "name": "parity-net",
  "engine": {
    "authorityRound": {
      "params": {
        "stepDuration": "5",
        "validators": {
          "list": [
            "0x4bc39aeb7fa35cae4243279b0903c7c057b34c07",
            "0x16fb22f3c2a25d687ca4cc1b94d79ad74570da1a",
            "0x171bc702052c4a925f06af3aca19158ac5b34261"
          ]
        }
      }
    }
  },
  "params": {
    "gasLimitBoundDivisor": 1024,
    "maximumExtraDataSize": 32,
    "minGasLimit": 5000,
    "networkID": 0
  },
  "genesis": {
    "seal": {
      "authorityRound": {
        "step": 0,
        "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
      }
    },
    "difficulty": 200000000,
    "gasLimit": 2100000
  },
  "accounts": {
    "0x25dc526a6cd43059979101867d0f250344c8ffb6": {
      "balance": "9223372036854775807"
    },
    "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
          }
        }
      }
    }
  }
}

The account private key files were created under another chain spec with different name and then copied to this chain.

@Tbaut Tbaut added F1-panic 🔨 The client panics and exits without proper error handling. and removed F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. labels Apr 10, 2018
@Yonom
Copy link

Yonom commented Apr 23, 2018

Hey,

"networkID": 0

Pick another number! Parity doesn't like networkID 0

@5chdn 5chdn modified the milestones: 1.11, 1.12 Apr 24, 2018
@folsen folsen changed the title panicked at 'Transaction was signed by AccountsProvider; it never produces invalid signatures; qed: Ethkey(InvalidSignature)' Parity panics on networkID: 0? May 21, 2018
@5chdn 5chdn added the Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. label Jun 23, 2018
@5chdn
Copy link
Contributor

5chdn commented Jun 23, 2018

Pull requests welcome :)

@debris
Copy link
Collaborator

debris commented Jun 26, 2018

Hey,

"networkID": 0

Pick another number! Parity doesn't like networkID 0

I'm not sure I understand. @folsen how networkID is related to the reported issue?

@folsen
Copy link
Contributor

folsen commented Jun 27, 2018

@debris me either :S I just went by the last report, it may be inaccurate, that's why I also put it in needs investigation

@5chdn 5chdn modified the milestones: 2.0, 2.1 Jul 17, 2018
@5chdn 5chdn modified the milestones: 2.1, 2.2 Sep 11, 2018
@seunlanlege
Copy link
Member

networkID is also used as a chain_id for chain replay protection, a chain_id of 0 causes undefined behaviour in the signing process.

The fix here would be to prevent a 0 value for networkID so in the future people don't run into this issue.

seunlanlege added a commit that referenced this issue Oct 16, 2018
seunlanlege added a commit that referenced this issue Oct 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F1-panic 🔨 The client panics and exits without proper error handling. M2-config 📂 Chain specifications and node configurations. P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants