-
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: index genesis transactions #34
Conversation
Signed-off-by: Norman Meier <[email protected]>
cbfd80e
to
19c991f
Compare
Signed-off-by: Norman Meier <[email protected]>
19c991f
to
984b8a9
Compare
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Related to gnolang/gno#1941 |
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
@n0izn0iz |
agree, would simplify, was planning on doing that |
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
added tests in 763c68a |
Signed-off-by: Norman Meier <[email protected]>
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.
Please, check the tests. Mocks are used to simulate dependencies our system interacts with. This helps us focus on testing the real functionality without checking the mock itself.
To make sure our tests are testing what is needed, we need to test not just the happy path but also different possible errors. Here are some scenarios we should include:
- Remote Server Failure: What happens if the remote server fails? We need to make sure our system handles server issues properly.
- Genesis Retrieval Issues: What happens if the genesis data can’t be retrieved? This could be due to network problems, data corruption, or other issues.
- Unexpected Genesis Object Type: What happens if the genesis object is not the expected type? Type mismatches can cause unexpected behavior, so our tests should check how the system deals with this.
These scenarios are important, but we should also think of other possible cases to ensure our system is robust and reliable.
Signed-off-by: Norman Meier <[email protected]>
improved tests in 0a31d61 it helped me catch nil deref corner cases, thanks |
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.
Looking at the implementation now, I think we made a right choice in the relevant gno genesis PR 👍
I've left a few comments that should be addressed before we merge, but nothing groundbreaking 🙏
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
there is one remaining problem, maybe the indexer should ignore genesis result if the node returns the well known "height must be greater than 0" otherwise we can't index test4 anymore btw just saw that test3 returns "Height must be greater than 0" (yes the error message lost capitalization on "height" in test4) |
@n0izn0iz I'll fix up the tests on this branch 🙏 |
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 for the fixup 🙏
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.
Tested locally, it won't break current indexes.
Depends on gnolang/gno#1941