Crown MN-PoS simplified

walkjivefly
Crown Platform
Published in
3 min readApr 14, 2019

This article presents a simple explanation of how the unique Crown MN-PoS system works.

Background

Crown v0.13.0.0 released on 28 March 2019 included a consensus change from Proof of Work (PoW) to Proof of Stake (PoS). Due to a technical glitch the switch-over at block 2,330,000 on 13 April 2019 didn’t go as smoothly as expected. The developers quickly identified the problem and pushed a new release, v0.13.2.0 which got the stalled chain moving again under PoS.

Please make sure you have updated to v0.13.2 to start staking and minting with your master- and systemnodes

The technical merits and details of the unique Crown MN-PoS system have been described elsewhere.

The Eli5 version

  • Miners from PoW are replaced by “minters” in PoS. In the Crown implementation, the minters are the active masternodes (MNs) and systemnodes (SNs) in the network.
  • You “stake” by running one or more MNs or SNs. The minimum quantity of Crown required to stake is one SN of collateral, i.e.: 500 CRW.
  • You don’t have to keep your wallet open to stake.
  • Staking is enabled by default for all MNs and SNs. If you really want to, you can disable staking for a particular node by configuring staking=0 in the node’s crown.conf config file.
  • Only MNs and SNs can “mint” or earn staking rewards. If you have a million non-collateral CRW in your wallet or (very unwise) on an exchange, they can’t earn staking rewards.
  • It’s not the actual collateral which is staked. Instead, it’s the MN/SN rewards which have been earned in an eligibility period.
  • Your MN/SN rewards from the eligibility period are referred to as “stakepointers”.
  • To be eligible, stakepointers must be:
    not too young (more than 100 confirmations)
    not too old (less than 2880 confirmations)
    not already used
  • All active, synchronised MNs and SNs continuously check to see if they have any eligible stakepointers.
  • If they find any, they pick the oldest and try to generate a new block.
  • If they successfully generate a block, it includes the “minting” or “staking” reward which is paid to themselves.
  • The generated block is broadcast to the network. Sometimes two (or more) nodes will broadcast a block at almost the same time. The network will choose one as “winner” and discard the other(s). Any discarded blocks’ staking reward will forever show in the owning wallet as conflicted/unconfirmed.
  • The winning stakepointer is marked as used and cannot be used again.
  • Reflecting the difference in collateral, a MN is 20 times more likely than a SN to generate a block.
  • It is possible to earn both staking reward and MN or SN reward in one block. If you run one or more MNs and one or more SNs, you could conceivably collect all of the staking and MN and SN rewards in a single block. It’s unlikely but not impossible.
  • If a MN or SN goes offline, there is a short time window when it may still earn a MN/SN reward (generated by a minter), but it cannot earn staking rewards.

Monitoring

  • Slightly confusingly, both staking/minting and MN/SN rewards display in the QT wallet as “Mined”. This may be addressed in a future update so it is easier to see which kind of reward each is.
  • You can check if a node is actively staking using the getinfo RPC command on the MN/SN itself:
masternode@vps01:~$ crown-cli getinfo
{
"version" : 130200,
"protocolversion" : 70057,
"walletversion" : 61000,
"balance" : 0.00000000,
"blocks" : 2330611,
"timeoffset" : 0,
"connections" : 12,
"proxy" : "",
"difficulty" : 0.08839286,
"testnet" : false,
"staking_active" : true,
"keypoololdest" : 1550325612,
"keypoolsize" : 1001,
"paytxfee" : 0.00000000,
"relayfee" : 0.00010000,
"errors" : ""
}
  • You can check what stakepointers are available for a particular node by:
masternode@vps01:~$ crown-cli getstakepointers
[
{
"blockhash" : "4faa93c18c7a07a9cfc452e883827f802a7bc63f62fcb61c92383f2616fd815f",
"hashpubkey" : "deadbeefad50dee9f52a2b7ea188a8e9ee5b69ada",
"pos" : 2,
"txid" : "f67c1a359c8a6317293c7a32f6663f1dedd48e783a499aa3023ecae94767b4a2"
},
{
"blockhash" : "9cca189081709948ffe762f9421a530ed731624e9a3571fb8c07eaa089ea32dd",
"hashpubkey" : "1337d50fdee9f52a2b4d7ea183b8a8e479edef5ba",
"pos" : 2,
"txid" : "55becabed4ec995b2f76e3eaa80b2afe3f1d88310681e980152e077ead3611f6"
},
{
"blockhash" : "941dfa33246b0b1e27d21c0ca39789be7de36343533f89e3ca5e9c98abf67ca6",
"hashpubkey" : "6a4fa8bd50fdee9fb47ea18b18a8e719eef5b169d",
"pos" : 2,
"txid" : "6c113ae75696523d2c154893940db4ae9a8d95ec3ed695a296088cc91fabcaf5"
}
]

In summary

  • Run one or more SNs/MNs.
  • Earn staking rewards.

Questions?

Ask us on Discord

--

--