Skip to content
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

Correct SupportedProofTypes in Filecoin.StateGetNetworkParams #11996

Open
rjan90 opened this issue May 15, 2024 · 1 comment
Open

Correct SupportedProofTypes in Filecoin.StateGetNetworkParams #11996

rjan90 opened this issue May 15, 2024 · 1 comment

Comments

@rjan90
Copy link
Contributor

rjan90 commented May 15, 2024

Description
Updating SupportedProofTypes in Filecoin.StateGetNetworkParams to the correct ProofTypes caused failures in devnet tooling:

PR #11988 updated SupportedProofTypes to the correct values, but this caused panics in the the devnet tooling when using lotus-seed, more specifically it seems to come from this part of the code:

// AddSupportedProofTypes sets supported proof types, across all actor versions.
// This should only be used for testing.
func AddSupportedProofTypes(types ...abi.RegisteredSealProof) {
for _, t := range types {
if t >= abi.RegisteredSealProof_StackedDrg2KiBV1_1 {
panic("must specify v1 proof types only")
}
// Set for all miner versions.
miner0.SupportedProofTypes[t] = struct{}{}
miner2.PreCommitSealProofTypesV0[t] = struct{}{}
miner2.PreCommitSealProofTypesV7[t] = struct{}{}
miner2.PreCommitSealProofTypesV7[t+abi.RegisteredSealProof_StackedDrg2KiBV1_1] = struct{}{}
miner2.PreCommitSealProofTypesV8[t+abi.RegisteredSealProof_StackedDrg2KiBV1_1] = struct{}{}
miner3.PreCommitSealProofTypesV0[t] = struct{}{}
miner3.PreCommitSealProofTypesV7[t] = struct{}{}
miner3.PreCommitSealProofTypesV7[t+abi.RegisteredSealProof_StackedDrg2KiBV1_1] = struct{}{}
miner3.PreCommitSealProofTypesV8[t+abi.RegisteredSealProof_StackedDrg2KiBV1_1] = struct{}{}
miner4.PreCommitSealProofTypesV0[t] = struct{}{}
miner4.PreCommitSealProofTypesV7[t] = struct{}{}
miner4.PreCommitSealProofTypesV7[t+abi.RegisteredSealProof_StackedDrg2KiBV1_1] = struct{}{}
miner4.PreCommitSealProofTypesV8[t+abi.RegisteredSealProof_StackedDrg2KiBV1_1] = struct{}{}
miner5.PreCommitSealProofTypesV8[t+abi.RegisteredSealProof_StackedDrg2KiBV1_1] = struct{}{}
wpp, err := t.RegisteredWindowPoStProof()
if err != nil {
// Fine to panic, this is a test-only method
panic(err)
}

./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2 
panic: must specify v1 proof types only

goroutine 1 [running]:
github.com/filecoin-project/lotus/chain/actors/policy.AddSupportedProofTypes({0x911e340, 0x4, 0xc00003b230?})
        /root/lotus/chain/actors/policy/policy.go:112 +0x2e5
github.com/filecoin-project/lotus/chain/actors/policy.SetSupportedProofTypes({0x911e340, 0x4, 0x4})
        /root/lotus/chain/actors/policy/policy.go:104 +0x305
github.com/filecoin-project/lotus/build.init.1()
        /root/lotus/build/params_2k.go:101 +0x2c

PR #11990 reverted the changes from PR #11988 to restore devnet-testing stability in the master branch. But we should look into the root-cause here, and fix it, so that we can update the SupportedProofTypes to the correct values.

@rjan90
Copy link
Contributor Author

rjan90 commented May 21, 2024

The correct way forward here is to find out why it panics, then fix the SupportedProofTypes to the correct values.

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

No branches or pull requests

1 participant