Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genesis with aura setup #2

Closed
blazejkrzak opened this issue Sep 14, 2020 · 7 comments
Closed

Genesis with aura setup #2

blazejkrzak opened this issue Sep 14, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@blazejkrzak
Copy link

blazejkrzak commented Sep 14, 2020

As a developer
I should be able to setup an aura consensus
Within genesis.json file
So I should implement parser and tests for that, and compare it against parity block

Mentioned in:
https://openethereum.github.io/wiki/Demo-PoA-tutorial
goerli#31

Tools to use:
rlpdump

@blazejkrzak blazejkrzak added the enhancement New feature or request label Sep 14, 2020
@blazejkrzak
Copy link
Author

Imho it can be split onto smaller issues

@blazejkrzak
Copy link
Author

blazejkrzak commented Sep 15, 2020

  • transcode it to genesis.json file that match 1:1

@blazejkrzak blazejkrzak assigned mxmar and blazejkrzak and unassigned atif-konasl Sep 15, 2020
@blazejkrzak
Copy link
Author

blazejkrzak commented Sep 15, 2020

eth.getBlock("0") could solve the issue.
Outcome was pushed into https://github.com/lukso-network/go-ethereum/tree/feature/11/basic-tests-against-goerli-aura

@mxmar
Copy link

mxmar commented Sep 24, 2020

  • Parser works
  • Tests are passing
  • Tested parity and geth configs separatly
  • Connection to L15 test network with parity client and config with timestamp="0x0"

@mxmar
Copy link

mxmar commented Sep 24, 2020

Connected to L15 from localhost by:
./openethereum --config parity.toml

The parity.toml file:

interface = "all"
port = 9655
apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"]
[websockets]
port = 8451
[network]
port = 30301
bootnodes = [
"enode://f73ca3cc5512041e35fc0aa89fee71af8cee9c678dbc8c0c4540655a3d540c3180aed8859ef3d998f30523f499d66caec75f4fb82c6acfec76641f91f5557390@35.234.103.138:30303",
"enode://2a85c28c49d67abe8d9fba63355334e43c7f445e48c8f4ad8f4ae97e8b2ef31502d0f9e9e3dbd32da2ee5a80ae93d6e2eb96f74d77b632e93ac80af7fb298f93@34.107.102.7:30303"
]
interface = "all"
[account]
password = ["node.pwds"]
[parity]
chain = "parity-spec.json"
base_path = "chain_data"

And parity-spec.json file:

{
  "name": "AuthorityRound",
  "engine": {
    "authorityRound": {
      "params": {
        "stepDuration": "5",
        "validators" : {
          "list": [
            "0x70ad1a5fba52e27173d23ad87ad97c9bbe249abf",
            "0xafe443af9d1504de4c2d486356c421c160fdd7b1"
          ]
        }
      }
    }
  },
  "params": {
    "gasLimitBoundDivisor": "0x400",
    "maximumExtraDataSize": "0x20",
    "minGasLimit": "0x1388",
    "networkID" : "0x2323"
  },
  "genesis": {
    "seal": {
      "authorityRound": {
        "step": "0x0",
        "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
      }
    },
    "difficulty": "0x20000",
    "author": "0x0000000000000000000000000000000000000000",
    "timestamp": "0x00",
    "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "extraData": "0x",
    "gasLimit": "0x222222"
  },
  "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 } } } }
  }
}

@mxmar
Copy link

mxmar commented Sep 24, 2020

  • Test connection to L15 with output of spec, err := NewParityChainSpec("AuthorityRound", &genesisGeth, nil)

Output config file:

{
  "name": "AuthorityRound",
  "engine": {
    "authorityRound": {
      "params": {
        "stepDuration": "5",
        "validators": {
          "list": [
            "0x70ad1a5fba52e27173d23ad87ad97c9bbe249abf",
            "0xafe443af9d1504de4c2d486356c421c160fdd7b1"
          ]
        }
      }
    }
  },
  "params": {
    "maximumExtraDataSize": "0x20",
    "minGasLimit": "0x1388",
    "gasLimitBoundDivisor": "0x400",
    "networkID": "0x2323",
    "maxCodeSize": null,
    "eip155Transition": null,
    "eip98Transition": null,
    "eip140Transition": null,
    "eip211Transition": null,
    "eip214Transition": null,
    "eip658Transition": null
  },
  "genesis": {
    "seal": {
      "authorityRound": {
        "step": "0x0",
        "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
      }
    },
    "difficulty": "0x20000",
    "author": "0x0000000000000000000000000000000000000000",
    "timestamp": 0,
    "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "extraData": "0x",
    "gasLimit": "0x222222"
  },
  "nodes": null,
  "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
          }
        }
      }
    }
  }
}

@mxmar
Copy link

mxmar commented Sep 24, 2020

I've changed backend to generate Seal config like:

"seal": {
      "authorityRound": {
        "step": "0x0",
        "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
      }
    },

So the parity-spec.json looks like:

{
  "name": "AuthorityRound",
  "engine": {
    "authorityRound": {
      "params": {
        "stepDuration": "5",
        "validators": {
          "list": [
            "0x70ad1a5fba52e27173d23ad87ad97c9bbe249abf",
            "0xafe443af9d1504de4c2d486356c421c160fdd7b1"
          ]
        }
      }
    }
  },
  "params": {
    "maximumExtraDataSize": "0x20",
    "minGasLimit": "0x1388",
    "gasLimitBoundDivisor": "0x400",
    "networkID": "0x2323",
    "maxCodeSize": null,
    "eip155Transition": null,
    "eip98Transition": null,
    "eip140Transition": null,
    "eip211Transition": null,
    "eip214Transition": null,
    "eip658Transition": null
  },
  "genesis": {
    "seal": {
      "authorityRound": {
        "step": "0x00",
        "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
      }
    },
    "difficulty": "0x20000",
    "author": "0x0000000000000000000000000000000000000000",
    "timestamp": 0,
    "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "extraData": "0x",
    "gasLimit": "0x222222"
  },
  "nodes": null,
  "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
          }
        }
      }
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants