Bitcoin Forum
May 26, 2024, 12:20:52 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 »
161  Bitcoin / Development & Technical Discussion / How to read/parse blockchain and get bitcoin addresses having balance. on: October 06, 2017, 03:35:25 PM
i am trying to get bitcoin addresses from my blockchain stored on server.

my bitcoin is up to date. index mode is not enabled, as i dont want UTXO database.

i tried using https://github.com/znort987/blockparser

compiled it succesfully.
strated like this


Code:
[root@blockparser]# env BLOCKCHAIN_DIR="/home/user2/" ./parser allBalances > allBalances.txt

info: mem at start = 0.000 Gigs
info: starting command "allBalances"
info: loading block chain from directory: /home/user2/.bitcoin
info: block chain size = 136.344 Gigs
info: initializing hash tables
info: estimated number of blocks = 1071.27K
info: estimated number of transactions = 276.71M
info: done initializing hash tables - mem = 0.000 Gigs
info: pass 1 -- walk all blocks and build headers ...
info: pass 1 -- took 48 secs, 488497 blocks, 136.34 Gigs, 2862.34 Megs/secs , 89430 early link misses, mem=0.000 Gigs        
info: pass 2 -- link all blocks ...
info: pass 2 -- done, did 89430 late links
info: pass 3 -- wire longest chain ...
info: pass 3 -- done, maxHeight=488497
info: pass 4 -- full blockchain analysis (with index)...
info: computing balance for all addresses
info: hit ^C to interrupt and dump current, valid state of ledger
info:        1 blocks,    0.000 MegaAddrs ,
info:   141229 blocks,    1.738 MegaAddrs ,
info:   166873 blocks,    3.058 MegaAddrs ,
info:   181587 blocks,    3.939 MegaAddrs ,
info:   186771 blocks,    4.633 MegaAddrs ,


but it crashes in the middle., or some times at the end., i tried running it many times.,

previously i got memory related error., so freed up memory and increased swap on my server. then tried running it again

right now i am getting

Code:
info: 481823 blocks, 295.351 MegaAddrs ,
fatal: failed to locate upstream transaction

i counted and looks like it aborts when 2000 blocks are remaining.

i am not the only one getting this error..

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

so what you guys are using ? to get data extracted from blockchain files.

i have 64 gigs of ram, i7 , ssd .
centos 7 x64

is there any other tool ? optimized ? or any other fork

thanks for your time,.
162  Bitcoin / Bitcoin Technical Support / Re: Auto restart bitcoind after crash on Ubuntu server on: September 29, 2017, 12:26:16 PM
why not find why is your bitcoind is crashing a nd fixing that issue ?

you can always look in to log
check last 200 lines ,after crash, you will find you answer.

tail -n 200 ~/.bitcoin/debug.log

you can restart bitcoind after crash in multiple ways .

1) start bitcoind every minute cron.
only one session is allowed of bitcoind, so you dont have to check whether bitcoind is already running

simple cron command will work

* * * * * bitcoind

2) check if bitcoind process is running, if not then start using cronjobs.
you need a bash script to check if bitcoind is runnig, then run that script every minute using cronjob.


3) check if your bitcoind's port,( default . 8333) is open, if not, then start bitcoind.

hope this helps.,



163  Bitcoin / Bitcoin Technical Support / Re: How to get or calculate inputs's prev_out tx hash using script ? on: September 29, 2017, 03:40:45 AM
Use a different api. Blockchain.info's api is not giving you the information that you want even though the previous transaction id and output index is included in the transaction itself.

how about this one ?

https://chain.so/tx/BTC/727b2cd08e728aeb08580333207c52d0ddf3ba47f85bd59241c3d92436f5fdd5

edit: got it.


https://chain.so/api/v2/tx/BTC/727b2cd08e728aeb08580333207c52d0ddf3ba47f85bd59241c3d92436f5fdd5


thanks


164  Bitcoin / Bitcoin Technical Support / How to get or calculate inputs's prev_out tx hash using script ? on: September 29, 2017, 02:24:06 AM
i am looking at tx json output at blockchain.info

here is simple tx for ref. using 1 input and 1 output.

https://blockchain.info/tx/727b2cd08e728aeb08580333207c52d0ddf3ba47f85bd59241c3d92436f5fdd5


