Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [nonce]

A random number that is only used once. It is generated at the beginning of a communication by one communication partner and has to be sent back by the other one in order to prevent replay attacks.

0
votes
1answer
14 views

How to rewrite my transfer transaction?

So I've made a simple tx to transfer. And it has been broadcasted. But I did not calculate the gas price properly so the tx is in still pending status. That seems takes long time. What if I make ...
0
votes
1answer
23 views

What is the beginning nonce on the Rinkeby Testnet?

I know that the nonce is representative of how many transfers an account has made and is 0 at the start on the mainnet. However, on testnets, such as the now decommissioned Morden where it was 2^20 I ...
1
vote
0answers
24 views

Handle nonce after RPC timeout

From time to time, I will be making some 5 ~ 10 tx/s on Ethereum via RPC interface. I have to handle the nonce manually because it cannot update fast enough. But I am facing issue below: From time ...
0
votes
1answer
28 views

web3.py locally signed transaction rejected because of invalid nonce

I'm trying to sign locally a transaction to a smart contract method using web3.py. I'm using ganache and there is one interesting issue when I send a transaction as the contract deployer everything ...
0
votes
1answer
12 views

What does mining software do when two tx are sent in one block with incremented nonces, but the second tx relies on the completion of the first?

If I call approve and transferFrom on an ERC20 token in two transactions, with the nonces being 1 and 2, respectively, how do the miners know which to accept first? Do the miners choose the ordering ...
0
votes
1answer
18 views

Is a transaction valid if it was signed weeks in the past?

I'd like to add scheduled transactions functionality to my chrome extension, but I don't want to ask the user for password input every time a scheduled tx is sent. My idea is to create and sign ...
1
vote
1answer
46 views

account nonce - what if it did not exist? [duplicate]

I can't understand how account nonce actually avoids double spending. Every answer about this on the internet follow the pattern "If you only have 50 Eth and try to send 50 to A and 50 to B with ...
1
vote
1answer
55 views

Why store account nonce on chain instead of using timestamp to prevent replay attacks?

Why store account nonce on chain instead of using timestamp to prevent replay attacks, or any other random bit of information that will change thr hash and differentiate the transaction? As far as I ...
0
votes
2answers
36 views

Is there a service to guarantee that transactions are successful?

I have a node which I use to send transactions to the network. Those transactions are really important. They must go through at all cost. If I simply send the transactions, there is a chance that one ...
2
votes
1answer
39 views

Can anyone tell what might had gone wrong with the transaction below?

May I know what does this transaction mean? I am running this inside my private node. Running the same transaction repeatedly none stop. Sending on average 10 transactions / sec. So I had to keep ...
3
votes
1answer
26 views

A doubt about forks and mining

Suppose I'm mining a block, and I still don't find the nonce. Suddenly I receive the mined block from another node. But when I try to validate it, I find it's not right. So I discard it. What happens ...
2
votes
0answers
48 views

Usage of web3 provider in multiple processes

I have web application and background queue that executes long lasting tasks. Both of them using truffle-privatekey-provider with same private key to sign/send transactions. Now I ma experiencing ...
0
votes
1answer
355 views

Deploy to mainnet with Truffle + Infura: nonce too low

I'm trying to deploy a very simply ERC20 token contract using Truffle and Infura and getting this: Running migration: 1_initial_migration.js Deploying Migrations... ... ...
0
votes
1answer
177 views

Transaction done, but nonce does not update and call to a function returns zero

I've used web3py to deploy a contract and send some transactions to it. I calculate the nonce this way: nonce = web3.eth.getTransactionCount(account, "pending") When I deploy the contract, ...
0
votes
1answer
121 views

Account nonce limit/maximum

I've been reading about an account's nonce, that it's supposed to be an incremental number that increments with every transaction. I found about transactions pool and queue, about what happen if you ...
0
votes
1answer
30 views

Transaction Pending and Dropped

I have a transaction pending from 4 days. I have tried to unlock following this answer: MyEtherWallet is pending and dropping. It looks like it is stuck in a loop for 2 days? Now the current nonce is ...
1
vote
1answer
41 views

