Author Topic: Dry Run 2: The Real Deal  (Read 145379 times)

0 Members and 1 Guest are viewing this topic.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
Thanks all! Dry run 3 starting soon!
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline sfinder

  • Hero Member
  • *****
  • Posts: 1205
  • 4 Cores CPU+100GB SSD+anti-DDoS Pro
    • View Profile
2 of my clients are in different chain. network forked  :-\


Code: [Select]


info
{
  "blockchain_head_block_num": 23968,
  "blockchain_head_block_time": "20140619T190830",
  "blockchain_head_block_time_rel": "3 seconds old",
  "blockchain_confirmation_requirement": 291,
  "blockchain_average_delegate_participation": 61.12161310649023,
  "network_num_connections": 8,
  "ntp_time": "20140619T190833.573876",
  "ntp_error_seconds": -0.0051879999999999999,
  "wallet_unlocked_seconds_remaining": 947714,
  "wallet_next_block_production_time": null,
  "wallet_seconds_until_next_block_production": null,
  "wallet_local_time": "20140619T190833",
  "blockchain_random_seed": "7eb8264deb04d0e8318364360af0722c4550fe23",
  "blockchain_shares": 10001234079409,
  "network_num_connections_max": 12,
  "network_protocol_version": 101,
  "wallet_open": true,
  "wallet_unlocked_until": "20140630T182347",
  "wallet_version": 100
}

blockchain_list_forks
[
  189,
  3594,
  8562,
  10370,
  11312,
  11338,
  14776,
  14793,
  14921,
  18376,
  18472,
  18718,
  20218,
  20506,
  21322,
  21325,
  21340,
  21449,
  21788,
  22139,
  22160,
  22171,
  22236,
  22281,
  22311,
  22324,
  22331,
  22342,
  22351,
  22504,
  22612,
  23579,
  23640,
  23817,
  23837,
  23912
]


Code: [Select]

info
{
  "blockchain_head_block_num": 23865,
  "blockchain_head_block_time": "20140619T190330",
  "blockchain_head_block_time_rel": "2 minutes old",
  "blockchain_confirmation_requirement": 291,
  "blockchain_average_delegate_participation": 56.89149560117302,
  "network_num_connections": 8,
  "ntp_time": "20140619T190550.862606",
  "ntp_error_seconds": 0.47598600000000002,
  "wallet_unlocked_seconds_remaining": 999924,
  "wallet_next_block_production_time": "20140619T190900",
  "wallet_seconds_until_next_block_production": 190,
  "wallet_local_time": "20140619T190550",
  "blockchain_random_seed": "bbbc529f2ec7ed04c5f3650dc79115cefc1704a8",
  "blockchain_shares": 10001224082315,
  "network_num_connections_max": 12,
  "network_protocol_version": 101,
  "wallet_open": true,
  "wallet_unlocked_until": "20140701T085114",
  "wallet_version": 100
}


blockchain_list_forks
[
  11312,
  22160,
  22281,
  23817,
  11338,
  23912,
  14793,
  21788,
  23837,
  189,
  22342,
  22171,
  23640,
  21449,
  22504,
  22331,
  10370,
  22351,
  22139,
  14776,
  21340,
  20506,
  8562,
  23579,
  22236,
  18472,
  22612,
  21325,
  21322,
  22324,
  22311,
  14921
]
微博:星在飘我在找|BTS X 受托人delegate ID:baidu
中国教育书店合作将20%收入捐献给贫困山区学生。
Cooperating with China Education Bookstore and will donate 20% of delegate income to the poor students

Offline vikram