Code:
{
   "ver":2,
   "inputs":[
      {
         "sequence":4294967295,
         "witness":"",
         "prev_out":{
            "spent":true,
            "tx_index":188897912,
            "type":0,
            "addr":"3KeMARg9fppMVGytgyVJpc37oAXWyRbRuv",
            "value":272135,
            "n":0,
            "script":"a914c4f11390a7b4fcb4ffc4bd7e756596c706d6098887"
         },
         "script":"00483045022100af349f6a1d70f7d179559ea054cbd7869537f303915e2368b29a51041307562b022025b849a291dbaccfeafdb7e6678f586793c365a38d0c1685410b875e0f541611014730440220210616dd589181b0194ab73f0b7a6aac15c5b17c9c80621397bafbf0060ef56a0220247e5bca72de61be853027bcb2cfa3ceff1912e7019e7fa8573665fc559eb998014c69522102def45a0229881116d6000bc99921426c35a3a8bb92e1d4485679a23c93799f512102ef970eabc8e92f7dc357a93ded039e63137718df0bcd19b3e74f7f1a9ad870e621037d811aa90fcb399985f79699f4e92044b663e01456f22bbc50888eccaffb742f53ae"
      }
   ],
   "weight":1360,
   "relayed_by":"0.0.0.0",
   "out":[
      {
         "spent":false,
         "tx_index":286831175,
         "type":0,
         "addr":"1NjTJADyoBLpqvM6kbc9VSMS9DnqUhMZ7R",
         "value":236548,
         "n":0,
         "script":"76a914ee6210015c3768052078a9802b5a648b7991bfb188ac"
      }
   ],
   "lock_time":0,
   "size":340,
   "double_spend":false,
   "time":1506651576,
   "tx_index":286831175,
   "vin_sz":1,
   "hash":"727b2cd08e728aeb08580333207c52d0ddf3ba47f85bd59241c3d92436f5fdd5",
   "vout_sz":1
}


how can i get/calculate input's tx_hash. i mean prev_out input's tx hash. from the available info in current json ?
i.e. from this
Code:
      {
         "sequence":4294967295,
         "witness":"",
         "prev_out":{
            "spent":true,
            "tx_index":188897912,
            "type":0,
            "addr":"3KeMARg9fppMVGytgyVJpc37oAXWyRbRuv",
            "value":272135,
            "n":0,
            "script":"a914c4f11390a7b4fcb4ffc4bd7e756596c706d6098887"
         },
         "script":"00483045022100af349f6a1d70f7d179559ea054cbd7869537f303915e2368b29a51041307562b022025b849a291dbaccfeafdb7e6678f586793c365a38d0c1685410b875e0f541611014730440220210616dd589181b0194ab73f0b7a6aac15c5b17c9c80621397bafbf0060ef56a0220247e5bca72de61be853027bcb2cfa3ceff1912e7019e7fa8573665fc559eb998014c69522102def45a0229881116d6000bc99921426c35a3a8bb92e1d4485679a23c93799f512102ef970eabc8e92f7dc357a93ded039e63137718df0bcd19b3e74f7f1a9ad870e621037d811aa90fcb399985f79699f4e92044b663e01456f22bbc50888eccaffb742f53ae"
      }

i want to get this

Code:
626ce1cc231f67c6895d92ee28aa4a595e86ffc7ba22de0d5a4469178ee84719


165  Bitcoin / Bitcoin Discussion / Re: Сan the volume of coins be increased? on: September 28, 2017, 05:20:54 AM
nope, that is hardcoded in the program/protocol i gess.

if btc supply increases, then its value decreases.

if amount is fixed, then btc value increases.

166  Bitcoin / Development & Technical Discussion / Re: libsecp256k1 as a library/dll/etc on: September 27, 2017, 02:42:45 PM
i am not sure, if this is what you are looking for .,
ref https://github.com/bitcoin-core/secp256k1/issues/451

Quote
You can configure libsecp256k1 not to use GMP at all. Option is --with-bignum=none.
167  Bitcoin / Bitcoin Discussion / Re: Material on Bitcoin (incl. Blockchain) for education on: September 25, 2017, 01:52:23 PM
Videos are good if you want to learn Bitcoin by yourself or as additional resource.
I am looking for slides and infographics in order to use it in a course.
In addition, demonstrators would be interesting.

I found this interesting demo where you are able to play (a little bit) with the concept behind the Blockchain:
https://anders.com/blockchain/

this is the best explanation i have seen so far.

very clear. and to the point., just realized how the nounce works.
168  Bitcoin / Development & Technical Discussion / Re: can i just send transaction to peers without adding it in my mempool ? on: September 23, 2017, 04:10:33 PM
in windows.,
its braocasting tx and giving.

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Can you send me a screenshot in PM?

Quote
but i cant able to compile it., what are you using ? i mean platform ? compiler ? linking libraries ?
a) Qt/C++ (very old version)
b) OpenSSL  (very old version) for ::SHA256() method

In fact there are only ~200 lines of code there. Isn't it easy to rewrite the code
to make your own tool based on my concept?

i have sent you pm.

and yes, i am working on re writing code.,
will see how it goes.
169  Bitcoin / Development & Technical Discussion / Re: can i just send transaction to peers without adding it in my mempool ? on: September 23, 2017, 11:34:31 AM
but its not broadcasting tx to the nodes.
any clue ?
thanks
i am now trying it on windows.

This is not "production tool". I created it for myself and it runs ok on windows.
Do you have the config file (with a list of ip) located in current directory?
What is the output of PushTxTool when you run it?
Do you pass the transaction hex as an argument?

in windows.,
its braocasting tx and giving.

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


but i cant able to compile it., what are you using ? i mean platform ? compiler ? linking libraries ?

thanks
170  Bitcoin / Development & Technical Discussion / Re: can i just send transaction to peers without adding it in my mempool ? on: September 23, 2017, 06:48:11 AM
Thank you, building it in linux.
It requires OpenSSL for ::SHA256() method
You have to slighly modify project file, because the windows path is hardcoded there

i have build it in linux, no errros, no warnings ., using

qmake-qt5
make

but its not broadcasting tx to the nodes.
any clue ?

thanks


i am now trying it on windows.
171  Economy / Service Discussion / Re: BitcoinCrack.org - All Bitcoin Private Keys Cracker (review) on: September 20, 2017, 08:30:28 AM
whats the flow of the software ?

how does it work ?

172  Bitcoin / Development & Technical Discussion / Re: can i just send transaction to peers without adding it in my mempool ? on: September 19, 2017, 11:53:56 AM
i wanted just to force feed my whole tx to peers of my choice, i mean i have list of peers, and i wanted to force feed them my newly created tx, as quick as possible,

The tool you are looking for Smiley
Just put your list in config file and run executable with a tx in hex as parameter
https://cloud.mail.ru/public/2rUa/zgcW6vf8g
(sources included)


Thank you, building it in linux.

173  Bitcoin / Development & Technical Discussion / Re: can i just send transaction to peers without adding it in my mempool ? on: September 19, 2017, 05:26:34 AM
looks like it also says inv message before and wait for the reply and then push tx.
You never specified that that was what you wanted when you made this thread until after I posted that link.

Bitcoinj is an example of something that broadcasts transactions without an inv: https://github.com/bitcoinj/bitcoinj/blob/a7cad0ede447d4bcba7dd55639df442a408df6fb/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java#L152

sorry , i must have missed that, and my english isnt very good, so sometimes, i miss some things from very long sentences.

thanks, looking in to it.

i wanted just to force feed my whole tx to peers of my choice, i mean i have list of peers, and i wanted to force feed them my newly created tx, as quick as possible,
174  Bitcoin / Development & Technical Discussion / Re: can i just send transaction to peers without adding it in my mempool ? on: September 19, 2017, 03:14:04 AM
You can't do that in Bitcoin Core. However there are other tools and software that allow you to broadcast a transaction. You can use submittx to do this: https://github.com/laanwj/bitcoin-submittx

i tried this., and its working as expected.,

thanks

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

edit 1 :

looks like it also says inv message before and wait for the reply and then push tx.

175  Bitcoin / Development & Technical Discussion / Re: can i just send transaction to peers without adding it in my mempool ? on: September 19, 2017, 03:13:09 AM
is this possible ?

i think not, but i need confirmation.

i have created a raw transaction and i have tx in hex.
can i push the tx hex to other peers without adding it in my mempool ?

but as per the bitcoin core source on , we only send tx hash hex, to peers , and if they dont have it, then we send full tx hex.

something like this.

 but i need more details.

i am planning to create tx and just feed it to the peers. if that is possible.

thanks
 
Yes. Simply broadcast it in serialized binary format. You will still add it to the mempool once it propagates back to you however. In order to do what you want you need to change the underlying code to ignore your transactions in the mempool.

