2
votes

I'm reaching out for help as I've become as stuck as my transactions which are showing up in Parity TxQueueViewer under local transactions as status:

In queue: Future

As pictured in the below screenshot as tx: 0x0e97a4c

enter image description here

I'm setting tx: 0x0e97a4c up with https://github.com/ethereumjs/ethereumjs-tx and sending with https://github.com/ethereum/web3.js/ as below:

var Web3 = require('web3');
var Transaction = require('ethereumjs-tx');
var data = contract.method.getData(some, data);
console.log("Data: " + data);
var gasEstimate = web3.eth.estimateGas({
    to: web3.env.SENDER_ADDRRESS,
    data: data
});
console.log("GasEstimate: " + gasEstimate);
var nonce = web3.eth.getTransactionCount(process.env.SENDER_ADDRRESS);
console.log("Transation Count: " + nonce);
var rawTx = {
    nonce: web3.toHex(nonce),
    gasPrice: web3.toHex(process.env.GAS_PRICE),
    gasLimit: web3.toHex(gasEstimate),
    to: web3.toHex(process.env.CONTRACT_ADDRESS),
    value: web3.toHex(provider.toWei('1', 'ether')),
    data: data,
    chainId: 3
};
console.log("RawTx: " + JSON.stringify(rawTx));
var tx = new Transaction(rawTx);
console.log(tx.getChainId());
tx.sign(new Buffer(process.env.KEY, 'hex'));
web3.eth.sendRawTransaction("0x".concat(tx.serialize().toString('hex')), function(error, txHash) {
    if (error) {
        console.log(error); // an error occurred
        callback(error);
    }
    else {
        callback(null,{"error":0,"tx":txHash});
    }
});

I know the node is syncing and propagating transactions, which are subsequently mined, as transactions setup and sent from the Parity UI succeed as pictured below (which shows as mined in the image above): enter image description here

As some background, I've been developing a project for Ethereum using Solidity and Javascript and utilising Truffle and Web3js. Testing against TestRPC. After some research, I selected Parity over Geth and am using the Ropsten network to run tests.

I have Parity version:

Parity/v1.6.8-beta-c396229-20170608/x86_64-macos/rustc1.17.0 

running on:

MacOS Sierra 10.12.5.

I'm starting parity with the following:

parity --pruning fast --chain ropsten --warp --mode active --jsonrpc-interface all --jsonrpc-hosts all --allow-ips public
  • What does status "In queue: Future" mean?
  • Is there some sort of transaction release mechanism with Parity?
  • Or am I not setting up the transaction correctly for this type of node?
2

2 Answers

2
votes

I just resolved this issue by stopping the Parity process and deleting Parity's cache (~/.local/share/io.parity.ethereum/cache). This problem occurs when there is a transaction that gets "stuck" locally. Once this "stuck" transaction is in the local queue, other transactions from the same address will not be propagated until the "stuck" transaction propagates.

0
votes

This was a problem which bothered me for a long time. In my case I found that the error was caused due to the newer nonce being sent by metamask.

Scenario

I was running a chain with a specific chain id. I was using metamask for sending transactions. And a week later I created a new chain with same chain id and then when I was sending transactions using metamask, the transactions kept going in future.

Cure

  • Change the chain ID of the new chain. It may require a change in genesis file.
  • Reconnect metamask to RPC. This is to update the chain ID that was stored in metamask.
  • Send transactions. And now they should not go in "Future"