create account

For smoother consensus change or no change: a fix for Steem 0_5_0 to avoid crashing on July 4th by abit

View this thread on: hive.blogpeakd.comecency.com
· @abit · (edited)
$1,135.84
For smoother consensus change or no change: a fix for Steem 0_5_0 to avoid crashing on July 4th
Update (29/06/2016): 
* Another crashing issue with 0.5.0 has been addressed yesterday. For the ones who want to stick with 0.5.0 consensus, please install v0.5.2 provided by @arhag: https://github.com/arhag/steem/commits/v0_5_2
* Steemit released v0.8.1 yesterday

----original post (26/06/2016)---------
Steem 0.8.0 has been released for a while. According to the [announcement](https://steemit.com/steem/@steemitblog/steem-0-8-0-released), the new release fixed an issue which will crash the earlier 0.5.0 release on July 4th (quoted below).

> Fix Divide by Zero Error
The existing code has a bug that will cause a divide by zero error on July 4th for anyone who does not upgrade to new code. This means that not upgrading by July 4th is not an option.

This makes 0.8.0 look like a forced upgrade, although "if the majority of the witnesses upgrade" is mentioned in earlier that announcement. In my opinion, it is not the best practice. In case when a serious bug is found in 0.8.0  before the scheduled hard fork time and if have no sufficient time to make a fix (I'm not saying it will 100% happen but it's possible), the whole block chain network will have to be stopped for some time, at that time it's best if witnesses can still run on 0.5.0 consensus until a fix is released. 

Fortunately, there are other solutions for witnesses to be able to stay on the 0.5.0 consensus without upgrading to 0.8.0 or crashing the program. One solution is made by @arhag ([link is here](https://github.com/steemit/steem/pull/91)). In addition, there is a bug in 0.5.0 which prevents a witness_node from downgrading from a higher version to 0.5.0, so need to apply the [2nd patch](https://github.com/steemit/steem/commit/56461684c9adf9e61c1d2ba539c903d8acf0d58c). Full steps:
```
git clone https://github.com/steemit/steem.git
cd steem
git checkout v0.5.0
git fetch origin pull/91/head:v0_5_0-fix-77
git cherry-pick 3ab1a040dd0a43226e73a55db5934cb985e4cf5d #divid-by-0 fix
git cherry-pick 56461684c9adf9e61c1d2ba539c903d8acf0d58c #version downgrading fix
git submodule update --init --recursive
cmake -DENABLE_CONTENT_PATCHING=OFF -DLOW_MEMORY_NODE=ON .
make steemd cli_wallet
```

Disclaimer: I'm not saying I'm supporting or I'm against the upgrade to consensus 0.8.0 right now. Just wanted to provide a way for better consensus decision-making.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
👎  
properties (23)
authorabit
permlinkfor-smoother-consensus-change-or-no-change-a-fix-for-steem-050-to-avoid-crashing-on-july-4th
categorysteem
json_metadata{"tags":["steem","divid-by-0","version"],"users":["arhag"],"links":["https://github.com/arhag/steem/commits/v0_5_2"]}
created2016-06-26 11:00:06
last_update2016-06-29 09:25:09
depth0
children0
last_payout2016-08-13 18:30:54
cashout_time1969-12-31 23:59:59
total_payout_value809.694 HBD
curator_payout_value326.146 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,343
author_reputation141,171,499,037,785
root_title"For smoother consensus change or no change: a fix for Steem 0_5_0 to avoid crashing on July 4th"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id44,288
net_rshares117,260,930,184,831
author_curate_reward""
vote details (56)