PCoin v1.2.0 — critical difficulty fix (LWMA)
Critical difficulty fix. Every node must upgrade before block height 2800. A node still running v1.0.1 at that height will follow a different chain.
What was wrong
The legacy retarget was silently computing the wrong difficulty on this chain. arith_uint256::operator*=(uint32_t) discards the carry out of the top limb, so target * timespan is evaluated mod 2^256 with no overflow check. Bitcoin never hits this because its powLimit is 2^224; PCoin raised powLimit to 2^244 to make CPU mining viable, which leaves only 12 bits of headroom against a timespan needing 19-23 bits.
At height 2016 the 4x clamp fired correctly and the multiply that followed wrapped, producing 0x1e0b7c33 instead of 0x1f03ffff — a 356x difficulty jump in one step. PermittedDifficultyTransition computes its bound with the same overflowing expression, so the safety check compared a corrupt value against an identically corrupt limit and passed.
This was not only historical. At the current target the wrap begins once average spacing reaches 724 s, and it inverts the sign: at 900 s spacing difficulty would rise 3.4x when it should fall 1.5x. A drop in hashrate would have raised difficulty and stalled the chain permanently.
What changed
LWMA (linearly-weighted moving average, N=60, T=600 s) replaces the 2016-block retarget at heights >= 2800, with an exact overflow guard derived by division rather than by the multiply it checks. Difficulty now responds every block instead of every 2016.
The legacy path below height 2800 is left byte-identical. The existing chain depends on those values, and correcting them retroactively would orphan every block from 2016 onward.
Also in this release: a dead-man's switch on the built-in miner (mining stops if the supervising app dies), Android thermal and charging safety gates, and a percentage-based performance setting on both Windows and Android.
Downloads
| Platform | File |
|---|---|
| Windows x64 | pcoin-1.2.0-win64.zip |
| Android arm64 | pcoin-1.2.0-android-arm64.apk |
| Linux x86_64 | pcoin-1.2.0-linux-x86_64.tar.gz |
63b8541db7a436cdbb2cb5ed5e9bdebb55f0129830973002f1236fd0bf048b83 pcoin-1.2.0-win64.zip
fe3017a877ba931c896e98e955a7a87381acb440ed519db93ca24c292992e939 pcoin-1.2.0-android-arm64.apk
3b483ab30ede007a30bece255423c2c79c789cf5fc4241baf5604acf845d1e5c pcoin-1.2.0-linux-x86_64.tar.gz
Setup instructions for each platform are in the v1.0.1 notes and unchanged.
Known gaps
- No recovery phrase yet. The wallet is still a file;
bitcoin-cli backupwalletis the only backup, and uninstalling the Android app destroys the wallet. A BIP39 12-word flow is the next thing being built. - Binaries are not code-signed on Windows; SmartScreen will warn.
Website: https://pc.am