Closed ghost closed 3 years ago
starting the older tags requires a --non-interactive parameter
docker run --rm --net host --rm -e DAEMON_HOST=0.0.0.0 -v /home/toor/monero:/monero xmrto/monero:v0.15.0.1 --data-dir /monero --non-interactive
Your Python code is using Wallet
and JSONRPCWallet
but you're interfacing with a daemon's RPC interface and not a wallet.
Try doing this instead:
from monero.daemon import Daemon
from monero.backends.jsonrpc import JSONRPCDaemon
d = Daemon(JSONRPCDaemon(port=28081))
Full example using my public node:
>>> from monero.daemon import Daemon
>>> from monero.backends.jsonrpc import JSONRPCDaemon
>>> d = Daemon(JSONRPCDaemon(host='singapore.node.xmr.pm', port=18089))
>>> d
<monero.daemon.Daemon object at 0x1086fd910>
>>> dir(d)
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_backend', 'block', 'headers', 'height', 'info', 'mempool', 'net', 'send_transaction', 'transactions']
>>> d.height()
2263032
>>> d.info()
{'adjusted_time': 1609273687, 'alt_blocks_count': 0, 'block_size_limit': 600000, 'block_size_median': 300000, 'block_weight_limit': 600000, 'block_weight_median': 300000, 'bootstrap_daemon_address': '', 'credits': 0, 'cumulative_difficulty': 81109858841735165, 'cumulative_difficulty_top64': 0, 'database_size': 102005473280, 'difficulty': 208944363243, 'difficulty_top64': 0, 'free_space': 18446744073709551615, 'grey_peerlist_size': 0, 'height': 2263032, 'height_without_bootstrap': 0, 'incoming_connections_count': 0, 'mainnet': True, 'nettype': 'mainnet', 'offline': False, 'outgoing_connections_count': 0, 'rpc_connections_count': 0, 'stagenet': False, 'start_time': 0, 'status': 'OK', 'target': 120, 'target_height': 2263022, 'testnet': False, 'top_block_hash': 'bc3601a4f8c86b869e2df9aba982c5ba346717ecb9f0c014517c6632dc0cf4e4', 'top_hash': '', 'tx_count': 10610334, 'tx_pool_size': 18, 'untrusted': False, 'update_available': False, 'version': '', 'was_bootstrap_ever_used': False, 'white_peerlist_size': 0, 'wide_cumulative_difficulty': '0x12028fca40b2ffd', 'wide_difficulty': '0x30a60df6eb'}
yes I figured that out thanks, but it was really unclear, but I figured it out by chance. The only reason I figured it out is because it caught my eye, out of all of the other snowflakes on this page: https://hub.docker.com/r/xmrto/monero/
I can't do anything with python-monero now though because of another problem with monero-wallet-rpc: https://github.com/monero-project/monero/issues/7227
I confirmed that I am also able to get the daemons up and running with monerod v 0.15 and connect to them as the documentation suggests. I'm helping someone with another problem though that is similarly vague, should maybe think a little about creating some custom exception classes and making use of them if people are actually going to be using this, for what that's worth, I'm not really sure who all uses this library.
@emesik this can be closed.
tried oldest available tag and latest: https://hub.docker.com/r/xmrto/monero/tags?page=2&ordering=last_updated same problem,
tried pip3 installable module and git sources same problem