State management #356
Unanswered
aphexmunky
asked this question in
Q&A
Replies: 1 comment
-
The orders are stored on-chain, so each node should return the same version of the order book. The version in the controller is a memory-based data structure to make it efficient to serve over RPC (which is only updated on Accept). It is important to note that the controller does not have the ability to write to "state" but rather keeps a separate DB for storing metadata (like tx hashes). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I see the state is stored and managed from the actions. There is also state created in the controller. Am i right in thinking that this is transient and potentially each node could return different versions of the order book or is the accepted code guaranteed to execute for each transaction?
hypersdk/examples/tokenvm/controller/controller.go
Lines 191 to 194 in 95942cc
Beta Was this translation helpful? Give feedback.
All reactions