-
Notifications
You must be signed in to change notification settings - Fork 25
[Disk Utilization] Flatten remaining events #1677
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
base: main
Are you sure you want to change the base?
Conversation
Add new subcommand to identify Event messages with non-primitive fields that negatively impact disk utilization in Cosmos SDK applications. Features: - Detects all protobuf messages starting with "Event" - Flags non-primitive fields (message types, repeated, maps, oneofs) - Provides detailed reporting with file paths and line numbers for IDE integration - Comprehensive test suite with multiple scenarios - Graceful handling of import dependencies Usage: go run ./tools/scripts/protocheck/cmd event-fields 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
After converting cosmos.base.v1beta1.Coin fields to string fields in event protobuf messages, updated all corresponding Go code to use .String() method when creating event instances and updated tests to compare string values instead of Coin pointers. Changes: - Updated migration, proof, and tokenomics keeper event emission - Fixed all test files to compare string representations - Temporarily disabled EventSupplierServiceConfigActivated emission - Updated integration tests for migration events 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Added check_proto_event_fields target to makefiles/checks.mk that runs the event-fields protocheck tool to identify Event messages with non-primitive fields. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Updated the event-fields protocheck tool to group violations by offending field type instead of by message. This provides more actionable output by showing patterns and helping prioritize which types to refactor first. Output now shows: - pocket.proof.Claim: 9 Event messages (most common) - pocket.application.Application: 9 Event messages - pocket.shared.Supplier: 6 Event messages - pocket.gateway.Gateway: 4 Event messages 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Replace log package with global logger.Logger and add command examples. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Remove claim fields from supplier and tokenomics events - Update EventProofValidityChecked to use session_id and supplier_operator_address instead of claim - Update EventClaimSettled to use session_id and supplier_operator_address instead of claim - Update EventSupplierServiceConfigActivated to use operator_address and service_id instead of supplier - Fix corresponding test assertions to match new event structure - Add cosmos_proto import to proof event.proto for address validation - Regenerate protobuf files 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* pokt/main: [Disk Utilization] refactor: remove unnecessary Msg.*Response fields (#1670)
* pokt/main: [Tokenomics] Adding `mint_equals_burn_claim_distribution` and revamping `tokenomics` module (#1618)
red-0ne
left a comment
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.
Fixed some tests and proto indexs.
Olshansk
left a comment
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.
@Alann27 Can you please review this PR.
We'll include it in v0.1.30.
I'll take a deep dive after making sure it works for the poktscan team.
--
cc @jorgecuesta for visibility
Olshansk
left a comment
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.
Changes LGTM as long as:
- @jorgecuesta and/or @Alann27 approve
- Tests pass
The chain size has grown a lot over the past 90 days and we need to revisit this problem.
@jorgecuesta @Alann27 I'm going to merge this ASAP (for release v0.1.30 in October) unless you have other concerns.
|
Give us tomorrow to complete a full review and ensure indexer will not break
|
…s to match the changes made to those events: pokt-network/poktroll#1677
|
@Alann27 @jorgecuesta @RawthiL We're going to be merging this in tomorrow. Let us know if this is an issue now or forever hold your peace! |
|
I've tested some of the events in this pull request and will be testing the rest today. I believe the changes in the Pocketdex PR include all the necessary support for your changes. |
|
@Alann27 Please approve this PR once you're done. It is blocked by your 👍 |
…s to match the changes made to those events: pokt-network/poktroll#1677
## Summary Refactored some event handlers of applications, gateways and suppliers to match the changes made to those events: pokt-network/poktroll#1677
Summary
"Flatten" remaining event types with non-primitive members.
pocket.shared.SupplierReduced to the following fields:
supplier_operator_addresssupplier_owner_addresspocket.application.ApplicationReduced to the following fields:
application_addressstake(EventApplicationStakedONLY)pocket.gateway.GatewayReduced to the following fields:
gateway_addressstake(EventGatewayStakedONLY)Issue
Type of change
Select one or more from the following:
Sanity Checklist
assignees,reviewers,labels,project,iterationandmilestonemake docusaurus_startmake go_develop_and_testandmake test_e2edevnet-test-e2elabel to run E2E tests in CImake test_e2e_oneshot