Author Topic: [DNS] ** LAST CHANCE TO CHECK ALLOCATION **  (Read 22079 times)

0 Members and 1 Guest are viewing this topic.

Offline toast

  • Moderator
  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
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.

Offline Akado

  • Hero Member
  • *****
  • Posts: 2752
    • View Profile
  • BitShares: 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?
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: 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 :(

Offline ffwong

  • Full Member
  • ***
  • Posts: 76
    • View Profile
  • BitShares: fftt
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

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Hug?
Code: [Select]
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!?

Offline ffwong

  • Full Member
  • ***
  • Posts: 76
    • View Profile
  • BitShares: fftt
Hug?
Code: [Select]
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

Offline ffwong

  • Full Member
  • ***
  • Posts: 76
    • View Profile
  • BitShares: fftt
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[0]=='1' or alist[0]=='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

« Last Edit: September 27, 2014, 10:24:37 am by ffwong »
Cast me some votes. I am running:
- dragonball for Bitshares 2.0 net
- delegate.fftt for PTS (DPOS) net

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Hug?
Code: [Select]
235800         [
235801             "PuTHy9uGtdHdJ9ch1kTtrLkGkTuHe7HwSR",
235802             1177308757                                                                                                                                                                                                     
235803             47092115
235804         ],

Offline testz

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.
« Last Edit: September 27, 2014, 10:08:29 am by testz »

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
have you had a change in your pts position since the snapshot?

could you share the script?

Offline ffwong

  • Full Member
  • ***
  • Posts: 76
    • View Profile
  • BitShares: fftt
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

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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

Offline testz

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

Offline ffwong

  • Full Member
  • ***
  • Posts: 76
    • View Profile
  • BitShares: fftt
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?
« Last Edit: September 27, 2014, 09:57:47 am by ffwong »
Cast me some votes. I am running:
- dragonball for Bitshares 2.0 net
- delegate.fftt for PTS (DPOS) net

Offline ffwong

  • Full Member
  • ***
  • Posts: 76
    • View Profile
  • BitShares: fftt
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