Skip to content

Minimum unit of data should be 64KB #936

@lpoli

Description

@lpoli

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions