Conversation
* frc42 & 46 * verifreg * verifiedClient * feat: deals parsing template * feat: add parsing of storage deals proposals * feat: add dealIds to miner sector data * removeVerifiedClient * feat: conditional version * parser: add verifiers and clients * universalHook * feat: impl. ParseDealsEvent on parserV1 * refactor: move common methods to diff. pkg * test: update utils tests * fix: lint * refactor: move common methods to diff. pkg * feat: parse deal space/weight info and activations * fix: refactor struct names * fix: use correct return type * fix: remove unused metrics * deals * fix: parsing bugs * fix: parsing bugs * fix: activation parsing bugs * fix: lint * fix: test case * fix: build * fix: metadata parsing * fix: rm unused code * fix: fix universal receiver hook parsing * fix: lint * fix: lint and rm unused code * fix: rm md file * feat: add provider address to deal and addr consolidation * fix: build * chore: go mod tidy * fix: frc46 token parsing * fix: remove verifier field * fix: lint * fix: missing params --------- Co-authored-by: Eric Mokaya <emagembe@gmail.com>
* frc42 & 46 * verifreg * verifiedClient * feat: deals parsing template * feat: add parsing of storage deals proposals * feat: add dealIds to miner sector data * removeVerifiedClient * feat: conditional version * parser: add verifiers and clients * universalHook * feat: impl. ParseDealsEvent on parserV1 * refactor: move common methods to diff. pkg * test: update utils tests * fix: lint * refactor: move common methods to diff. pkg * feat: parse deal space/weight info and activations * fix: refactor struct names * fix: use correct return type * fix: remove unused metrics * deals * fix: parsing bugs * fix: parsing bugs * fix: activation parsing bugs * fix: lint * fix: test case * fix: build * fix: metadata parsing * fix: rm unused code * feat: add DataCap events parsing support Implement comprehensive DataCap token and allowance event parsing: - Add DataCapEvents parser to track token mints, transfers, burns, and allowances - Support all DataCap token methods (mint, destroy, transfer, burn, increase/decrease/revoke allowance) - Track token balances and allowance states for addresses - Integrate with v1/v2 parser factory pattern * fix: comments * fix: field names * fix: field names * fix: merge * fix: merge * chore: go mod tidy * feat: add addr consolidation * fix: lint --------- Co-authored-by: Julian Toledano <jtoledanodiaz@gmail.com>
There was a problem hiding this comment.
Summary of Changes
Hello @ziscky, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request represents a significant update, primarily focused on enhancing the parsing capabilities for various events within the system. It introduces new modules for handling Verified Registry and DataCap events, allowing for more detailed and structured extraction of information from these critical operations. The changes include the addition of new data structures, custom serialization/deserialization logic for specific data types, and the integration of these new parsing functionalities into the main parser. Furthermore, it includes minor refactorings for improved code clarity and new utility functions for address consolidation.
Highlights
- Expanded Event Parsing: This pull request introduces comprehensive parsing capabilities for Verified Registry and DataCap events. New event generators and associated data structures have been added, and the main parser factory has been updated to integrate these new functionalities.
- Refactored Parameter Naming: The internal naming of
removeDataCapParamsandremoveDataCapReturnmaps inactors/v2/verifiedRegistry/params.gohas been updated toremovedVerifiedClientDataCapParamsandremovedVerifiedClientDataCapReturnrespectively, improving code readability and consistency. - Custom CBOR Unmarshaling: New custom CBOR unmarshaling logic has been implemented for
AllocationRequestsandFRC46TokenParamsto correctly handle specific data formats, particularly addressing theProviderfield in NV17. - New JSON Parsing Functions: Two new methods,
ParseAllocationRequestsParamsToJSONandParseFRC46ParamsToJSON, have been added toactors/v2/verifiedRegistry/verifiedRegistry.goto facilitate the conversion of these complex data structures into JSON. - Address Consolidation Utilities: Utility functions
ConsolidateIDAddressandConsolidateAddresswere added totools/common/utils.go. These functions enable the consolidation of ID addresses and robust addresses, enhancing address handling and consistency across the system.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request introduces significant new functionality for parsing datacap and verified registry events. The changes are extensive, adding new event generators, types, and parsing logic across multiple packages.
While the overall structure is sound, I've identified a critical bug in the verifiedRegistry parameters that could lead to incorrect parsing of transaction return values. Additionally, there are several opportunities to improve code quality and maintainability by reducing code duplication and using more robust programming patterns. I've provided specific suggestions for these improvements in the review comments.
🔗 zboto Link