How to decide on a nonce while developing a blockchain

+1 vote

I want to create my own blockchain, I am not able to find out how to decide on the nonce size.
I am using proof of work algorithm in my blockchain which uses SHA256 algorithm.

Can you provide an optimum solution?

Apr 10, 2018 in Blockchain by anonymous
1,287 views

1 answer to this question.

+1 vote
Best answer

A nonce should be decided on the basis of the difficulty conditions you want to satisfy. Firstly, set the difficulty conditions of the blockchain and then decide on the nonce. Optimally, a nonce shouldn't be too big to take unnecessary large space. When developing your blockchain make sure you don't create impossible to satisfy conditions.
Sometimes, there may be situations where even a 64-bit value is insufficiently large to get a satisfactory hash output, so make sure there's other things that can be adjusted, re-ordered, or incremented as necessary.
You can consider using 32-bit value for your blockchain because the nonce is tried sequentially so you won't need bigger nonce value.

answered Apr 10, 2018 by Shashank
• 10,400 points

selected Aug 7, 2018 by Omkar

Related Questions In Blockchain

0 votes
1 answer

How to create a new wallet on a blockchain?

Firstly, you need to have a clear ...READ MORE

answered Apr 4, 2018 in Blockchain by Christine
• 15,790 points
1,386 views
0 votes
1 answer

On-Chain NFT: How to store a pixel image on the ethereum blockchain?

The images are usually not stored in ...READ MORE

answered Feb 24, 2022 in Blockchain by Aditya
• 7,680 points
1,112 views
0 votes
1 answer

How to make sure transactions take no fee in a private Ethereum blockchain?

In a private ethereum network you have ...READ MORE

answered Mar 26, 2018 in Blockchain by Christine
• 15,790 points

edited Mar 26, 2018 by Christine 1,573 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,927 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,455 views
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points
1,417 views
0 votes
2 answers

Why is network already up to date while trying to deploy a contract on truffle?

I guess you have ganache running already ...READ MORE

answered Apr 24, 2018 in Blockchain by Shashank
• 10,400 points
4,570 views
0 votes
2 answers

How to set permissions within a blockchain?

There are blockchains that allow defining permissions. Hyperledger ...READ MORE

answered Aug 28, 2018 in Blockchain by Michael
1,107 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP