Skip to content

Conversation

@bryanchriswhite
Copy link
Collaborator

@bryanchriswhite bryanchriswhite commented Jul 17, 2025

Summary

"Flatten" remaining event types with non-primitive members.

image

pocket.shared.Supplier

Reduced to the following fields:

  • supplier_operator_address
  • supplier_owner_address

pocket.application.Application

Reduced to the following fields:

  • application_address
  • stake (EventApplicationStaked ONLY)

pocket.gateway.Gateway

Reduced to the following fields:

  • gateway_address
  • stake (EventGatewayStaked ONLY)

Issue

Type of change

Select one or more from the following:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Sanity Checklist

  • I have updated the GitHub Issue Metadata: assignees, reviewers, labels, project, iteration and milestone
  • For docs: make docusaurus_start
  • For small changes: make go_develop_and_test and make test_e2e
  • For major changes: devnet-test-e2e label to run E2E tests in CI
  • For migration changes: make test_e2e_oneshot
  • 'TODO's, configurations and other docs

bryanchriswhite and others added 30 commits July 14, 2025 13:36
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)
* issues/1497/event-fields2:
  [Tokenomics] Adding `mint_equals_burn_claim_distribution` and revamping `tokenomics` module (#1618)
  fix: backwards compatible field indices
  [Disk Utilization] refactor: remove unnecessary Msg.*Response fields (#1670)
Copy link
Contributor

@red-0ne red-0ne left a 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.

Copy link
Collaborator

@Olshansk Olshansk left a 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

Copy link
Collaborator

@Olshansk Olshansk left a 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:

  1. @jorgecuesta and/or @Alann27 approve
  2. Tests pass

The chain size has grown a lot over the past 90 days and we need to revisit this problem.

Screenshot 2025-09-24 at 3 12 21 PM

@jorgecuesta @Alann27 I'm going to merge this ASAP (for release v0.1.30 in October) unless you have other concerns.

@jorgecuesta
Copy link
Contributor

Give us tomorrow to complete a full review and ensure indexer will not break

Changes LGTM as long as:

  1. @jorgecuesta and/or @Alann27 approve
  2. Tests pass

The chain size has grown a lot over the past 90 days and we need to revisit this problem.

Screenshot 2025-09-24 at 3 12 21 PM

@jorgecuesta @Alann27 I'm going to merge this ASAP (for release v0.1.30 in October) unless you have other concerns.

Alann27 added a commit to pokt-network/pocketdex that referenced this pull request Sep 25, 2025
@Olshansk
Copy link
Collaborator

Olshansk commented Oct 8, 2025

@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!

@Alann27
Copy link

Alann27 commented Oct 17, 2025

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.

@Olshansk
Copy link
Collaborator

@Alann27 Please approve this PR once you're done. It is blocked by your 👍

Alann27 added a commit to pokt-network/pocketdex that referenced this pull request Oct 20, 2025
jorgecuesta pushed a commit to pokt-network/pocketdex that referenced this pull request Nov 27, 2025
## Summary

Refactored some event handlers of applications, gateways and suppliers
to match the changes made to those events:
pokt-network/poktroll#1677
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. devnet devnet-test-e2e on-chain On-chain business logic push-image CI related - pushes images to ghcr.io

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

[Onchain] Cap Disk Utilization Growth Rate

7 participants