Skip to content

Commit

Permalink
Merge pull request #2051 from OriginTrail/v6/develop
Browse files Browse the repository at this point in the history
OriginTrail 6.0.0-beta.2.2.1 Testnet Prerelease - bug fix
  • Loading branch information
zeroxbt authored Aug 24, 2022
2 parents 4040312 + db926f2 commit 29ba595
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 96 deletions.
5 changes: 2 additions & 3 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@
"package": "./blockchain/implementation/ot-parachain/ot-parachain-service",
"config": {
"networkId": "otp::testnet",
"hubContractAddress": "0x6e002616ADf12D4Cc908976eB16a7646B6cD6596",
"rpcEndpoints": ["wss://parachain-tempnet-01.origin-trail.network"],
"evmManagementPublicKey": "0x1B420da5f7Be66567526E32bc68ab29F1A63765A"
"hubContractAddress": "0x256736AEb3f19AC6738E9F4D10C9B61da71CEB9F",
"rpcEndpoints": ["wss://lofar.origin-trail.network"]
}
},
"polygon": {
Expand Down
6 changes: 3 additions & 3 deletions installer/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ install_mysql() {
text_color $GREEN "OK"
fi
perform_step sed -i 's|max_binlog_size|#max_binlog_size|' /etc/mysql/mysql.conf.d/mysqld.cnf "Setting max log size"
perform_step sed -i '/disable_log_bin/a wait_timeout = 31536000' /etc/mysql/mysql.conf.d/mysqld.cnf "Setting wait timeout"
perform_step sed -i 'sed -i '/disable_log_bin/a interactive_timeout = 31536000' /etc/mysql/mysql.conf.d/mysqld.cnf "Setting interactive timeout"
echo "disable_log_bin" >> /etc/mysql/mysql.conf.d/mysqld.cnf
perform_step sed -i '/disable_log_bin/a\wait_timeout=31536000' /etc/mysql/mysql.conf.d/mysqld.cnf "Setting wait timeout"
perform_step sed -i '/disable_log_bin/a\interactive_timeout=31536000' /etc/mysql/mysql.conf.d/mysqld.cnf "Setting interactive timeout"

systemctl restart mysql
}

Expand Down
9 changes: 3 additions & 6 deletions tools/local-network-setup/.bootstrap_origintrail_noderc
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,14 @@
],
"evmOperationalWalletPublicKey": "0xd6879C0A03aDD8cFc43825A42a3F3CF44DB7D2b9",
"evmOperationalWalletPrivateKey": "0x02b39cac1532bef9dba3e36ec32d3de1e9a88f1dda597d3ac6e2130aed9adc4e",
"evmManagementWalletPublicKey": "0x1B420da5f7Be66567526E32bc68ab29F1A63765A"
"evmManagementWalletPublicKey": "0x64B592e8e9AF51Eb0DBa5d4c18b817C01e8e75a8"
}
},
"otp": {
"config": {
"rpcEndpoints": [
"wss://parachain-tempnet-01.origin-trail.network"
],
"evmOperationalWalletPublicKey": "0xd6879C0A03aDD8cFc43825A42a3F3CF44DB7D2b9",
"evmOperationalWalletPrivateKey": "0x02b39cac1532bef9dba3e36ec32d3de1e9a88f1dda597d3ac6e2130aed9adc4e",
"evmManagementWalletPublicKey": "0x1B420da5f7Be66567526E32bc68ab29F1A63765A"
"evmManagementWalletPublicKey": "0x64B592e8e9AF51Eb0DBa5d4c18b817C01e8e75a8"
}
},
"polygon": {
Expand All @@ -68,7 +65,7 @@
],
"evmOperationalWalletPublicKey": "0xd6879C0A03aDD8cFc43825A42a3F3CF44DB7D2b9",
"evmOperationalWalletPrivateKey": "0x02b39cac1532bef9dba3e36ec32d3de1e9a88f1dda597d3ac6e2130aed9adc4e",
"evmManagementWalletPublicKey": "0x1B420da5f7Be66567526E32bc68ab29F1A63765A"
"evmManagementWalletPublicKey": "0x64B592e8e9AF51Eb0DBa5d4c18b817C01e8e75a8"
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions tools/local-network-setup/.dh_origintrail_noderc
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@
},
"otp": {
"config": {
"rpcEndpoints": [
"wss://parachain-tempnet-01.origin-trail.network"
],
"evmOperationalWalletPublicKey": "...",
"evmOperationalWalletPrivateKey": "...",
"evmManagementWalletPublicKey": "..."
Expand Down
26 changes: 5 additions & 21 deletions tools/local-network-setup/generate-config-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const keys = require('./keys.json');

const numberOfNodes = process.argv.length === 3 ? parseInt(process.argv[2], 10) : 4;

const templatePath = '.dh_origintrail_noderc';
const bootstrapTemplatePath = '.bootstrap_origintrail_noderc';
const templatePath = './tools/local-network-setup/.dh_origintrail_noderc';
const bootstrapTemplatePath = './tools/local-network-setup/.bootstrap_origintrail_noderc';

const template = JSON.parse(fs.readFileSync(templatePath));
const bootstrapTemplate = JSON.parse(fs.readFileSync(bootstrapTemplatePath));
Expand All @@ -28,7 +28,7 @@ for (const implementation in bootstrapTemplate.modules.blockchain.implementation
].config.evmOperationalWalletPrivateKey = keys.privateKey[0];
bootstrapTemplate.modules.blockchain.implementation[
implementation
].config.evmManagementWalletPublicKey = keys.managementKey;
].config.evmManagementWalletPublicKey = keys.publicKey[keys.publicKey.length - 1];
}

