Closed YaDavid closed 6 years ago
SendTransaction is performed on the candidate block block_height which is passed in the ReadKeys interface.
Modified: Was Read state storage in send transaction. Add an interface to get the reference block height and to request read based on that height.
PublicApi.CallMethod will stop accessing BlockStorage directly and instead pass 0 as the block height for VirtualMachine.CallLocalMethod (this indicates last block that StateStorage has). VirtualMachine will access StateStorage and retrieve its latest block height (StateStorageLastestBlockHeight) and set it for the duration of the call
Committed, State Storage provides it's last committed block height and timestamp.
When a transaction queries the state for a specific piece of information, a block height must be indicated or else different nodes might get different results. Now, there are two complications: If StateStorage hasn't processed the indicated block, there has to be some delay until the transaction is processed. If StateStorage has already deleted the state related to the indicated block, the node must somehow fetch that state. (It seems that the amount of blocks that need to be kept in StateStorage matches the amount of time transactions are kept in the transaction pool.)
This is also relevant for CrosschainConnector queries.