Code Monkey home page Code Monkey logo

Comments (7)

bochaco avatar bochaco commented on August 29, 2024

@RolandSherwin how exactly do you envision this to work, when you say small files what's the range of sizes you actually mean here? is it between 3 * MIN_CHUNK_SIZE and 3 * MAX_CHUNK_SIZE ? if so, for a file of size let's say 2 * MAX_CHUNK_SIZE we'll need to generate datamap + 2 chunks, right? and that'd be a different mechanism as SE needs at least three chunks to work...

from self_encryption.

happybeing avatar happybeing commented on August 29, 2024

I don't know if this is a good place to raise this, but it would be nice to have an API for self encrypting a block of memory. Currently it only allows self encryption of a file on disk and its not good to force data to be written to disk just for this purpose.

from self_encryption.

RolandSherwin avatar RolandSherwin commented on August 29, 2024

Hey @bochaco. Right, I see! Also, we were having troubles when actually trying to upload those extra chunks. We fetched store cost + paid + sent over chunk+payment, but they were never accepted.
I can try to reproduce it locally.

from self_encryption.

happybeing avatar happybeing commented on August 29, 2024

I can try to reproduce it locally.

These may be two separate bugs.

Firstly uploading individual small files does work (ie safe files upload -p <FILE>).

But uploading a directory (ie safe files upload -p <DIRECTORY>) fails with payments never being enough, and wallet gets drained (logs posted on forum for Qi here).

from self_encryption.

bochaco avatar bochaco commented on August 29, 2024

After digging in, the issue with small files ending up in 1 chunk (plus the data-map chunk) is due to the fact that files that are smaller than 3 * MAX_CHUNK_SIZE are split into 3 chunks, thus if the content of the file is by chance something like "hello\nhello\nhello\n" it ends up being split into three equal chunks: "hello\n".
So that seems all ok to me, at least, as long as we are ok with dealing that way with small files as mentioned above.

from self_encryption.

happybeing avatar happybeing commented on August 29, 2024

@bochaco That sounds like the issue riddim isolated as he was just adding the same text to a file to see what happened to the upload cost.

It doesn't explain the issue I was experiencing and reported to Qi Ma. Is anyone looking into that?

from self_encryption.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.