Author

Topic: Forking Q3 - what happens if I find a bad transaction? (Read 635 times)

hero member
Activity: 546
Merit: 500
But if it doesn't receive a valid block based on its last good ones, but continues to receive blocks based on the apparently bad block, is that the start of a hard fork? Can the node do anything at that stage, or must it update to be able to accept the new blocks?
In order to never receive a valid block based on its last good one, there would need to be 0 miners still using the old software, and 100% of all miners using software that think that this new block structure is "valid".

In that case, yes, a hard fork would have happened and unless you could find some miners and peers still running the old software you won't be able to send or receive bitcoins until you switch to the new software.
That is not entirely accurate, classic for instance will activate at seventy five percent of the hashrate. The client you run reflects your position on several issues regarding the future of Bitcoin. I would recommend running Bitcoin Unlimited since it will follow the longest chain automatically, or in other words, it will automatically follow the mining majority, so you will be on the longest chain regardless of what happens.

Regardless of what client you choose to use the node will deal with the situation without human intervention, based on the rules in its code, during the time of the fork. If you support scaling Bitcoin directly I would also recommend running Bitcoin Classic.

https://bitcoinclassic.com/
http://www.bitcoinunlimited.info/
legendary
Activity: 3416
Merit: 4658
But if it doesn't receive a valid block based on its last good ones, but continues to receive blocks based on the apparently bad block, is that the start of a hard fork? Can the node do anything at that stage, or must it update to be able to accept the new blocks?

In order to never receive a valid block based on its last good one, there would need to be 0 miners still using the old software, and 100% of all miners using software that think that this new block structure is "valid".

In that case, yes, a hard fork would have happened and unless you could find some miners and peers still running the old software you won't be able to send or receive bitcoins until you switch to the new software.
legendary
Activity: 2688
Merit: 2444
https://JetCash.com
But if it doesn't receive a valid block based on its last good ones, but continues to receive blocks based on the apparently bad block, is that the start of a hard fork? Can the node do anything at that stage, or must it update to be able to accept the new blocks?
legendary
Activity: 3416
Merit: 4658
Yes.  If a full node receives an invalid block from a peer, it should reject the block.  It shouldn't be added to the local copy of the blockchain, it shouldn't be relayed to any peers, and it shouldn't affect the current UTXO or current list of unconfirmed transactions.  The node should just continue to wait for a valid block, the same as if it hadn't received the invalid block.

If you never receive a valid block, then either the entire bitcoin experiment has failed and there is no longer anybody mining, or your peer is not well connected to the network and therefore is not hearing about valid blocks that are being broadcast and relayed.  In that case, you should investigate your connection problem and fix it.

Note that it is possible to receive blocks out of order.  In that case, you might receive a block that you can't determine if its valid or not until you receive other blocks that precede it.  Your node would need to get those earlier blocks from peers before deciding if the later block is valid or not.
hero member
Activity: 1092
Merit: 520
Your core node has set parameters built in you do not need to do anything,  If a block comes in that is not right it will just reject the block and so will all the other core nodes......... Easy  Grin  All core nodes will agree on what is the next block because it meets all the parameters.....
legendary
Activity: 2688
Merit: 2444
https://JetCash.com
I'm running the latest version of Bitcoin core, and I understand that this is good for the community because I am validating transactions. I'm not mining, so I'm not creating blocks. Now, what happens if I download a block, and I find that it contains an invalid transaction? Obviously, I can reject the block, but then what? At that point my blockchain has terminated. There doesn't seem to be a way for me to communicate the error with anybody. Do I just sit and wait for a miner to build another block based on the last valid one that I was given? What happens if I don't get anything based on that block?
Jump to: