Pages:
Author

Topic: [ANNOUNCE] RPC Ace - a simple cut-down block explorer alternative (Read 15723 times)

full member
Activity: 312
Merit: 102
Did anyone ever get search functionality running with this?
hero member
Activity: 1148
Merit: 562
Blockchain Core Dev
Hi mate, thank you for sharing!
But I can`t find a way to get the db working, can you please help me? Sad

Sure. Can you give me any details on errors or so?

For starters you need to give the web server write access to the filename you configure in the DB_FILE parameter, either by making the file itself writable by the web server process, or making the entire directory RPC Ace is located in writable - the first method is preferred. I suspect you may not be used to working in a shell environment, so the simlpest solution in your case is to create an empty file using f.e. Notepad, give it the same name as the filename you set in DB_FILE, upload it to the same dir as RPC Ace, right-click it in your ftp client and look at the file's properties/info and you should see a set of permission flags indicating user/group/other, read/write/execute - click the check box that indicates that the file will be writable by "other", and then give RPC Ace a try again.

Got it! Thank you!  Smiley
sr. member
Activity: 264
Merit: 250
Hi mate, thank you for sharing!
But I can`t find a way to get the db working, can you please help me? Sad

Sure. Can you give me any details on errors or so?

For starters you need to give the web server write access to the filename you configure in the DB_FILE parameter, either by making the file itself writable by the web server process, or making the entire directory RPC Ace is located in writable - the first method is preferred. I suspect you may not be used to working in a shell environment, so the simlpest solution in your case is to create an empty file using f.e. Notepad, give it the same name as the filename you set in DB_FILE, upload it to the same dir as RPC Ace, right-click it in your ftp client and look at the file's properties/info and you should see a set of permission flags indicating user/group/other, read/write/execute - click the check box that indicates that the file will be writable by "other", and then give RPC Ace a try again.
hero member
Activity: 1148
Merit: 562
Blockchain Core Dev
Hi mate, thank you for sharing!
But I can`t find a way to get the db working, can you please help me? Sad
sr. member
Activity: 264
Merit: 250
RPC Ace v0.8.0 released, adding optional database storage for faster page generation and reduced burden on the coin daemon, a bit cleaner configuration syntax, and a slightly touched-up version of the example explorer. The database storage is currently rather simplistic, but lays the groundwork for future versions of RPC Ace that will offer transaction/block/address searches and more.

https://github.com/stolendata/rpc-ace


 
sr. member
Activity: 264
Merit: 250
PHP Parse error:  syntax error, unexpected '[' in /var/public_html/5/rpcace.php on line 35

anyone ?

I suspect you accidentally removed a parenthesis, apostrophe or semicolon from the rows of defines further up when configuring RPC Ace, or in the require_once() statement referencing easybitcoin.php.
full member
Activity: 241
Merit: 107
PHP Parse error:  syntax error, unexpected '[' in /var/public_html/5/rpcace.php on line 35
anyone ?

Your code on line 35 in rpcace.php should look like this;

Code:
private static $blockFields = [ 'hash', 'nextblockhash', 'previousblockhash', 'confirmations', 'size', 'height', 'version', 'merkleroot', 'time', 'nonce', 'bits', 'difficulty', 'mint', 'proofhash' ];

if you can not find the bracket "[" that is out of place, look at a few lines before line 35.

If that fail, just replace the file with a copy from the original and make sure that you only change the required variables leaving the rest of the file in tact.



sr. member
Activity: 638
Merit: 250
PHP Parse error:  syntax error, unexpected '[' in /var/public_html/5/rpcace.php on line 35

anyone ?

sr. member
Activity: 638
Merit: 250
I try but it show blank page.
What am i doing wrong?
sr. member
Activity: 264
Merit: 250
Code:
PHP Notice:  Undefined index: num_blocks in /var/www/rpcace.php on line 164

Anyone else have this issue?

I presume that underneath it also says "failed to connect"? The problem is that RPC Ace can't reach your wallet/node. Make sure the username, password, IP and port is correct (and that the port is reachable in case the wallet/node is on a different computer), and make sure your wallet/node's .conf contains "server=1" so that it accepts RPC requests.
full member
Activity: 193
Merit: 108
Code:
PHP Notice:  Undefined index: num_blocks in /var/www/rpcace.php on line 164

Anyone else have this issue?
sr. member
Activity: 264
Merit: 250
Code:
PHP Notice:  Use of undefined constant user123 - assumed 'user123' in /var/www/html/easybitcoin.php on line 93
PHP Notice:  Use of undefined constant password123 - assumed 'password123' in /var/www/html/easybitcoin.php on line 94
PHP Notice:  Undefined index: num_blocks in /var/www/html/rpcace.php on line 164

I dont understand which part of easybitcoin im supposed to edit ?

You're not supposed to change anything in easybitcoin.php - all tunable parameters are in rpcace.php. From the looks of it you have accidentally broken the syntax in rpcace.php, probably by removing a single quote or a semicolon:

private static $rpcUser = 'user123'; <- note the single quotes on both sides of 'user123', and the semicolon at the end of the line.
hero member
Activity: 490
Merit: 500
Code:
PHP Notice:  Use of undefined constant user123 - assumed 'user123' in /var/www/html/easybitcoin.php on line 93
PHP Notice:  Use of undefined constant password123 - assumed 'password123' in /var/www/html/easybitcoin.php on line 94
PHP Notice:  Undefined index: num_blocks in /var/www/html/rpcace.php on line 164

I dont understand which part of easybitcoin im supposed to edit ?
sr. member
Activity: 264
Merit: 250
Can you specify the tally.php php compile time requirements?

I get
Code:
PHP Warning:  Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0

Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0
PHP Warning:  Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0

Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0
PHP Warning:  Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0

Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0

This is because your PHP CLI component isn't working as it should. I suspect you are using PHP-Pear, and not the regular PHP? Also, keep in mind that RPC Ace and tally.php requires PHP 5.4 or later.
sr. member
Activity: 420
Merit: 250
These are the USE flags required for Gentoo's PHP install

cli curl filter gd hash json pcntl posix readline sockets unicode xml zlib
sr. member
Activity: 420
Merit: 250
Can you specify the tally.php php compile time requirements?

I get
Code:
PHP Warning:  Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0

Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0
PHP Warning:  Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0

Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0
PHP Warning:  Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0

Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in Unknown on line 0
sr. member
Activity: 264
Merit: 250
RPC Ace v0.7.0 released, introducing optional JSON output and a bit more accurate detection of hashrate and PoS difficulty/stake. This update allows for removing the example block explorer in order to just get PHP array or JSON output for working with the block chain data in other ways - just don't forget to credit the author Wink
 
https://github.com/stolendata/rpc-ace
 
Merry christmas, crypto pioneers.
sr. member
Activity: 290
Merit: 250
Thanks for the reply. I will try again with your recommendations.

Let me know how it works out. If you can't get it to work, let me know the details of your PHP environment, your viacoin.conf and so on and we might be able to figure out what's wrong.
Yes thanks again. I did re-downloaded blockchain. It took less than half an hour and all blockchain was parsed without a hitch.
sr. member
Activity: 264
Merit: 250
Thanks for the reply. I will try again with your recommendations.

Let me know how it works out. If you can't get it to work, let me know the details of your PHP environment, your viacoin.conf and so on and we might be able to figure out what's wrong.
sr. member
Activity: 290
Merit: 250
I am trying tally.php with viacoin but script aborts after 1200 blocks. I am wondering if someone help me on this. Viacoin didnt issue any coins in first 10000 block apart from 1st block with 10 million premine. I am thinking if there is a limit for empty rpc calls. Thanks in advance.

xxxx@ubuntu:/var/www/html/rpc-ace-via/extras$ php tally.php tally.txt373652 blocks ... 1000 (tx# 999)   1200 (tx# 1199)   PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/rpc-ace-via/extras/tally.php on line 56
aborted - 1199 transactions through 1 unique addresses counted

I tried tallying Viacoin on my dev system (PHP5.6/OS X) and my two test systems (PHP5.6/FreeBSD and PHP5.5.4/Mint~Ubuntu) and it works perfectly on all three setups, no hiccups:

Code:
380101 blocks ... 1000 (tx# 999)   2000 (tx# 1999)   3000 (tx# 2999)
...
379000 (tx# 483117)   380000 (tx# 484442)   done! 484569 transactions through 96909 unique addresses counted
 
VbWdvrSjUcNmXbzcV8RoM1NmJNGXLk6f8h 2500000
VvFp7K6JH2tpEdCWDqKoZSHYFPzCYpQHRE 1500000.018
Via2XCHoqQxACVuXf4vrajVDJetwVgxLMz 1087512.7926959
Vi1CCHqqeAwxaKTmvLeY9FVNG4QMW1GFex 507061.96643365
VboG1dsDJfFD83M6fMtftfLfMXmLEe5KQV 254000
VutuLs7wbpWbmHby7gZVtL18FRvi3Jc34e 253399.998
VaXuoUBVpN671ynbNQ4Lno86MEfYXhqn76 204856.8025629
VbckMJ2iuWs9QCwtHAnUczZKTyqfgJ6jtJ 200000
Vn6XAtzqpYbWdpsVPGMAma8HivZo9vd3t4 199449.998
VqPrpeAYGGrkDtWqZ7i71LrnaQhaAH5di3 186871.35337862
Vkco4M3ZagejS8LAzXWh14D2B3L1sGi1ZG 179439.61787044
...

I'm not sure what "empty RPC calls" mean. Inspecting individual blocks in the Viacoin chain I don't see anything out of the ordinary. All blocks (including blocks 1-9999) contain coinbases and legitimate transactions with inputs and outputs, and even if they amount to 0 coins this doesn't affect anything.

With the risk of sounding like a broken record, I suspect that you didn't build the block chain with full transaction indexing from the start, as the instructions demand. It's not enough to just add "txindex=1" in your viacoin.conf and start the daemon/wallet up again - you need to remove the entire block chain and rebuild it from scratch, from block 0, with txindex=1 set already from the start.

Thanks for the reply. I will try again with your recommendations.
Pages:
Jump to: