Which of the following best describes the role of a consensus mechanism in a blockchain network?
-
A
To encrypt transaction data, ensuring confidentiality between the sender and receiver.
-
B
To generate new private keys for users to secure their digital assets.
-
C
To provide a graphical user interface for interacting with the blockchain.
-
D
To ensure that all participants in the network agree on the validity and order of transactions, thus preventing double-spending.