STEEM POWER retention ratio of top 50 witnesses

by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/steem-power-retention-ratio-of-top-50-witnesses Hello, this is @joviansummer(witness: @jswit). Some time ago there was a bit of discussion on discord witness chanel about witnesses' power-down/cashing-out. So out of curiosity I just checked current ratio of witnesses' own STEEM POWER(VESTS) and all-time producer reward(VESTS). The ratio is calculated by the following simple formula: ratio(%) = account's own SP(MV) / all-time producer reward SP(MV) * 100% Ratio value less than 100% indicates power-down. If witness does additional power-up or gets other types of reward(e.g., curation reward), the ratio may exceed 100%. This does not take witness' other accounts into consideration. All-time producer reward data is from @steemchiller's SDS API. Here is the result: rank account own_sp prod_sp ratio 1 justyy 2188.411MV 1284.2MV 170.41% 2 steemchiller 982.134MV 124...

파이썬에서 스팀잇 ID 및 포스팅 키 유효성 확인

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/id


파이썬에서 스팀잇 ID와 포스팅 키가 유효한지 확인하는 방법입니다. steem-python 모듈을 활용합니다.

steem-python

먼저 포스팅 키가 유효한지 확인하는 과정은 아래의 코드로 가능합니다.

import steem

STEEMIT_ID="joviansummer"
POSTING_KEY="my_posting_key"

# 포스팅 키 유효성 확인
try:
  user = steem.Steem(keys=[POSTING_KEY])
except:
  print("포스팅 키가 유효하지 않습니다.")
print("유효한 포스팅 키입니다.")

포스팅 키가 유효한지 확인이 되었으면 이제 이 포스팅 키의 주인이 스팀잇 ID와 일치하는지 확인합니다. 위의 코드에 이어서 아래의 코드로 가능합니다. (인터넷에서 발견하고 적어 두었는데 어디에서 찾았었는지 기억이 안 나네요.)

from steembase.account import PrivateKey

# 포스팅 키에 대응하는 공개키(public key)
pubkey = PrivateKey(POSTING_KEY).pubkey

# 스팀잇 ID에 대응하는 공개키
account = user.get_account(STEEM_ID)
pubkey2 = account['posting']['key_auths'][0][0]

# 양쪽 공개키가 일치하는지 확인
if str(pubkey) == str(pubkey2):
  print("스팀잇ID와 포스팅 키가 일치합니다.")
else:
  print("스팀잇ID와 포스팅 키가 일치하지 않습니다.")

오토보팅 서비스 개발은 주중에 틈틈이 설계하고 구상하면서 메모해 놓은 아이디어를 주말에 시간을 내서 구체적으로 시험하고 보완하는 식으로 진행중입니다. 시작한지 얼마 안되어서 그런지 일단 아직까지는 순조롭게 나아가고 있습니다.

Comments

Popular posts from this blog

스티미언의 영향력 지수 계산

jsup/avle code update - you don't have to write post everyday

jsup/avle 보팅 코드 갱신 - 1일1포스팅 강박에서 벗어나기