While understanding the concept of block chain and proof of work, few things are confusing me. Miners always consider the longest chain(by difficulty) and work on expanding it. Now, lets say two miners (Miner A and Miner B) come up with the solution at the same time (almost same time) for a block, and they publicly announces their solution. Then, some miners get first the solution of A , later they see B has the solution as well (just opposite happens to some other miners, they get B first). So, the miners who saw A first starts working over A's solution for next block and saves other branch of B if it becomes longer. Now , tie will be broken when next proof of work found, and miners were working on other branch will switch to the longer one. Now, I have few questions:
What will happen to transaction records which were stored in the rejected branch?
Will there be any transaction records at all for both block branches? (then I suppose, new transaction records will be stored on last block before the branch).
What will be the scenario of coinbase generation? if A wins, A gets the coinbase, later transactions should be stored in A's generated block. But, already solution of next block(Proof of Work) on the branch A is found. So, new transactions will be stored on next block (lets say generated by C..C gets the next coinbase). Is that means, there will be only one transaction record (coinbase) in the block generated by A?