偶然间发现JUSSI的一个小BUG by oflyhigh

View this thread on steempeak.com
· @oflyhigh ·
$24.99
偶然间发现JUSSI的一个小BUG
I implemented a python library myself, and because I saw that the `condenser_api` would be deprecated, so in this python library I used other substitution APIs instead of using the `condenser_api`.


![image.png](https://images.hive.blog/DQmXbHdVstYLw8EFjWZj6hF5FANF4jrspacmSjhZMhFApCU/image.png)
(图源 :[pixabay](https://pixabay.com/))

My scripts use my python library and the local node, and they work together without any problems.

But when I tried to use https://api.hive.blog, the following API call went wrong:
>`network_broadcast_api.broadcast_transaction`

And the error message:
>{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"Internal Error","data":{"error_id":"b39f68b2-729c-4a3d-8c0e-3a55d3ae0559","jussi_request_id":"000136681014195215"}}}

First of all, I thought there was a problem in my script or python library, but when I examined it closely, I found nothing wrong. In addition, I found that using my local node or https://anyx.io, my scripts worked fine.

So what's the difference between https://api.hive.blog and my local node or https://anyx.io? The answer is https://api.hive.blog using JUSSI.

In order to test this problem, I tested some other nodes, and the results are the same: ***Nodes with JUSSI enabled return "internal error", while others handle it normally***.

We can use the following steps to reproduce this problem:

#### Step 1

Make an API Call to https://api.hive.blog (JUSSI enabled)
>`curl -s --data '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_transaction", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"vote_operation","value":{"voter":"hiveio","author":"alice","permlink":"a-post-by-alice","weight":10000}}],"extensions":[],"signatures":[]},"max_block_age":50}, "id":1}' https://api.hive.blog`

Check the response:
>{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"Internal Error","data":{"error_id":"b39f68b2-729c-4a3d-8c0e-3a55d3ae0559","jussi_request_id":"000136681014195215"}}}

#### Step 2

Make API Call to https://api.hive.blog (without JUSSI)
>`curl -s --data '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_transaction", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"vote_operation","value":{"voter":"hiveio","author":"alice","permlink":"a-post-by-alice","weight":10000}}],"extensions":[],"signatures":[]},"max_block_age":50}, "id":1}' https://anyx.io`

Check the response:
>{"error":{"code":-32000,"data":{"code":3030000,"message":"missing required posting authority" ...

#### Conclusion

We expect the two nodes to return the same information (step 2 is correct), but step 1 returns:"Internal Error".

In my opinion, for an API call, ***whether or not the node is JUSSI enabled, the result should be consistent***. So, I think this may be a BUG of JUSSI.

# 中文版

自己实现了个python库,因为看到`condenser_api`要被弃用,所以的实现时基本上都是用其它替代API。

使用这个库的程序配合我的本地节点,一直工作的挺好没啥毛病。

不过当我偶然使用https://api.hive.blog, 发现竟然无法处理`network_broadcast_api.broadcast_transaction`。

经过一系列的测试,我决定这个应该是一个BUG,没想到偶然间竟然测出JUSSI的一个BUG。因为指望JUSSI迅速更新是不可能了,只好先自己改一下库喽。
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 68 others
properties (23)
post_id86,090,177
authoroflyhigh
permlinkjussi-bug
categorycn
json_metadata{"tags":["cn","cutehive","cn-programming","jussi","bug"],"image":["https:\/\/images.hive.blog\/DQmXbHdVstYLw8EFjWZj6hF5FANF4jrspacmSjhZMhFApCU\/image.png"],"links":["https:\/\/pixabay.com\/","https:\/\/api.hive.blog","https:\/\/anyx.io","https:\/\/anyx.io?"],"app":"steemit\/0.2","format":"markdown"}
created2020-05-22 02:50:45
last_update2020-05-22 02:50:45
depth0
children1
net_rshares47,894,918,886,095
last_payout2020-05-29 02:50:45
cashout_time1969-12-31 23:59:59
total_payout_value12.634 SBD
curator_payout_value12.359 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length3,184
author_reputation1,148,153,621,496,884
root_title偶然间发现JUSSI的一个小BUG
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (132)
@cheetah ·
Hi! Did you know that steemit.com is now censoring users and posts based on their opinions?
 All the posts of these users are gone!
https://github.com/steemit/condenser/commit/3394af78127bdd8d037c2d49983b7b9491397296 

 Here's a list of some banned users:
```'roelandp', 'blocktrades', 'anyx', 'ausbitbank', 'gtg', 'themarkymark', 'lukestokes.mhth', 'netuoso', 'innerhive'```
See anyone you recognize? There could be more, they also have a remote IP ban list.

Will you be censored next?
properties (22)
post_id86,090,179
authorcheetah
permlinkcheetah-re-oflyhighjussi-bug
categorycn
json_metadata{}
created2020-05-22 02:50:54
last_update2020-05-22 02:50:54
depth1
children0
net_rshares0
last_payout2020-05-29 02:50:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length487
author_reputation750,854,098,279,735
root_title偶然间发现JUSSI的一个小BUG
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000