forknote / cryptonote-generator

Generate Cryptonote coin with 1 command
104 stars 211 forks source link

blockchain-explorer commands #61

Closed servc4 closed 6 years ago

servc4 commented 6 years ago

Hi I made my own coin using you generator, but commands form file blockchain-explorer.json are not added to my source. The coin is running right now but I am not able to get blockchain-explorer working without those commend from forknote, can someone help me with that ?? Can I add those commands ???

regards

servc4 commented 6 years ago

In my config was only "extensions": [ "core/bytecoin.json", "print-genesis-tx.json" ], Can I add now more extensions when coin is life ?? and generate source one more time but with my genesis and rest of required settings ???

luiscosio commented 6 years ago

@servc4 What blockchain explorer you are using?

servc4 commented 6 years ago

Hi I was trying to use forknote-pool where is block explorer in it and also Karbowanec-Blockchain-Explorer

No results till yesterday in console

curl -s -X POST 127.0.0.1:18081/json_rpc -d '{"params": {"hash" : "abb030db953218630ff656a6487e79098acc9b62b316e23c186b88ad1a9bad9a"} ,"jsonrpc":"2.0","id":"test","method":"f_block_json"}' -H 'Content-Type: application/json'

Is:

{"id":"test","jsonrpc":"2.0","result":{"block":{"alreadyGeneratedCoins":"1749749696798552973","alreadyGeneratedTransactions":29747,"baseReward":63694221767932,"blockSize":550,"depth":0,"difficulty":9609537,"effectiveSizeMedian":100000,"hash":"abb030db953218630ff656a6487e79098acc9b62b316e23c186b88ad1a9bad9a","height":26124,"major_version":3,"minor_version":0,"nonce":581693486,"orphan_status":false,"penalty":0.0,"prev_hash":"a39cc082b709231d5209ab7fd4ef51b29ed6c86ca2030a83afbc3ea9ee196971","reward":63694221767932,"sizeMedian":395,"timestamp":1517180998,"totalFeeAmount":0,"transactions":[{"amount_out":63694221767932,"fee":0,"hash":"95443f8a7fce21c57da6b1b2370f56cea0d48c2b096065908f05ddf685e93a4a","size":431}],"transactionsCumulativeSize":431},"status":"OK"}}

and Karbowanec-Blockchain-Explorer start working but only in Internet Explorer but that is not a problem... not all data are show on it I need to make some corection.

Thank you

ricochetcoin commented 6 years ago

same problems, commands form file blockchain-explorer.json are not added

luiscosio commented 6 years ago

@ricochetcoin @servc4 You need to add this patch to your coin: https://github.com/inbestcoin/inbestcoin/commit/5922dccda86ed490478849b7b93ce72421f7c6c8

If you have any doubts, hit us at t.me/forknote

ricochetcoin commented 6 years ago

Added and it's works! Thanks!

servc4 commented 6 years ago

@luiscosio can you help me with somthing I run Karbowanec-Blockchain-Explorer is fine and thank's to you Origin is working as well. But not all information are displayed on home page. http://deutercoin.uk/explorer.PNG

First I was trying to sort Transaction pool the code is:

function getPoolTransactions(){

var xhrGetPool = $.ajax({

            url: api + '/json_rpc',
            method: "POST",
            data: JSON.stringify({
                jsonrpc:"2.0",
                id: "test",
                method:"f_on_transactions_pool_json",
                params: {

                }
            }),
            dataType: 'text',
            cache: 'false',
            success: function(data){

                                var txsRows = document.getElementById('mem_pool_rows');
                                while (txsRows.firstChild) {
                                        txsRows.removeChild(txsRows.firstChild);
                                }

                                var rawTxs = data.split('"transactions":"').pop();
                                rawTxs = rawTxs.split('"}}')[0];
                                var txsArray = [];
                                txsArray = rawTxs.split('\n\n');
                                txsArray.forEach(function(tx, i) {
                                        var arrayOfLines = tx.split('\n');
                                        var hash = arrayOfLines[0].split(': ').pop();
                                        if(hash != "") {
                                                var timestamp = arrayOfLines[10].split(':').pop();
                                                var amount = arrayOfLines[8].split(':').pop();
                                                var fee = arrayOfLines[9].split(':').pop();
                                                var size = arrayOfLines[1].split(':').pop();
                                                var row = document.createElement('tr');
                                                var columns =
                                                                '<td>' + formatDate(timestamp) + ' (<span class="mtx-ago"></span>)' + '</td>' +
                                                                '<td>' + getReadableCoins(amount, 4, true) + '</td>' +
                                                                '<td>' + getReadableCoins(fee, 4, true) + '</td>' +
                                                                '<td>' + size + '</td>' +
                                                                '<td>' + formatPaymentLink(hash) + '</td>';
                                                row.innerHTML = columns;
                                                $(txsRows).append(row);
                                                $(row).find('.mtx-ago').timeago('update', new Date(timestamp * 1000).toISOString());
                                        }
                                });
                                updateText('mempool_count', document.querySelectorAll('#mem_pool_rows tr').length);
                        }
    });
};

Answer from server in command line is:

{"id":"test","jsonrpc":"2.0","result":{"status":"OK","transactions":[{"amount_out":441285055013830,"fee":10000000000,"hash":"8be64340c5d21c0ae7e8202dd1274020c7d30cf61d9578714fa1b04e50444106","size":14462}]}}

but no data on website at all...

Regards

luiscosio commented 6 years ago

@servc4 Yes, it is a bug. I'm currently working on fixing them I will update you.

pmitchev commented 6 years ago

You must add an extension for the blockexplorer to work:

"extensions": [ "core/bytecoin.json", "print-genesis-tx.json", "blockchain-explorer.json" ],

Also, make sure you read this: https://github.com/forknote/forknote-pool#configuring-blockchain-explorer

servc4 commented 6 years ago

Hi If you readed topic then you will see that block explorer command are on my node implement correctly. On method:"f_on_transactions_pool_json", answer is {"id":"test","jsonrpc":"2.0","result":{"status":"OK","transactions":[{"amount_out":441285055013830,"fee":10000000000,"hash":"8be64340c5d21c0ae7e8202dd1274020c7d30cf61d9578714fa1b04e50444106","size":14462}]}}

then is working but not all data are displayed on block explorer.

ngarcell commented 5 years ago

hi, im the developer of QpesaCoin, and I need help coming up with a block explorer, I used forknote source code...I cant realy seem to decipher what yall are saying tho...please help