Bitcoin Forum
January 23, 2019, 04:26:50 AM *
News: Latest Bitcoin Core release: 0.17.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Looking for an Appropriate way to access the Forks (Need advice)  (Read 95 times)
Joel_Jantsen
Legendary
*
Offline Offline

Activity: 1162
Merit: 1186


Hand over the Merit and no one will get hurt!


View Profile
January 24, 2018, 03:32:33 PM
 #1


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.

.BitDice.               ▄▄███▄▄
           ▄▄██▀▀ ▄ ▀▀██▄▄
      ▄▄█ ▀▀  ▄▄█████▄▄  ▀▀ █▄▄
  ▄▄██▀▀     ▀▀ █████ ▀▀     ▀▀██▄▄
██▀▀ ▄▄██▀      ▀███▀      ▀██▄▄ ▀▀██
██  ████▄▄       ███       ▄▄████  ██
██  █▀▀████▄▄  ▄█████▄  ▄▄████▀▀█  ██
██  ▀     ▀▀▀███████████▀▀▀     ▀  ██
             ███████████
██  ▄     ▄▄▄███████████▄▄▄     ▄  ██
██  █▄▄████▀▀  ▀█████▀  ▀▀████▄▄█  ██
██  ████▀▀       ███       ▀▀████  ██
██▄▄ ▀▀██▄      ▄███▄      ▄██▀▀ ▄▄██
  ▀▀██▄▄     ▄▄ █████ ▄▄     ▄▄██▀▀
      ▀▀█ ▄▄  ▀▀█████▀▀  ▄▄ █▀▀
           ▀▀██▄▄ ▀ ▄▄██▀▀
               ▀▀███▀▀
        ▄▄███████▄▄
     ▄███████████████▄
    ████▀▀       ▀▀████
   ████▀           ▀████
   ████             ████
   ████ ▄▄▄▄▄▄▄▄▄▄▄ ████
▄█████████████████████████▄
██████████▀▀▀▀▀▀▀██████████
████                   ████
████                   ████
████                   ████
████                   ████
████                   ████
████▄                 ▄████
████████▄▄▄     ▄▄▄████████
  ▀▀▀█████████████████▀▀▀
        ▀▀▀█████▀▀▀
▄▄████████████████████████████████▄▄
██████████████████████████████████████
█████                            █████
█████                            █████
█████                            █████
█████                            █████
█████                     ▄▄▄▄▄▄▄▄▄▄
█████                   ▄█▀▀▀▀▀▀▀▀▀▀█▄
█████                   ██          ██
█████                   ██          ██
█████                   ██          ██
██████████████████▀▀███ ██          ██
 ████████████████▄  ▄██ ██          ██
   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ██          ██
             ██████████ ██          ██
           ▄███████████ ██████▀▀██████
          █████████████  ▀████▄▄████▀
[/]
1548217610
Hero Member
*
Offline Offline

Posts: 1548217610

View Profile Personal Message (Offline)

Ignore
1548217610
Reply with quote  #2

1548217610
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1548217610
Hero Member
*
Offline Offline

Posts: 1548217610

View Profile Personal Message (Offline)

Ignore
1548217610
Reply with quote  #2

1548217610
Report to moderator
Xynerise
Sr. Member
****
Offline Offline

Activity: 280
Merit: 282

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
January 24, 2018, 03:40:20 PM
 #2

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.
Joel_Jantsen
Legendary
*
Offline Offline

Activity: 1162
Merit: 1186


Hand over the Merit and no one will get hurt!


View Profile
January 24, 2018, 03:45:15 PM
 #3

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.

.BitDice.               ▄▄███▄▄
           ▄▄██▀▀ ▄ ▀▀██▄▄
      ▄▄█ ▀▀  ▄▄█████▄▄  ▀▀ █▄▄
  ▄▄██▀▀     ▀▀ █████ ▀▀     ▀▀██▄▄
██▀▀ ▄▄██▀      ▀███▀      ▀██▄▄ ▀▀██
██  ████▄▄       ███       ▄▄████  ██
██  █▀▀████▄▄  ▄█████▄  ▄▄████▀▀█  ██
██  ▀     ▀▀▀███████████▀▀▀     ▀  ██
             ███████████
██  ▄     ▄▄▄███████████▄▄▄     ▄  ██
██  █▄▄████▀▀  ▀█████▀  ▀▀████▄▄█  ██
██  ████▀▀       ███       ▀▀████  ██
██▄▄ ▀▀██▄      ▄███▄      ▄██▀▀ ▄▄██
  ▀▀██▄▄     ▄▄ █████ ▄▄     ▄▄██▀▀
      ▀▀█ ▄▄  ▀▀█████▀▀  ▄▄ █▀▀
           ▀▀██▄▄ ▀ ▄▄██▀▀
               ▀▀███▀▀
        ▄▄███████▄▄
     ▄███████████████▄
    ████▀▀       ▀▀████
   ████▀           ▀████
   ████             ████
   ████ ▄▄▄▄▄▄▄▄▄▄▄ ████
