Skip to content

Support lotus v1.36.0-rc1 + NV28 (FireHorse)#545

Merged
emmanuelm41 merged 11 commits intodevfrom
feat/lotus-v1.36.0-rc1
May 5, 2026
Merged

Support lotus v1.36.0-rc1 + NV28 (FireHorse)#545
emmanuelm41 merged 11 commits intodevfrom
feat/lotus-v1.36.0-rc1

Conversation

@emmanuelm41
Copy link
Copy Markdown
Member

Summary

Adds support for Filecoin Network Version 28 (FireHorse) and lotus v1.36.0-rc1 in fil-parser, paired with the rosetta release rosetta-filecoin-lib v1.3600.0-rc1 and rosetta-filecoin-proxy v1.3600.0-rc1.

This PR is a complete replacement for #543 — same actor/v18 surgery (cherry-picked from that branch), but lotus v1.36.0-rc1 instead of v1.35.0, real go-state-types v0.18.0 (released), and the real NV28 calibnet height instead of placeholders.

Commit structure

cc5a367  feat: lotus v1.36.0-rc1 + NV28 (FireHorse) calibnet height   ← new
8a759a0  fix: use custom struct for v21                               ⎤
239af5c  fix: use custom struct for v21                               │ cherry-picked
31e6f7b  fix: prevent adding of extra field to params                 │ from #543
4c3c277  fix: handle SectorDeals params breaking change               │ (feat/nv28-support)
86de1f2  feat: add NV28 support for all actors                        ⎦

Changes vs #543

