[번역] Scotbot 코드 최적화

in #sct6 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:  

번역하느라 고생하셨습니다. 몇 군데만 조금 수정하면 문맥이 훨씬 부드러울 것 같습니다. (검토하다보니 개선 의견이 좀 많아졌네요. 양질의 글을 남기기 위한 작업으로 양해해주시길)

(1) 기존 scotbot 시행은 더이상 효율적이지 못하게 되었습니다.

=> 보통 프로그래밍에서 implementation은 구현이라고 번역합니다. 조금 더 손 본다면 "기존에 구현한 scotbot은 더이상.."으로 수정하면 더 좋을 것 같습니다.

(2) pending

pending은 스팀에서 참 번역하기 애매한 단어 중 하나입니다. 미확정도 괜찮은 것 같습니다. 참고로 이전 scot 관련 번역에서는 아직 페이아웃이 발생하지 않은 또는 아직 보상이 발생하지 않은 으로 번역했습니다.

(3) 한 포스팅의 예상 보상액을 보여주기 위해서, 저는 현재 리워드 풀의 크기와 모든 포스팅의 미확정 rshares들의 합을 알아야 합니다.

=> 한 포스팅의 예상 보상액을 보여주려면, 현재 리워드 풀의 크기와 모든 포스팅의 미확정 rshares 합계를 알아야 합니다.

(4) 모든 포스팅과 보팅을 매번 계산하는 것은 효율적이지 못합니다.

=> 이 부분은 pending token amount을 요청에 의해 처리하는 것으로 변경한 것과 관련있으므로,

포스팅과 보팅이 발생할때마다 미확정 토큰 수량을 계산하는 것은 효율적이지 못합니다

로 변경하면 더 좋을것 같습니다만. 어떠신가요?

(5) 첫 개선이 이루어졌습니다.

=> 첫 번째 개선 작업이 완료되었습니다.

(6) 포스팅의 미확정 보상액은 이제 더이상 데이터베이스에 직접 저장되지 않으며, 요청에 따라 계산됩니다.

=> 이제 포스팅의 미확정 토큰 수량은 데이터베이스에 직접 저장되지 않으며, 요청이 있을 때만 계산됩니다.

(7) 이 개선으로 인하여, 매 라운드마다 데이터베이스의 모든 미확정 포스팅/댓글들의 보상액을 바꿀 필요가 없어졌습니다.

=> object는 데이터베이스 안의 객체로 해석하는게 좋을 것 같습니다.

이같은 변화로 인해, 매 라운드마다 데이터베이스의 모든 미확정 포스팅/댓글 객체를 변경할 필요가 없어졌습니다.

(8) rshares 들의 전체 합과 현재 리워드 풀은 다음의 API에서 확인할 수 있습니다:

=> rshares 들의 전체 합과 현재 리워드 풀은 다음의 API에서 확인할 수 있으며, pending_rshares, reward_pool 매개변수가 이들과 관련된 값입니다.

(9) 리워드 풀은 정수로 저장되며

=> 리워드 풀은 매개변수를 의미하므로, reward_pool로 표현하는 것이 좋을 것 같습니다.

(10) 모든 포스팅은 이제 vote_rshares 변수를 가지는데, 이것은 모든 보팅의 rshares 들의 합입니다.

=> 변수 대신 parameter는 매개변수로 통일.

(11) 비선형 저자 보상 승수도 모든 포스팅에 author_curve_exponent 로 저장됩니다

=> ..보상 승수도 author_curve_exponent 매개변수를 통해 모든 포스팅에 저장됩니다.

(12) 새 보팅이 이루어질 때마다, vote_rshares 와 글로벌 (주: 특정 포스팅이 아닌 전체 scot에 적용되는) pending_rshares 가 업데이트됩니다.

=> global은 프로그래밍에서 범위를 나타내는 단어이며 보통 전역이라고 번역합니다.

vote_rshares 매개변수와 전역 매개변수인 pending_rshares 가 업데이트 됩니다.

자세한 피드백 너무너무 감사드립니다. 이렇게 신경써주셔서 감사합니다.

  • 약소하게나마 제가 동원할 수 있는 보팅으로 우선 감사의 인사를 드리고자 합니다.

좋게 받아들여주셔서 저야말로 감사합니다. ㅎㅎ 앞으로도 좋은 번역 글 부탁드립니다.~

jcar토큰 보팅합니다. @glory7 님의 추천으로 보팅드립니다. 정말 번역의 대가이십니다. ㅎ

과찬이세요 ㅎㅎ 감사합니다~

Posted using Partiko iOS

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

New to Steemit?