message: Add mempool checks for VM version and MINIMUM_GAS_LIMIT
diff: @@ -773,14 +773,36 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
  ExtractQtumTX resultConverter = converter.extractionQtumTransactions();
  std::vector<QtumTransaction> qtumTransactions = resultConverter.first;
  std::vector<EthTransactionParams> qtumETP = resultConverter.second;
  +
  for(QtumTransaction qtumTransaction : qtumTransactions){
  sumGas += CAmount(qtumTransaction.gas() * qtumTransaction.gasPrice());
  + VersionVM v = qtumTransaction.getVersion();
  + if(v.format!=0)
  + return state.DoS(100, error("ConnectBlock(): Contract execution uses unknown version format"), REJECT_INVALID, "bad-tx-version-format");
  + if(!(v.rootVM == 0 || v.rootVM == 1))
  + return state.DoS(100, error("ConnectBlock(): Contract execution uses unknown root VM"), REJECT_INVALID, "bad-tx-version-rootvm");
  + if(v.vmVersion != 0)
  + return state.DoS(100, error("ConnectBlock(): Contract execution uses unknown VM version"), REJECT_INVALID, "bad-tx-version-vmversion");
  + if(v.flagOptions != 0)
  + return state.DoS(100, error("ConnectBlock(): Contract execution uses unknown flag options"), REJECT_INVALID, "bad-tx-version-flags");
  +
  if(qtumTransaction.gas() > blockGasLimit){
  return state.DoS(1, false, REJECT_INVALID, "bad-txns-gas-exceeds-blockgaslimit");
  }
  + //check gas limit is not less than minimum gas limit (unless it is a no-exec tx)
  + if(qtumTransaction.gas() < MINIMUM_GAS_LIMIT && v.rootVM != 0)
  + return state.DoS(100, error("ConnectBlock(): Contract execution has lower gas limit than allowed"), REJECT_INVALID, "bad-tx-too-little-gas");
  +
  + if(qtumTransaction.gas() > UINT32_MAX)
  + return state.DoS(100, error("ConnectBlock(): Contract execution can not specify greater gas limit than can fit in 32-bits"), REJECT_INVALID, "bad-tx-too-much-gas");
  +
  + //don't allow less than DGP set minimum gas price to prevent MPoS greedy mining/spammers
  + if(v.rootVM!=0 && (uint64_t)qtumTransaction.gasPrice() < minGasPrice)
  + return state.DoS(100, error("ConnectBlock(): Contract execution has lower gas price than allowed"), REJECT_INVALID, "bad-tx-low-gas-price");
  }
  +
  if(!CheckMinGasPrice(qtumETP, minGasPrice))
  return state.DoS(100, false, REJECT_INVALID, "bad-txns-small-gasprice");
  if(sumGas > nFees)
  