266 Commits

Author SHA1 Message Date
3d0112e471 fix(miner): ignore lastWork when selecting the best mining candidate (#12690)
* fix(miner): ignore lastWork when selecting the best mining candidate

Previously, we only took the new head if it's heavier than the last
head. Unfortunately, this meant that F3 finalization wasn't properly
propagated to the miner.

In terms of impact:

1. It seems likely that this check was simply defensive as, prior to F3,
the new head should never have a lower weight (unless you're talking to
multiple lotus nodes, I guess...).
2. The `lastWork` field is mostly used to track null blocks. Worst-case
scenario, if we switch heads, we'll attempt to re-mine previous heights.
However, that should be relatively fast and, due to the slash filter, we
won't attempt to re-broadcast any of those blocks.

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* fix(miner): continue mining if we fail to submit a block

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* fix(miner): check the slash filter with the correct parent height

We also perform this check inside `SyncSubmitBlock` so we did have an
effective filter, but this was still wrong.

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

---------

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Co-authored-by: Steven Allen <steven@stebalien.com>
2024-11-12 11:29:01 +00:00
1bc8a8b32c chore: remove (deprecated) deps on build/ proxy-constants
This is a large diff, yet should have exactly zero functional changes

Ideally as a result of this some parts of the depchain will become lighter,
with downstream reaping the same benefits as the team that initiated this split.

P.S. work was done while forming better intuition of current dependency graph
2024-07-22 17:36:12 +04:00
21abfc69fb feat: api: Clean API for Miners (#12112)
* proofparams alternate

* createminer

* const factored from /build and types updated to use it

* buildconstants for more places

* deprecate msg

* itest cleanup

* alerting interface

* house cleaning

* rm policy and drand from buildconstants

* clean up curio further

* aussie waffle

* pr fixes

* fix lints

* little fixes

* oops this got updated

* unbreak test builds

* test fixes

* comments - cleanups

* itests fix alerting

* rm obsolete alertinginterface

* spelling oops

* changelog

* tests need buildconstants port

* Fully migrate BlockGasTarget

* ulimit should not depend on build

* complete the simplest deprecations

* bringing back versions
2024-07-14 09:06:08 -05:00
26d3fd2ecc chore: lint: fix lint errors with new linting config
Ref: https://github.com/filecoin-project/lotus/issues/11967
2024-05-13 14:52:09 +10:00
9b4a3ba23d fix circleci and fiximports 2023-11-15 13:06:51 +01:00
c1edae62ad gen fix 2023-11-15 13:06:51 +01:00
f27d54b37b feat: lpwinning: Initial task layout 2023-11-11 09:36:33 +01:00
23ba7faa84 Merge branch 'release/v1.25.0' into feat/sturdypost 2023-11-08 11:24:17 -06:00
ba98d63c41 fix: nv21fix migration: correctly upgrade system actor 2023-11-08 17:13:55 +01:00
991cc473f8 feat: miner: defensive check for equivocation (#11328) 2023-10-24 10:16:48 -07:00
7778fc2473 feat: miner: defensive check for equivocation 2023-10-10 10:15:04 -04:00
82b13afed6 fix: miner: correct duration logs in mineOne 2023-09-05 12:10:14 -04:00
9567dee00c Merge pull request #11228 from filecoin-project/asr/log-slow-block
feat: miner: log detailed timing breakdown when mining takes longer than the block's timestamp
2023-09-05 12:07:28 -04:00
114a3bbf3f add some logs 2023-09-01 15:02:13 -04:00
b68ced7b19 address review 2023-09-01 15:01:22 -04:00
43d1d62fc6 Make EquivocationDelaySecs a build param 2023-09-01 15:01:22 -04:00
668d615be6 Add comments, re-select messages if refreshing base 2023-09-01 15:01:22 -04:00
91d2c02765 feat: miner: implement FRC-0051 2023-09-01 15:01:22 -04:00
f3b3ff0dd2 feat: miner: log detailed timing breakdown when mining takes longer than the block's timestamp 2023-08-31 10:28:38 -04:00
ae2ae3b9ed Merge pull request #11189 from filecoin-project/update-go-libp2p-v0300
update go-libp2p to v0.30.0
2023-08-24 16:15:26 +02:00
98a82d3dfe Refactor: Rand: Rename DrawRandomness to DrawRandomnessFromBase 2023-08-21 15:03:46 -04:00
bca0ec4f9c update go-libp2p v0.30.0 2023-08-21 10:44:37 +07:00
3566e96b55 refactor: pass more specialized params to computeTicket 2023-08-11 09:52:26 -04:00
20e831b9ea refactor: drop unused param from IsRoundWinner 2023-08-11 09:48:09 -04:00
7180b52d2c feat: improvements to the consensus slasher 2023-07-08 11:21:35 -04:00
802a9f0a78 feat: refactor slashfilter to return bool indicating fault 2023-07-08 11:14:41 -04:00
mx
2fca475dd4 fix: supply extra params for ReportConsensusFaultParams 2023-06-09 10:15:14 +08:00
dcb49dc8ee refactor: update cache to the new generic version (#10463)
- Adds type safety.
- Reduces allocations.
- Fixes the drand cache (was storing by value, but retrieving by pointer)
2023-03-13 15:29:09 -07:00
139f8773de fix some bugs and address some comments 2022-10-16 22:52:22 -04:00
98481821d8 solution for mining loop hitting the same node 2022-10-05 16:52:49 +00:00
08b22edd89 fix make gen 2022-08-29 16:25:30 +02:00
e65fae28de chore: fix imports 2022-06-14 17:00:51 +02:00
6924a3d5f2 Fix calculation of Drand round from Filecoin epochs 2022-05-25 12:43:52 -04:00
8cca9b1970 Use new go-state-types accessors 2022-05-17 15:21:27 -04:00
33f2d24f54 Snap Deals Integration
- FSM handles the actual cc upgrade process including error states
- PoSting (winning and window) works over upgraded and upgrading sectors
- Integration test and changes to itest framework to reduce flakes
- Update CLI to handle new upgrade
- Update dependencies
2022-01-10 15:39:38 +05:30
dfb65ed89f Plumb contexts through 2021-12-11 17:04:00 -05:00
c3c46e9097 Fix Drand fetching around null tipsets 2021-09-29 11:57:59 -04:00
dff097a992 Update miner/miner.go
Co-authored-by: Peter Rabbitson <ribasushi@protocol.ai>
2021-07-09 17:07:23 -04:00
3091e2a771 Update miner/miner.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2021-06-30 12:15:43 -04:00
b8866f1d16 Envvar to disable slash filter 2021-06-28 22:00:21 -04:00
d86c8195dd Merge pull request #6358 from filecoin-project/chore/better_winning_log_harder
Upscale mineOne message to a WARN on unexpected ineligibility
2021-05-31 20:59:08 +02:00
b6d5b88e9f Pushed the wrong thing >:( 2021-05-31 15:31:40 +02:00
c3a7b59bd1 Remove few useless variable assignments 2021-05-31 15:16:38 +02:00
039b88740d Upscale mineOne message to a WARN on unexpected ineligibility 2021-05-31 14:53:34 +02:00
391d6eca49 make lint happy 2021-05-24 10:04:37 -04:00
3a74ab8f82 Add a lateStart indicator, differentiate on Error/Warn/Info 2021-05-22 23:57:45 +02:00
888c63b79c Incorporate the 'Time delta between now...' log into the 'completed mineOne' 2021-05-22 17:39:56 +02:00
308d1e9b7c Fix logging around mineOne
- A nil MiningBaseInfo is *NOT* unexpected: it happens when one is in penalty
  https://github.com/filecoin-project/lotus/blob/v1.9.0/chain/stmgr/utils.go#L500-L502

- Remove the log from IsRoundWinner(): all we care about is the randbase epoch
2021-05-21 15:00:21 +02:00
de60229957 mining lookback is effectively a constant - make it so 2021-05-06 10:18:08 +02:00
72134ff458 Add a mining-heartbeat INFO line at every epoch 2021-05-06 10:18:08 +02:00