Getting transactions from mempool to block I have a question about getting transactions from mempool to be added to block. Imagine the situation where we have 500 transactions in mempool, when we decide that is enough to start adding them to the block? Also what if we sre in the middle of mining (so we have Merkles tree root already) and the new transaction is added to the mempool? The process of our mining in my node is starting again?
You can start to work in a block at any moment, you can even mine an empty block. If any new transaction arrives you rebuild the merkle tree and continue.