Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: sairon on May 19, 2013, 09:00:46 PM



Title: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 19, 2013, 09:00:46 PM
Hi!
I've modified Abe to work with Yacoin. Here it is:

http://yacexplorer.tk (http://yacexplorer.tk)

Also, everybody loves GRAPHS!
(for raw data, see http://pastebin.com/mEMdue3d (http://pastebin.com/mEMdue3d))

difficulty over time:
https://i.imgur.com/Pxt5lGM.png (http://imgur.com/Pxt5lGM)

hashrate over time:
https://i.imgur.com/Vt9778P.png (http://imgur.com/Vt9778P)

block generation interval over time:
https://i.imgur.com/fLyiHxf.png (http://imgur.com/fLyiHxf)

Yeah, I suck with gnuplot. ;)


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: anonynonanony on May 20, 2013, 05:24:02 PM
Very nice.  Good work!


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: procrypto on May 20, 2013, 06:14:12 PM
Looks great!
Layout is slightly broken for me on the Block page in Chrome, overlapping text at the top near the logo. e.g. http://yacexplorer.tk/block/0000000008b2943d6b68a5f909d5606660674b09d880a602e11290d3b4fa041f


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: aso118 on May 20, 2013, 10:24:15 PM
Thanks Sairon!  This is really helpful.

I am having a bit of trouble pulling API data out though.  Its probably just a noob mistake, but nothing is being returned when I try to pull from http://yacexplorer.tk/chain/YaCoin/q/getreceivedbyaddress/*my address here*.  

I also tried http://yacexplorer.tk/chain/YAC/q/getreceivedbyaddress/*my address here* & http://yacexplorer.tk/q/getreceivedbyaddress/*my address here* too, but no luck.  Any suggestions?


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 21, 2013, 07:20:26 AM
Thanks Sairon!  This is really helpful.

I am having a bit of trouble pulling API data out though.  Its probably just a noob mistake, but nothing is being returned when I try to pull from http://yacexplorer.tk/chain/YaCoin/q/getreceivedbyaddress/*my address here*.  

I also tried http://yacexplorer.tk/chain/YAC/q/getreceivedbyaddress/*my address here* & http://yacexplorer.tk/q/getreceivedbyaddress/*my address here* too, but no luck.  Any suggestions?

http://www.yacexplorer.tk/chain/Yacoin/q/getreceivedbyaddress/YAmvtnMWpBBwPzfesFMLmvNPwzg5cja8f8 (http://yacexplorer.tk/chain/Yacoin/q/getreceivedbyaddress/YAmvtnMWpBBwPzfesFMLmvNPwzg5cja8f8) ;)


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: procrypto on May 21, 2013, 10:53:19 AM
Since website update no one donated BTC or YAC to sairon addresses listed on blockchain explorer pages, how can you people be so pathetic?

LOL I've donated all kinds of YAC to all kinds of people, including sairon.

Broken layout for reference, Chrome 26.0.1410.64, Windows 7

https://i.imgur.com/Aqf7WzU.png


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: aso118 on May 21, 2013, 02:17:15 PM
Thanks Sairon!  This is really helpful.

I am having a bit of trouble pulling API data out though.  Its probably just a noob mistake, but nothing is being returned when I try to pull from http://yacexplorer.tk/chain/YaCoin/q/getreceivedbyaddress/*my address here*.  

I also tried http://yacexplorer.tk/chain/YAC/q/getreceivedbyaddress/*my address here* & http://yacexplorer.tk/q/getreceivedbyaddress/*my address here* too, but no luck.  Any suggestions?

http://www.yacexplorer.tk/chain/Yacoin/q/getreceivedbyaddress/YAmvtnMWpBBwPzfesFMLmvNPwzg5cja8f8 (http://yacexplorer.tk/chain/Yacoin/q/getreceivedbyaddress/YAmvtnMWpBBwPzfesFMLmvNPwzg5cja8f8) ;)

*Face Palm* Apparently the 'www.' is needed.   

Thank-you.  It now works.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: aso118 on May 21, 2013, 02:19:02 PM
You should change CHAIN to Yacoin on all API command description pages, no need to have it written universally since it is YAC-only blockchain explorer.

http://yacexplorer.tk/q/getreceivedbyaddress

Since website update no one donated BTC or YAC to sairon addresses listed on blockchain explorer pages, how can you people be so pathetic?

I thought I seen a few donations trickle through yesterday. 

http://yacexplorer.tk/address/YC83VqhfWWSJ1AmWcTsnssfTuqnENc86A7

I only mined about one coin so far - but I won't forget him. :)


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 21, 2013, 03:21:10 PM
I'm reorganizing the server a lil' bit, so it's down for a while.
(Changing database from sqlite to postgresql, making apache serve the requests instead of python, etc... TL;DR: the site should be much faster.)


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 21, 2013, 09:33:46 PM
OK, so the site is back up, hopefully it will be able to handle higher traffic without hanging on single large request for ages... (I managed to DoS the site in at least 5 different ways yesterday :D)

I'm reorganizing the server a lil' bit, so it's down for a while.
(Changing database from sqlite to postgresql, making apache serve the requests instead of python, etc... TL;DR: the site should be much faster.)

You could look at the issue mentioned by procrypto. As far as I can tell, it exists because "Proof of Work" and "X coins generated" are both put into H1 and font-size for it is defined in
CSS which makes Google Chrome overwrite first line with second one due to not having enough room to place both lines in separate rows. I suggest either putting both lines in the same
row (remove <br> between them) or moving both lines out of H1 and placing them above or bellow "Value out:" line.

Changed it to a single line, should be fine now.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: eddyfitz on May 24, 2013, 08:24:31 AM
It shows me "502 Bad Gateway"


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 24, 2013, 09:16:06 AM
It shows me "502 Bad Gateway"

Fixed.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: Kruncha on May 24, 2013, 09:29:30 AM
It shows me "502 Bad Gateway"

Fixed.

Good job :)

How do you go about getting the link on Bter? (and possibly removing the YAC warning ;D)

K.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 24, 2013, 09:50:32 AM
How do you go about getting the link on Bter? (and possibly removing the YAC warning ;D)

https://bitcointalk.org/index.php?topic=196196.msg2249651#msg2249651 (https://bitcointalk.org/index.php?topic=196196.msg2249651#msg2249651)  ;D


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: procrypto on May 28, 2013, 02:20:30 PM
Still having problems? It's down..

Haven't had time to look at my fork again although I'm fairly sure I could figure it out now I have a deeper understanding of the way YACoin works. If you share your code I'd happily host it, it would save me some time.  ;)


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 28, 2013, 02:50:59 PM
Still having problems? It's down..

Haven't had time to look at my fork again although I'm fairly sure I could figure it out now I have a deeper understanding of the way YACoin works. If you share your code I'd happily host it, it would save me some time.  ;)

Up now, but no idea for how long... It keeps breaking the database, dunno why. -.-"
The code is on github, see https://github.com/saironiq/yacoin-abe

EDIT: aaand it's gone... this time at block #73513. some debug info:
Code:
2013-05-28 16:28:36 UTC ERROR:  insert or update on table "block_tx" violates foreign key constraint "block_tx_tx_id_fkey"
2013-05-28 16:28:36 UTC DETAIL:  Key (tx_id)=(99232) is not present in table "tx".
2013-05-28 16:28:36 UTC STATEMENT:
                        INSERT INTO block_tx
                            (block_id, tx_id, tx_pos)
                        VALUES (73515, 99232, 0)
2013-05-28 17:13:39 UTC ERROR:  duplicate key value violates unique constraint "chain_candidate_pkey"
2013-05-28 17:13:39 UTC DETAIL:  Key (chain_id, block_id)=(8, 73566) already exists.
2013-05-28 17:13:39 UTC STATEMENT:
                    INSERT INTO chain_candidate (
                        chain_id, block_id, in_longest, block_height
                    ) VALUES (8, 73566, 1, 73519)
2013-05-28 19:13:48 UTC ERROR:  insert or update on table "txout" violates foreign key constraint "txout_pubkey_id_fkey"
2013-05-28 19:13:48 UTC DETAIL:  Key (pubkey_id)=(28308) is not present in table "pubkey".
2013-05-28 19:13:48 UTC STATEMENT:
                        INSERT INTO txout (
                            txout_id, tx_id, txout_pos, txout_value,
                            txout_scriptPubKey, pubkey_id
                        ) VALUES (192571, 99454, 0, '22410000', '21030019164d81bf8ff4ff0b9c732ea3e4d180aafa36d63008126b13d93bbbacb682ac', 28308)
need some sleep, will try to fix it tomorrow.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: feeling2011 on May 29, 2013, 03:59:34 PM
Great work!


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: rbdrbd on May 29, 2013, 05:01:44 PM
Just wondering: Do we have any live graphs?


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 29, 2013, 05:57:10 PM
Just wondering: Do we have any live graphs?

It's on my TODO list. ;)


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: St.Bit on May 30, 2013, 10:42:52 AM
http://yacexplorer.tk/ is down.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 30, 2013, 11:16:29 AM
http://yacexplorer.tk/ is down.

Yes, it is. I'm trying to figure out why the hell is it breaking the database all the time.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 30, 2013, 02:37:18 PM
Server up again, let's see for how long it will last this time...

