I'm using the embark framework to deploy some smart contracts to a private Ethereum network. The problem is, the network behaves differently on separate machines, even though they're similarly spec'd - for instance, on one machine it mines instantly, but on another it can take up to 30 minutes between committing a block and actually mining it. I'd like to figure out why!

Embark calls geth this way:

geth --datadir=".embark/development/datadir" --networkid 12301 --password config/development/password --port 30303 --rpc --rpcport 8545 --rpcaddr localhost --rpccorsdomain="*" --nodiscover --mine --shh --rpcapi "eth,web3,shh" --unlock=74ce832e8e34a554d6d77f1350f8d76e261d9f7a js .embark/development/js/mine.js

It uses a genesis.json that looks like this:

  "nonce": "0x0000000000000042",
  "difficulty": "0x0",
  "alloc": {
    "0x3333333333333333333333333333333333333333": {"balance": "15000000000000000000"}
  "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coinbase": "0x3333333333333333333333333333333333333333",
  "timestamp": "0x00",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "extraData": "0x",
  "gasLimit": "0x4c4b40"

The other 'variable', I think, is mine.js, which is basically doing this:

var start_transaction_mining = function (config, miner_obj) {
  web3.eth.filter("pending").watch(function () {
    if (miner_obj.hashrate > 0) return;

  web3.eth.filter("latest").watch(function () {
    if (!pendingTransactions()) {

Where pendingTransactions does this:

var pendingTransactions = function() {
  if (web3.eth.pendingTransactions === undefined || web3.eth.pendingTransactions === null) {
    return txpool.status.pending || txpool.status.queued;
  else if (typeof web3.eth.pendingTransactions === "function")  {
    return web3.eth.pendingTransactions().length > 0;
  else {
    return web3.eth.pendingTransactions.length > 0 || web3.eth.getBlock('pending').transactions.length > 0;

Any ideas as to where I might look in order to solve the performance disparity between different machines?

| improve this question | | | | |
  • Any differences of the machinces, like MEMORY and CPU? Ethash PoW in Ethereum is memory hard. – Yuan Dec 24 '16 at 3:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.