From what I understand, in Nxt, blocks are mined (or forged) using a system based on Proof-of-Stake where block creation works similarly to a lottery: people have tickets, and the more tickets you have, the greater the chances of winning and therefore forging a block. Tickets in Nxt are just coins you own in the system.

What I don't understand is that for each block creation, the winner is found from a pool of "active accounts" which so happens to be people that are online at that moment. Based on specific things (like how many coins one has), the winner is then found. My concern is that someone can forge a new block without caring about the "active accounts", he sort of pretends that nobody else is online. So he'll mine it for sure, as he's the only one, and then he'll broadcast it. He keeps doing this for the next blocks and so on.

What's stopping other peers from accepting his chain?

2 Answers 2


Linking to the discussion on the NXT forum https://nxtforum.org/general-discussion/academic-questions-regarding-pos-and-nxt


As you know from your previous question, a node is entitled to forge a block and submit it to the network when

hit < BaseTarget * EffectiveBalance * TimeSinceLastBlock

where new hit and BaseTarget values are computed from the last block, the hit value being effectively random and the BaseTarget being adjusted to maintain a steady blockchain growth rate of about one new block per minute.

All nodes running the NRS (Nxt Reference Software) use the same formulas to compute these values, and therefore if all of those nodes are on the same fork of the blockchain they will all agree on what the values are. Any new block received from another node is checked to make sure that the rule above was followed. If not, the block is rejected.

It is possible for the blockchain to fork, even when all nodes follow the rules, due to several nodes becoming eligible to forge at about the same time combined with network delays. Or, a subset of nodes could become isolated from the main network for a time.

Once a fork occurs, the competing blockchains will have different tails and all the blocks that make up the tails will have different hit and BaseTarget values. All nodes running NRS will chose the blockchain with the greatest cummulative difficulty, where

cumulativeDifficulty = cumulativeDifficultyOfPreviousBlock + (2^64 / BaseTarget)

cumulativeDifficulty grows with each new block, moreso when BaseTarget is small (more difficult to get a hit).

If a subset of nodes is isolated for a time, those nodes will continue to forge; but because they have a smaller combined balance, initially forging takes longer. BaseTarget will adjust larger to shorten the time between blocks, and thus cumulativeDifficulty will not grow as fast.

When this subset of nodes reconnects with the main network, its fork of the blockchain is considered by the main network (if less than 1440 blocks have been forged during the isolation). But because the main network has a greater combined balance, it will have a greater cumulativeDifficulty and therefore reject the competing blockchain. Likewise, the subset of nodes will consider the main fork and accept it unless more than 1440 blocks have been added on their fork, in which case a blockchain rollback or a fresh blockchain download is required.

This is how consensus is achieved on the network: it is governed by the nodes that have the greatest combined balance.

  • 1
    Thanks but you didn't address my concern with "active accounts". Only users that are online can forge. What if nobody is online expect me? I will be the only winner and I will forge a block, right? What's stopping others to accept such block? Jul 28, 2015 at 18:59
  • 1
    It is very unlikely that no one else will be online, because the big holders of NXT know that their participation is important to protect their investment. But if they did leave for long enough for you to forge a block and then return, they might accept your block if it is correctly forged, but it will be in competition with blocks immediately forged by returning nodes. A fork will likely occur and be resolved by cumulativeDifficulty. If the block you forged did not follow the rules, it will be rejected for that reason, so I don't know what you mean by "easily faked."
    – mystcoin
    Jul 29, 2015 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.