so it will be like relay node., just relaying tx to other nodes.

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


176  Bitcoin / Bitcoin Discussion / Re: Is btc mining still profitable or is it just a big cover-up scam? on: September 18, 2017, 10:33:38 AM
During a gold rush, sell shovels.
that is what i think.,

you cant beat warehouses filled with thousands of ASIC running 24x7
i did the calculations too and even though i have free electricity, i did nt bother to buy ASIC, becuase it was not simply profitable, becuase the difficulty keeps on increasing and delivery delay by ASIC suppliers., so when you receive actual ASIC, its already late.

good luck., i have said it before., buying bitcoins directly is the only profitable option for now.,
--------------------------------------------------------------------------------------------------------
seconds thought.

you are all thinking it wrong, while calculating btc price using current rate.
if you gonna sell btc and make money right now, then its not profitable.,

mining btc and holding on to them , until price reaches 20k-50k per btc. then selling is what i call profitable.

keep mining BTC. and keep holding em.
177  Bitcoin / Bitcoin Discussion / Re: China just like banning things, Google, Facebook, Twitter, then Bitcoin. on: September 18, 2017, 10:26:50 AM
china will ban anything and everything which they cant control.

they want to regulate i.e. make money out of it.

they banned google, i dont recall exactly why, but i guess ,something like sharing chinese people data and or having servers in china.

but i guess, banning bitcoin is temporary until they come up with some plan to make money from it.

thats my thinking.
178  Bitcoin / Development & Technical Discussion / Re: Why node is showing "whitelisted":false, even i added whitelist=<ip> on: September 18, 2017, 03:42:59 AM
You can try to specify the address on which whitelisted node can connect to, using "-whitebind".

If you look closely, the value you're refering to is displayed here : https://github.com/bitcoin/bitcoin/blob/e0e3cbbf081b74ed5322176dcda081c64076fd21/src/rpc/net.cpp#L171

This value is set here :

https://github.com/bitcoin/bitcoin/blob/723e5806578be90ba0f6b953629cf7389e6a27cd/src/net.cpp#L1056

Code:
bool whitelisted = hListenSocket.whitelisted || IsWhitelistedRange(addr);

So, it's true either because it's connected to a whitelisted bound address (set by -whitebind and should be restricted by a firewall or local network) or is in the whitelist range (which you seem to (wrongly?) set in your config).

I suggest you to break into this code and check what's going wrong with the test against the addr in your config : https://github.com/bitcoin/bitcoin/blob/723e5806578be90ba0f6b953629cf7389e6a27cd/src/net.cpp#L607-L613

thank you , looking in to it.

wiki says i can specify ip too. and not just ip range.

-whitelist=<IP address or network>   Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times. Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway


and i have other non trusted peers connecting to my node.
so if i do whitebind., then all the nodes will be whitlisted , i dont think thats a good idea.

ill try , the whitelist with cidr range.

thnks
179  Bitcoin / Development & Technical Discussion / Re: Low transactions fees but fast on: September 17, 2017, 06:26:51 PM
now i understand why my tx got confirmed in next block even though i had fees less than 5 sat/ byte.

i thought i was very lucky and people complaining on the forum of increased fees were stupid. but this thread clears the issue.

i thought this was becuase of segwit too., but could not confirm what caused this.
180  Bitcoin / Development & Technical Discussion / Re: Blockstream's Bitcoin Satelite WWW w/ OuterNet USB Reciever. on: September 17, 2017, 05:19:53 PM
i don't see, why is this necessary ?
i mean, it will only send data, so we will receive unconfirmed tx and confirmed blocks. (maybe superquick)

we cant send anything to the satellite directly. so at the end of the day, we will need internet , to do transactions. to send transactions.,

i am not sure, to whom it will be useful.
imho it will be continuous  stream of txs, and few of the main servers which will act as nodes in bitcoin network, will send data to that satellite. which will get distributed .

instead its better to be connected to internet and act as a node, so you can get data and even send data. of
unconfirmed tx and confirmed blocks.

just my thinking, please correct me if i am wrong.

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

edit1 :

just realized, the reason for not having bitcoin client on my home machine is because slow internet speed.

so for initial setup i can hook up dish setup, and get whole blockchain. but how will satellite send old data to only me ?

may be they can implement something like channels., on specific channels., old data is sent in loop.
while on another channel ,new tx data is sent.
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!