Code Monkey home page Code Monkey logo

Comments (17)

ytqaljn avatar ytqaljn commented on June 3, 2024

Because there is an upper limit to the number of random selections, within this limit, as many as possible, three miners who meet the conditions will be randomly selected. When uploading large files, the number of miners who meet the conditions decreases, which reduces the probability of selecting three miners who meet the conditions within the number of times.
code:
https://github.com/CESSProject/cess/blob/0.6.1-space-prove/c-pallets/file-bank/src/functions.rs#L291

from cess.

tehsunnliu avatar tehsunnliu commented on June 3, 2024

I see, so the primary criterion is they should have enough available space. But keeping an upper limit makes larger files to get uploaded forever and suppose there is not even 1 miner that can store a big chunk of data, that file will never get uploaded to the miners. In fact, in my opinion, there should not be any upper limit on the number of miners assigned and the file should be segmented so that its able to be stored on at least some number of miners. Right now I'm not sure why is this upper limit set, If you could explain this a little, it will be helpful in understanding. Thanks.

from cess.

ytqaljn avatar ytqaljn commented on June 3, 2024

Because these tasks need to be completed in one block within 6 seconds. So there's no way to keep selecting.

from cess.

tehsunnliu avatar tehsunnliu commented on June 3, 2024

I still didn't get a clear picture. Why the task has to be completed in one block? By the way if the miners fail to store the files, new miners are selected. So I wonder how come there is no way to keep selecting?

from cess.

ytqaljn avatar ytqaljn commented on June 3, 2024

Rules for blockchain transactions in the substrate framework

from cess.

tehsunnliu avatar tehsunnliu commented on June 3, 2024

Well, unfortunately this doesn't answer my doubt clearly.
Currently, when a user uploads file it takes hours and hours to distribute it to the miners. And during this time a number of times miners are reassigned due to failed attempts to deliver the segment to the miner. Then how come these tasks has to be completed in one block? Only selecting number of minsers can be done within a block.

from cess.

ytqaljn avatar ytqaljn commented on June 3, 2024

Go and learn about the blockchain foundation built by the substrate framework.

from cess.

tehsunnliu avatar tehsunnliu commented on June 3, 2024

Wao this is your answer. That's of great help.

from cess.

tehsunnliu avatar tehsunnliu commented on June 3, 2024

And this is very rude of you and unprofessional.

from cess.

ytqaljn avatar ytqaljn commented on June 3, 2024

Sorry, my English is not good, so when I finally saw your answer, I thought it solved your confusion

from cess.

ytqaljn avatar ytqaljn commented on June 3, 2024

I have already told you that this must be done within a block, and you have to delve into it yourself, still unable to understand. I really don't know what else to tell you. A transaction must be executed within a block, which is the rule.

from cess.

ytqaljn avatar ytqaljn commented on June 3, 2024

https://docs.substrate.io/learn/transaction-lifecycle/
image
https://docs.substrate.io/learn/transaction-types/
image

from cess.

tehsunnliu avatar tehsunnliu commented on June 3, 2024

My point is why only up to 3 miners are selected, why can't we select number of minsers dynamically based on the file size. If a bigger file is uploaded it should be distributed to even more miners so that miners with less storage space can also store it's segments and easier to find miners who meet the criteria and larger files won't take forever to upload.

from cess.

ytqaljn avatar ytqaljn commented on June 3, 2024

Because the allocation quantity is determined based on the current fragment size and segment size. The current segment size is 16Mib and will be divided into three fragments. It is not related to the size of the file itself, we consider it based on recoverability, with three being the optimal number

from cess.

tehsunnliu avatar tehsunnliu commented on June 3, 2024

So any solution for larger files that takes very long to get distributed to the miners?

from cess.

ytqaljn avatar ytqaljn commented on June 3, 2024

The current reassignment process has some bugs that will be fixed in 0.7.0 and will be resolved by improving the accuracy of random selection, rather than increasing the number of random selections.

from cess.

tehsunnliu avatar tehsunnliu commented on June 3, 2024

Okay waiting for 0.7.0 then.

from cess.

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.