▄█████████████████████████▄
██████████▀▀▀▀▀▀▀██████████
████                   ████
████                   ████
████                   ████
████                   ████
████                   ████
████▄                 ▄████
████████▄▄▄     ▄▄▄████████
  ▀▀▀█████████████████▀▀▀
        ▀▀▀█████▀▀▀
▄▄████████████████████████████████▄▄
██████████████████████████████████████
█████                            █████
█████                            █████
█████                            █████
█████                            █████
█████                     ▄▄▄▄▄▄▄▄▄▄
█████                   ▄█▀▀▀▀▀▀▀▀▀▀█▄
█████                   ██          ██
█████                   ██          ██
█████                   ██          ██
██████████████████▀▀███ ██          ██
 ████████████████▄  ▄██ ██          ██
   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ██          ██
             ██████████ ██          ██
           ▄███████████ ██████▀▀██████
          █████████████  ▀████▄▄████▀
[/]
Thirdspace
Hero Member
*****
Offline Offline

Activity: 868
Merit: 613


Mixing reinvented for your privacy | chipmixer.com


View Profile
January 24, 2018, 11:27:52 PM
 #4

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://bitcointalk.org/index.php?topic=623147.msg9370191#msg9370191
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

jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1260
Merit: 1182


bc1qdj5v2q8p398rdy6sexc0fapk4hcq0p54xz56ez


View Profile
January 24, 2018, 11:35:59 PM
 #5


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.

HCP
Legendary
*
Offline Offline

Activity: 854
Merit: 1043

<insert witty quote here>


View Profile
January 25, 2018, 02:56:33 AM
 #6

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.

Joel_Jantsen
Legendary
*
Offline Offline

Activity: 1162
Merit: 1186


Hand over the Merit and no one will get hurt!


View Profile
January 25, 2018, 06:27:17 AM
Merited by HCP (5), achow101 (1)
 #7

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.

.BitDice.               ▄▄███▄▄
           ▄▄██▀▀ ▄ ▀▀██▄▄
      ▄▄█ ▀▀  ▄▄█████▄▄  ▀▀ █▄▄
  ▄▄██▀▀     ▀▀ █████ ▀▀     ▀▀██▄▄
██▀▀ ▄▄██▀      ▀███▀      ▀██▄▄ ▀▀██
██  ████▄▄       ███       ▄▄████  ██
██  █▀▀████▄▄  ▄█████▄  ▄▄████▀▀█  ██
██  ▀     ▀▀▀███████████▀▀▀     ▀  ██
             ███████████
██  ▄     ▄▄▄███████████▄▄▄     ▄  ██
██  █▄▄████▀▀  ▀█████▀  ▀▀████▄▄█  ██
██  ████▀▀       ███       ▀▀████  ██
██▄▄ ▀▀██▄      ▄███▄      ▄██▀▀ ▄▄██
  ▀▀██▄▄     ▄▄ █████ ▄▄     ▄▄██▀▀
      ▀▀█ ▄▄  ▀▀█████▀▀  ▄▄ █▀▀
           ▀▀██▄▄ ▀ ▄▄██▀▀
               ▀▀███▀▀
        ▄▄███████▄▄
     ▄███████████████▄
    ████▀▀       ▀▀████
   ████▀           ▀████
   ████             ████
   ████ ▄▄▄▄▄▄▄▄▄▄▄ ████
▄█████████████████████████▄
██████████▀▀▀▀▀▀▀██████████
████                   ████
████                   ████
████                   ████
████                   ████
████                   ████
████▄                 ▄████
████████▄▄▄     ▄▄▄████████
  ▀▀▀█████████████████▀▀▀
        ▀▀▀█████▀▀▀
▄▄████████████████████████████████▄▄
██████████████████████████████████████
█████                            █████
█████                            █████
█████                            █████
█████                            █████
█████                     ▄▄▄▄▄▄▄▄▄▄
█████                   ▄█▀▀▀▀▀▀▀▀▀▀█▄
█████                   ██          ██
█████                   ██          ██
█████                   ██          ██
██████████████████▀▀███ ██          ██
 ████████████████▄  ▄██ ██          ██
   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ██          ██
             ██████████ ██          ██
           ▄███████████ ██████▀▀██████
          █████████████  ▀████▄▄████▀
[/]
Pages: [1]
  Print  
 
Jump to:  

Bitcointalk.org is not available or authorized for sale. Do not believe any fake listings.
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!