fs.writeFileSync(bootstrapTemplatePath, JSON.stringify(bootstrapTemplate, null, 2));
Expand All @@ -46,28 +46,12 @@ for (let i = 0; i < numberOfNodes; i += 1) {
}
console.log(`Configuring node ${nodeName}`);

const configPath = path.join(`.dh${i}_origintrail_noderc`);
const configPath = path.join(`./tools/local-network-setup/.dh${i}_origintrail_noderc`);
execSync(`touch ${configPath}`);

const parsedTemplate = JSON.parse(JSON.stringify(template));

const polygonEndpoints = [
'wss://polygon-mumbai.g.alchemy.com/v2/HWQYg3FX49VALP0FMMZxKhZDVrIRDiMo',
'wss://polygon-mumbai.g.alchemy.com/v2/A5XW59zlZH8Q4NYvHPOByry6RpYHVsZG',
'wss://polygon-mumbai.g.alchemy.com/v2/pjhHpEpgUyQcKde6lZGNK9i5DStsfg8P',
'wss://polygon-mumbai.g.alchemy.com/v2/PS344yOFOjNVjy7l4HywB824lD-tELBj',
'wss://polygon-mumbai.g.alchemy.com/v2/o1tqYf3FW4dFZMhKw5Pjrv1M9grn485F',
];

for (const implementation in parsedTemplate.modules.blockchain.implementation) {
if (implementation === 'polygon') {
parsedTemplate.modules.blockchain.implementation[implementation].config.rpcEndpoints = [
polygonEndpoints[i - 1],
'https://matic-mumbai.chainstacklabs.com',
'https://rpc-mumbai.matic.today',
'https://matic-testnet-archive-rpc.bwarelabs.com',
];
}
parsedTemplate.modules.blockchain.implementation[
implementation
].config.evmOperationalWalletPublicKey = keys.publicKey[i + 1];
Expand All @@ -76,7 +60,7 @@ for (let i = 0; i < numberOfNodes; i += 1) {
].config.evmOperationalWalletPrivateKey = keys.privateKey[i + 1];
parsedTemplate.modules.blockchain.implementation[
implementation
].config.evmManagementWalletPublicKey = keys.managementKey;
].config.evmManagementWalletPublicKey = keys.publicKey[keys.publicKey.length - 1];
}

parsedTemplate.modules.httpClient.implementation['express-http-client'].config.port = 8900 + i;
Expand Down
Loading

0 comments on commit 29ba595

Please sign in to comment.