filecoin-project / go-state-types

Primitive and low level types used in chain state and actor method parameters
Other
26 stars 37 forks source link

ClaimAllocationsReturn not match #312

Open yhio opened 1 month ago

yhio commented 1 month ago

https://github.com/filecoin-project/go-state-types/blob/5bc58c65d65c8e171b140c7a897ee72fd2d092df/builtin/v14/verifreg/verifreg_types.go#L121

https://github.com/filecoin-project/builtin-actors/blob/54236ae89880bf4aa89b0dba6d9060c3fd2aacee/actors/verifreg/src/types.rs#L173

Causes lily parsing error: https://github.com/filecoin-project/lily/issues/1316

rvagg commented 1 month ago

ooof, probably should be SectorClaims big.Int[]

rvagg commented 2 weeks ago

I've marked this as good first issue just in case someone wants to grab it before one of us gets to it. I would encourage the implementer to do this with serialisation tests like I've been adding to the codebase slowly. See https://github.com/filecoin-project/go-state-types/pull/270, https://github.com/filecoin-project/go-state-types/pull/314/commits/4fadebad425548a608c87fd9484646b90f750a67 and also in https://github.com/filecoin-project/go-state-types/pull/286. They all have mirrors over in builtin-actors - same fixtures and execution, just in Rust. I use cborg on the commandline to debug the binary / hex encoded forms of these and document them as such: cborg hex2diag ... and cborg hex2json are both pretty helpful, although the json form treats bytes as an indexed map for each byte (because of Uint8Arrays) so it requires a bit of manual munging to get those comments nicely describing what the encoded forms are.