Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transactional queries execution context #5171

Open
mversic opened this issue Oct 20, 2024 · 1 comment
Open

Transactional queries execution context #5171

mversic opened this issue Oct 20, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@mversic
Copy link
Contributor

mversic commented Oct 20, 2024

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

@s8sato
Copy link
Contributor

s8sato commented Oct 21, 2024

context

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants