<p>Below is an explanation how forging works at the current moment, in the future this will be slightly changed.</p>

<p>Every block has two fields - BlockSignature and GenerationSignature.</p>

<p>The former is filled by signing the block data with the private key of an account that generated a block and has almost nothing to do with forging process.</p>

<p>The latter is filled by computing SHA256(GenerationSignatureOfPreviousBlock+PublicKeyOfAccount).</p>

<p>The first 8 bytes of the hash give an unsigned 64-bit number in little-endian format, this number is called "hit".</p>

<p>Every account has a so-called EffectiveBalance which is usually (but not always) higher if the account holds more coins. EffectiveBalance is multiplied by some value that is the same for all the accounts - BaseTarget (it's adjusted every block trying to keep block generation rate at 1 minute) - and by number of seconds that have passed since the previous block. The resulting value is called "target".</p>

<p>If "hit" is less than "target" then peers accept a block and attach it to the blockchain.</p>

<p>This is the essential part of forging. I omitted such obvious things as validation of transaction signatures, checks for double-spending, etc.</p>

CC BY-SA 3.0
2014-07-28T09:17:10.343Z
2014-07-28T09:17:10.343Z
Come-from-Beyond
<p>I am looking for a technical answer that explains how are validated the forged block.</p>

<p>I already looked in the NXT wiki and in their white paper and found no detailed explanation.</p>

<nxt><forging>
How does forging work?
Jan Moritz
# How does forging work?

(Asked by: username_0 on 2014-07-28)

I am looking for a technical answer that explains how are validated the forged block.

I already looked in the NXT wiki and in their white paper and found no detailed explanation.

**Tags:** nxt, forging


---

## 1 answers

### Answer by username_1 on 2014-07-28. Score: 5 | Accepted answer

Below is an explanation how forging works at the current moment, in the future this will be slightly changed.

Every block has two fields - BlockSignature and GenerationSignature.

The former is filled by signing the block data with the private key of an account that generated a block and has almost nothing to do with forging process.

The latter is filled by computing SHA256(GenerationSignatureOfPreviousBlock+PublicKeyOfAccount).

The first 8 bytes of the hash give an unsigned 64-bit number in little-endian format, this number is called "hit".

Every account has a so-called EffectiveBalance which is usually (but not always) higher if the account holds more coins. EffectiveBalance is multiplied by some value that is the same for all the accounts - BaseTarget (it's adjusted every block trying to keep block generation rate at 1 minute) - and by number of seconds that have passed since the previous block. The resulting value is called "target".

If "hit" is less than "target" then peers accept a block and attach it to the blockchain.

This is the essential part of forging. I omitted such obvious things as validation of transaction signatures, checks for double-spending, etc.


---

