question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test infrastructure running multiple ganache instances impacted with removal of server options

See original GitHub issue

I am testing a bridge application which tries to spawn multiple ganache-server instances for setup. I have the following function which was working fairly well on ganache-cli: "^6.12.2":

import ganache from 'ganache-cli';

export type GanacheAccounts = {
  balance: string;
  secretKey: string;
};

export function startGanacheServer(
  port: number,
  networkId: number,
  populatedAccounts: GanacheAccounts[],
  options: any = {}
) {
  const ganacheServer = ganache.server({
    accounts: populatedAccounts,
    port: port,
    network_id: networkId,
    _chainId: networkId,
    chainId: networkId,
    _chainIdRpc: networkId,
    ...options,
  });

  ganacheServer.listen(port);
  console.log(`Ganache Started on http://127.0.0.1:${port} ..`);

  return ganacheServer;
}

I am testing another process in parallel - a relayer - which listens to events on one ganache instance and issues transactions on the other ganache instances. I am afraid that the latest "ganache": "^7.0.0-beta.2" will not support this behavior.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nepochecommented, Jan 13, 2022

I’ll close this and try to create a minimal reproduction before opening another issue. Thanks again for the earlier meeting!

1reaction
davidmurdochcommented, Jan 12, 2022

Will you be available at 12:00 PM Eastern Time tomorrow (Jan 13)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to run multiple Ganache nodes for private test ...
You can run multiple instances of ganache locally. You'll need to specify a dedicated port for each one, see -p parameter ...
Read more >
Releases · trufflesuite/ganache - GitHub
To start Ganache with a different hardfork, use the --chain.hardfork option. Miscellaneous. ci: remove node 12 from CI tests (#4029).
Read more >
Command line options - Truffle Suite
Command line options¶. This section will describe every command available in the Truffle application. Usage¶. All commands are in the following form:.
Read more >
ganache-cli - npm Package Health Analysis - Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice.
Read more >
How to develop, test, and deploy smart contracts using Ganache
Creating a Ganache Ethereum blockchain instance ... Ganache Dashboard. Check the port in RPC Server configuration., which is usually 7545 .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found