#543 this PR
lotus v1.35.0 v1.36.0-rc1
go-state-types v0.18.0-dev v0.18.0 (released)
Go directive 1.24.7 1.25.7 (transitive)
V28 calibnet height 999999999999999 placeholder 3694534 (real FireHorse activation, sourced from lotus@v1.36.0-rc1/build/buildconstants/params_calibnet.go:131)
V28 mainnet buildconstants.UpgradeXxHeight (doesn't exist) buildconstants.UpgradeFireHorseHeight (real constant; mainnet activation epoch itself still TBD upstream)
V28 comment Xx FireHorse
NodeVersionsSupported [..., v1.35] [..., v1.35, v1.36]

Test plan

  • go build ./... clean
  • go vet ./... clean
  • Non-Redis unit tests pass locally
  • CI passes (Redis-backed tests, mocks, lint)
  • After merge: tag v4.3600.0-rc1 (paired with rosetta lib/proxy v1.3600.0-rc1)

After merge

fil-indexing will be bumped to: lotus v1.36.0-rc1 + fil-parser v4.3600.0-rc1.

ziscky and others added 11 commits May 5, 2026 10:12
- Update go-state-types to v0.18.0-dev, lotus to v1.35.0, go-f3 to v0.8.12
- Add V28 version mapping with placeholder heights (UpgradeXxHeight)
- Add v18 builtin-actors imports and method/param entries for all 16 actors
- Add v1.35 to supported node versions
- Regenerate mocks for updated lotus API
- Update CI to Go 1.24.7
- Update version tests for V28 calibration support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bumps lotus to v1.36.0-rc1 on top of the NV28 actor work cherry-picked
from #543. Resolves the placeholders left in #543:

- lotus v1.35.0 -> v1.36.0-rc1
- go-state-types v0.18.0-dev -> v0.18.0 (released)
- Go directive 1.24.7 -> 1.25.7 (transitive requirement)
- V28 calibration height: 999999999999999 placeholder -> 3694534
  (real FireHorse activation epoch on calibnet, sourced from
  lotus@v1.36.0-rc1 build/buildconstants/params_calibnet.go)
- V28 mainnet: buildconstants.UpgradeXxHeight (which doesn't exist)
  -> buildconstants.UpgradeFireHorseHeight (real constant; mainnet
  height itself is still TBD and remains a placeholder upstream)
- V28 comment: 'Xx' -> 'FireHorse'
- parser/v2/parser.go: NodeVersionsSupported += 'v1.36'

Build clean, vet clean, non-Redis tests pass locally. CI will exercise
Redis-backed tests via the REDIS_addr secret.
builtin-actors v18.0.0 added three exported sector-status methods that
PR #543's actor-by-actor scan missed:

- GenerateSectorLocation(SectorNumber) -> (SectorStatusCode, AuxData)
- ValidateSectorStatus(SectorNumber, Status, AuxData) -> bool
- GetNominalSectorExpiration(SectorNumber) -> ChainEpoch

These are FRC-42 dispatched (deterministic method-hash), so they must be
registered in the miner customMethods() map. Without them, V28+ traces
calling these methods would be parsed as 'unknown method'.

Source: actors/miner/src/lib.rs in builtin-actors v18.0.0:
  GenerateSectorLocationExported = frc42_dispatch::method_hash!(...)
  ValidateSectorStatusExported = frc42_dispatch::method_hash!(...)
  GetNominalSectorExpirationExported = frc42_dispatch::method_hash!(...)

Implementation matches the existing per-version dispatch pattern used
by other V_N-introduced methods (e.g. ProveCommitSectors3, V22+):
- params + return maps in actors/v2/miner/params.go (V28-only entry)
- handler resolves via tools.VersionFromHeight(network, height)
- per-version dispatch lets future v19+ variants drop in cleanly

GenerateSectorLocation/ValidateSectorStatus types come from
go-state-types/builtin/v18/miner directly. GetNominalSectorExpiration
takes bare *abi.SectorNumber and returns abi.ChainEpoch (primitives,
not structs); locally-defined wrappers in actors/v2/miner/types/
provide the UnmarshalCBOR surface required by parseGeneric (same
pattern as existing GetSectorSizeReturn, MaxTerminationFee*, etc.).
go.mod was bumped from 1.24.7 -> 1.25.7 by 'go get lotus@v1.36.0-rc1'
in commit cc5a367. CI workflow uses GOTOOLCHAIN=local so the runner
must already have the required Go version installed; container image
pin needs to match too.
The TestABIMethodNumberToMethodName test (actors/v2/actors_test.go:137)
caught two gaps in the prior commit:

1. The 3 new v18 methods (GenerateSectorLocation, ValidateSectorStatus,
   GetNominalSectorExpiration) were registered in customMethods() but
   missing from miner.Parse() switch and miner.TransactionTypes() map.
   Both are required for the actor's full method-resolution surface.

2. Pre-existing bug surfaced: GetBeneficiaryExported has been the
   FRC-42 dispatch name for the GetBeneficiary method since v16
   builtin-actors, but only MethodGetBeneficiary was registered. The
   test was implicitly relying on dispatch never showing the *Exported
   variant — which it always did. Added MethodGetBeneficiaryExported
   constant + Parse() case + TransactionTypes() entry.

Three places to touch when adding/renaming a miner method:
  a. parser/constants.go            — string constant
  b. actors/v2/miner/miner.go       — handler + customMethods (FRC-42)
                                      OR per-version 'methods' map
  c. actors/v2/miner/parse.go       — Parse() switch + TransactionTypes()
The TestABIMethodNumberToMethodName test enforces (c) is in sync with
the methods registered via (b).
…int v2

Two CI follow-ups after the prior commit:

1. customMethods() registers methods cross-version (V0..V28). Putting
   the v18-only FRC-42 methods (GenerateSectorLocation, etc.) there
   exposed them at V0-V27 too, where our per-version dispatch returns
   ErrUnsupportedHeight, breaking TestVersionCoverage. Removed them —
   they're already in miner18.Methods so V28 picks them up natively.
   Updated Rule C in fil-parser-upgrade skill to match.

   Note: GetBeneficiary / GetBeneficiaryExported still need to be in
   customMethods because v17 and earlier registered the FRC-42 hash
   under name 'GetBeneficiary' (some version maps), and the constant
   was missing entirely until the prior commit. This case is genuinely
   cross-version and stays.

2. golangci-lint v1.64.8 was the last v1.x release and was built with
   Go 1.24, so it errors out on Go 1.25 code:
     can't load config: the Go language version (go1.24) used to build
     golangci-lint is lower than the targeted Go version (1.25.7)
   Bumped Makefile to v2.12.1. v2 changed several things:
     - gofmt is now a formatter, not a linter (can't be -E'd)
     - default linter set widened to include errcheck/govet/staticcheck
     - exclusion via flags removed; config file required
   Added .golangci.yml that restores v1.64.8 behavior (gosec + gocritic
   only, --default=none equivalent) with documented TODOs for the
   ~70 pre-existing issues v2 surfaces (50 goconst cosmetic,
   ~10 staticcheck QF1008, gosec G115/G304 in legacy code).

Verified locally: go test ./... -short, golangci-lint run, both clean
on the modified packages.
The upstream install.sh script's sha256 checksum verification fails on
v2.12.1 — both local and CI runs hit:
  err hash_sha256_verify checksum for '...golangci-lint-2.12.1-...tar.gz'
  did not verify <expected> vs <actual>

go install builds from source and avoids the checksum mismatch entirely.
Slightly slower in CI but reliable.
@emmanuelm41 emmanuelm41 merged commit 380466a into dev May 5, 2026
6 checks passed
@emmanuelm41 emmanuelm41 deleted the feat/lotus-v1.36.0-rc1 branch May 5, 2026 16:09
@emmanuelm41 emmanuelm41 mentioned this pull request May 5, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants