Author

Topic: Looking for an Appropriate way to access the Forks (Need advice) (Read 236 times)

legendary
Activity: 1988
Merit: 1317
Get your game girl
Thank you everyone for your inputs,I read them carefully and choose to go with the one Achow suggested me through private messages.More or less,it is the similar of doing it as suggested above.
Posting our conversations here for future reference.

 
My Problem-
I Have to only copy-paste not more than 498888 blocks (because that's where the fork happened).Since blk000.dat files contain block information and are binaries,how do i make sure I only copy till the specified  498888 blocks ?
Each blk*.dat file is ~134 MB, so each of the most recent ones contain ~90 blocks each (assuming blocks are 1.5 MB on average which is probably an over estimate). (505902-498888)/90 = 77.9, round down to 77. So delete the 77 highest numbered blk*.dat and rev*.dat files. This should overshoot block 498888 but you will still have most of the chain so you don't need to download a lot of it.

Note that you will need to do a reindex.

Also do suggest if there is a better way of doing this.I'm trying to save time by only downloading core once and then just copy pasting blocks where the forks took place.
Have a pruned copy of the blockchain up to a certain height that is before each fork. Then just copy and paste that pruned blockchain for each fork and let it sync up for each one. That's way faster and you know that it will be up to a height before the fork.

This.I'm taking this approach already !While the core is on download,my plan is to stop it like 100 blocks before it reaches that specified height and copy-paste the data from there to other wallets of the forked coin and let them download the remaining blocks.
You can use the -stopatheight command line option to stop the download and verification at a precise block height.

Thanks once again!
Where you did you get the command from ? Is there a man entry for the same ? It doesn't seem to be available in online API references..
It's new to 0.15.1. You can find it by starting Bitcoin Core with -help -help-debug

So the syntax is,

Code:
-stopatheight 490000
Close.
Code:
-stopatheight=490000
It's a command line option, not an RPC command. So you have to start Bitcoin Core with that option, not enter it into the debug console.
HCP
legendary
Activity: 2086
Merit: 4361
My Problem-
I Have to only copy-paste not more than 498888 blocks (because that's where the fork happened).Since blk000.dat files contain block information and are binaries,how do i make sure I only copy till the specified  498888 blocks ?
I did something similar to avoid having to fully sync Bitcoin Cash back in the day... there is one trick you can use to figure out which block files to remove (or not copy over)... Personally, I just copied the entire folder and then deleted the ones I didn't need... but do it whichever way you want.

Anyway, what you want to do is look at the file modified timestamp, for instance, take this screenshot:


As you can see... blk01038.dat was around 24th October... Deleting (or not copying) files from this point would mean that you wouldn't have the blocks AFTER a fork on Oct 24. There is a 1:1 relationship with the .blk and .rev files... so if you delete the "blk" files from 1038, then you'd also delete the "rev" files from the same number.

It isn't a super accurate method, and won't get it to an "exact" block number unless that block just happens to be the first one in a .dat file, but it'll get close and save a fair amount of downloading... you'll probably find that the fork wallet will probably want to reindex which is likely to eat into any time savings.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory

What I'm trying to achieve ?
- Get BitcoinX from the fork that took place in November-December.

Method-
- Download Bitcoin Core,run a full node including the entire blockchain (about 150 gb).
- Download Bitcoin X Core and  copy paste the blocks,checkstate from Bitcoin Core to Bitcoin X Core so I don't have to download the entire blockchain again.

My Problem-
I Have to only copy-paste not more than 498888 blocks (because that's where the fork happened).Since blk000.dat files contain block information and are binaries,how do i make sure I only copy till the specified  498888 blocks ?

Also do suggest if there is a better way of doing this.I'm trying to save time by only downloading core once and then just copy pasting blocks where the forks took place.

Thank you.

How much are you actually going to get out of these wallets? If the private keys have only a certain number of coins in them a hardware wallet or claiming them through online services might be more of a viable option. Unless you have free electricity or can leave your computer running a few days to recover all your coins.
hero member
Activity: 1232
Merit: 738
Mixing reinvented for your privacy | chipmixer.com
My Problem-
I Have to only copy-paste not more than 498888 blocks (because that's where the fork happened).Since blk000.dat files contain block information and are binaries,how do i make sure I only copy till the specified  498888 blocks ?
this is something like making a bootstrap up to certain block then using it with bitcoin X core
I'm not sure if bitcoin core has -makebootstrap ability but dooglus' created this RPC on clam wallet
https://bitcointalksearch.org/topic/m.9370191
might want to ask him in details on how about to do it with bitcoin core

Quote
Also do suggest if there is a better way of doing this.I'm trying to save time by only downloading core once and then just copy pasting blocks where the forks took place.
How about just copy paste the whole data and running bitcoin X core on that copy
shouldn't it automatically fix the blockchain by syncing/downloading the correct fork chain?
perhaps need to add some lines in conf file to state the last valid block number and such, to mark the block
legendary
Activity: 1988
Merit: 1317
Get your game girl
Where were your bitcoins when the said fork took place?
If there weren't in Core then I don't see the point of downloading Core.
They were in my Core wallet.I took this approach because I have lot of private keys that need to imported at once.Like around 400-500.

The general rule of thumb for accessing forked coins is to send ALL your bitcoin from where they were during the fork to a new wallet with a brand new seed/private key set, then import that seed/private key where they were stored into a wallet that supports the forked coins.
Yes but this is time consuming.I will still have to download the forked coin's core wallet which takes a long time to do so.

Bonus if there's an SPV wallet so you don't need to waste bandwidth downloading the blockchain over again.
Unfortunately I don't think Bitcoin X is supported by an SPV which has the ability to import all the private keys at once.
sr. member
Activity: 322
Merit: 363
39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD
Where were your bitcoins when the said fork took place?
If there weren't in Core then I don't see the point of downloading Core.

The general rule of thumb for accessing forked coins is to send ALL your bitcoin from where they were during the fork to a new wallet with a brand new seed/private key set, then import that seed/private key where they were stored into a wallet that supports the forked coins.

Bonus if there's an SPV wallet so you don't need to waste bandwidth downloading the blockchain over again.
legendary
Activity: 1988
Merit: 1317
Get your game girl

What I'm trying to achieve ?
- Get BitcoinX from the fork that took place in November-December.

Method-
- Download Bitcoin Core,run a full node including the entire blockchain (about 150 gb).
- Download Bitcoin X Core and  copy paste the blocks,checkstate from Bitcoin Core to Bitcoin X Core so I don't have to download the entire blockchain again.

My Problem-
I Have to only copy-paste not more than 498888 blocks (because that's where the fork happened).Since blk000.dat files contain block information and are binaries,how do i make sure I only copy till the specified  498888 blocks ?

Also do suggest if there is a better way of doing this.I'm trying to save time by only downloading core once and then just copy pasting blocks where the forks took place.

Thank you.
Jump to: