From the document, I should save data in the Multi-Index DB, I want to know: Does it mean the data is saved into the block chain if I save the data in the DB? If yes, how the data is saved into block chain from the DB? Is there tech detail to explain how this is done?
Thanks for your reply! I am still a little confusing about the relationship. We use smart contract by pushing actions, and action should use DB API to persistent its state to DB. Let's say I push an action and the action save its state to DB, but when the state/action is written to block chain? Is it written to block chain after some BP confirm the action?
From my understanding, the DB is an in-memory DB. If the machine that runs the DB crashed, how to restore the DB? replay all actions from the beginning? If it's true, this will be a very long time to restore the DB.