Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - j-v-h-silver

Pages: [1]
1
I have a VM with Ubuntu 16.04 LTS and downloaded https://github.com/bitshares/bitshares-core built it as per instructions and witness_node is running.
The witness_node starts with
./witness_node --data-dir=data-bts/myblocktestnet  --genesis-json=genesis/my-genesis.json --enable-stale-production --seed-nodes "[]"
and is running properly
The Cli_wallet starts with
 ./cli_wallet --wallet-file my-wallet.json --chain-id c3807ea4b7d28da76249c6be53dc6342a12888327aab9d66ac1d53e31e797ae3 --server-rpc-endpoint ws://0.0.0.0:8090 -u '' -p ''

as the config file in the data-bts/myblocktestnet has the rpc as
# Endpoint for websocket RPC to listen on
rpc-endpoint = 0.0.0.0:8090

I note that the line for API is still commented out as I chose to rely on defaults

# JSON file specifying API permissions
# api-access =

and I have made users and sent "test" assets to them successfully
"info command in cli_wallet shows the following
unlocked >>> info
{
  "head_block_num": 5359,
  "head_block_id": "000014ef5d66f77c29bce7c12bdc83722520818e",
  "head_block_age": "0 second old",
  "next_maintenance_time": "31 minutes in the future",
  "chain_id": "c3807ea4b7d28da76249c6be53dc6342a12888327aab9d66ac1d53e31e797ae3",
  "participation": "100.00",
  "active_witnesses": [
    "1.6.1",
    "1.6.2",
    "1.6.3",
    "1.6.4",
    "1.6.5",
    "1.6.6",
    "1.6.7",
    "1.6.8",
    "1.6.9",
    "1.6.10",
    "1.6.11"
  ],
  "active_committee_members": [
    "1.5.0",
    "1.5.1",
    "1.5.2",
    "1.5.3",
    "1.5.4",
    "1.5.5",
    "1.5.6",
    "1.5.7",
    "1.5.8",
    "1.5.9",
    "1.5.10"
  ]
}


However the  bitshares-ui which I built also from latest github code connects once I populate "settings" / "nodes" / "personal"
with ws://localhost:8090 in the firefox browser within the VM
However "send" and permissions are "greyed out" and I cannot seem to do anything but have readonly "database_api" access.
This is the case whether in a VM browser like firefox on Ubuntu or my Windows host accessing the VM ip address via the VM bridged network .. which also allows connections but active buttons greyed out.

 I have not built a faucet so logins are via saved BIN wallet files generated via brainkeys made from the suggest_brain_key cli_wallet feature

So I cant use the bitshares-ui with my testnet and am wondering if its because of using local login via a brainkey restored wallet OR that I need a API referenced file in config.ini with something like
{
   "permission_map" :
   [
     
      [
         "*",
         {
            "password_hash_b64" : "*",
            "password_salt_b64" : "*",
            "allowed_apis" : ["database_api", "network_broadcast_api", "history_api"]
         }
      ]
   ]
}


Any help would be greatly appreciated for which direction to take and perhaps any steps required.
Regards John

2
Technical Support / pybitshares
« on: April 11, 2017, 08:44:42 pm »
Hello All from a newbie
As per a suggestion from Xeroc to use pybitshares for Bot type functions ( since I couldn't get stakemachine permisions eror solved : see https://bitsharestalk.org/index.php/topic,23939.msg304190.html#msg304190  ) I have started trying out the scripts in http://docs.pybitshares.com/en/latest/tutorials.html to see what can be done there.
In particular after installing as per the intro I tried the Simple Sell script modified for the testnet account "AAB-12345" .
but get bitshares.exceptions.NoWalletException .
I have looked at the pybitshares documentation but its not clear how to specify what wallet is being used?
That is how do you get Python to access a particular wallet on a Ubuntu VM that I am testing on?
Thanks for any help
Cheers John

=========================================================
from bitshares import BitShares
from bitshares.market import Market
from bitshares.price import Price
from bitshares.amount import Amount

#
# Instanciate BitShares (pick network via API node)
#
bitshares = BitShares(
    "wss://node.testnet.bitshares.eu",
    nobroadcast=False   # <<--- set this to False when you want to fire!
)

#
# Unlock the Wallet
#
bitshares.wallet.unlock("AAB-12345")

#
# This defines the market we are looking at.
# The first asset in the first argument is the *quote*
# Sell and buy calls always refer to the *quote*
#
market = Market(
    "GOLD:TEST",
    bitshares_instance=bitshares
)

#
# Sell an asset for a price with amount (quote)
#
print(market.sell(
    Price(10.0, "TEST/GOLD"),
    Amount("0.01 GOLD")
))
=========================================================

vagrant@vagrant-ubuntu-trusty-64:~/py$ python3 ./ssell.py
Traceback (most recent call last):
  File "./ssell.py", line 17, in <module>
    bitshares.wallet.unlock("AAB-12345")
  File "/usr/local/lib/python3.4/dist-packages/bitshares/wallet.py", line 107, in unlock
    raise NoWalletException
bitshares.exceptions.NoWalletException

3
Technical Support / stakemachine
« on: March 28, 2017, 09:48:58 pm »
Hello .. trying out the trading bot stakemachine by Xeroc ( many thanks for the work put in there ) I have it installed but when running against a test node ( before trying it out on the real exchange ) it fails at one line. Running on Ubuntu 14.04.5 LTS (Trusty Tahr) python3 in virtualenvs to make sure there are no Python version problems. Invalid syntax at   File "/usr/local/lib/python3.4/dist-packages/stakemachine-0.0.2-py3.4.egg/stakemachine/strategies/maker.py", line 255
    placed_sell = self.sell(m, sell_price, sell_amount, returnID=True):

Any help greatly appreciated
John

Traceback (most recent call last):
  File "/usr/local/bin/stakemachine", line 9, in <module>
    load_entry_point('stakemachine==0.0.2', 'console_scripts', 'stakemachine')()
  File "/usr/local/lib/python3.4/dist-packages/stakemachine-0.0.2-py3.4.egg/stakemachine/__main__.py", line 137, in main
  File "/usr/local/lib/python3.4/dist-packages/stakemachine-0.0.2-py3.4.egg/stakemachine/bot.py", line 108, in init
  File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2222, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 2164, in _find_spec
  File "<frozen importlib._bootstrap>", line 1940, in find_spec
  File "<frozen importlib._bootstrap>", line 1916, in _get_spec
  File "<frozen importlib._bootstrap>", line 1897, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 863, in spec_from_loader
  File "<frozen importlib._bootstrap>", line 904, in spec_from_file_location
  File "/usr/local/lib/python3.4/dist-packages/stakemachine-0.0.2-py3.4.egg/stakemachine/strategies/maker.py", line 255
    placed_sell = self.sell(m, sell_price, sell_amount, returnID=True):
                                                                      ^
SyntaxError: invalid syntax



4
Hello All
I am basically a DBA and code SQL but know others (javascript C++ etc). I have been intrigued with the Blockchain for a while and have decided to bite the bullet and learn more. What dev environment is commonly used or recommended among bitshares developers.
I am assuming Eclipse would be up there but is there any documentation on a prefered setup for developing / exploring the system?

I am currently just touching the surface but hope to be around for  the long term so any pointers would be greatly appreciated.
Cheers John

Pages: [1]