EDIT: Gah, it went down again... -.-" However, I found out that this is a known problem in Abe related to concurrent blockchain processing when new block is received from the network (race condition or something). I've implemented a quick fix - using a separate process for writing new blocks into DB once in a while (so webpage might be delayed by up to 60 seconds, not a big deal). Hopefully this avoids another DB corruption until proper fix is implemented in Abe.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 30, 2013, 04:27:51 PM
Just wondering: Do we have any live graphs?

It's on my TODO list. ;)

Graphs now live at http://yacexplorer.tk/graphs.htm (http://yacexplorer.tk/graphs.htm). Updated every hour.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: St.Bit on May 30, 2013, 04:31:44 PM
Why are there negative intervalls?


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 30, 2013, 04:34:19 PM
Why are there negative intervalls?

Some miners try to decrease difficulty by including timestamps from the future in the block. These timestamps are chcecked by the network and accepted if they're within 2 hours of local time. By pretending it took almost 2 hours to solve a block instead of 1 minute, these miners trick the network into decreasing difficulty by a little fraction (around 2% the last time a checked). It also creates these weird data points in the graphs.

From https://en.bitcoin.it/wiki/Block_timestamp (https://en.bitcoin.it/wiki/Block_timestamp) (Forum warning: Possible phishing link!):
Quote
A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours. "Network-adjusted time" is the median of the timestamps returned by all nodes connected to you.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on May 30, 2013, 04:46:15 PM
It is code inherited from Bitcoin which uses 10 minutes block time so YACoin maximum future time should be dropped to 12 minutes.

Yeah, thanks for the correction.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on June 01, 2013, 11:09:36 PM
Two suggestions:

1. Remove showing 2016 blocks (count=2016) since it has no connection with YAC, it is made for cryptocoins that retarget every 2016 blocks.
2. Put link for this thread somewhere on explorer webpages.

Done.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: dreamwatcher on June 02, 2013, 12:49:20 AM
Server up again, let's see for how long it will last this time...

EDIT: Gah, it went down again... -.-" However, I found out that this is a known problem in Abe related to concurrent blockchain processing when new block is received from the network (race condition or something). I've implemented a quick fix - using a separate process for writing new blocks into DB once in a while (so webpage might be delayed by up to 60 seconds, not a big deal). Hopefully this avoids another DB corruption until proper fix is implemented in Abe.

Ahh, my young ABE Padawan.  ;)

The first step in your quest for a smooth running explorer is to switch to the FastCGI server and stop using the default built in python server.

You have the right idea about separate processes for update verses serve. Keep two copies of abe.py with different names like abe.py and uabe.py.

Any requests from the web server will use one abe.py with a conf file that uses a empty bracket for datadir (datadir = [] ). This will stop web requests from tripping an update.

To update the database use the blocknotify option in the coin daemon conf file and point it to a script that will run the second abe.py (uabe.py) with a full conf file to trigger a database update. The reason for the two named abe.py has to do with FastCGI sticking its big nose into your database update process if it has the same name as the process it trips.

If you need any more help, just let me know.  8)



Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on June 02, 2013, 12:57:53 AM
Server up again, let's see for how long it will last this time...

EDIT: Gah, it went down again... -.-" However, I found out that this is a known problem in Abe related to concurrent blockchain processing when new block is received from the network (race condition or something). I've implemented a quick fix - using a separate process for writing new blocks into DB once in a while (so webpage might be delayed by up to 60 seconds, not a big deal). Hopefully this avoids another DB corruption until proper fix is implemented in Abe.

Ahh, my young ABE Padawan.  ;)

The first step in your quest for a smooth running explorer is to switch to the FastCGI server and stop using the default built in python server.

You have the right idea about separate processes for update verses serve. Keep two copies of abe.py with different names like abe.py and uabe.py.

Any requests from the web server will use one abe.py with a conf file that uses a empty bracket for datadir (datadir = [] ). This will stop web requests from tripping an update.

To update the server use the blocknotify option in the coin daemon conf file and point it to a script that will run the second abe.py (uabe.py) with a full conf file to trigger a database update. The reason for the two named abe.py has to do with FastCGI sticking its big nose into your database update process if it has the same name as the process it trips.

If you need any more help, just let me know.  8)

I already solved it, but thanks anyway.


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on June 02, 2013, 01:27:08 PM
Two suggestions:

1. Remove showing 2016 blocks (count=2016) since it has no connection with YAC, it is made for cryptocoins that retarget every 2016 blocks.
2. Put link for this thread somewhere on explorer webpages.

Done.

You replaced 2016 with 1440 (in what sense is that value relevant to YAC?) and there is no link pointing to this thread.  ???