wallet_import_armory should work now.  (actually Issue #90 says it needs testing, care to help test?)

Armory import seems not implemented at all yet... Tried it with actual values, as well as random values, gives OK all the time

Code: [Select]
>>> wallet_import_armory
wallet_filename: /this/file/does/not/exist
passphrase:
account_name: well, this is not an account
OK

This was a mistake; Armory has not been implemented yet.

Offline vikram

I got at least a little further.
Looks i was referencing the location incorrectly
instead of ~/Imports/wallet.dat
should be /root/Imports/wallet.dat

It seems to have found it this way but when it asks for "imported wallet passphrase" (it doesn't have one)
I just hit enter, leaving blank and i get aborted

Code: [Select]
xeldal-w (unlocked) >>> wallet_import_bitcoin "/root/Imports/wallet.dat"
passphrase:
account_name: PTS-jmob
imported wallet passphrase:
Command aborted
It expects your PTS wallet to have a password. How about setting it up?

This has been fixed.

Offline bdnoble

  • Full Member
  • ***
  • Posts: 116
    • View Profile
    • Home Page

Ok i figured it out.  2 things.

1 you need to wallet_account_create before you import, it won't automatically create the account
2 wallet_account_create doesn't like uppercase  :-\

I got it to import provided these 2 things.

I feel like this process should be documented better. I went through the exact same process and it took me a while before I was able to get my PTS imported as well.


Sent from my iPhone using Tapatalk
:)

Xeldal

  • Guest
Ok i figured it out.  2 things.

1 you need to wallet_account_create before you import, it won't automatically create the account
2 wallet_account_create doesn't like uppercase  :-\

I got it to import provided these 2 things.


Offline bitcoinerS

  • Hero Member
  • *****
  • Posts: 592
    • View Profile
I got at least a little further.
Looks i was referencing the location incorrectly
instead of ~/Imports/wallet.dat
should be /root/Imports/wallet.dat

It seems to have found it this way but when it asks for "imported wallet passphrase" (it doesn't have one)
I just hit enter, leaving blank and i get aborted

Code: [Select]
xeldal-w (unlocked) >>> wallet_import_bitcoin "/root/Imports/wallet.dat"
passphrase:
account_name: PTS-jmob
imported wallet passphrase:
Command aborted
It expects your PTS wallet to have a password. How about setting it up?
>>> approve bitcoiners

Xeldal

  • Guest
I got at least a little further.
Looks i was referencing the location incorrectly
instead of ~/Imports/wallet.dat
should be /root/Imports/wallet.dat

It seems to have found it this way but when it asks for "imported wallet passphrase" (it doesn't have one)
I just hit enter, leaving blank and i get aborted

Code: [Select]
xeldal-w (unlocked) >>> wallet_import_bitcoin "/root/Imports/wallet.dat"
passphrase:
account_name: PTS-jmob
imported wallet passphrase:
Command aborted

Offline mauritso

  • Full Member
  • ***
  • Posts: 64
    • View Profile

In an attempt to simplify concepts we have decided to NOT overload the term 'address' as used in bitcoin.

Accounts have Public Keys which we are calling your Account Key and contain automatically generated addresses from TITAN or from imported bitcoin wallets.
An address is the hash of a public key used to control a balance (spendable entry in the blockchain).

Our goal is that users never have to think much about their Account Keys and NEVER about their addresses.

https://github.com/BitShares/bitshares_toolkit/wiki/Wallets,-accounts,-owner-&-active-keys,-addresses---The-differences-between-Bitcoin-and-Bitshares
BTS: maurits

Offline bitcoinerS

  • Hero Member
  • *****
  • Posts: 592
    • View Profile
I did a dumpprivkey <ptsAddress> in the Bitshares-PTS wallet console

I took this private key and tryed both
bitcoin_importprivkey  and wallet_import_private_key
neither worked

I also uploaded the wallet.dat to my server and used " wallet_import_bitcoin "~/imports/wallet.dat" "

it didn't like that either.  says it can't find wallet.dat
I tried moving the dat file to various places but it doesn't want to find it.
Is there a particular place it needs to be or a particular way i need to reference it?

I imported my PTS wallet with wallet_import_bitcoin <full path to wallet.dat>
>>> approve bitcoiners

Offline bitcoinerS

  • Hero Member
  • *****
  • Posts: 592
    • View Profile
How to import PTS wallet?

I see the bitcoin, electrum, multibit, armory, and keyhotee import commands. 

Is there no command for PTS yet?

Use import bitcoin.
>>> approve bitcoiners

Xeldal

  • Guest
I did a dumpprivkey <ptsAddress> in the Bitshares-PTS wallet console

I took this private key and tryed both
bitcoin_importprivkey  and wallet_import_private_key
neither worked

I also uploaded the wallet.dat to my server and used " wallet_import_bitcoin "~/imports/wallet.dat" "

it didn't like that either.  says it can't find wallet.dat
I tried moving the dat file to various places but it doesn't want to find it.
Is there a particular place it needs to be or a particular way i need to reference it?

Offline crazybit

if my understanding is not wrong, the command wallet_import_bitcoin can be used for pts wallet import, since pts is clone from bitcoin qt,

How to import PTS wallet?

I see the bitcoin, electrum, multibit, armory, and keyhotee import commands. 

Is there no command for PTS yet?

Offline bdnoble

  • Full Member
  • ***
  • Posts: 116
    • View Profile
    • Home Page

How to import PTS wallet?

I see the bitcoin, electrum, multibit, armory, and keyhotee import commands. 

Is there no command for PTS yet?

You can either import the private key directly or you can import the PTS wallet.dat using the bitcoin import.


Sent from my iPhone using Tapatalk
:)

Offline crazybit

would you mind to describe a little bit more about the wallet data structure, i can not sort out the data structure diagram base on the program,since there are many table mapping there, know you are quite busy on the development, just let go if it need too much time to make it clear  :D, don't want to spend too much of your time.

Code: [Select]
fc::optional<wallet_master_key_record>                           wallet_master_key;

 unordered_map< address, wallet_key_record >                      keys;
 unordered_map< address, address >                                btc_to_bts_address;
 unordered_map< address, int32_t >                                address_to_account_wallet_record_index;
 unordered_map< account_id_type, int32_t >                        account_id_to_wallet_record_index;
 map< string, int32_t >                                           name_to_account_wallet_record_index;

 unordered_map<address,wallet_market_order_status_record>         market_orders;

 /** maps wallet_record_index to accounts */
 unordered_map< int32_t,wallet_account_record >                   accounts;
 unordered_map< transaction_id_type, wallet_transaction_record >  transactions;
 unordered_map< balance_id_type,wallet_balance_record >           balances;
 map<string,wallet_asset_record>                                  assets;
 map<property_enum, wallet_property_record>                       properties;
 map< string, wallet_setting_record >                             settings;



i found there are many mapping in the wallet db,would you please describe a bit more about the wallet data structure?
same question here.... anyone knows the answer
i have registered account "crazybit" and "james", when tried to export the private key of "james" and import to the account "crazybit" , it can be done without error, is that expected? if yes, will the balance of account "james" combined to the account "crazybit"?

suppose there is something wrong , how can a name map to 2 different private keys?

Every account has the 'account key' and under the account key are any number of 'balance keys' that are generated  when someone sends you a titan transaction or you import keys into the account from an external source.

In theory no funds should be sent directly to an 'account key', but only to a key derived from the account key.

Importing the key into two places will probably confuse the wallet right now.