Open laudiacay opened 2 years ago
It's a bit of an edge case but I don't think so. ErrIllegalArgument for values actor logic forbids. ErrIllegalState for failures that should be impossible. In this case the bitfield was serialized correctly but makes Count fail which I wouldn't expect to be possible. If you look into it and Count errors are expected for certain valid serializations I'll support changing to ErrIllegalArgument.
Well, the serialization may not actually be valid. We check lazily when we actually operate on the bitfield to avoid validating bitfields in the state every time we rehydrate them.
https://github.com/filecoin-project/specs-actors/blob/97fc4480cbc9b7078c67276d8c3394e3423ef513/actors/builtin/miner/miner_actor.go#L869-L870
this should probably be an errIllegalArgument, no? the params failed validation?