-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(store): correctly break weight ties based on smaller ticket #12253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
matches FIP-0023 from my read of it
needs a fiximports though on the new test file
@ribasushi pointed out that this is likely consensus breaking and I think he's right. Won't this cause us to order blocks within a tipset differently? |
Ah! This is between two tipsets. It's a "soft" consensus breaking change that'll likely resolve within a few tipsets, from what I can tell. |
(more importantly, the current behavior is forky and the new behavior is less forky) |
Yeah, the other thing is that this is already the fallback option. Weight is what's actually supposed to decide between tipsets, this is only for when that ties. |
@rjan90 and @jennijuju reported seeing this log a lot, which prompted an investigation of the logic. This code does not implement [FIP-0023](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0023.md) correctly. Specifically, if we have the following mintickets: ``` ts1: 1, 2 ts2: 0,3 ``` This code will incorrectly return ts1 as the "smaller" tipset, even though the tie should have been broken in favour of ts2 based on `1 > 0`.
* Update changelog Update changelog * chore: lotus-shed: Add support for nv23 in `migrate-state` cmd (#12172) * Add support for nv23 in `lotus-shed migrate-state` cmd Add support for nv23 in `lotus-shed migrate-state` cmd * Add actors v14 to `check-invariants` cmd Add actors v14 to `check-invariants` cmd * feat: F3: Update go-f3, change the style of participation call (#12196) * Upgrade go mod F3 dependency to v0.0.3 tagged release Use concrete/latest version of F3: v0.0.3 * update changelog * chore!: markets: remove deal constants * Upgrade to OpenTelemetry v1.28.0 Upgrade to new version of OpenTelemetry to also play nice with F3. * Reduce log level in F3 message sending to Debug (#12224) Reduce the log level for `miner with id...` to DEBUG, since in normal operation of F3 at least 5 messages are sent per epoch. In an event of rebroadcast the number of messages broadcasted could surpass 10. Hence, the `DEBUG` log level. * chore: deps: upgrade to [email protected] * Upgrade to latest go-f3 `v0.0.4` (#12237) Upgrade to the latest go F3, with fix to default cert exchange config in local devnet. * chore: config: yet more lp2p removal from miner * fix(store): correctly break weight ties based on smaller ticket (#12253) @rjan90 and @jennijuju reported seeing this log a lot, which prompted an investigation of the logic. This code does not implement [FIP-0023](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0023.md) correctly. Specifically, if we have the following mintickets: ``` ts1: 1, 2 ts2: 0,3 ``` This code will incorrectly return ts1 as the "smaller" tipset, even though the tie should have been broken in favour of ts2 based on `1 > 0`. * Fix lint error: correct typo in F3Participation function comment Fix lint error: correct typo in F3Participation function comment * Fix typo in F3Participate documentation Corrected "successfull" to "successful" in comments and documentation to fix a lint error. * chore: libp2p: update to v0.35.4 (#12265) * go mod tidy go mod tidy * Update CHANGELOG.md Co-authored-by: Steve Loeppky <[email protected]> * fix a bug * Set Mainnet upgrade epoch NV23 Set Mainnet upgrade epoch NV23 * Update changelog.md Update changelog.md * chore: deps: Update GST, Filecoin-FFI and Actors to final versions NV23 (#12276) * Update to final GST for nv23 Update to final GST for nv23 * Bump filecoin-ffi to v1.28.0 Bump filecoin-ffi to v1.28.0 * Update CHANGELOG.md Update CHANGELOG.md * Update Builtin-actors to v14.0.0 Update Builtin-actors to v14.0.0 * Update Changelog, version-string, make gen and make docsgen Update Changelog, version-string, make gen and make docsgen * Re-run ./pack.sh v14 v14.0.0 Re-run ./pack.sh v14 v14.0.0 * Set up otel metrics reporting to prometheus Register otel collector bridging to the default prometheus registry so that F3 metrics (which use the newer otel APIs for metrics) get included in Lotus metrics. * Update changelog with #12285 backport Update changelog with #12285 backport * Revert "chore!: markets: remove deal constants" This reverts commit d045ccb. * Revert "chore: config: yet more lp2p removal from miner" This reverts commit 70400c9. * fix eth trace panic * backport: f3: Upgrade to go-f3 `v0.0.5` (#12279) (#12288) * chore: f3: Upgrade to go-f3 `v0.0.5` (#12279) * Upgrade to go-f3 `v0.0.5` Upgrade to the latest version of go-f3 with initial power table storage with far enough lookback, and dynamic manifest persistence. --------- Co-authored-by: Jakub Sztandera <[email protected]> Co-authored-by: Jiaying Wang <[email protected]> Co-authored-by: Steven Allen <[email protected]> * remove unwanted changelog * fix import * Revert "chore!: markets: remove deal constants" This reverts commit d045ccb. * Revert "chore: config: yet more lp2p removal from miner" This reverts commit 70400c9. * fix eth trace panic * Update CHANGELOG.md Co-authored-by: Jakub Sztandera <[email protected]> * Update CHANGELOG.md --------- Co-authored-by: Masih H. Derkani <[email protected]> Co-authored-by: Jakub Sztandera <[email protected]> Co-authored-by: Steven Allen <[email protected]> Co-authored-by: Phi <[email protected]> Co-authored-by: aarshkshah1992 <[email protected]> --------- Co-authored-by: Jakub Sztandera <[email protected]> Co-authored-by: Masih H. Derkani <[email protected]> Co-authored-by: aarshkshah1992 <[email protected]> Co-authored-by: Rod Vagg <[email protected]> Co-authored-by: Peter Rabbitson <[email protected]> Co-authored-by: Aayush Rajasekaran <[email protected]> Co-authored-by: Steve Loeppky <[email protected]> Co-authored-by: Jiaying Wang <[email protected]> Co-authored-by: Steven Allen <[email protected]>
Related Issues
@rjan90 and @jennijuju reported seeing this log a lot, which prompted an investigation of the logic. This code does not implement FIP-0023 correctly. Specifically, if we have the following mintickets:
This code will incorrectly return ts1 as the "smaller" tipset, even though the tie should have been broken in favour of ts2 based on
1 > 0
.Proposed Changes
Fix this bug, we should return in favour of ts2 if its ticket is smaller. Add test.
Additional Info
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, mempool, multisig, networking, paych, proving, sealing, wallet, deps[skip changelog]
to the PR titleskip/changelog
to the PR