Open dacut opened 3 years ago
No, they can not be safely snapshotted right now (calling a method on a snapshotted struct will throw).
I am happy to take a PR that lets you "re-hydrate" a snapshotted struct by de-serializing it and then calling a new .with_account()
method that re-populates the account: Option<Arc<Account>>
inner slot.
I see that many of the structs and enums derive
Deserialize
but notSerialize
. Would it be safe to addSerialize
to these objects?What I'm trying to do: I'm trying to make an event-driven ACME interface (for serverless uses like AWS Lambda). Ideally, this wouldn't block while waiting for a challenge to be validated and a separate polling system (e.g. Step Functions) would drive this.
Doing this correctly requires (I think) snapshotting the current order, authorizations, and challenges (e.g. to JSON) and reconstituting them elsewhere.
I'm going to go ahead and try this myself, but was curious if you had any insight.
Thanks!