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

Minimum unit of data should be 64KB #936

Open
lpoli opened this issue Feb 5, 2023 · 0 comments
Open

Minimum unit of data should be 64KB #936

lpoli opened this issue Feb 5, 2023 · 0 comments
Assignees

Comments

@lpoli
Copy link
Contributor

lpoli commented Feb 5, 2023

Since 0chain advocates minimum unit of data to be 64KB per file we need to correct price calculation for data stored in an allocation.
If S is size of data in writemarker and W is the write price then price calculation in storage smart contract should be:

Price(p) = Ceil_of(S / 64KB) * 64KB * W

However client can be clever to upload multiple files say, 1KB each and commit them with single writemarker. In this case if client had uploaded 64 such files then total size in writemarker is 64KB in which case above price calculation is not enough. Blobber however can decide whether to accept such writemarkers or not. In the above case, blobber should expect to get total size in writemarker to be 64 *64KB and if not then it should reject the writemarker.

This issue is an alias of 0chain/gosdk#451

@lpoli lpoli self-assigned this Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants