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
27
votes
3answers
3k 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
29 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 ...
0
votes
1answer
40 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 ...
0
votes
1answer
25 views

how does DAG affect the NONCE finding?what about fix the DAG size to 1G?

I'm going to decrease DAG size on private net, by change the algorithm.go code var datasetSizes = [maxEpoch]uint64{ 1073739904, 1082130304, 1090514816, 1098906752, 1107293056, 1115684224, ...
1
vote
1answer
56 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?
1
vote
2answers
28 views

is account nonce network dependent?

In Ethereum, does Account nonce depend on network? I mean for same address on different network, will there be different nonce?
2
votes
2answers
61 views

What is the difference between account nonce and block nonce?

Block and accounts both use a value called "nonce" but they seem to represent something very different. For account I understand that the nonce is an integer quantity indicating the number of ...
1
vote
0answers
17 views

How to process null TransactionReceipt?

I have some transaction that is sent and from time to time when I call the eth_getTransactionReceipt I get a null. I see esentially two approaches for handling this: I could reiterate the call to ...
0
votes
1answer
36 views

getTransactionCount return different response

geth version 1.8.27 The pending nonce is 8 at first, then I send a transaction and use eth.getTransactionCount to get the next pending nonce. > eth.getTransactionCount("...
0
votes
1answer
135 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 ...
7
votes
2answers
1k views

getTransactionCount with 'pending' not working?

Sending Ethereum transactions requires incrementing the nonce properly. In a typical application, there can be concurrent and/or consecutive requests to transfer from the same address. Most solutions ...
0
votes
1answer
831 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("...
0
votes
0answers
16 views

How to manage nonce in a faucet

I have a faucet contract with an onlyOwner function to transfer Ether to an account. I also have a public API which users can call with their public key: the API then users the owner's keypair to send ...
0
votes
1answer
187 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 ...
3
votes
1answer
844 views

{'message': 'Nonce too low', 'code': -32000} when sending transaction on geth JSON-RPC

I am trying to send a transaction using Go Ethereum 1.4.18-stable JSON-RPC and I am getting the following error: {'message': 'Nonce too low', 'code': -32000} This is a single transaction on ...
0
votes
1answer
32 views

In bitcoin it's bad to reuse addresses (less security, as public key has already been revealed), how about ethereum? [duplicate]

In bitcoin it's bad to reuse addresses (less security, as public key has already been revealed), how about ethereum? Is the public key revealed when the first transaction (first nonce) is used?
1
vote
1answer
319 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
523 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
0answers
36 views

Will miners meet the situation that they can not find the nonce?

Because the Nonce is uint64 in the Golang code. the code is here: // Compute the PoW value of this nonce digest, result := hashimotoFull(dataset.dataset, hash, nonce) if new(big....
0
votes
0answers
12 views

How to verify access of child contracts?

I am using a factory A to produce child contracts. Now I want to guarantee that only these child contracts have access to a different contract B. Using the factory as a proxy is somehow a detour as I ...
0
votes
0answers
20 views

Ethereum Multi Node network design - nonce management for address

I am running two nodes on two different machines and geth installed, and for educational purposes I would like to make both nodes work concurrently. I know that nonce management is quite pain in the **...
0
votes
0answers
38 views

How to calculate the value of mixhash in block header?

As of my knowledge how POW works is When mining the miner will have the hash1 which is block hash and he need to fine the hash2 which is hash of nonce (a random number). So that the root hash of ...
0
votes
1answer
140 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.
0
votes
2answers
161 views

How to skip transactional nonce for private ethereum chain

We are using a private ehtereum chain on geth. It is mainly for the purpose of storing the values as part of transactions and distribute across our private network. However when we are sending ...
0
votes
1answer
33 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
44 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 ...
0
votes
1answer
85 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 ...
1
vote
0answers
42 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
16 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
21 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 ...
28
votes
2answers
18k 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 ...
0
votes
1answer
389 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
83 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
96 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
40 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 ...
1
vote
2answers
157 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
52 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
30 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
78 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
293 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 ...
2
votes
1answer
828 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?
0
votes
1answer
568 views

Webj3 erc20 specify nonce for token transfer

How do you specify a nonce when sending erc20 tokens using web3j?
3
votes
1answer
2k 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,...
9
votes
2answers
3k 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+...
16
votes
3answers
5k views

How does the Ethereum ETH accounting system work and prevent double-spends?

In Bitcoin, the BTC accounting system is based on UTXOs (Unspent Transaction Outputs), which prevents the same BTC from being spent multiple times. I heard that Ethereum has a simpler account balance ...
0
votes
1answer
122 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 ...
2
votes
0answers
109 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
282 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 ...
2
votes
1answer
536 views

Is it possible to get the transaction count for a contract in Solidity?

Is there built-in functionality for getting the transaction count (nonce) for an account in Solidity?
0
votes
1answer
358 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 ...