create account

update for beem - preparing beem for HF 20 and delegate added to beempy by holger80

View this thread on: hive.blogpeakd.comecency.com
· @holger80 · (edited)
$20.72
update for beem - preparing beem for HF 20 and delegate added to beempy
#### Repository
https://github.com/holgern/beem
<center>
![beem-logo.png](https://cdn.utopian.io/posts/d563a408c062506aed88befbe7781399184fbeem-logo.png)
</center>
[beem](https://github.com/holgern/beem) is a python library for steem. beem has now 489 unit tests and a coverage of 73 %. The current version is 0.19.56.
I created a discord channel for answering a question or discussing beem: https://discord.gg/4HM592V

The newest beem version can be installed by:
```
pip install -U beem
```
or when  using conda:
```
conda install beem
```
beem can be updated by:
```
conda update beem
```

## Bug Fixes
### Account.get_voting_power() method Not Functional on HF20 RPC Nodes
The post about the bug can be found [here](https://hive.blog/utopian-io/@anthonyadavisii/beem-0-19-55-beem-account-getvotingpower-method-not-functional-on-hf20-rpc-nodes).
`get_voting_power` was fixed in  [commit c01e10d](https://github.com/holgern/beem/commit/c01e10d2629dd868f90532dc60d13da7f923f946)
by using:
* `self["voting_manabar"]["current_mana"]`
* `self["voting_manabar"]["last_update_time"]`

Example with working get_voting_power():
```
from beem import Steem
from beem.account import Account

stm = Steem(node="https://api.steemit.com")
acc = Account("holger80", steem_instance=stm)
acc.get_voting_power()
95.37947158587963
stm
<Steem node=https://api.steemit.com, nobroadcast=False>
stm.get_blockchain_version()
'0.20.2'
```

### New Features
#### delegation added to beempy
Delegation can be done by
```
beempy delegate -a <account> <amount> <to_account>
```
`amount` can be VESTS or STEEM and must be quoted with `"`.
Examples:
```
beempy delegate -a beembot "1 STEEM" holger80
beempy delegate -a beemboot "1000 VESTS" holger80
```
It is also possible to create steemconnect links by adding `-l` before `delegate`:
```
beempy -l delegate -a beembot "1 STEEM" holger80
```
This results in `https://steemconnect.com/sign/delegate_vesting_shares?delegator=beembot&delegatee=holger80&vesting_shares=2021.090606+VESTS`
### Connection to HF20 testnet
The asset symbols were fixed for the HF20 testnet. It can be used by:
```
from beem import Steem
stm = Steem(node="https://testnet.steemitdev.com")
stm.chain_params["chain_id"] = "46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32"
```

#### Nodelist update
All nodes in nodelist were updated.

##### Unit tests
All unit tests were fixed. As non-appbase nodes are no longer available, all unit tests which uses non-appbase nodes were failing. This was fixed.

#### Constants fixed
* `STEEM_VOTING_MANA_REGENERATION_SECONDS` and `STEEM_REVERSE_AUCTION_WINDOW_SECONDS_HF20` were added.

## Commit history
### STEEM_VOTING_MANA_REGENERATION_SECONDS is used for regenerated_vp calculation
* [commit d993074](https://github.com/holgern/beem/commit/d993074d974d9838f8c4a85731230b108654fc98)
* Fix unit test
### Fix constants and unittests
* [commit b407a5f](https://github.com/holgern/beem/commit/b407a5f03af0c75779e66a751224055088658fdd)
### Fix unit tests
* [commit 65bcdec](https://github.com/holgern/beem/commit/65bcdec455808eada356c99bee545baccea2736f)

### Improved several functions and nodelist updated
* [commit 476656c](https://github.com/holgern/beem/commit/476656c679c42df1923b7dbe41cac4fbfaaeee94)
### CONSTANTS
* STEEM_REVERSE_AUCTION_WINDOW_SECONDS_HF20 added

### Nodelist
* nodes information updated

### Steem
* get_dust_threshold() improved and get_config used
* hardfork checks improved
* hardfork property improved by using get_hardfork_properties function

### Changelog.rst added and Issue #80 fixed

## Fix remaining unit tests
* [commit 74c189a](https://github.com/holgern/beem/commit/74c189a511bb6915cdaccfb739e8571eb9ca78cf)

## Fix more unit tests for appbase and upcoming HF20
* [commit 6ddfeea](https://github.com/holgern/beem/commit/6ddfeea9b06e3d1be857e868e6bdce2296000628)

## Remove non appbase nodes and related tests from all unit tests Improve blockchain.stream() for appbase
* [commit 77bf202](https://github.com/holgern/beem/commit/77bf20234e5d2253ddd14cc9078c9a48f542294b)

## Fix warnings
* [commit c98562c](https://github.com/holgern/beem/commit/c98562cb4b6ecad7db1f57c7b402c2f920032c76)

## Fix flake8 and revert changes to sbd_to_rshares
* [commit d55ab7b](https://github.com/holgern/beem/commit/d55ab7b775827ba339aa5bfe972c343a1875c3b5)

## Add delegate to beempy and some HF20 fixes
* [commit c01e10d](https://github.com/holgern/beem/commit/c01e10d2629dd868f90532dc60d13da7f923f946)

___

#### GitHub Account
https://github.com/holgern/
____
If you like what I'm doing, please consider @holger80 as one of your witnesses ([steemconnect](https://v2.steemconnect.com/sign/account-witness-vote?witness=holger80&approve=1)).
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 4 others
properties (23)
authorholger80
permlinkupdate-for-beem-preparing-beem-for-hf-20-and-delegate-added-to-beempy
categoryutopian-io
json_metadata"{"community": "busy", "app": "beempy/0.23.10", "format": "markdown", "tags": ["utopian-io", "development", "beem", "python", "busy"], "users": ["anthonyadavisii", "holger80"], "links": ["https://github.com/holgern/beem", "https://github.com/holgern/beem", "https://discord.gg/4HM592V", "https://hive.blog/utopian-io/@anthonyadavisii/beem-0-19-55-beem-account-getvotingpower-method-not-functional-on-hf20-rpc-nodes", "https://github.com/holgern/beem/commit/c01e10d2629dd868f90532dc60d13da7f923f946", "https://github.com/holgern/beem/commit/d993074d974d9838f8c4a85731230b108654fc98", "https://github.com/holgern/beem/commit/b407a5f03af0c75779e66a751224055088658fdd", "https://github.com/holgern/beem/commit/65bcdec455808eada356c99bee545baccea2736f", "https://github.com/holgern/beem/commit/476656c679c42df1923b7dbe41cac4fbfaaeee94", "https://github.com/holgern/beem/commit/74c189a511bb6915cdaccfb739e8571eb9ca78cf"], "image": ["https://cdn.utopian.io/posts/d563a408c062506aed88befbe7781399184fbeem-logo.png"], "canonical_url": "https://hive.blog/utopian-io/@holger80/update-for-beem-preparing-beem-for-hf-20-and-delegate-added-to-beempy"}"
created2018-09-22 13:23:36
last_update2020-05-23 14:50:18
depth0
children10
last_payout2018-09-29 13:23:36
cashout_time1969-12-31 23:59:59
total_payout_value16.594 HBD
curator_payout_value4.128 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,712
author_reputation358,857,509,568,825
root_title"update for beem - preparing beem for HF 20 and delegate added to beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id71,946,522
net_rshares16,242,915,742,343
author_curate_reward""
vote details (68)
@algo.coder ·
Thank you for the quick fixes !
I had nightmares about steeping down from the podium in your curation contest :D

Joke aside, Beem is the best there is ! Thanks a lot for your hard work !
properties (22)
authoralgo.coder
permlinkre-holger80-update-for-beem-preparing-beem-for-hf-20-and-delegate-added-to-beempy-20180922t143218201z
categoryutopian-io
json_metadata{"community":"busy","app":"busy/2.5.6","format":"markdown","tags":["utopian-io"],"users":[],"links":[],"image":[]}
created2018-09-22 14:32:18
last_update2018-09-22 14:32:18
depth1
children0
last_payout2018-09-29 14:32:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length187
author_reputation3,643,171,587,055
root_title"update for beem - preparing beem for HF 20 and delegate added to beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id71,952,481
net_rshares0
@emrebeyler ·
$0.14
Greetings, great updates as usual.

One question, though, it seems appbase nodes supports both ```voting_manabar``` dict and the old ```last_vote_time``` and ```voting_power``` fields to keep the backward compability. Why beem was failing before this fix?

***

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/2222222).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
👍  , , , , ,
properties (23)
authoremrebeyler
permlinkre-holger80-update-for-beem-preparing-beem-for-hf-20-and-delegate-added-to-beempy-20180923t180249864z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2222222","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2018-09-23 18:02:51
last_update2018-09-23 18:02:51
depth1
children4
last_payout2018-09-30 18:02:51
cashout_time1969-12-31 23:59:59
total_payout_value0.118 HBD
curator_payout_value0.019 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length751
author_reputation448,535,049,068,622
root_title"update for beem - preparing beem for HF 20 and delegate added to beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id72,055,763
net_rshares115,636,963,773
author_curate_reward""
vote details (6)
@holger80 ·
It failed as not all nodes have both dicts. Nodes running 0.19.12 have `voting_power ` and nodes running 0.20.2 have only `voting_manabar `.
properties (22)
authorholger80
permlinkre-emrebeyler-re-holger80-update-for-beem-preparing-beem-for-hf-20-and-delegate-added-to-beempy-20180923t182852986z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-09-23 18:29:06
last_update2018-09-23 18:29:06
depth2
children3
last_payout2018-09-30 18:29:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length140
author_reputation358,857,509,568,825
root_title"update for beem - preparing beem for HF 20 and delegate added to beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id72,057,556
net_rshares0
@emrebeyler · (edited)
I didn't try with all of them but ```https://api.steemit.com``` had both of them. (v0.20.2)
👍  
properties (23)
authoremrebeyler
permlinkre-holger80-re-emrebeyler-re-holger80-update-for-beem-preparing-beem-for-hf-20-and-delegate-added-to-beempy-20180923t183016510z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-09-23 18:30:15
last_update2018-09-23 18:30:48
depth3
children2
last_payout2018-09-30 18:30:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length91
author_reputation448,535,049,068,622
root_title"update for beem - preparing beem for HF 20 and delegate added to beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id72,057,649
net_rshares2,077,633,745
author_curate_reward""
vote details (1)
@flugschwein ·
$0.08
Thank you very much for all the work you put into beem :D
I really enjoy using (and sometimes even improving) it ;)
👍  , ,
properties (23)
authorflugschwein
permlinkre-holger80-update-for-beem-preparing-beem-for-hf-20-and-delegate-added-to-beempy-20180922t152757323z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"steempeak","app":"steempeak"}
created2018-09-22 15:28:00
last_update2018-09-22 15:28:00
depth1
children1
last_payout2018-09-29 15:28:00
cashout_time1969-12-31 23:59:59
total_payout_value0.058 HBD
curator_payout_value0.017 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length115
author_reputation11,950,112,708,339
root_title"update for beem - preparing beem for HF 20 and delegate added to beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id71,957,579
net_rshares57,241,476,185
author_curate_reward""
vote details (3)
@holger80 ·
Thank you for improving beem :).
properties (22)
authorholger80
permlinkre-flugschwein-re-holger80-update-for-beem-preparing-beem-for-hf-20-and-delegate-added-to-beempy-20180922t162124439z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-09-22 16:21:33
last_update2018-09-22 16:21:33
depth2
children0
last_payout2018-09-29 16:21:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length32
author_reputation358,857,509,568,825
root_title"update for beem - preparing beem for HF 20 and delegate added to beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id71,962,296
net_rshares0
@steem-ua ·
#### Hi @holger80!

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

In our last Algorithmic Curation Round, consisting of 426 contributions, your post is ranked at **#50**.
##### Evaluation of your UA score:

* You've built up a nice network.
* The readers appreciate your great work!
* Try to improve on your user engagement! The more interesting interaction in the comments of your post, the better!


**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-update-for-beem-preparing-beem-for-hf-20-and-delegate-added-to-beempy-20180923t023507z
categoryutopian-io
json_metadata"{"app": "beem/0.19.54"}"
created2018-09-23 02:35:09
last_update2018-09-23 02:35:09
depth1
children0
last_payout2018-09-30 02:35:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length712
author_reputation23,214,230,978,060
root_title"update for beem - preparing beem for HF 20 and delegate added to beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id71,997,939
net_rshares0
@steemprojects ·
This post has been just added as new item to _[timeline of beem on Steem Projects](https://steemprojects.com/projects/p/beem/?utm_source=comment_timeline&utm_medium=steem&utm_campaign=new_event&utm_content=c1)_.

If you want to be notified about new updates from this project, register on Steem Projects and add beem to your favorite projects.
properties (22)
authorsteemprojects
permlinkre-update-for-beem-preparing-beem-for-hf-20-and-delegate-added-to-beempy-20180922t150751
categoryutopian-io
json_metadata""
created2018-09-22 15:07:54
last_update2018-09-22 15:07:54
depth1
children0
last_payout2018-09-29 15:07:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length345
author_reputation29,054,729,340
root_title"update for beem - preparing beem for HF 20 and delegate added to beempy"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id71,955,748
net_rshares0