1) 1 day / 60 second blocks = 1440 blocks/day
2) at the end of technical info http://yacexplorer.tk/graphs.htm#tech (http://yacexplorer.tk/graphs.htm#tech)


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on June 02, 2013, 05:39:10 PM
1. Why would someone ever switch to 1440 blocks shown on a single page? It is pointless since there will hardly ever be exactly 1440 blocks solved in one day.
2. Cool, but it is on graphs page, not main page so anyone checking just block, address or transaction will never see it.
1) meh
2) why would they want to? imo anyone interested in details will browse through the technical info and find the links there


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: sairon on June 03, 2013, 07:03:53 PM
Implemented new block explorer feature: getbalance API call:
http://yacexplorer.tk/chain/Yacoin/q/getbalance/YOUR_ADDRESS_HERE

EDIT: Also, approximate network hashrate over last N blocks (default N = 1440 blocks = ~1 day):
http://yacexplorer.tk/chain/Yacoin/q/hashrate (http://yacexplorer.tk/chain/Yacoin/q/hashrate)


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: JahPowerBit on June 13, 2013, 11:07:23 AM
Implemented new block explorer feature: getbalance API call:
http://yacexplorer.tk/chain/Yacoin/q/getbalance/YOUR_ADDRESS_HERE

cool! thank you.
If you can implemente this 2 queries for Yacoin:

https://blockchain.info/pushtx
http://blockchain.info/unspent?address=address

Brainwallet.org will be easy to be adapted for Yacoin..




Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: JahPowerBit on June 13, 2013, 11:09:55 AM
Please some one can explain me why this transaction have 0 confirmation, and why i can not find it on yacexplorer

Code:
Status: 0/unconfirmed
Date: 6/12/13 01:55
Debit: 0.00 YAC
Net amount: -1189.99 YAC
Transaction ID: 7a86082a5685784ad33cec31a5300a611b9f4076a0c2b1d1d7f2c035a6d3e7e5

Staked coins must wait 520 blocks before they can return to balance and be spent. When you generated this proof-of-stake block, it was broadcast to the
 network to be added to the block chain. If it fails to get into the chain, it will change to "not accepted" and not be a valid stake.
This may occasionally happen if another node generates a proof-of-stake block within a few seconds of yours.

http://yacexplorer.tk/search?q=7a86082a5685784ad33cec31a5300a611b9f4076a0c2b1d1d7f2c035a6d3e7e5

Thanks!!


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: JahPowerBit on June 13, 2013, 02:06:03 PM
Restart YACoin client with -rescan option once. If it does not help, restart it with -reindex option once (it takes some time to complete).

Thank you a lot, but it does not work  :-\
My wallet always indicates stakes = 0 and the transaction is still not confirmed ..
Please someone tell me that I have not lost permanently in 1800 YAC  :'(


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: JahPowerBit on June 13, 2013, 08:33:42 PM
resolved by a simple "repairwallet"  :-[ :-[
thanks


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: dreamwatcher on June 13, 2013, 08:44:38 PM
Restart YACoin client with -rescan option once. If it does not help, restart it with -reindex option once (it takes some time to complete).

Thank you a lot, but it does not work  :-\
My wallet always indicates stakes = 0 and the transaction is still not confirmed ..
Please someone tell me that I have not lost permanently in 1800 YAC  :'(

OK, the indicator for me is that it does not indicated it broadcast the transaction to any node. This tells me the client created the transaction, but for whatever reason it was never broadcast (Client was shut-down or crashed before it broadcast the transaction).

This means your wallet (client) believes you had a -1800 transaction. but in reality it was never broadcast and therefor not in the block chain. The thing that needs to be done is to remove that transaction out of your wallet, as it is not a real transaction.

Couple of way to solve this when it gets this bad:

1. Always backup your current wallet

2. Dump/import key method - Dump the private key for the address involved in the transaction (dumpprivkey), this will display the private key to that address. Close the client.  Rename your current wallet.dat. Restart the client. Import the private key (importprivkey <Private key you got before>). When the cursor comes back (It might not say anything), restart the client. The new wallet should show the coins from the address you just imported. Your old wallet will still have that transaction, and not accept the real transaction. Your best bet is to move whatever coins you have in the old wallet to the new wallet and go from there.( rename the wallet.dat and switch the old wallet back to wallet.dat...etc...etc...)

3. You could use PYwallet to delete all the transactions in your current wallet and force a TRUE rescan, as the wallet will have no transactions in it, the client will have to find all the transactions associated with it.Instructions for that are a bit more detailed and setting up PYwallet is system specific (Windows or linux).

EDIT: Looks like it was solved while I was typing this up... ;D


Title: Re: [ANN][YAC] Yacoin Block Explorer now LIVE! http://yacexplorer.tk
Post by: JahPowerBit on June 13, 2013, 09:53:51 PM

EDIT: Looks like it was solved while I was typing this up... ;D

yep double  :-[ ! thank you very much and very sorry for your time!!

i type "help" to search command for dump all my private keys et reload them in another wallet, when i saw the "repairwallet" command.. and eureka :-)
thank you again all!!