At the beginning of this thread, it was stated that Bitcoin Core was able to handle both blockchains, and I quote: "The safest thing to do is to use Bitcoin Core as it is a full node and gives you control over which chain you want to use (via the invalidateblock and reconsiderblock RPC commands)."
I really thought that you would need 2 core nodes running now... one for the "original" blockchain and another for the "new" blockchain, but it makes sense the same program can run both just by an option on which one to use.
Can someone elaborate, or guide me to where I can find more information on how to select each blockchain? I thought that these commands were only to eliminate blockchain starting from the block indicated... but I can also see how that would make you to go form one fork to the other if you invalidating the block on the height of the fork. Still not sure I understand how that would "connect" you to the main blockchain, or to the alt blockchain.
After looking for 1 hour around for this, I think one of you might guide me since all explanations are not that clear.
Thanks in advance for the guidance!
You would need to perform these commands with the block at the height of the fork on each chain.
For example, suppose that chain A has a block with the hash abcdef at the height of the fork. Suppose that chain B has a block with the hash 123456 at the height of the fork.
To use chain A, you would do
invalidateblock 123456
reconsiderblock abcdef
To use chain B, you would do
invalidateblock abcdef
reconsiderblock 123456
You can use those commands to switch back and forth between blockchains.
Note that switching back and forth may result in some undefined behavior and bugs. Since such a fork has not happened before, this method has not been tested in practice. Your mileage may vary.
Thank you very much for making this SO clear! I now understand where I got it wrong: I was thinking that the invalidateblock used the block height, so not sure how that would be different from any blockchain main or fork, but clarifying that I must use the block
it makes perfect sense so that the specific "old" block would be identified to be removed, and the new one would start to be considered.
And now the only thing left to test is if there is a way to run two instances of Bitcoin core in the same machine...