Blockchains combine other technologies, such as cryptography, networking, and incentive mechanisms, to enable the creation, validation, and recording of transactions between participating nodes. A consensus algorithm is used in a blockchain system to determine the shared state among distributed nodes. An important component underlying any blockchain-based system is its consensus mechanism, which principally determines the performance and security of the overall system. As the nature of peer-topeer(P2P) networks is open and dynamic, the security risk within that environment is greatly increased mostly because nodes can join and leave the network at will. Thus, it is important to have a system that can check against malicious behaviour. In this work, we propose a reputation-based consensus mechanism for blockchain-based systems, Proof-of-Reputation(PoR) where the nodes with the highest reputation values eventually become part of a consensus group that determines the state of the blockchain.