add History storable struct and encode/decode
Add storable flow structure