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.

Filter by
Sorted by
Tagged with
0
votes
2answers
47 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
70 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
37 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 ...
3
votes
0answers
124 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
767 views

Deploy to mainnet with Truffle + Infura: nonce too low [duplicate]

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... ... ...
1
vote
1answer
599 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, ...
1
vote
1answer
528 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
100 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 ...
3
votes
1answer
89 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
1k 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
180 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 ...
4
votes
1answer
3k 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
541 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
160 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
173 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
136 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
2answers
335 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
435 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
4k 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+...
5
votes
1answer
4k 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)...
4
votes
4answers
994 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
680 views

Webj3 erc20 specify nonce for token transfer

How do you specify a nonce when sending erc20 tokens using web3j?
0
votes
1answer
2k 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
182 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 ...
32
votes
3answers
5k 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
40 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
774 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
419 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
229 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
1k 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
231 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
1k 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 ...
1
vote
1answer
2k 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
423 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
1k 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
1k 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
338 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
650 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 ...
0
votes
1answer
2k views

How to create a transaction with same nonce?

How do I create a new transaction that has the same nonce as a previous transaction? I sent a txn with 4Gwei gas price and I want to cancel it by sending a 0 Eth txn with the same nonce. I am ...
0
votes
1answer
1k views

How to get current nonce that I need to send along with a transaction?

I wish you send nonce with every transaction so that I can store my nonce in DB and can override a specific transaction if it is pending for a while. I know I can use eth.getTransactionCount("...
36
votes
2answers
23k views

What is nonce in Ethereum? How does it prevent double spending?

recently I got fascinated by blockchain, and started learning Ethereum. I came across the concept of the nonce in Ethereum. After researching I found out that nonce is used for two purposes. a. To ...
1
vote
2answers
514 views

What if a malicious party sends two transactions with same nonce?

It's said nonce is used to prevent reply/double-spending attack. But an adversary can send two transactions with the same nonce, and the rest of scenario will be the same as in Bitcoin. Question 1: ...
1
vote
1answer
913 views

Getting the Nonce for an Account [duplicate]

I know of three ways to get the nonce for an account. MyEtherWallet under the Offline Transactions tab. At the command line with Geth Manually count the number of outgoing transactions for an account ...
1
vote
0answers
271 views

Getting pending transactions even with nonce in sequence

I am running a private network with 5-9 seconds block time and no diff bomb. I am submitting thousands of transactions using a single node. The submission is managed by a job queue, and it happens at ...
3
votes
1answer
291 views

How many pending transactions can I create with the same nonce?

Recently I cancelled a pending transaction by resending an other transaction with the same nounce and a higher gas price in order to have the new transaction mined faster. This was useful in my case. ...
4
votes
2answers
572 views

How is the nonce in a the block header arrived at?

My understanding is that the nonce in the header of an Ethereum block is an integer within a certain range (greater than 0). However, when I look at the blocks through an online block explorer, such ...
2
votes
3answers
3k views

What happens if no nonce is provided for a transaction?

The nonce parameter seems to be optional for transactions. Its goal is to protect from replay attacks. In that case, why is it optional, and what happens if it's not provided? It leaves the particular ...
2
votes
0answers
472 views

Does sendRawTransaction behave the same as sendTransaction with nonce parameter.

In the Javascript API wiki it states that if you send a transaction with sendTransaction() and the optional nonce parameter set you can overwrite your pending transaction. nonce: Number - (...
1
vote
1answer
265 views

Why is the nonce uint64 and not big.Int in Geth?

Anyone knows why the nonce in geth is uint64 and not big.int? My main (and perhaps only) problem with this is that then the test-case "TransactionWithHihghNonce256" from: https://github.com/ethereum/...