Closed Schwartz10 closed 3 months ago
Calibrationnet is on version 14 now. That is:
version := actorstypes.Version(14) // 13 -> 14
Hey thanks for responding so quickly @Stebalien ! That makes much more sense.. tho i'm confused why (without changing the lotus version in my go.mod) changing the version from 13->14 doesn't change the code CID i get back from actors.GetActorCodeID
. My guess is that i need to upgrade my filecoin-project/lotus
dep to somewhere in the 1.28 range... but doing so breaks my code haha. I may just hardcode the right CID for now :see_no_evil:
Well, if you'll need to do that if you want to interact with calibrationnet anyways, right? Or are you using lotus as a library?
Using lotus as a library for a backend service. We like to run a calibnet version and a mainnet version side by side - and normally we had been using LatestVersion()
to derive the right "live version" number for each actor type. So the LatestVersion when using 1.26.. is correct for mainnet, but incorrect for calibnet. Then if you upgrade, the flip side occurs haha. I can probably patch this on my side for now tho by upgrading lotus and manually using actor version 13 for mainnet and actor version 14 for calibration
Ah, so, the issue is that you need to get the current version for the network. I.e. Epoch->NetworkVersion -> ActorVersion.
Alternatively, you can always call https://github.com/filecoin-project/lotus/blob/43b7a78a587d27c763a9bb2afb102410b873b39f/chain/actors/builtin/builtin.go#L168. That'll always work for the latest version (as long as you're on the right network).
(closing because there isn't really anything we can do here)
I have a go program that relies on Lotus and go-state-types to determine if a specific address is a
storageminer
actor. The program looks up the actor code associated with the address, and compares it to the same actor version manifests from go-state-types/build packageThe following code works on mainnet, but not on calibration:
I've tried various other versions of go-state-types and lotus with the same end result:
Does anyone know how I can get:
To match the correct actorCode returned by (live) calibrationnet for a
storageminer
? Am i using a wrong version of something? Loading the wrong manifests somehow?