Update README, fixes
This commit is contained in:
parent
fb62f19879
commit
778073b8c4
52
README.md
52
README.md
|
@ -30,31 +30,63 @@
|
|||
4. Parity 1.9.2+
|
||||
|
||||
There are some options to start POA Network test setup depending on your needs:
|
||||
- [Start MoC node](#start-moc-node) - launches only MoC node, generates initial key, launches Ceremony Dapp
|
||||
- [Start MoC node](#start-moc-node) - launches only MoC node, generates initial key
|
||||
- [Launch DApps](#launch-dapps) - launches Ceremony, Validators, Governance DApps
|
||||
- [Launch Ceremony](#launch-ceremony) - holds Ceremony
|
||||
- [Start MoC node + e2e Ceremony test](#start-moc-node--e2e-ceremony-test) - launches only MoC node, generates initial key, launches Ceremony Dapp and generates production keys from it
|
||||
- [Start MoC + 1 validator nodes + e2e Ceremony test](#start-moc-one-validator-nodes--e2e-ceremony-test) - launches MoC node, generates initial key, launches Ceremony Dapp and generates production keys from it, launches 1 validator node, launches Validators Dapp
|
||||
|
||||
## Start MoC node
|
||||
## Basic scenarios
|
||||
|
||||
### Start MoC node
|
||||
1. `npm i`
|
||||
2. `npm run start-test-setup`
|
||||
|
||||
At the successful end of POA test setup start you'll see this message `### POA test setup is configured ###`
|
||||
|
||||
### Expected result:
|
||||
#### Expected results:
|
||||
- RPC of Parity node with unlocked MoC account will be on `http://localhost:8545`
|
||||
- Spec of the network is generated to `./spec` folder
|
||||
- MoC keystore file, password, private key is generated to `./keys/moc` folder
|
||||
- Initial key password, private key is generated to `.keys/initial_keys` folder
|
||||
- Parity config of MoC node is generated to `./nodes/parity-moc/moc.toml` file
|
||||
- Addresses of governance smart contracts are generated to `./submodules/poa-network-consensus-contracts/contracts.json`
|
||||
- ABI of smart contracts are generated to `./submodules/poa-network-consensus-contracts/build/contracts`
|
||||
- Ceremony Dapp is started on `http://localhost:3000`
|
||||
|
||||
## Start MoC node + e2e Ceremony test
|
||||
### Launch DApps
|
||||
|
||||
*Note*: can be started after [previous step is complited](#start-moc-node)
|
||||
|
||||
1. `npm i`
|
||||
2. `npm run launch-dapps`
|
||||
|
||||
#### Expected results:
|
||||
- Ceremony Dapp is started on `http://localhost:3000`
|
||||
- Validators Dapp is started on `http://localhost:3001`
|
||||
- Governance Dapp is started on `http://localhost:3002`
|
||||
|
||||
### Launch Ceremony
|
||||
|
||||
*Note*: can be started after [previous step is complited](#launch-dapps)
|
||||
|
||||
1. `npm i`
|
||||
2. `npm run launch-ceremony`
|
||||
|
||||
#### Expected results:
|
||||
- Initital key is generated
|
||||
- Initial key password, private key is generated to `.keys/initial_keys` folder
|
||||
- e2e test of Ceremony DApp is executed
|
||||
- Mining address, password and private key is copied to `./keys/mining_keys` folder
|
||||
- Payout address, password and private key is copied to `./keys/payout_keys` folder
|
||||
- Voting address, password and private key is copied to `./keys/voting_keys` folder
|
||||
- Initital key is removed
|
||||
|
||||
## Additional scenarios
|
||||
|
||||
### Start MoC node + e2e Ceremony test
|
||||
1. `npm i`
|
||||
2. `npm run start-test-setup-e2e-ceremony-test`
|
||||
|
||||
### Expected result:
|
||||
#### Expected results:
|
||||
- All expected results from [Start MoC node script](#start-moc-node)
|
||||
- e2e test of Ceremony DApp was executed
|
||||
- Mining address, password and private key is copied to `./keys/mining_keys` folder
|
||||
|
@ -63,14 +95,14 @@ At the successful end of POA test setup start you'll see this message `### POA t
|
|||
|
||||
If you have already started test POA setup before with [Start MoC node script](#start-moc-node) you can run e2e ceremony test with `npm run e2e-ceremony-test`
|
||||
|
||||
## Start MoC, one validator nodes + e2e Ceremony test
|
||||
### Start MoC, one validator nodes + e2e Ceremony test
|
||||
1. `npm i`
|
||||
2. `npm run start-moc-validator-setup`
|
||||
|
||||
### Expected result:
|
||||
#### Expected results:
|
||||
- All expected results from [Start MoC node + e2e Ceremony test](#start-moc-node--e2e-ceremony-test)
|
||||
- RPC of Parity node with unlocked validator account will be on `http://localhost:8554`
|
||||
- Validators Dapp is started on `http://localhost:3001`
|
||||
|
||||
## Finish test POA setup
|
||||
### Finish test POA setup
|
||||
`npm run stop-test-setup`
|
|
@ -54,9 +54,9 @@ async function main() {
|
|||
driver.sleep(2000);
|
||||
|
||||
metaMask.switchToAnotherPage();
|
||||
driver.sleep(2000);
|
||||
driver.sleep(3000);
|
||||
metaMask.refresh();
|
||||
driver.sleep(1000);
|
||||
driver.sleep(2000);
|
||||
let el = await metaMask.isElementPresent(buttonSubmit.buttonSubmit)
|
||||
if (el) {
|
||||
confirmTx(el)
|
||||
|
@ -71,7 +71,7 @@ async function main() {
|
|||
metaMask.submitTransaction();
|
||||
ceremonyPage.switchToAnotherPage();
|
||||
|
||||
driver.sleep(3000);
|
||||
driver.sleep(5000);
|
||||
|
||||
await getKeys(ceremonyPage);
|
||||
console.log("Productions keys are saved")
|
||||
|
@ -111,7 +111,7 @@ async function getKeys(ceremonyPage) {
|
|||
if (err) throw err;
|
||||
|
||||
for (const file of files) {
|
||||
if (file != '.gitkeep') {
|
||||
if (file != '.gitkeep' && file != '.DS_Store') {
|
||||
fs.unlinkSync(path.join(constants.scriptsMocOutputFolder, file));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ function main() {
|
|||
function(err, content, filepath, next) {
|
||||
let filename = path.basename(filepath)
|
||||
|
||||
if (filename == '.gitkeep') {
|
||||
if (filename == '.gitkeep' && filename != ".DS_Store") {
|
||||
return next();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ async function main() {
|
|||
for (let i = 0; i < files.length; i++) {
|
||||
let filePath = files[i]
|
||||
let filename = path.basename(filePath)
|
||||
if (filename != ".gitkeep") {
|
||||
if (filename != ".gitkeep" && filename != ".DS_Store") {
|
||||
validatorKeyPath = filePath;
|
||||
break;
|
||||
}
|
||||
|
@ -51,11 +51,16 @@ async function main() {
|
|||
|
||||
const validatorNodeExampleTomlPath = `${constants.nodeFolder}node-slave.toml`;
|
||||
let validatorNodeTomlContent = fs.readFileSync(validatorNodeExampleTomlPath, "utf8");
|
||||
validatorNodeTomlContent = validatorNodeTomlContent.split("parity_validator_/").join(`parity_validator_${validator_num}/`);
|
||||
const validatorNodeToml = toml.parse(validatorNodeTomlContent);
|
||||
//validatorNodeTomlContent = validatorNodeTomlContent.split("parity_validator_/").join(`parity_validator_${validator_num}/`);
|
||||
let validatorNodeToml = toml.parse(validatorNodeTomlContent);
|
||||
|
||||
validatorNodeToml.account.unlock = [validator];
|
||||
validatorNodeToml.account.password = [`./nodes/parity_validator_${validator_num}/node.pwd`];
|
||||
validatorNodeToml.network.port = validatorNodeToml.network.port + (validator_num - 1);
|
||||
validatorNodeToml.rpc.port = validatorNodeToml.rpc.port + (validator_num - 1);
|
||||
validatorNodeToml.websockets.port = validatorNodeToml.websockets.port + (validator_num - 1);
|
||||
validatorNodeToml.mining.engine_signer = validator;
|
||||
validatorNodeToml.parity.base_path = `./nodes/parity_validator_${validator_num}/`;
|
||||
const newToml = tomlJS.dump(validatorNodeToml);
|
||||
|
||||
utils.removeFolderRecursive(`${validatorNodeFolder}cache`);
|
||||
|
@ -64,7 +69,6 @@ async function main() {
|
|||
utils.removeFolderRecursive(`${validatorNodeFolder}network`);
|
||||
|
||||
const validatorTomlPath = `${validatorNodeFolder}node.toml`;
|
||||
console.log("validatorTomlPath:", validatorTomlPath)
|
||||
try { await utils.saveToFile(`${validatorTomlPath}`, newToml)}
|
||||
catch (err) { return console.log(err.message); }
|
||||
|
||||
|
|
Loading…
Reference in New Issue