Main Menu

[DNS] ** LAST CHANCE TO CHECK ALLOCATION **

Started by toast, September 26, 2014, 05:42:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

toast

Quote from: xeroc on September 27, 2014, 10:23:53 AM
Just wanted to run the script of
https://bitsharestalk.org/index.php?topic=9283.0
on the genesis block but couldn't find the total supply (at launch) to make the numbers right!?
is the supply announced? I just know about the distribution :(

Initial supply is 5bn.
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.

Akado

my numbers seem to be off? It seems to show i have only 151 pts/ags but i was supposed to have some more?
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

xeroc

Just wanted to run the script of
https://bitsharestalk.org/index.php?topic=9283.0
on the genesis block but couldn't find the total supply (at launch) to make the numbers right!?
is the supply announced? I just know about the distribution :(

ffwong

Quote from: xeroc on September 27, 2014, 10:01:43 AM
have you had a change in your pts position since the snapshot?


@xeroc, you are right, I did move my coin to a new wallet right before the snapshot. And I forgot to scan that new wallet addresses. Now, after including that listaddressgroupings from this new wallet. The sum is correct. I can confirm (at least my allocation) that the genesis block allocation contains AGS (both from BTC and PTS donations) and PTS (during snapshot time) allocation. Thanks.  ;)
Cast me some votes. I am running:
- dragonball for Bitshares 2.0 net
- delegate.fftt for PTS (DPOS) net

xeroc

Quote from: ffwong on September 27, 2014, 10:11:15 AM
Quote from: xeroc on September 27, 2014, 10:09:29 AM
Hug?

235800         [
235801             "PuTHy9uGtdHdJ9ch1kTtrLkGkTuHe7HwSR",
235802             1177308757                                                                                                                                                                                                     
235803             47092115
235804         ],


Yes, I met this bug or typo as I run my python script as well, you need to manually fix it.

and toast should fix it too .. however .. no idea if I am supposed to just add them up!?

ffwong

Quote from: xeroc on September 27, 2014, 10:09:29 AM
Hug?

235800         [
235801             "PuTHy9uGtdHdJ9ch1kTtrLkGkTuHe7HwSR",
235802             1177308757                                                                                                                                                                                                     
235803             47092115
235804         ],


Yes, I met this bug or typo as I run my python script as well, you need to manually fix it.
Cast me some votes. I am running:
- dragonball for Bitshares 2.0 net
- delegate.fftt for PTS (DPOS) net

ffwong

#21
Quote from: xeroc on September 27, 2014, 10:01:43 AM
have you had a change in your pts position since the snapshot?

could you share the script?

Here is the python code. You may need to install the required modules.
Just put the output of "listaddressgroupings" as a file in the same folder, e.g. "pts-listaddressgroupings.json"
and pass the name of the file containing the genesis block as command line option to the program.

Quote
#
# dns-alloc.py  [genesis_json]
#
# This program intends to extract addresses from bitcoin-qt (or protoshares-qt) debug window command
# listaddressgrouppings. Then it looks up Bitshares DNS genesis block (allocation of DNS to AGS (PTS|BTC)
# and PTS. It lists the DNS allocation for each address and cumulate the sum.
# Save your listaddressgroupings to a file like "pts-listaddressgroupings.json". The program will
# scans all matched .json file. The genesis json is input as the command line option.
#
# ffwong



import sys
import json
from sys import exit
from pprint import pprint
import glob


def recur_addr(alist, btclist):
    for i in range(0,len(alist)):   
        if isinstance(alist, list):     
            recur_addr(alist, btclist)
        elif isinstance(alist, str) and len(alist)>30 and (alist
  • =='1' or alist
    • =='P'):
                  #pprint (alist)
                  btclist.append(alist)
         

      ###### main ######

      scaleup = 1  # DNS scale up factor (if any)

      wallets = glob.glob('*-listaddressgroupings.json')
      filecnt = len(wallets)

      genesis_json = open(sys.argv[1])  # change the filename is file changed
      genesis_dict = json.load(genesis_json)
      genesis      = genesis_dict['balances']  # list of list

      for i in range (0, filecnt):
          jfilename = wallets

          # Load json text file and extract all addresses recursively
          json_data = open(jfilename)
          addrlist = json.load(json_data)

          btclist = []
          recur_addr(addrlist,btclist)
          json_data.close()

          addrcnt      = len(btclist)
          allocnt      = len(genesis)
          start        = 0
          dns_sum     = 0
          for i in range(0, addrcnt): # for each address, look up the genesis block
              allocation = 0       
              for j in range(0, allocnt):
                  if genesis[j][0] == btclist:       
                      allocation  = genesis[j][1]
                      msg = '%40s: %16.8f DNS' % (genesis[j][0], allocation/100000000*scaleup)
                      print (msg)
                      break
              dns_sum += allocation   
          msg = ('Wallet %18s: [address count: %3d]   [amount: %16.8f DNS]' % \
                (jfilename.replace('-listaddressgroupings.json',''), len(btclist), dns_sum/100000000*scaleup))   
          pprint (msg)  # convert satoshi -> DNS

Cast me some votes. I am running:
- dragonball for Bitshares 2.0 net
- delegate.fftt for PTS (DPOS) net

xeroc

Hug?

235800         [
235801             "PuTHy9uGtdHdJ9ch1kTtrLkGkTuHe7HwSR",
235802             1177308757                                                                                                                                                                                                     
235803             47092115
235804         ],

testz

#19
Quote from: ffwong on September 27, 2014, 09:59:49 AM
Quote from: testz on September 27, 2014, 09:54:48 AM
Quote from: ffwong on September 27, 2014, 09:53:12 AM
Just want to clarify. The genesis block allocation contains both the AGS and PTS allocations.
So if I see the allocation associated with a PTS address in the json file, it is the sum of the allocation for AGS (donated from that same PTS address) plus the allocation to the same PTS (holdiing during snapshot), am I right?

Yes

If that is the case, it seems to there is a discrepancy. I wrote a python to scan and sum all my PTS addressess in the genesis allocation. It is less than I expected. It seems to me it only accounts for AGS allocation. May be I missed something.

Double check your AGS allocation with http://www1.agsexplorer.com
If your address in json has, as example 12345678901234 this mean you has 123.45678901234 AGS and http://www1.agsexplorer.com should show it.
If you has more for specific address, probably this address has AGS and PTS at snapshot.

xeroc

have you had a change in your pts position since the snapshot?

could you share the script?

ffwong

Quote from: testz on September 27, 2014, 09:54:48 AM
Quote from: ffwong on September 27, 2014, 09:53:12 AM
Just want to clarify. The genesis block allocation contains both the AGS and PTS allocations.
So if I see the allocation associated with a PTS address in the json file, it is the sum of the allocation for AGS (donated from that same PTS address) plus the allocation to the same PTS (holdiing during snapshot), am I right?

Yes

If that is the case, it seems to there is a discrepancy. I wrote a python to scan and sum all my PTS addressess in the genesis allocation. It is less than I expected. It seems to me it only accounts for AGS allocation. May be I missed something.
Cast me some votes. I am running:
- dragonball for Bitshares 2.0 net
- delegate.fftt for PTS (DPOS) net

xeroc

Quote from: ffwong on September 27, 2014, 09:53:12 AM
Just want to clarify. The genesis block allocation contains both the AGS and PTS allocations.
So if I see the allocation associated with a PTS address in the json file, it is the sum of the allocation for AGS (donated from that same PTS address) plus the allocation to the same PTS (holdiing during snapshot), am I right?
assuming your have left some PTS in an address you also used to donate to AGS from .. then I would say so .. yes
those allocations should also be listed accordingly @ agsexplorer.com AFAIK

testz

Quote from: ffwong on September 27, 2014, 09:53:12 AM
Just want to clarify. The genesis block allocation contains both the AGS and PTS allocations.
So if I see the allocation associated with a PTS address in the json file, it is the sum of the allocation for AGS (donated from that same PTS address) plus the allocation to the same PTS (holdiing during snapshot), am I right?

Yes

ffwong

#14
Just want to clarify. The genesis block allocation contains both the AGS and PTS allocations.
So if I see the allocation associated with a PTS address in the json file, it is the sum of the allocation for AGS (donated from that same PTS address) plus the allocation to the same PTS (holdiing during snapshot), am I right?

Or it only accounts for AGS allocation?
Cast me some votes. I am running:
- dragonball for Bitshares 2.0 net
- delegate.fftt for PTS (DPOS) net

ffwong

Besides, does the genesis allocation accounts for bounty?
Cast me some votes. I am running:
- dragonball for Bitshares 2.0 net
- delegate.fftt for PTS (DPOS) net