-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: add query IDs filter #87
Conversation
Thanks, we'll review it shortly! |
@sotnikov-s Thanks for your thorough reviews :). Changes have been made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you very much! we'll test the feature and get back to you with more info
The filter works great! I used test_kv_query script to create several smart-contracts, each with a registered interchain query. After that, I've checked the filter with different combinations of the received smart-contract addresses and query IDs. And every time I got the expected result. For example, let's say we have the following:
============================================================================================ For envs set as:
or
or
ICQ processes queries with ID="1" and ID="2" ============================================================================================ For envs set as:
or
ICQ processes only the query with ID="1" ============================================================================================ For envs set as:
or
ICQ processes only the query with ID="2" ============================================================================================ |
@joldie777 Thank you for your test and feeback! The procedure and the test cases are very concise and easy to reproduce. And we are delighted to contribute to Neutron eco! |
@dcb9 Thank you for your contribution! |
The PR looks great, thanks! But could you add a simple unit test to cover new functionality?
Also please the documentation |
Hi @pr0n00gler here is the PR for doc neutron-org/neutron-docs#171 |
Thx, the doc PR is approved!
No, just a basic unit test that covers a functionality you introduced (that some queries are being filter out basically). We are going to cover almost everything with unit tests and these PRs is a good start for that |
We've merged the PR, so you can just merge main into your branch and implement the test! |
Unit tests added, and it works perfectly! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for such a delayed response and thank you very much for contribution!
Currently relayer handles all queries in specified smart contracts, but that is not enough in some circumstances, such as in a big SaaS project, users may only want to relay for specific queries in the contracts. This feature complements to
RELAYER_REGISTRY_ADDRESSES
to further filter out messages being processed.If the PR is approved I'll update the doc accordingly.