I’m trying to understand how the Bitcoin network works a bit better and the main thing I’m having trouble with is forks, particularly soft forks. I have a few questions about how exactly a soft fork works. If you can provide an answer for any of them I'd be most grateful! Apologies if I butcher a load of terminology in the process of asking these questions.
1 – Some things that I've read seem to suggest that during a soft fork, all blocks produced by legacy miners would be rejected by nodes running forked software. Other things seem to suggest that legacy miners would be able to get a subset of the blocks they produce accepted by nodes running forked software; I.E. any blocks they produce which happened to comply with forked rules, as well as legacy rules. Who is correct?
For example, if bitcoin still had a 1 MB file size limit on blocks and someone proposed a soft fork to change the file size limit to 0.5MB, would legacy miners be able to get any blocks that they produce which happened to be under 0.5MB in file size, accepted by nodes running forked software and nodes running legacy software, as those blocks would abide by the legacy rules (max file size 1MB) and the forked rules (max file size 0.5MB)? Or would any blocks produced by legacy miners be rejected outright by nodes running forked software, because they were produced by miners running their hardware on the legacy chain and not the forked chain?
2 – I want to make sure I understand this part correctly. After a soft fork activates, if during one of the checks of the latest blocks added to the consensus version of the blockchain, 95+% of the latest blocks have come from miners running on the forked chain, then the forked chain has ‘won’ (I don’t know the proper term) and the changes to Bitcoin made by that fork will be ‘locked in’ for a small grace period. Is this correct?
3 – If the forked chain ‘wins’ in one of the checks of the latest blocks added to the blockchain, is the forked chain then taken to be the chain with the most work put into its creation, I.E. the correct, consensus version of Bitcoin's blockchain? How does this work?
If 95+% of blocks in one check come from the forked chain, is the forked chain then recognised by all full node software as the chain with the most work put into its creation? Then does legacy full node software send a notification to legacy full node users and miners on the legacy chain telling them they’re now operating on a chain that is not the chain with the most work put into its creation and they should reconfigure to run on the forked chain? After the grace period to give legacy full nodes and miners a chance to reconfigure, is the legacy chain then considered ‘stale’ and the forked chain then considered to be the only consensus, correct version of Bitcoin’s blockchain?
4 – If the above is correct, what would happen to any transactions that were made on the legacy chain, added to the legacy chain by legacy nodes, but were not added to the forked chain by forked nodes as the blocks they were mined in did not comply with forked rules? If someone made a transaction like that, would their wallet software warn them at the time that their transaction appeared on the legacy chain, but not the forked chain, so therefore their transaction hadn’t been added to the consensus version of the blockchain, meaning it was technically still ‘pending’ and would be unlikely to get ‘confirmed’?
Is the possibility of this scenario an incentive for development teams of wallet software to make sure their software runs correctly on the forked chain and not on the legacy chain, when a soft fork activates?
Thank you very much if you read this far!