Skip to content

Stages#1

Open
milena-hakobyan wants to merge 8 commits into
mainfrom
stages
Open

Stages#1
milena-hakobyan wants to merge 8 commits into
mainfrom
stages

Conversation

@milena-hakobyan

Copy link
Copy Markdown
Owner

Milena Hakobyan and others added 8 commits April 22, 2025 13:37
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
@milena-hakobyan milena-hakobyan requested a review from kamirovgd May 6, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant