Address comments

This commit is contained in:
Shrenuj Bansal 2022-10-04 19:21:55 +00:00
parent 96ddd756f8
commit 9653584d73
4 changed files with 10 additions and 10 deletions

View File

@ -401,11 +401,11 @@
# env var: LOTUS_PROVING_MAXPARTITIONSPERRECOVERYMESSAGE
#MaxPartitionsPerRecoveryMessage = 0
# Enable single partition per Post Message for partitions containing recovery sectors
# Enable single partition per PoSt Message for partitions containing recovery sectors
#
# In cases when submitting PoSt messages which contain recovering sectors, the default network limit may still be
# too high to fit in the block gas limit. In those cases, it becomes useful to only house the single partition
# with recovery sectors in the post message
# with recovering sectors in the post message
#
# Note that setting this value lower may result in less efficient gas use - more messages will be sent,
# to prove each deadline, resulting in more total gas use (but each message will have lower gas limit)

View File

@ -719,11 +719,11 @@ resulting in more total gas use (but each message will have lower gas limit)`,
Name: "SingleRecoveringPartitionPerPostMessage",
Type: "bool",
Comment: `Enable single partition per Post Message for partitions containing recovery sectors
Comment: `Enable single partition per PoSt Message for partitions containing recovery sectors
In cases when submitting PoSt messages which contain recovering sectors, the default network limit may still be
too high to fit in the block gas limit. In those cases, it becomes useful to only house the single partition
with recovery sectors in the post message
with recovering sectors in the post message
Note that setting this value lower may result in less efficient gas use - more messages will be sent,
to prove each deadline, resulting in more total gas use (but each message will have lower gas limit)`,

View File

@ -293,11 +293,11 @@ type ProvingConfig struct {
// resulting in more total gas use (but each message will have lower gas limit)
MaxPartitionsPerRecoveryMessage int
// Enable single partition per Post Message for partitions containing recovery sectors
// Enable single partition per PoSt Message for partitions containing recovery sectors
//
// In cases when submitting PoSt messages which contain recovering sectors, the default network limit may still be
// too high to fit in the block gas limit. In those cases, it becomes useful to only house the single partition
// with recovery sectors in the post message
// with recovering sectors in the post message
//
// Note that setting this value lower may result in less efficient gas use - more messages will be sent,
// to prove each deadline, resulting in more total gas use (but each message will have lower gas limit)

View File

@ -529,8 +529,8 @@ func (s *WindowPoStScheduler) BatchPartitions(partitions []api.Partition, nv net
batches := [][]api.Partition{}
currBatch := []api.Partition{}
for i := 0; i < len(partitions); i++ {
recSectors, err := partitions[i].RecoveringSectors.Count()
for _, partition := range partitions {
recSectors, err := partition.RecoveringSectors.Count()
if err != nil {
return nil, err
}
@ -542,13 +542,13 @@ func (s *WindowPoStScheduler) BatchPartitions(partitions []api.Partition, nv net
batches = append(batches, currBatch)
currBatch = []api.Partition{}
}
batches = append(batches, []api.Partition{partitions[i]})
batches = append(batches, []api.Partition{partition})
} else {
if len(currBatch) >= partitionsPerMsg {
batches = append(batches, currBatch)
currBatch = []api.Partition{}
}
currBatch = append(currBatch, partitions[i])
currBatch = append(currBatch, partition)
}
}
if len(currBatch) > 0 {