-
Couldn't load subscription status.
- Fork 146
Description
The idea of Machine IDs were to have a somewhat random number that could identify a machine (epoch + some random number). Ideally we would get some randomness from the network to generate the random number (this was done originally) #616 (comment). Since we can't get randomness from the current epoch, it was scrapped with #669 and now we use a thread local rand instead.
This ID is only used in the store_artifact syscall currently, so it is fine for now but if it has other uses it would need a different source of randomness or be removed entirely.
Removing ID would require where the artifacts are stored to be structured to prevent clobbering previous machines/actors. Currently the thought is to have the node set env var FVM_STORE_ARTIFACT_DIR to {anything}/{unix timestamp of starting the FVM}/ then have some atomic counter in lotus that passed into the FVM that it uses adds internally to the prefix, with the file name being whatever any actor decides to name it (overwritting). eg /foo/bar/1659483852/3/boxy.cov
This would let actors overwrite artifacts from previous actors in the callstack which is (maybe?) bad. So that would need another solution to potentially prevent that (but this was done in the previous implementation as well).
A good Machine ID could replace timestamp and atomic counter, though actor clobbering would still need addressing.