I'm going to explain a bit more about my question, by talking first about what I understand about blockchain and transaction in a decentralized network. Correct me if I'm wrong somewhere.
- In a decentralized network, every node has a copy of the ledger. If node A sends to node B an amount of bitcoins, he does it by broadcasting a message containing [sender - receiver - amount] together with a digital signature. Every other node in the network verifies the message with the signature, and if they (or the majority of them) consent that it is correct, the transaction is written into the ledger. Note that a node is not necessarily a miner, and here, to verify a message is no other than to compare 2 hashes.
- Miners validate transactions/blocks by solving a math problem which is to find nonces.
So my question is, what is the link between these 2 things? If nodes in the network are enough to verify transactions, why do we need miners? When do miners enter in the game of validating transactions? And how come that to verify transaction is relied with to find a nonce?