An implementation of a cryptocurrency blockchain network that implements P2P networking, local persistence, transaction merkle trees, memory pooling and a proof-of-work consensus layer. [WIP]
An implementation of a blockchain network that implements P2P networking, local persistence, transaction merkle trees, memory pooling and a proof-of-work consensus layer.
Define an interface for the POW data of the BlockHeader
This is an extra layer of abstraction at first glance but represents the interface for all future consensus models that may be integrated into the package
Add a struct that holds the badgerDB client but also a mutex object that will allow the client the database to have thread-safety when multiple goroutines try to access it
Integrate the DB open and close functionality as methods of this structure
While the package is currently not using any goroutines for optimizations, the integration of a network module and future optimizations will potentially cause issues. Better safe than sorry.
Refactor the wallet module utilities to be more general and integrate them into the utils package
Refactor the address generation mechanism to be compliant with the structure as detailed below. (Current model uses a deviation that probably isn't safe)
Keep the transition from RIPEMD160 to a truncated SHA256 intact
Add hash helpers to the utils library while modifying the wallet utilities
Add a struct BlockHeader to store the information considered when generating the block hash
This is in line with development convention and the structure of traditional blockchains
It would allow for the isolation of components such as the block height and full transaction data away from the content that is considered for the block hash