-
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
feat: chain: light-weight patch to fix calibrationnet again by removing move_partitions from built-in actors #11409
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.
@aarshkshah1992 Thanks a lot for this, it looks great! There's really only one major change needed: there's one actor whose state needs to be updated, which is the system actor. This actor contains the manifest entry in its state, and so needs to be updated in the patch migration.
The reason you missed this is because we actually missed this in the original patch :D We fixed this on the release branches, but hadn't done so on master
-- I just did so by landing this forward-port PR.
If you rebase this PR onto master, you'll see the necessary change. I suspect you'll have to modify the buildUpgradeActorsV12MinerFix
method to also take the manifest CID as input, but you can take a stab at it.
Apart from that, I want to squint a little closer at how the bundles & manifests are being loaded, but that can be a second pass.
build/builtin_actors.go
Outdated
@@ -190,9 +191,10 @@ func readEmbeddedBuiltinActorsMetadata(bundle string) ([]*BuiltinActorsMetadata, | |||
return nil, xerrors.Errorf("error loading builtin actors bundle: %w", err) | |||
} | |||
|
|||
// The following manifest cid existed temporarily on the calibnet testnet | |||
// The following manifest cids existed temporarily on the calibnet testnet | |||
// We include it in our builtin bundle, but intentionally omit from metadata |
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.
// We include it in our builtin bundle, but intentionally omit from metadata | |
// We include them in our builtin bundle, but intentionally omit from metadata |
@@ -70,6 +70,9 @@ var UpgradeWatermelonHeight = abi.ChainEpoch(200) | |||
// This fix upgrade only ran on calibrationnet | |||
const UpgradeWatermelonFixHeight = -100 | |||
|
|||
// This fix upgrade only ran on calibrationnet | |||
const UpgradeWatermelonFix2Height = -101 |
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.
Let's rename this (and the above) fields to UpgradeCalibrationWatermelonFix2?
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.
Sorry about missing these !
build/params_calibnet.go
Outdated
@@ -85,6 +85,10 @@ const UpgradeWatermelonHeight = 1013134 | |||
// 2023-11-07T13:00:00Z | |||
const UpgradeWatermelonFixHeight = 1070494 | |||
|
|||
// 2023-11-07T13:00:00Z | |||
// TODO INSERT VALUE HERE ONCE DECIDED |
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.
Per @jennijuju Thursday the 16th is a good day to aim for.
@arajasek Pulled in master and addressed your review. Note that there are some TODOs we'll have to address before using this (enumerated in the PR description). |
} | ||
|
||
// now confirm we have the one we're migrating to | ||
if haveManifest, err := stateStore.Has(ctx, newManifestCID); err != nil { |
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.
How does the newManifestCID
get into the state store ?
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.
Ah, I have a bug here -- I need to load calibnetv12BuggyBundleSuffix2
, pushing a commit to fix this. Thank you!
With that fix, the two blocks above should do this:
bundle.LoadBundles(ctx, stateStore, actorstypes.Version12)
loads the "correct" bundle, cuz that's what's hard-coded as the bundle to use for v12 actorsbuild.GetEmbeddedBuiltinActorsBundle(actorstypes.Version12, calibnetv12BuggyBundleSuffix2)
, followed by a call toLoadBundle
should load the second buggy bundle (the one that's currently live)
chain/consensus/filcns/upgrades.go
Outdated
if err := bundle.LoadBundles(ctx, stateStore, actorstypes.Version12); err != nil { | ||
return cid.Undef, xerrors.Errorf("failed to load manifest bundle: %w", err) | ||
} | ||
|
||
// this loads the second buggy bundle, for UpgradeWatermelonFixHeight | ||
_, ok := build.GetEmbeddedBuiltinActorsBundle(actorstypes.Version12, calibnetv12BuggyBundleSuffix2) |
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.
So in this line, we're ensuring that we have the "second buggy bundle" as that is what we will upgrade to during the first upgrade epoch ?
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.
Yes (but I'm missing a step), see above.
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.
just some questions
lgtm. |
But would love a full review from @Stebalien too. |
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.
There's nothing obviously wrong, but we should really test it. Would it be possible to test this on a devnet? We'd likely have to swap out the CIDs and all the "is this calibrationnet" checks, but that seems doable and it should let us actually go over the upgrade.
I believe we have the 2k mocks here https://github.com/filecoin-project/lotus/tree/asr/devnet - need to double confirm if we have run the testing |
Ah! Awesome. |
I tested the At epoch 8:
After the first upgrade epoch (UpgradeWatermelonFixHeight = 20)
After the second upgrade epoch (UpgradeWatermelonFix2Height = 25)
|
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.
Need to unset / update the mainnet upgrade epoch, but otherwise LGTM.
// TODO INSERT VALUE HERE ONCE DECIDED | ||
const UpgradeWatermelonFix2Height = -1 | ||
// 2023-11-21T13:00:00Z | ||
const UpgradeWatermelonFix2Height = 1108174 |
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.
LGTM
…ng move_partitions from built-in actors (#11409) * upgrade calibnet by removing move_partitions from miner actor in actor v12 * cids for buggy bundles * revert changes to v12 tar * upgrade system actor state * update based on manifest * nit: clean up some comments * chore: rename param to oldBuggyMinerCID * refactor, ensure both buggy bundles are loaded * update to actors v12.0.0-rc.3 * fix: load second buggy bundle for UpgradeWatermelonFixHeight * add calibration fix2 upgrade epcoh * update mainnet upgrade epoch --------- Co-authored-by: Aayush <arajasek94@gmail.com> Co-authored-by: jennijuju <jiayingw703@gmail.com>
…ng move_partitions from built-in actors (#11409) * upgrade calibnet by removing move_partitions from miner actor in actor v12 * cids for buggy bundles * revert changes to v12 tar * upgrade system actor state * update based on manifest * nit: clean up some comments * chore: rename param to oldBuggyMinerCID * refactor, ensure both buggy bundles are loaded * update to actors v12.0.0-rc.3 * fix: load second buggy bundle for UpgradeWatermelonFixHeight * add calibration fix2 upgrade epcoh * update mainnet upgrade epoch --------- Co-authored-by: Aayush <arajasek94@gmail.com> Co-authored-by: jennijuju <jiayingw703@gmail.com>
TODO
UpgradeWatermelonFix2Height
epoch to when we want to do this upgrade on calibnetlotus/chain/consensus/filcns/upgrades.go
Line 307 in 689fdaa
Related Issues
The calibration test network upgraded to nv21 / actors v12 2 weeks ago. Further testing on the testnet revealed a minor bug in a new feature that has since been patched: filecoin-project/builtin-actors#1455.
We then patched the testnet with the fix but ran into another confirmed bug related to the implementation of FIP-0070 at filecoin-project/builtin-actors#1326.
For now, we propose that we completely revert FIP-0070 from the testnet and NV21. See the corresponding built-in Actors PR at filecoin-project/builtin-actors#1481. Unfortunately, this is consensus-critical, and so needs a coordinated upgrade on the testnet in order to land the new code. This PR proposes a relatively easy way to achieve this and is based on #11363.
Proposed Changes
UpgradeWatermelonFixHeight2
upgrade that ONLY exists for calibrationnet (disabled for all others)actorMeta
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, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps