Bitcoin Forum
May 26, 2024, 01:37:40 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 [3] 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 »
41  Economy / Service Discussion / Is ItBit exchange any good ? on: January 26, 2018, 04:09:50 AM
hi, am wondering if Itbit exchange is any good ? or genuine.


its ranked around 50th on coinmarketcap.

there are 2 threads of about how they delay bitcoin withdrawal but they are pretty old.

so i would like to make sure before i jump in and send them funds.,


i wont be doing bigger transaction at first, but still.


anyone here does trading at Itbit ?


Thanks
42  Bitcoin / Development & Technical Discussion / Re: Why are transactions much faster now? on: January 25, 2018, 04:35:55 AM
new transactions count are less as compared to before and this gave time to clear up backlog.

or

old transaction from mempool dropped.
43  Bitcoin / Development & Technical Discussion / Re: which file in bitcoin core src handles chainstate db ? on: January 25, 2018, 04:30:05 AM
The chainstate db contains basically two parts, the UTXO set and the actual chain state. The stuff pertaining to the UTXO set is in txbd.{cpp, h}. The stuff related to the actual chain state can be found in validation.{cpp, h} (mostly things under the CChainState class).

i am interested in UTXO set .
i read key=> value pairs are there in UTXO set chainstate.

whats in actual chain state ?
44  Bitcoin / Development & Technical Discussion / which file in bitcoin core src handles chainstate db ? on: January 25, 2018, 03:42:28 AM
i am trying to find out which cpp file in bitcoin-core src, is handling stuff related to chainstate db.

https://github.com/bitcoin/bitcoin/


Thanks for your time.
45  Bitcoin / Development & Technical Discussion / Re: Bitcoin RPC. Get sum of all fees in the mempool. on: January 24, 2018, 07:24:47 AM
to get all fees , you need to get list of all trasnactins in mempool

getrawmempool will give you all transactions "txid" in mempool.

then you need to run

getrawtransaction "txid" 1

it will give you detailed transaction in json.

from that you can get

"vin"

"vout"

fees = vin - vout

do this for all transactions and you will get fees of all transactions in mempool.

hope this helps.
This would only work if OP has txindex enabled on his node.

no, txindex is required only if op wants to query old tx which are in block, but he only wants to query which are in mempool.,

so imho txindex is not required just to query tx in mempool.


Quote
By default -txindex=0 Bitcoin Core doesn't maintain any transaction-level data except for those

in the mempool or relay set
pertinent to addresses in your wallet
pertinent to your "watch-only" addresses


ref:  https://bitcoin.stackexchange.com/a/37979/10603

or maybe i am missing something.,
sorry for my bad english.
46  Bitcoin / Development & Technical Discussion / Re: Bitcoin RPC. Get sum of all fees in the mempool. on: January 21, 2018, 12:36:12 PM
to get all fees , you need to get list of all trasnactins in mempool

getrawmempool will give you all transactions "txid" in mempool.

then you need to run

getrawtransaction "txid" 1

it will give you detailed transaction in json.

from that you can get

"vin"

"vout"

fees = vin - vout

do this for all transactions and you will get fees of all transactions in mempool.

hope this helps.
47  Bitcoin / Development & Technical Discussion / Re: How to speed up json/rpc calls ? to bitcoin core on: January 18, 2018, 04:44:13 PM
Any news about running a fast blockchain dump using json/rpc ?
It's taking month, like something is locked and calls serialized.


there is method called "batch json" in in, you can combine multiple json requests in single query., it should speed up the reply.

48  Bitcoin / Development & Technical Discussion / Re: How to speed up json/rpc calls ? to bitcoin core on: January 15, 2018, 11:39:00 AM
the trouble in reading blockfiles or chainstate db is , core developers keep changing the internal format., so you must be pro in c,c++ to read and understand from core source files.

this is true and most of what I have seen with Bitcoin core sure does look over complicated and has lead
to lots of programs having to use REST API's on-line which is not really the way to go.

I will get to were I want to go and do it in a way that I want to do it

if you dont mind spending some bucks ,then i heard user amaclin had some cpp code to read the blk files and he is pro too in terms fo bitcoin protocol.
49  Bitcoin / Development & Technical Discussion / Re: How to speed up json/rpc calls ? to bitcoin core on: January 15, 2018, 02:18:34 AM
assuming you have a fully sync'd client, you can read-in directly the blk*.dat files into mysql, without the need for the JSON API:
https://github.com/bitcoin-abe/bitcoin-abe/blob/master/README-MYSQL.txt

Getting direct access to blk0001.dat is all very easy until you try doing from windows without running
a full node and doing RPC that is real slow from what I am picking up.

I think the file format needed is LevelDB but i cannot even get a LeveDB programs in C++ to compile in Visual Studio
that I can then use from C# or even find a windows based copy of LevelDB.dll to Pin.Invoke from C#

Hopefully i can hit the ground running once I can read the block .dat files but for now i am stuck in the mud
and much of the code hanging around the internet that works in windows is well out of date anyway.

Just reading Peers.dat for now would be nice  Cheesy




the trouble in reading blockfiles or chainstate db is , core developers keep changing the internal format., so you must be pro in c,c++ to read and understand from core source files.
50  Bitcoin / Development & Technical Discussion / Re: How to speed up json/rpc calls ? to bitcoin core on: January 14, 2018, 02:45:31 PM
assuming you have a fully sync'd client, you can read-in directly the blk*.dat files into mysql, without the need for the JSON API:

https://github.com/bitcoin-abe/bitcoin-abe/blob/master/README-MYSQL.txt





i read initial bitcoin-abe sync takes month+
51  Bitcoin / Development & Technical Discussion / Re: Get list of all addresses with a balance over x? on: January 14, 2018, 03:16:35 AM
thanks @btctousd81.

would you give the script that allows to create this csv?
did you do it in bash or python or anything else?


Nice so did you do it from windows or Linux without using a wrapper around someones
mega-big API or running a full-node and using RPC ?

I am trying to code this myself to read block.dat from several  types of forked BC  from Bitcoin
so I need to go back to raw files I think and then see what happens after a fork date to the data
so off the shelf API's won't help me out.

Will be interesting to see who has money in the forks and are not using it





i have full node running at home, on linux centos 7 dedicated to only bitcoind.

there is no single readymade script to get all addresses having balance.

what i did was i used rusty-blockparser to get all unspent outputs in csv.
then loaded it in myql
then some queries to get data in proper format and bitcoin-tool to get address to hash160.

then i have this php script which gets run every 4-6 hours and parses all new blocks using rpc. and updates my mysql db.

it was time consuming task took me 2-3 days to get everything in db.

it would be great if someone could create app which can directly read chainstate db.

parsing blockchain is pretty simple using rpc but its fuckin slow as hell.

every output is +1 and old amount + new amount
while
every input is -1 and old amount - new amount

this is my logic to get uptodate all addresses having balance ..

hope this helps.,

i could upload regular updated db daily but my home net has very slow upload speed so it takes around 7-8 hours to upload above dump.

-------------------------------

edit:

if you want only addresses having balance not care about the amount of btc its holding, then just run

rusty-blockparser with unspentcsv callback

you wiill get huge csv dump file then just use grep sed something like that to only get addresses.

the parser takes around 8 -12 hours., even on my amd fx 8350 , 32 gig dedicated machine.
52  Bitcoin / Development & Technical Discussion / Re: Block #488466 BTC on: January 12, 2018, 05:52:10 PM
I'm trying to parse blockchain using parser https://github.com/znort987/blockparser but it throws an error (segfault) on block #488466.

Did anyone have the same error and how to overcome it?

P.S Ran with "./parser allBalances" param on Ubuntu 14 64Gb RAM, 32 cores

yes, that is old peice of software., it doesnt work anymore. read this  https://github.com/znort987/blockparser/issues

and this

https://github.com/znort987/blockparser/issues/65

install bitcoin-core-0.11.2 and do rescan on whole blockahain and then try to run

./parser allBalances

and see if it works., theriotically it should from above references.



That sw is like what 4+ years old, and it will just bog down around 400k blocks, and certainly there would be a core crash, they even caveat to tell you to have 32gb of RAM on your system, as all their work is done in malloc()

The problem here is this sw is 4+ years old, and if the github is even a month since the last update, chances are 99% it aint' going to work, its the nature of BTC sw, ... because core is always changing the block-chain format, and nobody is going to maintain the shit for long, cuz you would go nutz

...

Said it before and will say again, if you want to parse bTC you must write you  own parser, its not hard, only ten lines of python to parse, what most ppl here are after, the problem, is that its clear that most here aren't programmers, and that is where the rubber meets the road,

Just like this post about a seg-fault, a programmer, would have just just used GDB and resolved the problem, but not here no way, there are no programmers.

there are lots of programmers here.,

but why reinvent the wheel ? there are already libraries/apps on internet to do the job., besides learning constantly changing bitcoin-core is not easy task.

53  Bitcoin / Development & Technical Discussion / Re: How to generate list of all non-zero balances of Bitcoin blockchain? on: January 12, 2018, 06:34:16 AM
i recently did this.

try rusty-blockparser https://github.com/gcarq/rusty-blockparser

with unspencsv callback.,
it thorws txt file., it gives all unspent outputs with address , amount , txid, nout.

54  Bitcoin / Development & Technical Discussion / Re: Get list of all addresses with a balance over x? on: January 12, 2018, 01:15:48 AM
give me few hours, ill upload latest one.

Your lists just pull addresses with balances right? You don't list every address on the blockchain, or do you?

nope, only addresses having balance.

edit: here it is

Code:
https://transfer.sh/xGs0K/btctousd81-12jan2018.csv.7z
format

