BitShares Forum

Main => General Discussion => Topic started by: bytemaster on March 02, 2014, 07:30:30 am

Title: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: bytemaster on March 02, 2014, 07:30:30 am
I have created a helper utility that will allow anyone with a PTS or Bitcoin-Qt wallet to see what their BTS balance is from the Feb 28th snapshot.

Mac OS X Binary:
http://the-iland.net/static/downloads/get_bts_bal.tar.gz     
sha256:    6efe7a84363ae012b4743cf6ce7ff0db18300ff99bf217bb95077c059a82ad97
Signed:     PaNGELmZgzRQCKeEKM6ifgTqNkC4ceiAWw
Signature: G4ZFb2RHKRxwgvipFiLXLw17KZV6Xw8H99UkTylCCtSLXqFP4AM2G6b9FyTBi08wpVCqYVKstkTnHxrZjrouSoI=

To validate the signature of your download perform the following command:
Code: [Select]
shasum -a 256 get_bts_bal.tar.gz
To validate the signature, open BitShares-PTS wallet, go to the File Menu, then to Verify Message.
Then enter the PaNGELmZgzRQCKeEKM6ifgTqNkC4ceiAWw, the sha256 hash, and the Signature above.

Inside the archive you will find genesis.json and an executable called get_bts_balance

1) Close all Bitcoin-Qt and PTS wallets.
2) Backup all of your wallets before attempting to run this command.
3) Only use trusted executables signed by the PTS Angel Address as this will unlock the private keys in your wallets.

Run one or more commands like so:

Code: [Select]
./get_bts_balance ~/Library/Application\ Support/Bitcoin/wallet.dat
or
./get_bts_balance ~/Library/Application\ Support/BitShares-PTS/wallet.dat
or
./get_bts_balance ~/.protoshares/wallet.dat

The executable is only built for OS X right now, but we will provide versions for other platforms in time.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: bytemaster on March 02, 2014, 07:39:46 am
I will offer a nice tip for someone to enhance this utility to support all of the various wallet formats (apis are already done and in the code).

It should include Armory, Multibit, Eletcturm, and Blockchain.info dumps. 
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: joaoha on March 02, 2014, 08:29:52 am
Hi, This is my output,

Loaded 107 keys... searching for balances
balance: 128.832

Does it mean I own 128 BTS?

Can I move my PTS out of the wallet now that the snapshot was taken?

Great work and thanks for the update.
Cheers
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: HackFisher on March 02, 2014, 08:45:57 am
sorry, I tried signature validation, but it failed, why?

Quote
To validate the signature, open BitShares-PTS wallet, go to the File Menu, then to Verify Message.
Then enter the PaNGELmZgzRQCKeEKM6ifgTqNkC4ceiAWw, the sha256 hash, and the Signature above.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: cgafeng on March 02, 2014, 09:42:07 am
how many bts per ags
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: theoretical on March 02, 2014, 10:12:02 am

I'm not on a Mac, but the archive contains a file called genesis.json which contains all addresses and balances in a simple format.  You can easily check your balance "manually" by reading this file.  You may have balances at automatically generated change addresses, as well as the addresses listed in your "Receive" window, so you may need to use the listaccounts and getaddressesbyaccount commands to figure out all of your addresses.

Is there any chance we can see the code which was used to create genesis.json?  The initial balances should be publicly verifiable, i.e. derived from the blockchain with open-source code.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: speedy on March 02, 2014, 10:35:35 am
Are you going to be extending this genesis.json file to include AGS holders?
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: davidpbrown on March 02, 2014, 10:45:55 am
So, the file genesis.json appears to contain 57972 addresses and their balance.

Total of those balances appears to be 396666666666666, which I note is not exactly the money supply 400000000000000 with diff being 3333333333334. It would be useful to know what that difference is.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: jwiz168 on March 02, 2014, 11:21:45 am
can I get my bts amount from a multibit wallet(btc) which is not in wallet.dat format?
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: CLains on March 02, 2014, 12:04:10 pm
The ags-tracking websites could integrate this feature.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: mauritso on March 02, 2014, 12:07:24 pm
I will offer a nice tip for someone to enhance this utility to support all of the various wallet formats (apis are already done and in the code).

It should include Armory, Multibit, Eletcturm, and Blockchain.info dumps.

Can we get the source for that or am I missing something?
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: alt on March 02, 2014, 02:04:58 pm
So, the file genesis.json appears to contain 57972 addresses and their balance.

Total of those balances appears to be 396666666666666, which I note is not exactly the money supply 400000000000000 with diff being 3333333333334. It would be useful to know what that difference is.
Maybe 10000 ags for the funder ID.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: kmtan on March 02, 2014, 02:13:42 pm
not really understand how to check the balance...
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: davidpbrown on March 02, 2014, 04:12:12 pm
not really understand how to check the balance...

In the absence of a better option and being on Linux, I just did a simple translate to make it readable.
So, in a terminal navigate to the get_bts_bal/ directory. Do something like
 tr '[' '\n' < ./genesis.json > read.txt
and that'll make the detail easy to read and search with a text editor. With a bit more of the same you can dump into a spreadsheet.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: unimercio on March 02, 2014, 04:28:01 pm
Nice addition, thanks...

Just one question, I manually found my PTS address and it's BTS balance.. But, where/how/when can I found my BTS balance from my AGS donations. I understood it would map my BTC address to a BTS or PTS address on the new chain?
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: vikram on March 02, 2014, 05:11:50 pm
What about BTS derived from AGS given to Keyhotee founders?
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: bytemaster on March 02, 2014, 05:27:01 pm
It is missing the founders ags right now.   This includes ags and pts.

Source code is in bts_wallet directory   


Sent from my iPhone using Tapatalk (http://tapatalk.com/m?id=1)
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: bytemaster on March 02, 2014, 05:28:30 pm
Genesis.json was created by one of the open source services.  And anyone can recreate it.


Sent from my iPhone using Tapatalk (http://tapatalk.com/m?id=1)
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: Pixar on March 02, 2014, 06:03:15 pm
sorry, I tried signature validation, but it failed, why?

Quote
To validate the signature, open BitShares-PTS wallet, go to the File Menu, then to Verify Message.
Then enter the PaNGELmZgzRQCKeEKM6ifgTqNkC4ceiAWw, the sha256 hash, and the Signature above.

I'm having this issue too.  Can someone explain?  Where do you run the command shasum -a 256 get_bts_bal.tar.gz
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: blackbeard on March 02, 2014, 08:28:56 pm
What does the number in the JSON file map to? My numbers seem really high, unless I'm doing better than I think I am. I doubt I have 937615320 bts from one key
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: joaoha on March 02, 2014, 08:37:57 pm
Hi,
Can anyone explain?
This is my output,

Loaded 107 keys... searching for balances
balance: 128.832

Does it mean I own 128.832 BTS?

Can I move my PTS out of the wallet now that the snapshot was taken?

Great work and thanks for the update.
Cheers
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: davidpbrown on March 02, 2014, 08:57:29 pm
What does the number in the JSON file map to? My numbers seem really high, unless I'm doing better than I think I am. I doubt I have 937615320 bts from one key

That appears to be the integer of 'satoshi's, or whatever the name of the smallest fraction of BTS is.
So, divide by 100000000 and that is likely the order of magnitude you might have been expecting.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: theoretical on March 02, 2014, 09:07:36 pm
Genesis.json was created by one of the open source services.

Does anybody have a link to these "open source services" which create genesis.json?

And anyone can recreate it.

Yes, if we know what parameters were used, e.g. what block the snapshot is based on.  Does anyone have that information?
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: davidpbrown on March 02, 2014, 09:50:47 pm
So, the file genesis.json appears to contain 57972 addresses and their balance.

Total of those balances appears to be 396666666666666, which I note is not exactly the money supply 400000000000000 with diff being 3333333333334. It would be useful to know what that difference is.
Maybe 10000 ags for the funder ID.

From pc's link to Genesis creators (https://bitsharestalk.org/index.php?topic=3345.msg42053#msg42053) this amount seems to fit with this suggestion of default action in the preferred option: "If you want, you can provide a Keyhotee file to be included in the AGS calculations. If you don't provide a file, Keyhotee holders will be awarded 10000 AGS to the single address FOUNDERS."

So, it seems that PTS and AGS are all included in the genesis.json as expected and all is well. I don't know anything of what Keyhotee holders will have been expecting but expect that's as is should be too.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: Ykw on March 02, 2014, 11:46:08 pm
Hi bytemaster,

Do you have the opensource code of this BTS checker.. to get it compiled over linux?

Thanks
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: taoljj on March 03, 2014, 04:32:51 am
Easy way!Ctrl+C,Ctrl+H,Ctrl+V Done!
http://bbs.btcman.com/thread-16588-1-1.html?_dsign=31c0d243
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: merlin0113 on March 03, 2014, 04:57:07 am
Easy way!Ctrl+C,Ctrl+H,Ctrl+V Done!
http://bbs.btcman.com/thread-16588-1-1.html?_dsign=31c0d243
我的查询结果: "45,392,524,614 ",求解释。Many thanks!
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: mmiaow on March 03, 2014, 05:50:51 am
Easy way!Ctrl+C,Ctrl+H,Ctrl+V Done!
http://bbs.btcman.com/thread-16588-1-1.html?_dsign=31c0d243

I looked up my PTS address and found I "have" 2,640,096,539 BTS.
I remember I have only 18 PTS before the snapshot, if the balance is true, then it's ridiculous.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: pc on March 03, 2014, 08:15:05 am
I looked up my PTS address and found I "have" 2,640,096,539 BTS.
I remember I have only 18 PTS before the snapshot, if the balance is true, then it's ridiculous.

That number is your BTS in satoshis. Divide by 100000000 to receive your number of shares.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: JA on March 03, 2014, 09:09:36 am
I thought i have around 30
Is this right ?

Code: [Select]
PoC3hA1N27beHJKv17g3rLScQig9bhyybo 0
PfxWNKyd3jcqAjjV4Cd5rYEEYrY1phpfmw 0
Ptjdsn3rp78XtBVGvupw61511MMtCE2Jy9 0
PZMHJSUT1oEfsJmzPSfZYpK9j9W3Xcj4bV 1496470265
PmoGfNFphw4WkaytmSvZVCsDFEFCxsyC7X 0
Phxq9BUFapRxwbdgrNcsDrSucFcrypT4Na 0
Pdp4AZRpE1MwKSKweEYZkCyaEtimxhm9xU 0
PYjeEfnx53JDBNoddyQBvSzoWnkPFXgTDh 558536697
PeBxsFDKjEWwmpJHJ3YuPQvJkWVTe8CMed 4527284
PYUb4fjUpCmATRzPQoGSeQ4qBtrqP9W9mx 721876888
PhyBvM7iUECwFTUyKyi4BxrbS3sfVJEj5z 0

1EXNQbCpFxp8ze3hqL7JqTCZFZgfb5z4p 0
1A1qm5WYAoMn31uYEERTeWKL3SPDqurPHy 0
1Lv4y6ScVdqxcgXTAm3AkoFnP3Z6iuz5Xo 0
1AsyBrnXa1mHDbbixb63VbsWXwFQ6kXMcv 0
1B8mqCcMVMFZTNCnmJWxJAQpPhwVB35d13 0
1JskcuvU9788UuMn7wpwXoABkqMiTW9LTo 300528323
1Pu1E2z3y8BK5svKDJRQRNKis4AxRkV3Qi 348247267
1AyoC9n6nwrPLDWc2UPqZQPsArtDTRKqwA 471963233
165UPesUquncH7FsBLs8d544XgpYJF95he 0
1J9bt6eBRmqyTY5c4SAh9KvzhYJyib9RqC 0
1FJabtta5pgkwPBHpfPCKrjuzqk17Gqtp7 680312903
1AiWZADPh8g7LvWPuJQHQ9VmxMcYc9iPqJ 410794137
1Cenk6CTx5hzfwdHtz3qqP75mLcJQXBbZM 0
1AGKtTQa5rghYsEzrJMzacF5eBn435jLj 0
1JsF1wb5zgmdA44y4fBu1ATKQTdBosJCWC 244420503
19T5WidBS9ndhA5UN5XdftidDayR8VebYi 0
1AdrianoR4AgcyD5NtkAEHFn58VPdDkJDs 354021587

=5591699087/100000000 = 55,91699087

+5% + ?.?.? = Profit
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: thisisausername on March 03, 2014, 09:39:58 am
I will offer a nice tip for someone to enhance this utility to support all of the various wallet formats (apis are already done and in the code).

It should include Armory, Multibit, Eletcturm, and Blockchain.info dumps.

See this pull request (https://github.com/InvictusInnovations/BitShares/pull/63).  I made some of the changes.  Though, what are blockchain.info dumps?  What function should those call?

Also, Armory support doesn't work since the armory wallet implementation is currently commented out.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: betax on March 03, 2014, 11:13:16 am
I have created a very simple alternative version that  checks your BTSX balance without using any your wallet/s, it just extracts the addresses from the output of "listaddressgroupings" or from a comma separated file and matches them to the genesis.json.

Code and usage can be found here:

https://github.com/betaxx/BTSXBalance

A .net compiled version can be found here: https://www.dropbox.com/s/ahri1d61zd1fc6r/BTSXBalance.zip, this should run in windows and linux / mac using mono

Have fun
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: JA on March 03, 2014, 12:01:33 pm
I have created a very simple alternative version that  checks your BTSX balance without using any your wallet/s, it just extracts the addresses from the output of "listaddressgroupings" or from a comma separated file and matches them to the genesis.json.

Code and usage can be found here:

https://github.com/betaxx/BTSXBalance

A .net compiled version can be found here: https://www.dropbox.com/s/ahri1d61zd1fc6r/BTSXBalance.zip, this should run in windows and linux / mac using mono

Have fun
I just wanted to make the exact same vb.net app dang!
But thanks anyway
Maybe you could name it BitBalance
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: betax on March 03, 2014, 12:50:32 pm
Tested it (https://github.com/betaxx/BTSXBalance) on Linux under mono.  The compilation has been downgraded it to .net 4.0. If you are planning to use the compiled version you will need to install mono-complete if you have any problems.

sudo apt-get install mono-complete


Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: betax on March 03, 2014, 12:52:16 pm
Quote
I just wanted to make the exact same vb.net app dang!
But thanks anyway
Maybe you could name it BitBalance

Lest's see how many people use it and we can vote for a better name :)
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: JA on March 03, 2014, 02:52:36 pm
It cant read Bitcoin adresses...at leat the precompiled one
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: betax on March 03, 2014, 03:28:25 pm
It cant read Bitcoin adresses...at leat the precompiled one

Tested with mine.. check the format

using comma separated format

addressesCommaSeparated.txt

18wh9z4o2NWSVJijiX6CcBLXYhPdahmbKk,12CLxa1B5V3ywxFaP7Qb5GUPF9kB7q48n4

244.178...

using listaddressgroupings

addressGroupingsBTC.txt

[
[
[
"12CLxa1B5V3ywxFaP7Qb5GUPF9kB7q48n4",
0.18279316,
"mul2"
],
[
"18wh9z4o2NWSVJijiX6CcBLXYhPdahmbKk",
0.00000000,
"mul1"
]
]
]

244.178...


 
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: betax on March 03, 2014, 03:32:15 pm
Note: If you put both at the same time you will get a double amount.. ill put a check for duplicated addresses later on.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: JA on March 03, 2014, 03:33:25 pm
It cant read Bitcoin adresses...at leat the precompiled one

Tested with mine.. check the format

using comma separated format

addressesCommaSeparated.txt

18wh9z4o2NWSVJijiX6CcBLXYhPdahmbKk,12CLxa1B5V3ywxFaP7Qb5GUPF9kB7q48n4

244.178...

using listaddressgroupings

addressGroupings.txt

[
[
[
"12CLxa1B5V3ywxFaP7Qb5GUPF9kB7q48n4",
0.18279316,
"mul2"
],
[
"18wh9z4o2NWSVJijiX6CcBLXYhPdahmbKk",
0.00000000,
"mul1"
]
]
]

244.178...
I tried it now with bitcoin adresses only and it worked
Semms it cant read BTC and PTS together
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: betax on March 03, 2014, 04:05:28 pm
Oh yes.. I will put a separate txt file for listgroupings for BTC, PTC.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: betax on March 03, 2014, 04:24:44 pm
Corrected, now there are 3 types of file input.

addressesCommaSeparated.txt (Comma separated)
addressGroupingsBTC.txt (List groupings BTC)
addressGroupingsPTS.txt (List groupings PTS)

Duplicated addresses will be ignored now.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: betax on March 03, 2014, 09:33:17 pm
I have moved the tool to another thread as I am hijacking bytemasters thread (we will have to import our wallets in a similar way hopefully soon :)).
https://bitsharestalk.org/index.php?topic=3371.0
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: speedy on March 03, 2014, 09:43:22 pm
If anyone doesnt want to use any tools, you can just search for your address manually in
https://raw.github.com/betaxx/BTSXBalance/master/genesis.json

Edit: although it doesn't include AGS from PTS donations.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: betax on March 04, 2014, 05:57:12 am
If anyone doesnt want to use any tools, you can just search for your address manually in
https://raw.github.com/betaxx/BTSXBalance/master/genesis.json

Edit: although it doesn't include AGS from PTS donations.

My AGSs from PTS donation is included in the genesis.json, just make sure to "listaddressgroupings" to get all your addresses, and this is were the tool helps you if you have many addresses just copy and paste the output into the text file. If you have 2/3 addresses yes it is pointless ;)
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: boombastic on March 04, 2014, 09:42:14 am
For AGS donator addresses, initial BTS balance is now integrated in balance page on http://agsexplorer.com .
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: betax on March 04, 2014, 12:52:23 pm
I have created a web site using the same code / principles

http://bitbalance.azurewebsites.net/

Have fun
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: Xeldal on March 08, 2014, 10:57:20 pm
What happens with the 117,567.513007 BTS from the PTS the donation address held during the snapshot?

http://www1.agsexplorer.com/balances/PaNGELmZgzRQCKeEKM6ifgTqNkC4ceiAWw

Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: bytemaster on March 08, 2014, 11:19:11 pm
What happens with the 117,567.513007 BTS from the PTS the donation address held during the snapshot?

http://www1.agsexplorer.com/balances/PaNGELmZgzRQCKeEKM6ifgTqNkC4ceiAWw


Those funds are used by us to build the industry.
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: prophetx on April 18, 2014, 11:29:02 am
I have created a web site using the same code / principles

http://bitbalance.azurewebsites.net/

Have fun

nothing happens when i click submit
Title: Re: Get your BTS XT Balance Here from the Feb 28th snapshot
Post by: betax on April 21, 2014, 07:42:20 am
Fixed, problem with github hosting the genesis.