Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posting bw penalty fn is linear instead of quadratic #633

Closed
zxcat opened this issue May 3, 2019 · 3 comments
Closed

Posting bw penalty fn is linear instead of quadratic #633

zxcat opened this issue May 3, 2019 · 3 comments
Assignees
Milestone

Comments

@zxcat
Copy link
Contributor

zxcat commented May 3, 2019

In Golos author's reward weight calculated as:

reward_weight = uint16_t(std::min(
    (STEEMIT_POST_WEIGHT_CONSTANT * STEEMIT_100_PERCENT) / (pb.value * pb.value),
    uint64_t(STEEMIT_100_PERCENT)));

(STEEMIT_POST_WEIGHT_CONSTANT is 400%² = cutoff²)

In posting smart-contract we have linear dependency: https://github.com/GolosChain/golos.contracts/blob/d12b194da94eb67b3c9f286c59d21c0d34d5a24c/golos.publication/golos.publication.cpp#L908-L910

@kudzinp
Copy link
Contributor

kudzinp commented May 29, 2019

#688

@kudzinp
Copy link
Contributor

kudzinp commented Jun 3, 2019

  • create accounts
  • set params
  • open balances
  • add funds
  • set rules
  • set limits
  • create mssg
  • check reward weight
  • create one more mssg
  • check that reward weight was changed
  • create more mssgs
  • check that reward weight wasn't changed after reaching cutoff value

@s-medvedev

@zxcat
Copy link
Contributor Author

zxcat commented Jun 4, 2019

@DedbaradeD, it works differently. Reward weight should change when you reach cutoff and should not if charge is less than cutoff.
Details: the default cutoff used in testnet is 400%, each "create-post" costs 100%, and battery restores min(current_charge, current_charge*time_since_last_use/24h).
So you can create 4 posts in a row without penalty and with 100% reward weight. Note: there is other limit, restricting time between 2 posts to 5 minutes by default.
The 5th post will have greater charge than cutoff, and at this point penalty applied (calcrwrdwt called), and reward weight will be less than 100%.

kudzinp added a commit that referenced this issue Jun 17, 2019
kudzinp added a commit that referenced this issue Jun 18, 2019
kudzinp added a commit that referenced this issue Jun 18, 2019
kudzinp added a commit that referenced this issue Jun 18, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
kudzinp added a commit that referenced this issue Jun 19, 2019
s-medvedev pushed a commit that referenced this issue Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants