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

Flags field is dropped in SectorOnChainInfo conversions #11962

Closed
5 of 11 tasks
hanabi1224 opened this issue May 6, 2024 · 1 comment · Fixed by #11963
Closed
5 of 11 tasks

Flags field is dropped in SectorOnChainInfo conversions #11962

hanabi1224 opened this issue May 6, 2024 · 1 comment · Fixed by #11963
Labels
kind/bug Kind: Bug

Comments

@hanabi1224
Copy link
Contributor

hanabi1224 commented May 6, 2024

Checklist

  • This is not a security-related bug/issue. If it is, please follow please follow the security policy.
  • I have searched on the issue tracker and the lotus forum, and there is no existing related issue or discussion.
  • I am running the Latest release, the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.
  • I did not make any code changes to lotus.

Lotus component

  • lotus daemon - chain sync
  • lotus fvm/fevm - Lotus FVM and FEVM interactions
  • lotus miner/worker - sealing
  • lotus miner - proving(WindowPoSt/WinningPoSt)
  • lotus JSON-RPC API
  • lotus message management (mpool)
  • Other

Lotus Version

lotus version 1.27.0-dev+calibnet+git.10f7b6ed5

Repro Steps

The Flags field is not converted in the code at https://github.com/filecoin-project/lotus/blob/master/chain/actors/builtin/miner/v12.go#L533

func fromV12SectorOnChainInfo(v12 miner12.SectorOnChainInfo) SectorOnChainInfo {
	info := SectorOnChainInfo{
		SectorNumber:          v12.SectorNumber,
		SealProof:             v12.SealProof,
		SealedCID:             v12.SealedCID,
		DealIDs:               v12.DealIDs,
		Activation:            v12.Activation,
		Expiration:            v12.Expiration,
		DealWeight:            v12.DealWeight,
		VerifiedDealWeight:    v12.VerifiedDealWeight,
		InitialPledge:         v12.InitialPledge,
		ExpectedDayReward:     v12.ExpectedDayReward,
		ExpectedStoragePledge: v12.ExpectedStoragePledge,

		SectorKeyCID: v12.SectorKeyCID,

		PowerBaseEpoch:    v12.PowerBaseEpoch,
		ReplacedDayReward: v12.ReplacedDayReward,
	}
	return info
}

Describe the Bug

When posting the below payload to http://localhost:1234/rpc/v0

{"jsonrpc":"2.0","id":0,"method":"Filecoin.StateSectorGetInfo","params":
["f04040",102,[{"/":"bafy2bzacedbmki5e4olfcdkruq7qjh7xj4yg6wbcqsiqw2ez7kngiywbdsge4"},{"/":"bafy2bzacebbntlxgcsdq2mjg23lf6fjwbugsbx52umyur3yyhszganidni2p2"}]]
}

Flags should be 1 in the response.

Logging Information

N/A
@rvagg
Copy link
Member

rvagg commented May 6, 2024

#11963

rvagg added a commit that referenced this issue May 6, 2024
rvagg added a commit that referenced this issue May 6, 2024
rvagg added a commit that referenced this issue May 7, 2024
ribasushi pushed a commit to ribasushi/ci-abusing-lotus-fork that referenced this issue May 11, 2024
rvagg added a commit that referenced this issue May 15, 2024
rvagg added a commit that referenced this issue May 15, 2024
rvagg added a commit that referenced this issue May 15, 2024
ribasushi pushed a commit to ribasushi/ltsh that referenced this issue May 16, 2024
rjan90 pushed a commit that referenced this issue May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Kind: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants