Stages#1
Open
milena-hakobyan wants to merge 8 commits into
Open
Conversation
…hance class structure
Updated blockchain to include messages in mined blocks. - Messages are collected during block mining and added to the new block once mining is complete. - Implemented thread synchronization for message intake and block mining. - Each block stores only messages received during its mining phase. - Added logic to clear pending messages after inclusion in a block.
- Added Message class to handle message construction, signing, and verification. - Implemented RSA-based signing with SHA256 hash for message integrity and authenticity. - Included public key in message for signature verification. - Added isValid method to verify the message's authenticity using the sender's public key. - Ensured message signatures are validated on the receiver side to maintain security and integrity.
- Replace text messages with virtual coin (VC) transactions - Reward 100 VC to the miner who creates each block - Include reward as a transaction before mining starts - Simulate real-world entities like stores, shops, and institutions (e.g., CarShop, FastFood) - Allow transactions between users and simulated entities - Reject transactions if sender lacks sufficient balance - Assume all clients start with 100 VC for testing purposes - Add method to calculate current balance of any client - Output first 15 blocks showing miner rewards and realistic VC circulation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
project-description.pdf