1

What is the format of the Clique PoA genesis extradata field to set up the sealers?

This is an example: "extraData": "0x000000000000000000000000000000000000000000000000000000000000000009b0888de6f7a33791d41b7041c71deef6c92d7616f5cf972fa3a9d139d1777387f06b073d99b43864ef6834ac2e543fb8c747b02a55087be4f955ac6a3a944c6c69fb1c2efb7f0593c1a1c6f406c95cb8f46fa71b33acddb030df8ef86efa305090f0f30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",

In the middle, all the sealers are stuck. I know we need to add zeros to left and right, but how many?

  • 2
    I've played with this in the past and not had much luck. I believe that manually adding or removing these addresses will only work when you start a new network. – danielcooperxyz Apr 10 at 13:07
  • 1
    Yes once you started a network with a given genesis block, you can't change it. This file defines how block zero is generated, so once network is started, block zero is immutable. – Nicolas Massart Sep 11 at 14:56
1

Clique extradata field, used to define PoA validators/sealers must match the following format:

  • First part: 32bytes vanity, meaning whatever you want here since it's expressed as an hex string (64 chars long as one byte is 2 chars), here in the example it's just zeros.
  • Second part: concatenated list of sealers/validators nodes addresses. Each address written as hex string without the "0x" prefix and must be 20 bytes long (40 chars long as one byte is 2 chars).
  • Third part: a 65 bytes signature suffix called proposer seal. It's used to identify the proposer of the new validator in a block. Given we talk here about the genesis file, this seal has no reason to be because no specific node proposed it, it's the base on which everyone agree before starting. So it must be filled with zeros (65 zeros).

References:

Clique EIP: https://github.com/ethereum/EIPs/issues/650 Codebases:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.