-
Notifications
You must be signed in to change notification settings - Fork 467
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
miner actor indexes slice by an int64 #521
Comments
Yes it will. My main input here is, please don't use |
Trying to understand ... is there a problem here right now? This code won't work as-is when the length of the slice gets longer than 2^32, but at that point (probably way before that point) we will be using something fancier in-memory. |
Put another way: is there a protocol-breaking change that needs to get made here? (honest question). |
There is a problem in the sense that what we are doing is a bug. There is not a problem in the sense that it is not going to break any time soon. |
OK snarkasaurus. Yeah there are so many things that fit that description. Before we get anywhere close to this slice index, presumably the node will fall over trying to deserialize an XGB array into memory. |
As it likely falls out of data model work I just moved this issue from "ready" to "backlog". |
Think this is fixed by moving to champ, so let's make the scope of this issue to scan for any places where we're doing something like this to an on-chain data structure and then close the issue if none are found. |
@phritz @acruikshank cool to close? |
As part of looking into #340 I noticed that the miner actor indexes a slice using an int64 https://github.com/filecoin-project/go-filecoin/blob/master/actor/builtin/miner/miner.go#L219. My understanding is that this is going to fail on 32-bit platforms as soon as the value is greater than int max. For example https://play.golang.org/p/lzNI3tQyMA7.
See also discussion in #340
The text was updated successfully, but these errors were encountered: