Open mversic opened 1 month ago
My point was that if we introduce query validation, we need to be careful what CommonState
each validate_query
is based on. There are SmartContract
Trigger
ExecuteTransaction
ExecuteInstruction
Migrate
ValidateQuery
states and for example, by-call trigger executions seems to validate_query
as ExecuteTransaction
After #5151 current block header was introduced into every smart contract executor. For free queries (coming over HTTP) there is no current block so latest block header was used. However, it was incorrectly assumed that this is the case for all queries. For queries executed from a transaction (like from a wasm) there is a current block and it's header should be given to
validate_query
entrypoint instead of latest block header