什么是硬岔19?What is Hard Fork 19

in #cn7 years ago (edited)

我刚加入Steemit没几天就看大家欢欣鼓舞普大喜奔谈论硬岔19。当时只是一头雾水不知所云。这几天在看源码终于明白了什么是硬岔19:

      case STEEMIT_HARDFORK_0_19:
         {
            modify( get_dynamic_global_properties(), [&]( dynamic_global_property_object& gpo )
            {
               gpo.vote_power_reserve_rate = 10;
            });
...
               rfo.author_reward_curve = curve_id::linear;
               rfo.curation_reward_curve = curve_id::square_root;
});

上面这段代码把作者奖励曲线设置为线性,把点赞奖励曲线设置为开平方根。下面这段代码显示硬岔17的时候这两个曲线都是二次方。

      case STEEMIT_HARDFORK_0_17:
         {
...
               rfo.author_reward_curve = curve_id::quadratic;
               rfo.curation_reward_curve = curve_id::quadratic_curation;

再看这几个曲线怎么定义的。线性就是线性,开方就是开方都简单。这个作者奖励二次方曲线也能懂,因为有个二次方。这个点赞二次方没看懂。但是不管怎么说,硬岔19点赞曲线是对权重开平方的,肯定对小鱼有利。不过对小鱼也无所谓,我一般点赞的收获都是1厘钱。猜测硬岔19以前都接近0。

      case quadratic:
         {
            uint128_t rshares_plus_s = rshares + content_constant;
            result = rshares_plus_s * rshares_plus_s - content_constant * content_constant;
         }
         break;
      case quadratic_curation:
         {
            uint128_t two_alpha = content_constant * 2;
            result = uint128_t( rshares.lo, 0 ) / ( two_alpha + rshares );
         }
         break;
      case linear:
         result = rshares;
         break;
      case square_root:
         result = approx_sqrt( rshares );
break;

HF19投票威力加四倍应该是这个vote_power_reserve_rate决定的。现在是10,以前是40。下面这段代码说明投票威力跟这个变量成反比。

  const dynamic_global_property_object& dgpo = _db.get_dynamic_global_properties();

   // used_power = (current_power * abs_weight / STEEMIT_100_PERCENT) * (reserve / max_vote_denom)
   // The second multiplication is rounded up as of HF 259
int64_t max_vote_denom = dgpo.vote_power_reserve_rate * STEEMIT_VOTE_REGENERATION_SECONDS / (60*60*24);

Above source code snippets show the modifications of Hard Fork 19. Now the author reward curve is linear and curation reward curve is square root. At HF17, both curves were quadratic.

HF19 also improved the power of each vote. Now vote_power_reserve_rate is 10, comparing to previous 40.


这两天的数字货币市场是伏尸百万流血漂橹,总市值掉到了$80B以下。

Screen Shot 2017-07-11 at 5.13.09 PM.png

Screen Shot 2017-07-11 at 5.08.24 PM.png

图片截屏自https://coinmarketcap.com/


Posts of @nationlpark 的帖子 & About Myself 自我介绍

Sort:  

Thanks for the post. It helps me understand the HF 19 better.

You are welcome. I am glad it's useful

膜拜。HF19算是让我们这类小鱼熬出头了,记得HF19刚刚开始的两天大家一起high,然后steem从2.5跌成了1

看来我来的是时候,没有受以前的苦。另外我也没见过2.5的steem。进来时记得是两块钱

明白多一點了(但都是十分複雜, 反正知道對小魚好就好)。謝謝分享!

谢谢你看贴

These code snippets and analysis are quite interesting!

Sometimes, it's easy to understand by reading the code :)

厲害,有人跟O大哥一起研究代碼了。

向O哥学习

以后你们都是Steem专家了。

Hmm Nice dear @nationalpark welldone keep it up upvoted :) Visit me plz when you free i hope you will enjoy :) Thanks Alot have a nice day