Data Block Set
The blockset application is a command line program that can store and retrieve data blocks using a content-dependent tree (CDT) hash function as a universal address of the blocks.
Articles:
Usage
Prerequisites
- Rust.
- For Windows, you may need Visual C++. You can get either either
- by installing Microsoft C++ Build Tools,
- or adding Desktop development with C++ to Visual Studio.
Installation
To install the latest stable version from crates.io, run:
cargo install blockset
To install the current version from the main branch, run:
cargo install --git https://github.com/datablockset/blockset
To unininstall the blockset, run:
cargo uninstall blockset
Commands
- address validation:
blockset validate 3v1d4j94scaseqgcyzr0ha5dxa9rx6ppnfbndck971ack - calculate address:
blockset address ./README.md - add a data block to the local storage
cdt0/:blockset add ./LICENSE - get a file by address
blockset get ngd7zembwj6f2tsh4gyxrcyx26h221e3f2wdgfbtq87nd ./old.md
For Developers
Internal documentation: https://blockset.pages.dev/.
Best practices
- Make it simple.
- Avoid
unsafecode. Currently, we don't haveunsafecode. - No I/O is allowed in a library. We have 100% code coverage.
- Make
constfunctions if possible. - Avoid using macros. Allowed macros:
derive,cfg,test,assert..,wasm_bindgen_test. - Avoid using third-party dependencies, especially if they use I/O directly.