Code:
addresss, hash160, amount
55  Bitcoin / Development & Technical Discussion / Re: How to speed up json/rpc calls ? to bitcoin core on: January 11, 2018, 05:16:31 PM
nobody queries rpc for running site, mysql can handle 1k+ queries per second, and rpc cant even handle 100 queries per second.

i have already have

rpcworkqueue=128
rpcthreads=128
rpctimeout=220

this in my bitcoin.conf

and still got that

WARNING

Quote
You could also have more than one rpc client.
what do you mean by this ?
i tried running 100 threads simultaneously.


Thanks for your input.

just curious what are specs of the machine you are running this on?

Btw I am aware of the capabilities of MySQL. I'm trying to help you find an alternative method because of your issues.

sorry if my last reply was mean.

i was just trying to say, that mysql is very powerful vs., bitcoind queriying the blk files or chainstate.


my machine is
fx 8350
32 gigs ddr3 1600
asus gaming motherboard.
latest centos 7 x64 , minimal + bitcoind

thanks for your time.
56  Bitcoin / Development & Technical Discussion / Re: How to speed up json/rpc calls ? to bitcoin core on: January 11, 2018, 02:12:59 PM
The debug log told you how to allow more requests. Bump that setting up. You could also have more than one rpc client.

The task is repetitive. For you to find out if an address has a zero balance in Mysql you will need to parse the whole blockchain inside of your database. Essentially, processing through the whole dataset. Your essentially recreating a slower version of the rpc.

It might be more feasible to  query the rpc itself and avoid all the wasted processing power.

There might also be software out there that does this for you. I would seearch for that.

I can’t speak to how the block explorers do it but I believe they just query the rpc.

nobody queries rpc for running site, mysql can handle 1k+ queries per second, and rpc cant even handle 100 queries per second.

i have already have

rpcworkqueue=128
rpcthreads=128
rpctimeout=220

this in my bitcoin.conf

and still got that

WARNING

Quote
You could also have more than one rpc client.
what do you mean by this ?
i tried running 100 threads simultaneously.


Thanks for your input.
57  Bitcoin / Development & Technical Discussion / Re: How to speed up json/rpc calls ? to bitcoin core on: January 11, 2018, 12:00:15 PM
hi,

i am trying to load bitcoin blockchain in mysql.,
and going through the simple json/rpc way.

at current speed , it will take about 1 year+ to process all blocks till today and all transactions.

i am using php to query data.

is there way to speed up the process ?
by using multiple threads ? i can do that.

how many parallel/multiple threads the bitcoin-core json/rpc can handle ?

anyone tried this approach before ?


Thanks for your time.



If you don't mind me asking why are you trying to store everything in a MySQL database? One of the best things about bitcoin is the RPC itself. You can get all the data you need on demand.

Regarding you question, there are somethings that you can do to help. Try storing data in a message queue such as redis and use a cron to migrate the information to the database. That might help speed up as the driver isnt waiting on the response of the rpc itself.


i know rpc is great, but i want to analize the data , i cant ask rpc to give me address having highest balance.
or lowest balance., or transactions sending 0 btc .

i am more fammiliar with mysql i can see data directly.,

i am working on site like blockexplorer so its not very feasible to send all requests to rpc , as rpc has some limitations on how many threads it can handle., while in mysql type relational dbs, its much easier to scale.

i have loaded balance data in mysql, but it took me 3-4 days , to try different libraries and benchmark which one is faster to process block.

current database is not 100% accurate so i want to parse blockchain again.

i have tried running rpc queries without inserting data in database and its quite slow. like avarage block takes 100 seconds to process all transactions and get all vouts and vin

so i am looking for something much faster. i can do parallel queries to bitcoind using json/rpc, but how many parallel queriees can bitcoind handle.,
i tried sending 100 queries at a time and debug.log got filled with

Code:
WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting


58  Bitcoin / Development & Technical Discussion / Re: Get list of all addresses with a balance over x? on: January 11, 2018, 08:33:15 AM
give me few hours, ill upload latest one.
59  Bitcoin / Development & Technical Discussion / Re: Block #488466 BTC on: January 11, 2018, 04:01:40 AM
I'm trying to parse blockchain using parser https://github.com/znort987/blockparser but it throws an error (segfault) on block #488466.

Did anyone have the same error and how to overcome it?

P.S Ran with "./parser allBalances" param on Ubuntu 14 64Gb RAM, 32 cores

yes, that is old peice of software., it doesnt work anymore. read this  https://github.com/znort987/blockparser/issues

and this

https://github.com/znort987/blockparser/issues/65

install bitcoin-core-0.11.2 and do rescan on whole blockahain and then try to run

./parser allBalances

and see if it works., theriotically it should from above references.

60  Bitcoin / Development & Technical Discussion / Re: Block #503198 what is it ? on: January 10, 2018, 11:48:44 AM
Maybe it was 51% attack ? I do not know how but this is the place to be, big amount of miners accept this version of block #503198

imho 51% attack is not that easy and why do something like that ? unless there are bitcoins worth couple of millions are at stake.

Pages: « 1 2 [3] 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!