Author Topic: Importing from OpenLedger to CLI  (Read 4948 times)

0 Members and 1 Guest are viewing this topic.

Offline bitsandtea

  • Newbie
  • *
  • Posts: 12
    • View Profile
My blockchain is syncing so thats probably why I can't see it yet. I can see some other accounts but not mine. I was wondering what is the size of the current blockchain?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
if you have registerd your account pre bitshares2, you may try with a "bts-" prefix: bts-bitshares3030.

Offline svk

Yes the documentation is conflicted in more than one way ...

Anyhow I managed to setup the wallet and now bitshares-2 is syncing. When I do get_account bytemaster I can get the details so thats great. However I have an account registered for ex. bitshares3030 and it has a balance of 200+ BTS (account name is not real, just an example)

When I do get_account bitshares3030 account I can't see it. Should I upgrade my account to another type of membership to see it from my CLI and run my faucet on it? IF so how do I go about doing that? The account is accessible on openledger.info

Thanks again

If you're still syncing it could simply be because that account hasn't been created yet at the current state of your blockchain.
Worker: dev.bitsharesblocks

Offline bitsandtea

  • Newbie
  • *
  • Posts: 12
    • View Profile
Yes the documentation is conflicted in more than one way ...

Anyhow I managed to setup the wallet and now bitshares-2 is syncing. When I do get_account bytemaster I can get the details so thats great. However I have an account registered for ex. bitshares3030 and it has a balance of 200+ BTS (account name is not real, just an example)

When I do get_account bitshares3030 account I can't see it. Should I upgrade my account to another type of membership to see it from my CLI and run my faucet on it? IF so how do I go about doing that? The account is accessible on openledger.info

Thanks again
« Last Edit: May 31, 2016, 10:54:40 am by bitsandtea »

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
You should have a folder called bitshares-2 ... compile in there .. not in the graphene folder.
Make sure you have checked out the correct repository

Offline bitsandtea

  • Newbie
  • *
  • Posts: 12
    • View Profile
Before I installed it I did a
Code: [Select]
rm-r graphene
Of the whole folder. If you mean start from scratch should I delete something else? Since it takes about an hour or more for it to compile I would like as much info as possible before I go and remake it.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
you should start over from scratch .. you'r binary still uses the graphene code (the pubkey in the second line starts with GPH)

Offline bitsandtea

  • Newbie
  • *
  • Posts: 12
    • View Profile
I installed and compiled the binaries for the repository https://github.com/bitshares/bitshares-2

I added rpc-endpoint = 127.0.0.1:8090 to my config.ini
after that I launched the witness_node:

Code: [Select]
~/graphene/programs/witness_node$ ./witness_node
53723ms th_a       witness.cpp:89                plugin_initialize    ] witness plugin:  plugin_initialize() begin
53724ms th_a       witness.cpp:99                plugin_initialize    ] key_id_to_wif_pair: ["GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]
53724ms th_a       witness.cpp:117               plugin_initialize    ] witness plugin:  plugin_initialize() end
53724ms th_a       object_database.cpp:94        open                 ] Opening object database from /home/ubuntu/graphene/programs/witness_node/witness_node_data_dir/blockchain ...
53758ms th_a       object_database.cpp:100       open                 ] Done opening object database.
53758ms th_a       db_management.cpp:128         open                 ] last_block->id(): 000000016db057988d99b10fca98c7c437988003 last_block->block_num(): 1
53759ms th_a       thread.cpp:95                 thread               ] name:ntp tid:140116430878464
53759ms th_a       thread.cpp:95                 thread               ] name:p2p tid:140116411995904
53762ms th_a       application.cpp:143           reset_p2p_node       ] Configured p2p node to listen on 0.0.0.0:45374
53763ms th_a       witness.cpp:122               plugin_startup       ] witness plugin:  plugin_startup() begin
53763ms th_a       witness.cpp:139               plugin_startup       ] No witnesses configured! Please add witness IDs and private keys to configuration.
53763ms th_a       witness.cpp:140               plugin_startup       ] witness plugin:  plugin_startup() end
53764ms th_a       main.cpp:179                  main                 ] Started witness node on a chain with 1 blocks.
53764ms th_a       main.cpp:180                  main                 ] Chain ID is e2f8b7db0c551d82cd2930feaf0596506a956772d571b05f694b87891cee3a9c
53797ms ntp        ntp.cpp:177                   read_loop            ] ntp_delta_time updated to 14915031 us

and launched the CLI (as instructed)

Code: [Select]
unlocked >>> get_account bytemaster
get_account bytemaster
10 assert_exception: Assert Exception
rec && rec->name == account_name_or_id:
    {}
    th_a  wallet.cpp:597 get_account

Still getting the same response. Any thoughts?


Offline bitsandtea

  • Newbie
  • *
  • Posts: 12
    • View Profile
OK, I am building bitshares-2 now will let you know how it went in a bit. Thanks for the help

Offline svk

Thanks for the help!

In the guide that xeroc posted it says that I should run this code

Code: [Select]
git clone https://github.com/cryptonomex/graphene
mv graphene/ graphene-testnet
cd graphene-testnet/
git branch testnet
git remote set-url origin https://github.com/BitSharesEurope/graphene-testnet
git push origin testnet

Is this the right one or should I continue with Bitshares-2.0? I have also compiled from bitshares-2.0 before and had the same issue.

That example is only for the graphene testnet, it's a different blockchain used only for test purposes. If you're looking to connect to the Bitshares blockchain, you need to use the bitshares-2 repo I linked.
Worker: dev.bitsharesblocks

Offline bitsandtea

  • Newbie
  • *
  • Posts: 12
    • View Profile
Thanks for the help!

In the guide that xeroc posted it says that I should run this code

Code: [Select]
git clone https://github.com/cryptonomex/graphene
mv graphene/ graphene-testnet
cd graphene-testnet/
git branch testnet
git remote set-url origin https://github.com/BitSharesEurope/graphene-testnet
git push origin testnet

Is this the right one or should I continue with Bitshares-2.0? I have also compiled from bitshares-2.0 before and had the same issue.

Offline svk

For example even if I type:

Code: [Select]
unlocked >>> get_account bytemaster
get_account bytemaster
10 assert_exception: Assert Exception
rec && rec->name == account_name_or_id:
    {}
    th_a  wallet.cpp:597 get_account
unlocked >>>

Even though bytemaster is a valid account in the public blockchain. Any ideas?

Looks to me like you're not using the bitshares-2 code but either the graphene or graphene-testnet code.  You need to compile the binaries from this repo:

https://github.com/bitshares/bitshares-2
Worker: dev.bitsharesblocks

Offline bitsandtea

  • Newbie
  • *
  • Posts: 12
    • View Profile
For example even if I type:

Code: [Select]
unlocked >>> get_account bytemaster
get_account bytemaster
10 assert_exception: Assert Exception
rec && rec->name == account_name_or_id:
    {}
    th_a  wallet.cpp:597 get_account
unlocked >>>

Even though bytemaster is a valid account in the public blockchain. Any ideas?

Offline bitsandtea

  • Newbie
  • *
  • Posts: 12
    • View Profile
Yes I am providing the account name (registered in the blockchain can be seen at OpenLedger web wallet) and the correct wif key imported again from the web wallet.

The issue is the one that I initially stated, somehow my blockchain is not syncing with the main public testnet. Is there a way you can provide a config.inc and a genesis.json that make my blockchain connect with the main one?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
import_key requires an account name plus the wif key .. the account name needs to exist already on the chain .. you can check with get_account xxxx