0

Using [ReedSolomon JavaScript Library][1] to erasure code a local file, it gives me following error :

shardSize 5432
bufferoffset 0
bufferSize 5432
paritysize 10864
sources 3
targets 12
/Users/nidhisharma/client-sdk/Node/0chain_sdk/encode.js:56
 var rs = ReedSolomon.encode(
                      ^

Error: shardSize % 8 != 0
    at fileinfo (/Users/XYZ/CS/encode.js:56:23)
    at Object.<anonymous> (/Users/XYZ/CS//client.js:6:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:279:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:752:3)    

But Shard Size is 5432. I am not sure what is missing here and causing trouble, Please guide.

N_b26
  • 43
  • 7
  • Can you output some debug info to make sure shardSize is still 5432 by the time it makes the call to the function in encode.js? Are there any "extra" bytes included in a shard that would or would not count towards shardSize? – rcgldr Sep 28 '18 at 01:47
  • I have edited the debug information, and also shardSize is 5432 when i print at the last. – N_b26 Sep 28 '18 at 05:45
  • I'm not sure what the issue is. Is there a way to contact the group that made this library? – rcgldr Sep 28 '18 at 06:56
  • Seems like we can raise the query at there github repo issues – N_b26 Sep 28 '18 at 23:00

0 Answers0