Score:0

Does the number of bits in the block nonce influence the security of the blockchain?

us flag

I know that Bitcoin uses a 32bit nonce that miners iterate over trying to hit the target number of prefixed 0's in the hash. If they run through all 2^32 combinations they then change something else in the block (either the 32bit extraNonce field, or by adding and removing transactions, changing the timestamp of the block slightly etc.)

I am implementing my own cryptocurrency from scratch and my thought was that this is cumbersome and I'd rather just have a 256bit nonce that every miner could iterate on. Is there anything inherently flawed with this approach or are there some adversarial side effect? (e.g miners always favoring blocks with a single transaction because it is faster to compute the hash that way etc.)

Maarten Bodewes avatar
in flag
And then what, the miner that finds the first hash with a certain amount of ones and zeros on the left wins? That would even be less efficient than normal mining where each miner works on a specific block (which is already horrible, doing work with little to no returns). Can't you think of a scheme without mining?
us flag
It's the exact same scheme as bitcoin, just with a 256 bit nonce ... so all miners are guaranteed to find a solution to any block just through incrementing the nonce. My intuition is that this approach is the same security-wise as bitcoin, just that the number of bits ("difficulty") needed might increase in my construction. I don't know what you mean by a better scheme... isn't the inefficiency inherent to why the chain is difficult to replicate? I'm confused by your answer so please help me understand what other scheme you'd recommend.
kelalaka avatar
in flag
Use [Proof of Stake](https://en.wikipedia.org/wiki/Proof_of_stake) instead of [Proof of Work](https://en.wikipedia.org/wiki/Proof_of_work)
Maarten Bodewes avatar
in flag
According to your solution, would each miner have a miner specific nonce or a separate, random nonce? Or is there some other distinguishing data for the blocks that they try and mine?
us flag
The distinguishing data is the transaction fee that is included in the block -- this fee is different for each miner (since they each have a different wallet address) so each miner has a different target.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.