Skaro 129 Posted March 21, 2017 Share Posted March 21, 2017 If the owner of 1CvPQJiUypsARMQajjVcNfq5erxaJHNhy2 Would be willing to share some some of the details of this address with me, that would helpful in developing the explorer. Thank you. Link to post Share on other sites
Arcurus 331 Posted March 21, 2017 Author Share Posted March 21, 2017 i guess there are many addresses like that, just clicked one some blocks with transactions and found some addresses with negative balances, so i guess there a lot more out there. Link to post Share on other sites
Skaro 129 Posted March 21, 2017 Share Posted March 21, 2017 That's important yes. The explorer is calculating the number how I understand demurrage works. That's why i would like to compare the result with wallets. Also, i have the code for the wallet that I have to look at very closely. But Arcurus, can you explain to me how a wallet can withdraw the same amount of Freicoins it deposited 3000 blocks later? The balance should have reduced by demurrage, right? Link to post Share on other sites
Arcurus 331 Posted March 21, 2017 Author Share Posted March 21, 2017 doesnt the demurrage look like some kind of fee? I guess you can clear the full balance, but you cannot use all of the balance. Link to post Share on other sites
Skaro 129 Posted March 21, 2017 Share Posted March 21, 2017 And logically, there is only one place to spend Freicoins these days... Link to post Share on other sites
Arcurus 331 Posted March 21, 2017 Author Share Posted March 21, 2017 two i guess freiexchange and virco is back online Link to post Share on other sites
Skaro 129 Posted March 21, 2017 Share Posted March 21, 2017 Yeah, Arcurus, I thought the wallet destroys coins, as a function of block height, every time you open it, as it syncs with the network. That's what i thought I saw my wallet doing. And I thought I read that the Exchange doesn't calculate demurrage. Link to post Share on other sites
Arcurus 331 Posted March 21, 2017 Author Share Posted March 21, 2017 the wallet just displays. When coins are moved then the coins are destroyed. Otherwise it will blow the blockcain. Link to post Share on other sites
Skaro 129 Posted March 21, 2017 Share Posted March 21, 2017 Well, the demurrage fee doesn't appear in the blockchain. The wallet may only update when there are transactions concerning the wallet. But I assumed it updates the balance to the new block height, before reconciling transactions. Also, it should be updated before any spending can be made. That appears to be something I have to verify. Link to post Share on other sites
Arcurus 331 Posted March 21, 2017 Author Share Posted March 21, 2017 I guess the best is to look in the code how maaku implemented it. Link to post Share on other sites
fedde 311 Posted March 21, 2017 Share Posted March 21, 2017 One factor to remember if you send from a wallet, you hit send and enter amount. If you have maby 5 addresses there it will pick from them all to sum up what you want to transfer. Wallet is just a placeholder of addresses. Link to post Share on other sites
Skaro 129 Posted March 21, 2017 Share Posted March 21, 2017 Still, if people could compare with their personal wallets, that would help. But it's more complicated with old wallets that have imported private keys, suffered dropped transactions, and get regular deposits from mining. Did you compare yours, Acurus? Rik8119 1 Link to post Share on other sites
Arcurus 331 Posted March 21, 2017 Author Share Posted March 21, 2017 i checked them, but the thing is, the wallet uses many addresses but displays only one amount, so i can only check if the total amount is right Link to post Share on other sites
Arcurus 331 Posted March 21, 2017 Author Share Posted March 21, 2017 this address for example has a negative balance: http://freicoin.info/address/1LjKPSa7J9KyWFv7pWka2iUaLj6c29rtb Maybe the explorer dosent calculate the transaction fees right? Rik8119 1 Link to post Share on other sites
fedde 311 Posted March 21, 2017 Share Posted March 21, 2017 I think so that there is a fee that is not reduced right ending up in a negative balance Link to post Share on other sites
Skaro 129 Posted March 21, 2017 Share Posted March 21, 2017 There are few things to check. My working theory is that the sum of the adresses balances should be correct and correspond to the wallet. The exchange has one big wallet with many adresses, but the individual accounts are not reduced by demurrage. The explorer is calculating demurrage per address. Link to post Share on other sites
Skaro 129 Posted March 21, 2017 Share Posted March 21, 2017 But the good news is, apparently, Makku confirmed that the balances calculated for the foundation wallets were correct. Rik8119 1 Link to post Share on other sites
fedde 311 Posted March 21, 2017 Share Posted March 21, 2017 When looking abit deeper, we are missing coins in a block. Address in questen, when examin the block, you see it somehow says the block is 74 coins (should be 96) and the fees in the the block is summed up so it becomes 96, so we are missing some coins, that is why we se negative balance Link to post Share on other sites
Skaro 129 Posted March 25, 2017 Share Posted March 25, 2017 So it doesn't have anything to do with the exchange (sorry Fedde). The main problem causing the negative values is that the wallet gathers up inputs from previous transactions to make the payment (change is returned to an automatically generated change address). The chain uses the original deposit amounts associated with the inputs. The wallet, however, transfers the original transactions amounts reduced by demurrage (so its good to show 'amounts' already discounted because its what the wallet really has). So I had to go back to attach the original block height to discount the inputs from the beginning rather than the withdrawal date. The discrepancy between the what ABE expected for change and the real change, Abe calculates as the Fee, which are the missing coins that Fedde mentioned. The changes work on ABE on my laptop, and so you guys will have to wait for Fedde to make the changes. There is still one small thing to be changed (I have other real life things to tend to for a while). We are referring to the block height that contains the transaction. The wallet uses the block height when the transaction is sent. The wallet also sends this reference height. I have to find it in ABE and make changes accordingly. But what we have now should be pretty close, since a transaction gets put in a block quite soon after its made. Link to post Share on other sites
Skaro 129 Posted March 25, 2017 Share Posted March 25, 2017 hehe Arcurus 1 Link to post Share on other sites
Arcurus 331 Posted March 25, 2017 Author Share Posted March 25, 2017 Great! I never thought so be so happy about a zero balance Skaro 1 Link to post Share on other sites
Skaro 129 Posted March 25, 2017 Share Posted March 25, 2017 Thanks, Arcurus. Its doing what its supposed to now, but I think we are realizing its different from what we imagined. It appears the wallet keeps track of all input transaction and discounts them for demurrage, which makes sense. So its nice to know the remaining value of each transaction in the wallet. After you spend it, however, the values should be frozen in history, but that would require IF statements etc in ABE which don't fit very well with the existing imbedded SQL statements. So the table for any address will constantly change with block height. While correct for balances, its silly when the balance is zero. The negative value will also change continuously. While mathematically necessary, powerful and simple, it does look a little bizarre. But no rush. I plan to do a lot more playing with ABE this year. Our original goal was to be able to correctly calculate Foundation coin balance and to correctly estimate circulating currency. So we have more than that. Link to post Share on other sites
Arcurus 331 Posted March 25, 2017 Author Share Posted March 25, 2017 why you need if statements? The historic balance when an transaction happened could be calculated with the block height of that time the transaction was included or? Where can i see what is in circulation right now? Link to post Share on other sites
Skaro 129 Posted March 25, 2017 Share Posted March 25, 2017 Yes that's basically how you would calculate it. You have to check if that output has been spent, IF yes, calculate it differently. Its also done in a SELECT statement embedded in Python, which is a little advanced for my level, but I don't mind learning it. Then, finally, we would have to make two separate SELECT statements one to display differently the 'amounts' the other to calculate the balance using the current method (but if two values cancel each other out maybe not). This may require changes to ABE's display. etc. The circulating currency is an API. There was a small bug after the recent modifications (yes, I am literally an amateur). I've already corrected and uploaded it, but it may not be 'pushed' yet. Link to post Share on other sites
Skaro 129 Posted March 25, 2017 Share Posted March 25, 2017 http://212.125.247.59/chain/Freicoin/q/circulatingfrc http://212.125.247.59/address/1CvPQJiUypsARMQajjVcNfq5erxaJHNhy2 Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now