31

You can load this script to your geth console Mine only when there are transactions! var mining_threads = 1 function checkWork() { if (eth.getBlock("pending").transactions.length > 0) { if (eth.mining) return; console.log("== Pending transactions! Mining..."); miner.start(mining_threads); } else { ...


17

eth.pendingTransactions are the transactions that your local Geth node has, that haven't been mined to a block. eth.getBlock('pending') is the current block your node is mining (or would be mining on). It is not a block that has been added to the blockchain. eth.getBlock('pending').transactions are the transactions that are included in this hypothetical ...


11

Just use eth.pendingTransactions to find the transaction you want to resend. Then var tx = eth.pendingTransactions[index], replacing index with the index of the transaction you want to resend. Then eth.resend(tx, <optional gas price>, <optional gas limit>). This allows you to change the gas price and gas limit of the resent transaction. ...


8

Latest means the latest block that is already inside your own chain. All transactions contained within can be considered successfully executed. Security wise of course there can be reorgs, but in general they are executed transactions. Pending on the other hand is the collection of transactions that can be executed by the network (that your own node knows ...


7

My understanding is that your understanding is correct, except you're missing one particular property of the Ethereum node software. Namely, as part of #3, the transaction is stored in the node's transaction pool (cf. Bitcoin's mempool). Normally, the transactions live there until mined, but because computers have finite memory and processing power, the ...


7

The closest I was able to find is parity_pendingTransactions and parity_pendingTransactionsStats. parity_pendingTransactions is very similar to geth's txpool_content, and gets the job done. Update: Since I was specifically looking for transactions sent from a specific account, this new method works even better: parity_localTransactions It only returns the ...


6

I still don't know why eth.resend was failing (and continues to fail as of geth 1.6.5), but this compatible patch works for me: eth.resend = function (tx, gasPrice, gas) { if (gasPrice) { tx.gasPrice = gasPrice; } if (gas) { tx.gas = gas; } tx.data = tx.input; return eth.sendTransaction(tx); }; I prefer to also add this convenience ...


6

The network's under strain cause of the Status ICO. Unfortunately there's not much you can do for cancelling it since the transaction has already been propagated to other nodes. If you click on the Gas Price you can set a higher price and resubmit the transaction to the network.


5

60k - 80k pending transactions sounds like a normal situation and does not seem extensive. Currently, Ethereum does ~750k transactions daily. Assuming all transactions are processed at the same rate, the content of the pool is swapped in every 2.5 hours. However, my guess is that automated services send very low fee transactions that are not critical. ...


4

These transactions are from a mining pool. You can see the frequently mined blocks in 0xea674fdde714fd979de3edf0f56aa9716b898ec8. What you saw in txpool.content.pending are just two pending transactions representing the transactions that the miner is paying to the miners in the pool. Here is the transaction list for the same account. This mining pool is ...


4

Example here using filters: How do I know when I've run out of gas programmatically? and also here by busy polling: https://github.com/barkthins/ether-pudding/blob/master/index.js#L375 I use busy polling, because I've found the filters to be unreliable (fails about 1:1000 times) EDIT: Also, how MANY blocks to wait for confirmation is debatable, ...


4

In Parity the hash is the an item for the ordering criteria, as you can see here: https://github.com/paritytech/parity/blob/1aaafa2d11b42af6be97754f4bc06e2856904464/ethcore/src/miner/transaction_queue.rs#L179 So in theory, the hash can decide the order, if the previous ordering compared to "equal". However miners can, and probably do, run custom algorithms ...


4

I have an educated guess based on the following scenario that Ethereum does permit: A sends 10 eth to B. (Tx01) While Tx01 is pending, A also sends 10 eth to C. (Tx02) Whether Tx01 or Tx02 end up in the chain (if any) is implementation-dependent and based on the node that actually mines the block. As a result, one cannot rely on anything in the transaction ...


4

You can totally simulated the transaction througth eth_call. Her are the code snippets of eth_call and apply transaction (source from go-ethereum): eth_call (could not change state) // Setup the gas pool (also for unmetered requests) // and apply the message. gp := new(core.GasPool).AddGas(math.MaxUint64) res, gas, failed, err := core.ApplyMessage(evm, ...


4

I assume you deployed it on the Main Net using MetaMask. Probably the gas limit of the transaction was too low. Otherwise the gas price was to low. Please send a screenshot of your MetaMask transactions, in case above didn't fix it.


3

Your coins seem to be in your account on the public blockchain explorer, so I don't think you have to worry. The next step is to work out what has happened in your local wallet. Presumably you are using the Ethereum Wallet. Check the block number (like 2,105,732 currently) on the top of your Ethereum Wallet screen. This should match the latest block in ...


3

Yes, that's normal Geth behavior. eth.pendingTransactions are the transactions that your local Geth node has, that haven't been mined to a block. Geth does not persist these anywhere, so they are gone when Geth is restarted. You can also see that eth.pendingTransactions is an addition to Geth and not part of web3.eth. (There's also eth....


3

Here is a ECMAScript 2016 version of waiting a contract to be mined (or any transaction hash): // await sleep trick // http://stackoverflow.com/questions/951021/what-is-the-javascript-version-of-sleep function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } // We need to wait until any miner has included the transaction // in a ...


3

Xavier has a good solution with clear usage examples here: https://gist.github.com/xavierlepretre/88682e871f4ad07be4534ae560692ee6. You get a thenable transaction receipt. This is a non-blocking solution, so the javascript thread is not stuck while waiting for the promise to be returned. It's well-solved using promises and implemented as an extension of ...


3

Often it will appear in seconds after you transmit it. If you are asking about "pending" transactions from an exchange wallet then it will appear shortly after they actually transmit the transaction to the network


3

Have a look here Understanding transactions better Full nodes listen and broadcast transactions. As a full node you receive and can display the pending transactions in your transaction pool. That's what etherscan does. Maybe you can't access it through their API, their choice. So you can get some of the pending transactions as a node, but you don't get to ...


3

Let me explain how transaction are created so I can explain the problem. To avoid transaction malleability each Ethereum transaction includes a sequence number called nonce. The very first transaction from an account has nonce equal to zero, and subsequent transactions are the previous plus one. If two or more transactions have the same nonce, only one ...


3

4371658 (7837 block confirmations) This means that your transaction was mined in block 4371658. That block was at Oct-16-2017 03:00:36 PM +UTC, about 21 hours before your question was posted. The 7837 block confirmations means that the transaction is irrevocably part of the network. Usually 30 or so confirmations are regarded as enough, which is 7-8 ...


3

You can cancel a transaction via MyCrypto's Check TX Status Page Go to https://mycrypto.com/tx-status Copy and paste the transaction hash into the field provided. Click the Check TX Status button. Details will appear depending on the state of the transaction. It could be... Transaction Found: Your transaction was successfully mined and is on the blockchain....


3

Whose transaction gets priority and is added to the block? (Only one will go through while the others are refunded minus the gas for the computation) Whichever of the 3 transactions was chosen by the miner who finds the block. Miners can pick any transactions they like, so long as they allow for valid state changes. (They can do this by writing their own ...


3

Péter Szilágyi's answer on (https://github.com/ethereum/go-ethereum/issues/16284) help me to solve the problem. Every account and transaction in Ethereum has a nonce. At any given time, only the transaction with the correct nonce can be executed. If you submit a transaction with a low gas price, that will block all subsequent transactions since they ...


3

To send a transaction to the network, all you need is a connection to it. When using geth or parity, your the nodes may not broadcast your transactions until they are reasonably close to being fully synced with the network on some modes. You can always run them in a light mode setting, which allows them to connect to already synced nodes and make requests,...


3

These are both valid transactions, provided transaction 2 gets mined before transaction 1. When a miner finds a block, they include the transactions in an order they choose. If they happen to choose transaction 2 to occur before transaction 1, then transaction 1 will be successful. If they do it in the opposite order, transaction 1 will not be successful. ...


3

Sure, you can implement your own algorithm to order the txpool. Currently, they order by gas price that make sense for mining incentive https://github.com/ethereum/go-ethereum/blob/6bd896a97f0c86fdb6d0538f5f839d7ea104e888/core/tx_list.go#L374


3

Instead of using getTransactionReceipt, I used getTransaction So, to solve the above, we can use: var accountOneGasPrice = (await web3.eth.getTransaction(accountOneReceipt.tx)).gasPrice Where accountOneReceipt is the return value we receive from the above function call. And accountOneReceipt.tx to get the transaction hash. Note: await is necessary for ...


Only top voted, non community-wiki answers of a minimum length are eligible