[번역] Scotbot 코드 최적화

in #sct5 years ago

As more and more posts were created that have at least one of the scot tags included, my previous scotbot implementation was not efficient anymore.

Scot 태그를 포함한 포스팅들의 숫자가 증가하면서, 기존 scotbot 시행은 더이상 효율적이지 못하게 되었습니다.


I rewrote the part that handles the all pending rshares and the token reward pool. In order to show the pending token rewards for one posts, I need to know the current reward pool size and the sum of all pending rshares of all posts.

Pending rshares (미확정 rshares) 와 Token reward pool(리워드 풀) 관련 부분들을 새로 작성하였습니다. 한 포스팅의 예상 보상액을 보여주기 위해서, 저는 현재 리워드 풀의 크기와 모든 포스팅의 미확정 rshares들의 합을 알아야 합니다.


As there are currently around 15000 pending posts/comments and 217000 votes on palnet, going everytime through all posts and votes is not very efficient.

현재 palnet에 약 15,000개의 보상 전 포스팅/댓글들과 217,000개의 vote가 있는데, 모든 포스팅과 보팅을 매번 계산하는 것은 효율적이지 못합니다.


The first part of improving this is now completed. The pending token amount for a post is no longer stored directly in the database and calculated directly on request. With this change, it is no longer necessary to change all pending posts/comments objects in the database at every round.

첫 개선이 이루어졌습니다. 포스팅의 미확정 보상액은 이제 더이상 데이터베이스에 직접 저장되지 않으며, 요청에 따라 계산됩니다. 이 개선으로 인하여, 매 라운드마다 데이터베이스의 모든 미확정 포스팅/댓글들의 보상액을 바꿀 필요가 없어졌습니다.


The complete sum of all rshares and the current reward pool can be received from the API:
https://scot-api.steem-engine.com/info?token=PAL
with the parameter pending_rshares and reward_pool. pending_rshares includes the author nonlinear curve.
The reward_pool is stored as integer, the token amount can be calculated by dividing it through 10**precision.

rshares 들의 전체 합과 현재 리워드 풀은 다음의 API에서 확인할 수 있습니다: (역자 주: PAL 토큰이 아니라 SCT 토큰 관련 정보를 볼 수 있는 링크로 대체함)
https://scot-api.steem-engine.com/info?token=SCT

pending_rshares 는 비선형 저자 보상 (주: 스코판은 1.3승입니다) 를 포함합니다.

리워드 풀은 정수로 저장되며, 토큰 개수는 리워프 풀 (reward_pool)을 10**precision 으로 나눠서 구할 수 있습니다. (주: 각 scot마다 precision 세팅값이 다릅니다. 스코판은 100인 것으로 추정 - 따라서 리워드 풀을 1,000으로 나눠주면 됩니다)


Every posts has now a vote_rsharesparameter, which is the sum of all vote rshares. The nonlinear author curve exponent is also stored in every posts with theauthor_curve_exponent parameter. The vote_rsharesparameter and the global pending_rshares are updated whenever a new vote arrives.

모든 포스팅은 이제 vote_rshares 변수를 가지는데, 이것은 모든 보팅의 rshares 들의 합입니다. 비선형 저자 보상 승수도 모든 포스팅에 author_curve_exponent 로 저장됩니다. 새 보팅이 이루어질 때마다, vote_rshares 와 글로벌 (주: 특정 포스팅이 아닌 전체 scot에 적용되는) pending_rshares 가 업데이트됩니다.


The pending token amount can then be calculated on request by:

pending_token = int_pow(vote_rshares, author_curve_exponent) / pending_rshares * reward_pool / 10**precision


미확정 토큰 개수는 요청이 있을 때 다음과 같이 계산됩니다:

pending_token = int_pow(vote_rshares, author_curve_exponent) / pending_rshares * reward_pool / 10**precision


Blacklisted accounts

Whenever the @steemsc accounts mutes an account, this account will be blacklisted from all SCOT instances. A blacklisted account can not vote and can only post once a day.

Currently, only animalcontrol is muted by steemsc.

블랙리스트 계정들

@steemsc 계정이 특정 계정을 mute(차단) 할때마다, 모든 SCOT에서 그 계정은 차단됩니다. 블랙리스트된 계정은 보팅을 할 수 없으며 하루에 한 번만 포스팅할 수 있습니다.

현재, animalcontrol만 steemsc에 의해 차단되어 있습니다.

Sort:  
Loading...

Thank you for your continued support towards JJM. For each 1000 JJM you are holding, you can get an additional 1% of upvote. 10,000JJM would give you a 11% daily voting from the 700K SP virus707 account.

Hi @glory7!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 3.718 which ranks you at #4962 across all Steem accounts.
Your rank has dropped 575 places in the last three days (old rank 4387).

In our last Algorithmic Curation Round, consisting of 193 contributions, your post is ranked at #100.

Evaluation of your UA score:
  • You're on the right track, try to gather more followers.
  • The readers like your work!
  • You have already shown user engagement, try to improve it further.

Feel free to join our @steem-ua Discord server

Coin Marketplace

STEEM 0.30
TRX 0.11
JST 0.033
BTC 64320.07
ETH 3154.23
USDT 1.00
SBD 4.34