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

Authority node #70

Merged
merged 48 commits into from
Dec 10, 2019
Merged

Authority node #70

merged 48 commits into from
Dec 10, 2019

Conversation

nikzaugg
Copy link
Collaborator

@nikzaugg nikzaugg commented Dec 6, 2019

Okay boys, my little Docker experiment has arrived:

What's new:

  • two new projects
    • poa-blockchain: has all pre-created keyStore files for the parity blockchain and scripts to start multiple nodes
    • sealer: represent the actual sealer node with a frontend, backend and parity-node
  • we can now start sealer-nodes with valid accounts already on the chain (without booting up and down). This is done by adding the keyStore (JSON) files of the accounts.
  • i had to build the parity image with a Dockerfile as you can only docker run parity/parity as normal user, and I had to copy over key files... Docker: run parity as normal user openethereum/parity-ethereum#9689
  • A sealer-node is defined inside sealer/parity-node/docker-compose.yml file. A single node is started with run.sh <sealerNr:int>. This script will copy the chainspec.json and the needed keys inside the local folders. Then it will generate a temporary .env file with variables for the docker-compose.yml.
  • there are scripts to start and stop multiple containers poa-blockchain/scripts/dev-chain.sh
  • all separately created container with sealer/parity-node/docker-compose.yml are put on the same network (that took forever for me to realize xD i previously had all nodes running but apparently on different networks, such that they could never peer, even tough the RPC call was successful each time)
  • poa-blockchain/scripts/start-sealer.sh $1 runs the docker-compose.yml inside sealer. This spins up a frontend and backend. It's configured such that all requests from the frontend go to the correct backend. This can be done multiple times for different sealers.

TODO:

  • add READMEs and describe how to run all this
  • relay the buttons to the auth backend to register the wallet address
  • get the final chainspecs from the backend for 3 sealers and boot all nodes via CLI
  • maybe add script that will start three sealer nodes (3x frontend, 3x backend)... and then play through the registration phase etc...get the new chainpec... and then boot up the chain (with 3 nodes)

@ghost
Copy link

ghost commented Dec 6, 2019

DeepCode Report (#612be4)

DeepCode analyzed this pull request.
There is 1 new warning.

@nikzaugg nikzaugg force-pushed the authority-node branch 2 times, most recently from 124922c to 94779d6 Compare December 8, 2019 13:55
- frontend-container cann call backend container an trigger it to run a shell script
- cannot find other nodes
- don't commit /wallet/sealer*
- should be fetched from the auth backend
- dete dockrrode stuff
- remove dummy script
- /chainspec will fetch the chainspec and write it to a file
- /peer will trigger an RPC call to the running chain to register node
- updated /register, will read wallet address from keyStore file and send it to auth backend
- also subscribe to nr of sealers
- allow step change when enough sealers
- backend also needs .env file
@nikzaugg
Copy link
Collaborator Author

The following steps will be developed in a separate branch:

  • key generation
  • key submission to contract
  • tallying the votes
  • ...

@nikzaugg nikzaugg merged commit 98ad6b2 into master Dec 10, 2019
@nikzaugg nikzaugg deleted the authority-node branch December 10, 2019 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant