Bitcoin Forum
February 16, 2020, 07:24:24 PM *
News: Latest Bitcoin Core release: 0.19.0.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: script to get only first block from all blk*.dat files  (Read 73 times)
aitsam
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 25, 2019, 02:46:45 PM
 #1

Sorry if that question is already asked and answered earlier, but I couldn't find it in this forum.

I am testing bitcoin data by using different filters. Now I want to write a script which will only consider the first block in blk*.dat file. I am confused about where to start.
Your help will be highly appreciated.
Thank you
100% First Deposit Bonus Instant Withdrawals Best Odds 10+ Sports Since 2014 No KYC Asked Play Now
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1581881064
Hero Member
*
Offline Offline

Posts: 1581881064

View Profile Personal Message (Offline)

Ignore
1581881064
Reply with quote  #2

1581881064
Report to moderator
1581881064
Hero Member
*
Offline Offline

Posts: 1581881064

View Profile Personal Message (Offline)

Ignore
1581881064
Reply with quote  #2

1581881064
Report to moderator
1581881064
Hero Member
*
Offline Offline

Posts: 1581881064

View Profile Personal Message (Offline)

Ignore
1581881064
Reply with quote  #2

1581881064
Report to moderator
ETFbitcoin
Legendary
*
Offline Offline

Activity: 1918
Merit: 2202

Use SegWit and enjoy lower fees.


View Profile WWW
November 25, 2019, 06:12:26 PM
 #2

I don't know the technical details, but for starters :
1. Bitcoin Core use LevelDB
2. blk*.dat have fixed maximum size, so you might only get partial data of the "first" block in a blk*.dat file
3. Bitcore Core use obfuscation key on LevelDB, see https://bitcoin.stackexchange.com/a/50902 for detailed info

P.S. this sounds like XY problem, what are you trying to accomplish by get only first block from all blk*.dat files

ETFbitcoin
Legendary
*
Offline Offline

Activity: 1918
Merit: 2202

Use SegWit and enjoy lower fees.


View Profile WWW
November 26, 2019, 08:55:54 AM
 #3

I don't know the technical details
3. Bitcore Core use obfuscation key on LevelDB


Is that unique to each to program on each computer?

According to answer on https://bitcoin.stackexchange.com/a/50902, it's unique to each program.

The scheme is very simple - a randomly chosen (per database) 64-bit value that gets XORed into all values in the database. This is fast, simple, and so far, effective.

aitsam
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 26, 2019, 09:20:14 AM
 #4

I don't know the technical details, but for starters :
1. Bitcoin Core use LevelDB
2. blk*.dat have fixed maximum size, so you might only get partial data of the "first" block in a blk*.dat file
3. Bitcore Core use obfuscation key on LevelDB, see https://bitcoin.stackexchange.com/a/50902 for detailed info

P.S. this sounds like XY problem, what are you trying to accomplish by get only first block from all blk*.dat files

````````````````````````````````````
I am testing some filters and it turns out that at a specific block the code get stuck, I want to find that block and run test on it separately.
ETFbitcoin
Legendary
*
Offline Offline

Activity: 1918
Merit: 2202

Use SegWit and enjoy lower fees.


View Profile WWW
November 26, 2019, 09:41:46 AM
 #5

I am testing some filters and it turns out that at a specific block the code get stuck, I want to find that block and run test on it separately.

I still don't understand what you're trying to accomplish, but i doubt you'll get detailed/specific answer because there aren't many Bitcoin Core developer/contributor in this forum.

You might want try your luck on IRC channels or https://bitcoin.stackexchange.com/

ETFbitcoin
Legendary
*
Offline Offline

Activity: 1918
Merit: 2202

Use SegWit and enjoy lower fees.


View Profile WWW
November 27, 2019, 07:00:27 PM
 #6

There are some who still regularly contribute here, and because of that it does not matter how many there are, just that there are some if it interests them to respond for some reason they could.

True, but it won't hurt to ask the question of multiple places.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!