The state of Cold Staking

Dan Gershony
Khilone
Published in
5 min readJul 10, 2019

Stratis network and community are (still) in the processes of activating Cold Staking on the Stratis mainnet (on testnet CS is already active).

Analysing the network

The progress of Cold Staking activation, which hovers between 65%–80% can be tracked here https://stratis.guru/coldstaking-progress

Here is a break down of a recent blocks and the signal bit.

This is the api result from calling the deployment endpoint on Stratis Core towards the end of an activation windows (2016 blocks).
http://localhost:37221/api/Consensus/deploymentflags

[
{
"deploymentIndex": 2,
"stateValue": 1,
"thresholdState": "Started",
"height": 1379278,
"confirmationPeriod": 2016,
"periodStartHeight": 1378943,
"periodEndHeight": 1380959,
"votes": 253,
"blocks": 334,
"versions": {
"20000004": 253,
"00000007": 81
},
"threshold": 1916,
"timeStart": "2018-12-01T00:00:00",
"timeTimeOut": "2019-12-01T00:00:00"
}
]

Cold Staking uses bit 2 which translates to hex version 20000004.
Once a threshold of 1916 blocks out of the 2016 window signal the CS bit it will become active (the window is a time slot wherein a min % of blocks need to signal activation).

In the json result above we can see that at block height 1379278 as many as 253 blocks signalled bit 2 out of 334 blocks which is roughly 75% of the 95% needed to activate Cold Staking.

The bounty…

A Cold Staking bounty was announced a few weeks ago to create an incentive for miners that have not moved yet to Stratis Core.
The discussions about the bounty can be found on this tweet https://twitter.com/dangershony/status/1126825010801332227

I’d like to note for that matter, from a personal experience, that Stratis Core is quite stable for staking, I and other community members, are staking for many weeks uninterrupted on core.

Proposals for how to distribute the bounty are still discussed on our community discord, ideas proposes are:

  • Split the bounty in a few chunks and reward only the biggest miners that move over, this makes sense as a big miner moving over has substantial more value in getting CS activated.
  • Pay an extra STRAT as block reward to all miners that signal activation (until the bounty runs out)

I am becoming a bit less convinced the bounty will help activate Cold Staking, because of other reasons which I will discuss next.

The bounty will be re-purposed (for smart contracts bounty) if it wont be used for activation.

What’s holding us back?

First i’d like to note that I see the difficulty of the Stratis community to activate Cold Staking as a measure of how decentralised the network is.

Community discussions on the topic brought some good reasons to light on why miners will not upgrade to Stratis Core

  • Low configuration device: Many miners use RPi to stake, the node is not officially supported with such a low configuration. I think this is not a good reason to not upgrade, when the network will be under stress validating blocks on a RPi will take longer and result in more orphans. It may actually be quite cheap to put the network under some stress to verify that claim, we would then observe an increase in blocks signalling CS.
  • Selfish miners: It’s predicted that more staking power will come in to the network once there is no risk of theft in order to stake (by not needing to leave the keys that own the coins on a hot wallet). As a result current miners will have more competition and produce less blocks.
  • Instability of core: Core is new tech that was just released and that always has some risk associated with it from undiscovered exploits to edge case bugs.
  • Unsupported devices: StratisX can run on older operating systems that core does not support, at least one community member shared they are staking on an old windows XP laptop and refuse to upgrade for that reason.

Can we address the issues above and is it really worth it?

Maybe it’s time to take a different approach?

There are some other options to get Cold Staking activated faster, but they may come with a price:

  • UASF (user activated soft fork): In this solution the devs set a hard date in to the Stratis Core node and ask the community to upgrade (not only miners but anyone running a node, also referred to as the economic majority), any block after that date that does not signal Cold Staking will be rejected. This will cause CS to be activated almost immediately (after 2000 blocks).
    However nodes running on StratisX may experience reorgs, the frequency and size of the reorgs depend on the percent of nodes already staking on core (this ranges between 65%–80%) and how well a StratisX node is connected to Stratis Core nodes.
    The network is not expected to fork because Stratis Core has the majority of the staking power (Cold Staking is a soft fork and StratisX can download blocks from Stratis Core). To mitigate big reorgs (useful for exchanges for example) connecting in advance to many Stratis Core nodes will prevent that.
    During this process X miners will experience a lot of orphans, after Cold Staking becomes active the UASF is disabled and X can (in theory) go back to mining (though it’s not so recommended)
  • Propagation flag: The devs will set a flag in Stratis Core that will not propagate blocks that don’t signal Cold Staking activation. As a result StratisX blocks will reach less nodes on the network and will experience a higher orphan rate (Straits Core nodes will likely not stake on top of StratisX blocks because they will just not receive them on time or so frequently). This is a more subtle change and will help activate Cold Staking by creating an advantage for Stratis Core nodes that are staking.
  • Shutdown the gateways: The bridge between Stratis X and Stratis Core goes via some gateway nodes, X can download blocks from core but not the other way around. This solution is very similar to UASF with the one difference that it is initiated by the Stratis Company and not the community, most gateways (if not all since I shut down mine) are run by the company.
  • Modify StratisX: This solution was proposed by (again) the mighty aprogiena, and can be considered as sort of a compromise.
    Modifying StratisX to signal Cold Staking activation, this should not be a hard task and will allow X miners to continue staking happily with no interruptions (only the need to upgrade to a new compiled version of X)

Stratis company is going to have an internal meeting to discuss these options (and maybe others), I will of course initiate such discussions to the community as they happen, depending on my level of involvement.

Staking Service: Trustaking

Looking ahead to the day that Cold Staking will be activated, I’d like to share a new service that is focused in that area.

Trustaking is an interesting project, created as a community initiative to simplify the process of cold staking for the community.

The site can be found at stratis.trustaking.com and the service is free, though they have a donation page. For more info pop to their discord to say “Hi”.

Trustaking also created a step by step guide on how to fund and withdraw from a cold staking wallet account on the Stratis full node, this can be found here:

https://github.com/stratisproject/StratisBitcoinFullNode/blob/b1b84ca47d10fb523e884585b01c000814e52af3/Documentation/cold-staking-setup.md

--

--