Sealing in parallel

#1

This is a simple question: could a miner seal multiple sectors simultaneously. If possible, how?

Currently when I go through the code, it looks a miner only could handle one sector for sealing. It is no problem usually when a miner is not that powerful and sealing is really resource consuming. It is fully understood that a sealing process should take a great deal of time and it should not be unlimited speed up even there are more resources available. The algorithm should guarantee the period of sealing is long enough with defined dependences.

But, if the miner capacity allows, we should be able to do multiple sealing simultaneously, in this way, the resources could be fully utilized, and, since each sealing process still takes long enough, the security of the proving should not be weakened.

#2

Hi Steven,

Currently when I go through the code, it looks a miner only could handle one sector for sealing.

Today, the miner can seal, in parallel, a number of sectors equal to the number of workers in its SealWorker pool. This number is currently fixed to NUM_SEAL_WORKERS, defined here.

Does that make sense? Let me know if you have further questions.

Erin (@laser)

#3

That makes sense. I browsed the code about a week ago, I remember the NUM_SEAL_WORKERS = 1 at that time. I thought there would be some concerns to set it bigger.
Once the code is kind of mature, I would like to see this number could be configurable, or this can be put in config.json file.

#4

Hi Steven,

Once the code is kind of mature, I would like to see this number could be configurable, or this can be put in config.json file.

I think that’s a completely reasonable request.

Erin