Skip to content

Why should we use writeFinal when recording a final state to Vstorage #8812

Answered by gibson042
Jorge-Lopes asked this question in Q&A
Discussion options

You must be logged in to vote

What I would like to understand in more depth is if this pattern was implemented to protect the developer in case of fault design in the contract or if it has any overload to Agoric chain to keep the Publish object listening to updates?

The former. Our async sequence publisher pattern consists of a { publish, finish, fail } trio as described at @agoric/notifier and Notifiers and Subscriptions, and the RecorderKit interface is built on top of it. Also, finalization applies to the publisher object but not to the chain storage node that ultimately receives its data—a distinct publisher object associated with the same chain storage node can still continue writing to it.

Is that sufficiently…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Jorge-Lopes
Comment options

Jorge-Lopes Jan 26, 2024
Collaborator Author

Answer selected by Jorge-Lopes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants