Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented block format #149

Merged
merged 6 commits into from
Jan 14, 2020
Merged

Implemented block format #149

merged 6 commits into from
Jan 14, 2020

Conversation

dutterbutter
Copy link
Contributor

  • Implements block format used prior to block writes

Go Library of Block Format:

See usage examples in implementations here:

Closes #147

* Implements block format for block and message writes
Copy link
Contributor

@austinabell austinabell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add a lib.rs file and also include this crate in the root Cargo.toml if intended to keep this as seperate crate. Why is this not included in the blocks crate by the way? If it is intended to be seperate, the file that the block header is defined in should be changed from block.rs to block_header.rs or something to that effect.

blockchain/blk_format/src/blk_format.rs Outdated Show resolved Hide resolved
blockchain/blk_format/Cargo.toml Outdated Show resolved Hide resolved
blockchain/blk_format/src/blk_format.rs Outdated Show resolved Hide resolved
blockchain/blk_format/src/blk_format.rs Outdated Show resolved Hide resolved
blockchain/blk_format/src/blk_format.rs Outdated Show resolved Hide resolved
blockchain/blk_format/src/blk_format.rs Outdated Show resolved Hide resolved
blockchain/blk_format/src/blk_format.rs Outdated Show resolved Hide resolved
blockchain/blk_format/src/blk_format.rs Outdated Show resolved Hide resolved
@dutterbutter
Copy link
Contributor Author

You need to add a lib.rs file and also include this crate in the root Cargo.toml if intended to keep this as seperate crate. Why is this not included in the blocks crate by the way? If it is intended to be seperate, the file that the block header is defined in should be changed from block.rs to block_header.rs or something to that effect.

My main reasoning for keeping it separated from blocks crate it that it mimics the external library used in the lotus implementation and if we wanted to pull it out into its own lib it would be easy. However, I am impartial and can move it into the blocks crate, but will rename it to blk_format rather than renaming blocks.rs which although is mostly blockheader it does define full blocks as well.

* Moved blk format trait into block.rs
* Removed BasicBlock and applied trait to full block
@dutterbutter
Copy link
Contributor Author

dutterbutter commented Jan 13, 2020

Moved RawBlock trait into block.rs for now. Although this will likely be moved into its own crate in the future as it will be used for themessageStore once we get there. However, since that component is incomplete and I am unsure exactly how the message component will use the RawBlock trait accordingly imo makes sense to have it live in block.rs for the time being.

blockchain/blocks/src/block.rs Show resolved Hide resolved
@dutterbutter dutterbutter merged commit 1e99c0c into master Jan 14, 2020
@dutterbutter dutterbutter deleted the dustin/blk-format branch January 14, 2020 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Block Format for Blockstore writes
4 participants