diff --git a/src/express/commands/start.js b/src/express/commands/start.js index 210b3e30..a9c93d27 100644 --- a/src/express/commands/start.js +++ b/src/express/commands/start.js @@ -151,6 +151,11 @@ async function installCommonPackages(ip) { console.log('📍Installing rabbitmq...') command = 'sudo apt install rabbitmq-server -y' await runSshCommand(ip, command, maxRetries) + + console.log('📍Installing grpcurl...') + command = + 'curl -sSL "https://github.com/fullstorydev/grpcurl/releases/download/v1.8.7/grpcurl_1.8.7_linux_x86_64.tar.gz" | sudo tar -xz -C /usr/local/bin' + await runSshCommand(ip, command, maxRetries) } async function installHostSpecificPackages(ip) { diff --git a/src/setup/devnet/index.js b/src/setup/devnet/index.js index cc8f8bbd..02f507f7 100644 --- a/src/setup/devnet/index.js +++ b/src/setup/devnet/index.js @@ -93,7 +93,7 @@ export class Devnet { return path.join(this.heimdallDir(index), 'config', 'genesis.json') } - heimdallHeimdallConfigFilePath(index) { + heimdallAppConfigFilePath(index) { return path.join(this.heimdallDir(index), 'config', 'heimdall-config.toml') } @@ -251,7 +251,7 @@ export class Devnet { task: async () => { // set heimdall for (let i = 0; i < this.totalBorNodes; i++) { - fileReplacer(this.heimdallHeimdallConfigFilePath(i)) + fileReplacer(this.heimdallAppConfigFilePath(i)) .replace( /eth_rpc_url[ ]*=[ ]*".*"/gi, `eth_rpc_url = "${this.config.ethURL}"` @@ -260,6 +260,14 @@ export class Devnet { /bor_rpc_url[ ]*=[ ]*".*"/gi, `bor_rpc_url = "http://bor${i}:8545"` ) + .replace( + /bor_grpc_flag[ ]*=[ ]*".*"/gi, + 'bor_grpc_flag = "true"' + ) + .replace( + /bor_grpc_url[ ]*=[ ]*".*"/gi, + 'bor_grpc_url = "localhost:3131"' + ) .replace( /amqp_url[ ]*=[ ]*".*"/gi, `amqp_url = "amqp://guest:guest@rabbit${i}:5672/"` @@ -363,7 +371,7 @@ export class Devnet { task: async () => { // set heimdall for (let i = 0; i < this.totalNodes; i++) { - fileReplacer(this.heimdallHeimdallConfigFilePath(i)) + fileReplacer(this.heimdallAppConfigFilePath(i)) .replace( /eth_rpc_url[ ]*=[ ]*".*"/gi, `eth_rpc_url = "${this.config.ethURL}"` @@ -372,6 +380,14 @@ export class Devnet { /bor_rpc_url[ ]*=[ ]*".*"/gi, 'bor_rpc_url = "http://localhost:8545"' ) + .replace( + /bor_grpc_flag[ ]*=[ ]*".*"/gi, + 'bor_grpc_flag = "true"' + ) + .replace( + /bor_grpc_url[ ]*=[ ]*".*"/gi, + 'bor_grpc_url = "localhost:3131"' + ) .replace( /amqp_url[ ]*=[ ]*".*"/gi, 'amqp_url = "amqp://guest:guest@localhost:5672/"' diff --git a/src/setup/heimdall/index.js b/src/setup/heimdall/index.js index 478d7d91..81adc47c 100644 --- a/src/setup/heimdall/index.js +++ b/src/setup/heimdall/index.js @@ -83,7 +83,7 @@ export class Heimdall { return path.join(this.heimdallConfigDir, 'genesis.json') } - get heimdallHeimdallConfigFilePath() { + get heimdallAppConfigFilePath() { return path.join(this.heimdallConfigDir, 'heimdall-config.toml') } @@ -304,7 +304,7 @@ export class Heimdall { { title: 'Process heimdall config file', task: () => { - fileReplacer(this.heimdallHeimdallConfigFilePath) + fileReplacer(this.heimdallAppConfigFilePath) .replace( /eth_rpc_url[ ]*=[ ]*".*"/gi, 'eth_rpc_url = "http://localhost:9545"' @@ -313,6 +313,11 @@ export class Heimdall { /bor_rpc_url[ ]*=[ ]*".*"/gi, 'bor_rpc_url = "http://localhost:8545"' ) + .replace(/bor_grpc_flag[ ]*=[ ]*".*"/gi, 'bor_grpc_flag = "true"') + .replace( + /bor_grpc_url[ ]*=[ ]*".*"/gi, + 'bor_grpc_url = "localhost:3131"' + ) .save() } },