Account nonce — Incremental, i.e., Deterministic or Arbitrary

In cryptography, a nonce is an arbitrary number that can be used just once. But in Ethereum, the account nonce is deterministic. Deterministic vs Arbitrary -- How can both be true at the same time?
2
votes
1answer
514 views

What does a position means in an ethereum Tx?

There are 2 fields in the following Ethereum Tx, named nonce & {position}. What does position mean?
1
vote
2answers
96 views

Nonce in Layer 2 State Channels

In Layer 2 Solution of Ethereum (State Channels), what I don't get is what about nonces? If we signed a state channel Tx with 13 nonce and don't put it on the chain for now, then if I make another Tx ...
2
votes
1answer
959 views

How to properly set nonce in a web3 contract invocation?

I have this code, which works: MyToken.airdrop(wallets,amounts,{ gas: 1267051, gasPrice: 2000000000, },function(err,tx){ console.log('err is %s',err) console.log('tx is %s',tx) callback(err,...
0
votes
1answer
137 views

How does metamask manage the multiple transaction with same address?

I'm struggling to implement the functionality which sends multiple transactions using the same address. here the from address is same but the to addresses are different. When I did research on this, I ...
0
votes
1answer
75 views

What happens when two nodes have conflicting transaction nonce?

Let's say I have two geth nodes which run on two distant networks with slow connections between them, and I use the same newly created address (private key) to send two different transactions with the ...
0
votes
1answer
87 views

Is there any method in web3 through we can verify whether the nonce associated with any transaction or not of same from address?

How to get the new nonce of from address using web3? There shouldn't be any transaction associated with this. Is there any way to get this.
2
votes
0answers
69 views

How to set the nonce in offline transaction?

Let's suppose, I already executed 48 Tx onchain and I signed an offchain Tx with nonce 49. Now, If: I don't sign the offchain Tx with nonce, the transaction will be invalid because every Tx must ...
0
votes
0answers
115 views

Private network not incrementing NONCE and not mining

So I've set up a network with 10 nodes using Parity 1.10.4-20180514 stable. Ubuntu 16.04 on AWS. The node count says: 0 Active / 9 Connected The genesis json is: { "name": "private", "engine": { ...
0
votes
2answers
232 views

Ethereum blockchain node & block terminology

I was studying about the basic blockchain terminology and got confused the point of node & block. In some links, both seem similar whereas in some both explained differently. I don't exactly know ...
0
votes
1answer
264 views

Batch generating raw transactions nonce problem [duplicate]

I'd like to batch generate a large number of transactions for one account and sign them in a more secure environment. Ideally I would create a queue of unsigned transactions (here in my understanding ...
9
votes
2answers
2k views

Truffle + Infura on Mainnet: Nonce too low error

I have the following code: const Contract = artifacts.require('./Market.sol'); module.exports = async function(callback) { let instance = await Contract.deployed(); for(var i = 0; i <=200; i+...
3
votes
1answer
2k views

Reset MetaMask nonce

I am testing stuff on Ganache and am using Metamask to send transactions to simulate user behavior with the app. Now here's the issue. If I restart Ganache it resets all accounts (no problem with that)...
3
votes
3answers
691 views

send raw transaction without knowing nonce

I want to send raw transactions but I don't want to accidentally overwrite any transactions. Afaik when using eth.sendTransaction it automatically increments the nonce and doesn't overwrite any ...
0
votes
1answer
434 views

Webj3 erc20 specify nonce for token transfer

How do you specify a nonce when sending erc20 tokens using web3j?
0
votes
1answer
646 views

What's the difference between “pending” block and txpool?

Even though my parity node (private network) is not mining, it seems to have a pending block as well as a txpool. After sending some transactions, the web3.eth.getBlock("pending") call returns ...
0
votes
1answer
104 views

BlockCypher Account nonce too far behind transaction

I'm currently working on a DApp that involves sending transactions. I'm using BlockCypher to send the transactions since the API is fairly straight forward. One issue I'm finding is that when I run my ...
20
votes
3answers
2k views

Concurrency patterns for account nonce

The account nonce is the only element in the transaction structure that prevents replay attack (as explained in this very good answer). It essentially forces sequentialisation of an account's ...
0
votes
1answer
24 views

Combined transactions executed together?

If I'm correct the nonce is responsible for the order transactions are executed. Let assume you have two transactions T1 & T2. T1 depends on T2. So I want to have an order T1 then T2. This is done ...
2
votes
1answer
356 views

Send transaction with same nonce as another transaction but lower gas price

I want to send a transaction using web3, and I want this transaction to have the same nonce as other transactions - so far so good. The issue comes when I set a lower gasPrice than the other ...
1
vote
1answer
233 views

Why is there a nonce and mixHash value in the genesis file?

I may not fully understand the genesis file. Why is there a nonce and mixHash value in the file if nothing is being mined? It was my impression the genesis file is used to bootstrap block 0, then ...
0
votes
1answer
153 views

Can there be multiple transactions with the same nonce and from address?

I am trying to create a state-channel by signing transactions directly, and I was wondering that the nonce might be troubling in this case.
1
vote
1answer
891 views

How to queue up simultaneous signed transactions

I have written a simple API server in NodeJS that uses web3 (version 1 beta 27) to interact with a remote Parity node. The guts of the call is as follows const invoke = async (req, res) => { ...
0
votes
1answer
140 views

How get nonce of smart contract account with JSON RPC function? eth_getTransactionCount only for EXTERNAL accounts right?

How get nonce of smart contract account with JSON RPC function? (Number of new smart contract accounts created by a smart contract account?) eth_getTransactionCount only for EXTERNAL accounts so won'...
1
vote
0answers
2k views

Nonce Too Low, try incrementing nonce | Not able to send TRX

Can someone tell me how to correct a Nonce Too Low issue? I'm trying to send an ERC 20 TRX tokens that I have stored on my nano s ETC wallet and I'm not able to due to this low nonce. FYI I have ...
3
votes
1answer
851 views

Is it possible that the same address sends out two transactions at the same time

Several articles say that a transaction can be canceled or replaced with the same nonce and higher gas price. Then does this indicate that the same address can NOT send two transactions at the same ...
0
votes
0answers
33 views

Implementing multiple account balances per address

Say if one wanted to fork Ethereum's codebase and implement a second account balance per each address - a public key is now associated with the standard Ether balance but now also with another ...
0
votes
0answers
119 views

help I need to get my funds back. I tried to transfer with metamask but it said error nonce too low

My question is about metamask and what does error nonce to low mean in metamask and how can i get my eth back?
0
votes
1answer
1k views

Getting and setting the nonce for a transaction

I'm using a javascript library (etheremjs) to sign a transaction. When creating it, it asks for the nonce field. I researched about it and partially understood it. But my main problem is: How do I ...
4
votes
1answer
239 views

Why does nonce have to increment by one? Wouldn't it be sufficient to require unique nonces?

For replay protection, it would be sufficient to require a unique nonce for every transaction from the same address. More precisely, it would be sufficient to consider a new transaction T from an ...
1
vote
1answer
483 views

cannot unmarshal non-string into Go value of type common.Address at Infura

i'm trying to call this function: const nonce = web3.eth.getTransactionCount(myAddress) On the testnet of this node: 'https://ropsten.infura.io/' But I get this error on this node: cannot ...
2
votes
2answers
491 views

Why do contracts start with nonce 1?

This is a follow-up to this question. The accepted answer says: Yes, contracts have nonces. A nonce of a contract is only incremented when that contract creates another contract [...]. When a ...
1
vote
1answer
287 views

Send back to back signed raw transaction

I have to send multiple signed transactions and from a specific account with nonce via web3.eth.getTransactionCount. Because the call may come parallel, I either get replacement transaction ...
1
vote
1answer
389 views

Would a pending transaction block all subsequent transactions?

I know that each ethereum transaction has a corresponding nonce, which is a positive increasing number. Say if tx1 with nonce 97 is still pending, would subsequent tx2 with nonce 98 also blocked until ...