Coder Social home page Coder Social logo

bitcoin-iterate's People

Contributors

ajtowns avatar jb55 avatar jsarenik avatar kallerosenbaum avatar rcasatta avatar rsbondi avatar rustyrussell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitcoin-iterate's Issues

default dir not working for Mac OS

/* First try new-style: $HOME/.bitcoin/blocks/blk[0-9]*.dat. */

has a distinction between the old directory format and the new one.

It might make sense to also add a distinction for MacOS as in Mac OS the blocks are stored at ~/Library/Application Support/Bitcoin/blocks/

how do we print public keys?

I'm looking to dump wallets from inputs to outputs (senders to receivers).
I believe these keys exist within the script portion, but it doesn't look like the tool parses scripts.
Does it make sense to add that functionality?

Filter outputs on unspend

Would it be possible to add an option that allows for printing only the outputs that are unspend (and therefore in the UTXO cache the script keeps already)?

I would like to use that to iterate over the blocks and dump the UTXO set at a given time, say each month.

Won't run on Mac OS

when running make I get:

....
./types.h:4:10: fatal error: 'openssl/sha.h' file not found
#include <openssl/sha.h>
         ^~~~~~~~~~~~~~~
1 error generated.
make: *** [iterate.o] Error 1

according to: https://www.anintegratedworld.com/mac-osx-fatal-error-opensslsha-h-file-not-found you can install openssl with brew install openssl (which I already had) but then you need to create the symlink like:

> cd /usr/local/include 
> ln -s ../opt/openssl/include/openssl .

not sure if the readme should updated for mac users

segmentation fault (core dumped)

When I execute "bitcoin-iterate" i get an error message "segmentation fault (core dumped)".

Bitcoin blockchain is up-to-date. I am using Ubuntu Desktop 18.

What's the reason for this error and how to fix it?

Is it safe to launch while bitcoind is running?

The question regard only the point of view of the bitcoind node, I don't care if bitcoin-iterate in some case crash or creates not perfect statistics because can't read a block file modified by the node.

Litecoin support ?

./bitcoin-iterate/bitcoin-iterate -q --tx=%th --blockdir /mnt/e/Litecoin/blocks >> ltctxs.txt

bitcoin-iterate: Skipped 134006689 at end of /mnt/e/Litecoin/blocks/blk00000.dat
bitcoin-iterate: Skipped 134170322 at end of /mnt/e/Litecoin/blocks/blk00001.dat
......
bitcoin-iterate: Skipped 134205049 at end of /mnt/e/Litecoin/blocks/blk00106.dat
bitcoin-iterate: Skipped 67108861 at end of /mnt/e/Litecoin/blocks/blk00107.dat
bitcoin-iterate: Could not find a genesis block.

Is it possible to only get the first output of each coinbase transaction?

Hello there,

First of all, thank you for the excellent tool.

Is it possible to get the first output from the coinbase transaction only from each block?

I can get the input for each coinbase transaction with this command:

# %iB: input UTXO block number (0 for coinbase)
bitcoin-iterate -q --input=%iB,%is | grep "^0,"

However, I'm not sure how to get the first output from the coinbase transaction only, as this command returns every first output for each transaction in the block:

# %oN: output number
bitcoin-iterate -q --output=%oN,%os | grep "^0,"

I'm trying to identify the miner behind each block. I can mostly do this looking at the scriptSig of the input in the coinbase transaction, but it seems that some miners identify themselves by the address they use to claim the block reward, which can be found in the scriptPubKey on the first output in the coinbase transaction.

I'm not sure if getting only the coinbase transaction's first output is possible, but I thought it would be best to ask.


EDIT: I'm guessing one solution would be to the hex of every coinbase transaction, then decode each one with bitcoin-cli and filter out the first output's address with jq:

bitcoin-iterate -q --transaction=%tN,%tX | grep "^0," | cut -d "," -f 2
# next: bitcoin-cli decoderawtransaction
# next: jq

Dump tx in block #761249 fail

I encountered an error when running the following command on macOS.

$ bitcoin-iterate -q --tx='%bN %bh %th %tX' --start=761249 --end=761250 > ./dump761249tx.txt
Assertion failed: (space->off + bytes <= sizeof(space->buf)), function space_alloc, file space.h, line 22.
Abort trap: 6

Dumping the transactions of other blocks has no issues.

how to work on prune mode

Hi,

I found out this program needs a full node from genesis block to work, it presents an error - "Could not find a genesis block.", even though I added '--start' to start from certain block height.

I cannot run a full node, what should I do , any suggestions?

OpenSSL not found

cc -O3 -flto -ggdb -I ccan/ -Wall -c -o iterate.o iterate.c
In file included from iterate.c:22:
In file included from ./parse.h:3:
./types.h:4:10: fatal error: 'openssl/sha.h' file not found
#include <openssl/sha.h>
^~~~~~~~~~~~~~~
1 error generated.
make: *** [iterate.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.