#### Expected behavior `blockchain.stream()` and `blockchain.ops()` should stream both regular and virtual Steem operations. Via optional arguments, it should be possible to stream only virtual operations. #### Actual behavior `blockchain.stream()` and `blockchain.ops()` only stream regular operations. Virtual ops like `author_reward`, `curation_reward` and others are not contained in the stream. `blockchain.ops()` lists an optional parameter `only_virtual_ops`. If set, `blockchain.ops()` fails with ``` TypeError: blocks() got an unexpected keyword argument 'only_virtual_ops' ``` #### How to reproduce ```python from beem import Steem from beem.blockchain import Blockchain s = Steem(node='https://rpc.buildteam.io') b = Blockchain(s) for op in b.stream(): if op['type'] == "author_reward": print(op) break ``` This script never completes, because none of the ops yielded by `stream()` is a (virtual) "author_reward" op. The same code with `steem-python` completes within seconds: ```python from steem import Steem from steem.blockchain import Blockchain s = Steem(nodes=['https://rpc.buildteam.io']) b = Blockchain(s) for op in b.stream(): if op['type'] == "author_reward": print(op) break ``` ##### Stacktrace for `virtual_ops_only` ```python >>> from beem.blockchain import Blockchain >>> b = Blockchain() >>> for op in b.ops(virtual_ops_only=True): ... print(op) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.6/site-packages/beem/blockchain.py", line 323, in ops for block in self.blocks(start=start, stop=stop, **kwargs): TypeError: blocks() got an unexpected keyword argument 'virtual_ops_only' ``` ##### Environment ``` # python --version Python 3.6.4 # beempy --version beempy, version 0.19.26 # steempy --version steempy 1.0.0 ```
author | stmdev | ||||||
---|---|---|---|---|---|---|---|
permlink | blockchain-stream-and-blockchain-ops-are-missing-virtual-operations | ||||||
category | utopian-io | ||||||
json_metadata | "{"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":121505504,"name":"beem","full_name":"holgern/beem","html_url":"https://github.com/holgern/beem","fork":false,"owner":{"login":"holgern"}},"pullRequests":[],"platform":"github","type":"bug-hunting","tags":["utopian-io","beem","python","steemdev","bug"],"moderator":null,"config":{"questions":[{"question":"What was the severity level of the bug?","question_id":"bug-1","answers":[{"answer":"Critical","answer_id":"bug-1-a-1","value":45},{"answer":"Major","answer_id":"bug-1-a-2","value":38.5},{"answer":"Minor","answer_id":"bug-1-a-3","value":29},{"answer":"Trivial","answer_id":"bug-1-a-4","value":0}]},{"question":"Were the steps to reproduce the bug easy to understand and follow?","question_id":"bug-2","answers":[{"answer":"Yes, the steps were clearly understandable and easy to follow.","answer_id":"bug-2-a-1","value":7.5},{"answer":"The steps were easy to follow, but were not described with sufficient clarity.","answer_id":"bug-2-a-2","value":5.25},{"answer":"The description of the steps severely lacked in clarity, but it is possible to reproduce.","answer_id":"bug-2-a-3","value":2.25},{"answer":"The steps are badly explained and nearly impossible to follow.","answer_id":"bug-2-a-4","value":0}]},{"question":"Was the bug a technical issue or a user experience (UX) issue?","question_id":"bug-3","answers":[{"answer":"It was largely technical but also had significant impact on the user experience.","answer_id":"bug-3-a-1","value":10},{"answer":"It was purely technical.","answer_id":"bug-3-a-2","value":9},{"answer":"It described a UX issue caused by a technical error.","answer_id":"bug-3-a-3","value":5},{"answer":"It described a UX issue alone.","answer_id":"bug-3-a-4","value":0}]},{"question":"How common and easy to discover was the bug reported?","question_id":"bug-4","answers":[{"answer":"The bug was a very common occurrence and impacted the end user experience significantly.","answer_id":"bug-4-a-1","value":7.5},{"answer":"The bug was relatively common, but avoidable.","answer_id":"bug-4-a-2","value":6},{"answer":"The bug was very rare but impactful.","answer_id":"bug-4-a-3","value":3},{"answer":"The bug was nearly impossible to encounter without actively looking for it.","answer_id":"bug-4-a-4","value":0}]},{"question":"Has the contributor reported the issue to the project owner prior to submitting it to Utopian?","question_id":"bug-5","answers":[{"answer":"Yes, it was reported by this contributor and acknowledged by the project owner. Utopian was never mentioned in the process.","answer_id":"bug-5-a-1","value":5},{"answer":"Yes, it was reported by this contributor but has to yet be acknowledged by the project owner.","answer_id":"bug-5-a-2","value":4},{"answer":"No, it was not reported, but an effort to alert the project owner has been made.","answer_id":"bug-5-a-3","value":1.25},{"answer":"No, it was not reported OR there is evidence the user contacted the project owner on behalf of Utopian without permission.","answer_id":"bug-5-a-4","value":0}]},{"question":"How would you describe the formatting, language and overall presentation of the post?","question_id":"c-1","answers":[{"answer":"The post is of very high quality.","answer_id":"c-1-a-1","value":10},{"answer":"The post is of decent quality, but not spectacular in any way.","answer_id":"c-1-a-2","value":7},{"answer":"The post is poorly written and/or formatted, but readable.","answer_id":"c-1-a-3","value":3},{"answer":"The post is really hard to read and the content is barely understandable.","answer_id":"c-1-a-4","value":0}]},{"question":"How would you rate the overall value of this contribution on the open source community and ecosystem?","question_id":"c-2","answers":[{"answer":"This contribution brings great and impactful value, and can be used for applications outside the specific project.","answer_id":"c-2-a-1","value":20},{"answer":"This contribution adds significant value to the open source community and ecosystem, or is of critical importance to the specific project.","answer_id":"c-2-a-2","value":16},{"answer":"This contribution adds some value to the open source community and ecosystem or is only valuable to the specific project.","answer_id":"c-2-a-3","value":8},{"answer":"This contribution adds no value to the open source community and ecosystem or the specific project.","answer_id":"c-2-a-4","value":0}]}]},"questions":null,"score":null,"total_influence":null,"staff_pick":null,"staff_pick_by":null}" | ||||||
created | 2018-05-03 08:58:15 | ||||||
last_update | 2018-05-03 10:33:30 | ||||||
depth | 0 | ||||||
children | 8 | ||||||
last_payout | 2018-05-10 08:58:15 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 1.422 HBD | ||||||
curator_payout_value | 0.544 HBD | ||||||
pending_payout_value | 0.000 HBD | ||||||
promoted | 0.000 HBD | ||||||
body_length | 1,864 | ||||||
author_reputation | 10,427,398,400,460 | ||||||
root_title | "blockchain.stream and blockchain.ops are missing virtual operations" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 1,000,000.000 HBD | ||||||
percent_hbd | 10,000 | ||||||
post_id | 53,602,913 | ||||||
net_rshares | 397,144,516,911 | ||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
techslut | 0 | 245,813,162,019 | 100% | ||
cifer | 0 | 5,247,091,745 | 80% | ||
crokkon | 0 | 35,832,779,637 | 100% | ||
holger80 | 0 | 104,797,688,261 | 50% | ||
nafestw | 0 | 5,453,795,249 | 39.09% |
Thanks for the contribution it has been approved ! ---------------------------------------------------------------------- Need help? Write a ticket on https://support.utopian.io/. Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://utopian.io/moderators)
author | cha0s0000 |
---|---|
permlink | re-stmdev-blockchain-stream-and-blockchain-ops-are-missing-virtual-operations-20180508t034550310z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"links":["https://support.utopian.io/","https://discord.gg/uTyJkNm","https://utopian.io/moderators"],"app":"steemit/0.1"} |
created | 2018-05-08 03:45:51 |
last_update | 2018-05-08 04:37:48 |
depth | 1 |
children | 5 |
last_payout | 2018-05-15 03:45:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.147 HBD |
curator_payout_value | 0.049 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 288 |
author_reputation | 30,983,518,016,225 |
root_title | "blockchain.stream and blockchain.ops are missing virtual operations" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 54,493,751 |
net_rshares | 42,223,404,127 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
crokkon | 0 | 42,223,404,127 | 100% |
The docu says that ops() should return also virtual operations: ``` ops(start=None, stop=None, **kwargs) Yields all operations (including virtual operations) starting from start. Parameters: start (int) β Starting block stop (int) β Stop at this block mode (str) β We here have the choice between βheadβ (the last block) and βirreversibleβ (the block that is confirmed by 2/3 of all block producers and is thus irreversible) only_virtual_ops (bool) β Only yield virtual operations ``` but does not. So it is a valid bug report to me.
author | holger80 |
---|---|
permlink | re-cha0s0000-re-stmdev-blockchain-stream-and-blockchain-ops-are-missing-virtual-operations-20180508t042536027z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-05-08 04:25:42 |
last_update | 2018-05-08 04:25:42 |
depth | 2 |
children | 1 |
last_payout | 2018-05-15 04:25:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 535 |
author_reputation | 358,857,509,568,825 |
root_title | "blockchain.stream and blockchain.ops are missing virtual operations" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 54,498,614 |
net_rshares | 0 |
give me some mins to check it !
author | cha0s0000 |
---|---|
permlink | re-holger80-re-cha0s0000-re-stmdev-blockchain-stream-and-blockchain-ops-are-missing-virtual-operations-20180508t043259384z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-05-08 04:33:00 |
last_update | 2018-05-08 04:33:00 |
depth | 3 |
children | 0 |
last_payout | 2018-05-15 04:33:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 31 |
author_reputation | 30,983,518,016,225 |
root_title | "blockchain.stream and blockchain.ops are missing virtual operations" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 54,499,393 |
net_rshares | 0 |
hi @cha0s0000, `author_reward` is a [block chain operation type](https://github.com/holgern/beem/blob/6a89402b178d418d6e8aec049f65ef374fde0d54/beembase/operationids.py#L50) that should come out of `blockchain.stream()`. `only_virtual_ops` is an option to `blockchain.stream()`, see [here](https://github.com/holgern/beem/blob/6a89402b178d418d6e8aec049f65ef374fde0d54/beem/blockchain.py#L405). I've been in contact with the PO who confirmed this is a bug.
author | stmdev |
---|---|
permlink | re-cha0s0000-re-stmdev-blockchain-stream-and-blockchain-ops-are-missing-virtual-operations-20180508t042557697z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"users":["cha0s0000"],"links":["https://github.com/holgern/beem/blob/6a89402b178d418d6e8aec049f65ef374fde0d54/beembase/operationids.py#L50","https://github.com/holgern/beem/blob/6a89402b178d418d6e8aec049f65ef374fde0d54/beem/blockchain.py#L405"],"app":"steemit/0.1"} |
created | 2018-05-08 04:25:57 |
last_update | 2018-05-08 04:25:57 |
depth | 2 |
children | 2 |
last_payout | 2018-05-15 04:25:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 31.200 HBD |
curator_payout_value | 10.394 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 454 |
author_reputation | 10,427,398,400,460 |
root_title | "blockchain.stream and blockchain.ops are missing virtual operations" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 54,498,643 |
net_rshares | 8,869,845,490,889 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
alexzicky | 0 | 3,194,695,063 | 6% | ||
utopian-io | 0 | 8,866,650,795,826 | 6% |
give me some mins to check it !Thank you !
author | cha0s0000 |
---|---|
permlink | re-stmdev-re-cha0s0000-re-stmdev-blockchain-stream-and-blockchain-ops-are-missing-virtual-operations-20180508t043328968z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-05-08 04:33:30 |
last_update | 2018-05-08 04:33:30 |
depth | 3 |
children | 0 |
last_payout | 2018-05-15 04:33:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 42 |
author_reputation | 30,983,518,016,225 |
root_title | "blockchain.stream and blockchain.ops are missing virtual operations" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 54,499,444 |
net_rshares | 0 |
Hello @stmdev. Due to a small delay in reviewing and upvoting this contribution, this comment has been upvoted instead.
author | utopian-io |
---|---|
permlink | re-stmdev-re-cha0s0000-re-stmdev-blockchain-stream-and-blockchain-ops-are-missing-virtual-operations-20180509t223750470z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"users":["stmdev"],"app":"steemit/0.1"} |
created | 2018-05-09 22:37:51 |
last_update | 2018-05-09 22:37:51 |
depth | 3 |
children | 0 |
last_payout | 2018-05-16 22:37:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.150 HBD |
curator_payout_value | 0.048 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 119 |
author_reputation | 152,955,367,999,756 |
root_title | "blockchain.stream and blockchain.ops are missing virtual operations" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 54,836,471 |
net_rshares | 41,378,936,045 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
crokkon | 0 | 41,378,936,045 | 100% |
Congratulations @stmdev! You have completed some achievement on Steemit and have been rewarded with new badge(s) : [](http://steemitboard.com/@stmdev) Award for the number of upvotes received Click on any badge to view your own Board of Honor on SteemitBoard. For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard) If you no longer want to receive notifications, reply to this comment with the word `STOP` > Upvote this notification to help all Steemit users. Learn why [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
author | steemitboard |
---|---|
permlink | steemitboard-notify-stmdev-20180510t050114000z |
category | utopian-io |
json_metadata | {"image":["https://steemitboard.com/img/notifications.png"]} |
created | 2018-05-10 05:01:12 |
last_update | 2018-05-10 05:01:12 |
depth | 1 |
children | 0 |
last_payout | 2018-05-17 05:01:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 680 |
author_reputation | 38,975,615,169,260 |
root_title | "blockchain.stream and blockchain.ops are missing virtual operations" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 54,885,242 |
net_rshares | 0 |
Hey @stmdev **Thanks for contributing on Utopian**. We're already looking forward to your next contribution! **Contributing on Utopian** Learn how to contribute on <a href="https://join.utopian.io">our website</a> or by watching <a href="https://www.youtube.com/watch?v=8S1AtrzYY1Q">this tutorial</a> on Youtube. **Want to chat? Join us on Discord https://discord.gg/h52nFrV.** <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for Utopian Witness!</a>
author | utopian-io |
---|---|
permlink | re-stmdev-blockchain-stream-and-blockchain-ops-are-missing-virtual-operations-20180509t223822289z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"users":["stmdev"],"links":["https://join.utopian.io","https://www.youtube.com/watch?v=8S1AtrzYY1Q","https://discord.gg/h52nFrV","https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1"],"app":"steemit/0.1"} |
created | 2018-05-09 22:38:21 |
last_update | 2018-05-09 22:38:21 |
depth | 1 |
children | 0 |
last_payout | 2018-05-16 22:38:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.147 HBD |
curator_payout_value | 0.048 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 505 |
author_reputation | 152,955,367,999,756 |
root_title | "blockchain.stream and blockchain.ops are missing virtual operations" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 54,836,537 |
net_rshares | 40,534,467,962 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
crokkon | 0 | 40,534,467,962 | 100% |