steemit / steem-python

The official Python (3) library for the Steem Blockchain.
https://steem.io
MIT License
153 stars 99 forks source link

Default public nodes don't work #114

Closed hrosspet closed 6 years ago

hrosspet commented 6 years ago

After steemd.steemit.com stopped running, steem-python no longer works with default values:

With 'https://api.steemit.com' it works just fine:

from steem import Steem
from steem.post import Post

s1 = Steem(nodes=['https://api.steemit.com'])
Post('@steemitdev/update-your-steem-apps-big-changes-coming-for-3rd-party-developers', steemd_instance=s1.steemd)

yields: <Post-@steemitdev/update-your-steem-apps-big-changes-coming-for-3rd-party-developers>

However:

s2 = Steem()
Post('@steemitdev/update-your-steem-apps-big-changes-coming-for-3rd-party-developers', steemd_instance=s2.steemd)

just hangs and yields nothing when trying to make the connection.

I think this migh be one of the possible points of failure: https://github.com/steemit/steem-python/blob/f8c10b59af536985b71e1c625a37320d005cc4ad/steem/steemd.py#L53

AmoghSubhedar commented 6 years ago

When I try to access a post or transfer stream, the connection just hangs and yields nothing. After stopping the process from the terminal, I get this: block_interval = self.config.get("STEEMIT_BLOCK_INTERVAL")

devopsjourney1 commented 6 years ago

Steemd.steemit.com node is retired.. https://www.steem.center/index.php?title=Public_Websocket_Servers

I was able to fix via nodes = [ 'https://steemd.steemitstage.com/', 'https://gtg.steem.house:8090', 'https://steemd.steemgigs.org' ] s = Steem(nodes)

However, I am not sure how to fix this for Blockchain()

AmoghSubhedar commented 6 years ago

Yes,

However, I am not sure how to fix this for Blockchain()

Cannot access stream of posts or transfers on any of these nodes.

hrosspet commented 6 years ago

Cannot access stream of posts or transfers on any of these nodes.

As I said earlier, this works: nodes = ['https://api.steemit.com']

crokkon commented 6 years ago

see also the documentation on custom nodes here in the repo: https://github.com/steemit/steem-python/blob/master/docs/steem.rst#setting-custom-nodes this describes how to set custom nodes once for all instances or individually

hrosspet commented 6 years ago

Since today neither nodes = ['https://api.steemit.com'] is working.

Does anybody know a solution?

KylePiira commented 6 years ago

@hrosspet are you having the same issue I am here: https://github.com/steemit/steem-python/issues/119

ghost commented 6 years ago

hey everyone

if you cant connect at all, use

s = Steem(keys=[privatepostingkey, privateactivekey],nodes= nodes)

and

Post(le_post, steemd_instance=s)

with that said, im having the same problem with claim_reward_balance

sadly it doesnt have an arg of steemd_instance so it doesnt connect and goes to limbo

pls help!

from steem.steemd import Steemd
from steem.instance import set_shared_steemd_instance

steemd_nodes = [
    'https://gtg.steem.house:8090',
    'https://steemd.steemit.com',
]
set_shared_steemd_instance(Steemd(nodes=steemd_nodes))

this does NOT help

ghost commented 6 years ago

okey guise

this worked

> steemd_nodes = ['http://steemd.pevo.science',]
> set_shared_steemd_instance(Steemd(nodes=steemd_nodes))
> s = Steem(keys=[privatepostingkey, privateactivekey],nodes= steemd_nodes)
> s.claim_reward_balance(account=myusername)
hrosspet commented 6 years ago

I can confirm that 'http://steemd.pevo.science' works as opposed to 'https://api.steemit.com'.

cryptocifer commented 6 years ago

seems api.steemit.com doesn't work well on get_ops_in_block call, it keeps returning empty result. anyone encountered this issue?

andybets commented 6 years ago

@cifer-lee I found that blockchain.stream_from was giving me frequent errors with api.steemit.com so have temporarily (I hope) switched to a community public node for those calls.

hrosspet commented 6 years ago

@andybets which community node do you use? I tried https://steemd.privex.io and http://steemd.pevo.science and both are kind of slow.

juicypop commented 6 years ago

@hrosspet I tried both and can't get operations on posts but they work for sending funds

It's a pity that the official node isn't working properly :( I hope they fix it soon

andybets commented 6 years ago

@hrosspet I made a page for viewing the RPC node response times here. Generally it seems that when they're new they're faster, and then people start using them! ;)

juicypop commented 6 years ago

@andybets how do I know if a node is http or https and if they have full support for all operations? I mean without trying every single one :D

andybets commented 6 years ago

@juicypop all those listed on my site are https, but I guess the easiest way would be to test each operation you need. I do 7 different operations (I think, but don't remember which without checking code), so if some nodes have some repeated errors, it suggests they're not full nodes.

juicypop commented 6 years ago

Thank you @andybets

I will give it a try this evening. It's a pain to switch nodes constantly for different operations though

Are there any news about the official steemit API node out there and when it will be full functional again?

hrosspet commented 6 years ago

@andybets wow, the rpc node monitor is supercool! Just upvoted some of your newer posts to express my appreciation. Thank you!

andybets commented 6 years ago

@hrosspet many thanks for the votes!

@juicypop I know. I'm not sure if/when it'll be working well again, I'll be looking into it again soon though, because it doesn't feel comfortable relying on community nodes.

AmoghSubhedar commented 6 years ago

@juicypop so what are you finally using for get_replies() ? I have some code that also uses it and was wondering how you overcame the issue.

juicypop commented 6 years ago

@AmoghSubhedar For get_replies I'm switching to 'https://api.steemit.com' For payments back to 'http://steemd.pevo.science'

Very uncomfortable when you ask me :(

cyon1c commented 6 years ago

https://api.steemit.com should be up and running fine now. The most recent updates to the library, including changing the default to https://api.steemit.com will be published to PyPi in due order.