Can you do the function addTransaction() ,isChainValid,minePendingTransactions,getBalanceOfAddress,prettyPrint​​​​​​​ na

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Can you do the function addTransaction() ,isChainValid,minePendingTransactions,getBalanceOfAddress,prettyPrint​​​​​​​ na

Post by answerhappygod »

Can you do
the function addTransaction()
,isChainValid,minePendingTransactions,getBalanceOfAddress,prettyPrint​​​​​​​
namespace ra :: BlockChain
Aim:
To create an iterable blockchain, which could work with an
extendable transaction class. Here the
link GitHub repo!
Blockchain in Brief:
Scope of this Project:
Plan of Attack:
Setup
Lets Setup the extra files!
RSA: Library will be used for signing and verification of
transactions.
Create a includes folder and add files
from Github
not_implemented_exception: The exception that is thrown when a
requested method or operation is not implemented.
base_transaction<EncryptionAlgo>
Here are the required things:
Every Function logic will be same, which is to
throw not_implemented_exception, for example:
custom_transaction : public
base_transaction<EncryptionAlgo>
Private Members:
Public Members:
Here are some Pointers regarding signing
block <Transaction, HashFunctionClass>
NOTES:
A block typically contains the following:
hash_function is an instance of template class used for all
hashing related needs (std::hash used in main.cpp)
Proof of Work:
In BitCoin:
In namespace::ra :
block_chain <Transaction, HashFunctionClass>
Well as the name states it is a chain of blocks, So Naturally,
It will contain the same Template Arguments as Block
Private Members:
Public Members:
Iterator Class (To make iteration easy)
Private:
Public:
block_chain(diffuculty, verfication_function,
minning_reward)Constructor:
get_balance():
add_transaction(temp)
mine_pending_transactions(minning_reward_address)
is_chain_valid()
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply