ethereum-pocr / ethereum-pocr.github.io

Apache License 2.0
4 stars 0 forks source link

Vue auditor #3

Closed rpuccine closed 2 years ago

guenoledc commented 2 years ago

@khaounen

Note that in this last commit https://github.com/ethereum-pocr/ethereum-pocr.github.io/pull/3/commits/10c26b53205c214dbe07001ac05a3ece8c277c8e I have added a mechanism to update the genesis file from the smart contract compilation

in the build.sh I have added

  export SMART_CONTRACT_BYTECODE=$(node extract-bytecode.js)
  export GIT_HEAD_HASH=$(git rev-parse  HEAD)
  node inject-bytecode.js ../pocr-network/genesis/saturndev-all-sealers-authorized.json 

First line is to extract the byte code of the governance smart contract
Second line is to get the hash of the commit
Last line is to inject both into the genesis file given in parameter, the hash goes into the nonce of the genesis block to ensure we get a different genesis hash every time we restart the network.
Also, if the GIT_HEAD_HASH is not present in the script, it calculates the hash of the bytecode instead.

So this is the line to run on the kerleano network instead of the substenv logic