Merge pull request #2526 from filecoin-project/fix/reduce-gas

Enable gas estimation for SubmitWindowPost
This commit is contained in:
Łukasz Magiera 2020-07-22 19:35:58 +02:00 committed by GitHub
commit d411de811a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -382,7 +382,6 @@ func (s *WindowPoStScheduler) runPost(ctx context.Context, di miner.DeadlineInfo
sidToPart[si.SectorNumber] = uint64(partIdx) sidToPart[si.SectorNumber] = uint64(partIdx)
} }
params.Partitions[partIdx] = miner.PoStPartition{ params.Partitions[partIdx] = miner.PoStPartition{
Index: uint64(partIdx), Index: uint64(partIdx),
Skipped: skipped, Skipped: skipped,
@ -458,14 +457,12 @@ func (s *WindowPoStScheduler) submitPost(ctx context.Context, proof *miner.Submi
} }
msg := &types.Message{ msg := &types.Message{
To: s.actor, To: s.actor,
From: s.worker, From: s.worker,
Method: builtin.MethodsMiner.SubmitWindowedPoSt, Method: builtin.MethodsMiner.SubmitWindowedPoSt,
Params: enc, Params: enc,
Value: types.NewInt(1000), // currently hard-coded late fee in actor, returned if not late Value: types.NewInt(1000), // currently hard-coded late fee in actor, returned if not late
// TODO: Gaslimit needs to be calculated accurately. Before that, use the largest Gaslimit GasPrice: types.NewInt(3),
GasLimit: build.BlockGasLimit,
GasPrice: types.NewInt(1),
} }
// TODO: consider maybe caring about the output // TODO: consider maybe caring about the output