Skip to content

Bump gowaves#544

Merged
nickeskov merged 2 commits intomainfrom
bump-gowaves
Apr 28, 2026
Merged

Bump gowaves#544
nickeskov merged 2 commits intomainfrom
bump-gowaves

Conversation

@nickeskov
Copy link
Copy Markdown
Collaborator

No description provided.

Created new 'StateHash' structure because 'proto.StateHash' now is an
interface. Tests added.
@nickeskov nickeskov added enhancement New feature or request dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Apr 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the codebase to work with the bumped github.com/wavesplatform/gowaves dependency by moving state-hash handling from gowaves/pkg/proto into a local entities.StateHash type with compatible JSON encoding.

Changes:

  • Bump github.com/wavesplatform/gowaves to v0.11.1 and refresh indirect deps in go.mod/go.sum.
  • Introduce entities.StateHash with custom JSON marshal/unmarshal (keys blockId / stateHash) and migrate usages from proto.StateHash.
  • Update scraper, storage, API parsing, alert structures, and tests to use entities.StateHash.

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/storing/events/events_test.go Update tests to build/compare entities.StateHash instead of proto.StateHash.
pkg/storing/events/events.go Change StateHashAtHeight return type to entities.StateHash and drop proto import.
pkg/scraping/client.go Convert debug state-hash response into entities.StateHash.
pkg/messaging/pair/responses.go Switch response DTO field type to *entities.StateHash.
pkg/entities/statements_test.go Add JSON compatibility tests for entities.StateHash vs gowaves state-hash JSON.
pkg/entities/statements.go Add entities.StateHash type + JSON marshal/unmarshal; update NodeStatement.StateHash type.
pkg/entities/events.go Update StateHashEvent to store/return *entities.StateHash.
pkg/entities/alerts_test.go Add JSON round-trip test for empty StateHashAlert.
pkg/entities/alerts.go Replace proto.StateHash with entities.StateHash in state-hash alert payloads.
pkg/api/api.go Parse incoming state hash into *entities.StateHash and pass into events.
pkg/analysis/finders/fork_finder_test.go Update finder tests to use entities.StateHash.
pkg/analysis/finders/fork_finder.go Change state-hash finder APIs to return entities.StateHash.
pkg/analysis/criteria/state_hash_test.go Update criterion tests to use entities.StateHash.
pkg/analysis/criteria/base_target_test.go Update test struct field type to *entities.StateHash.
pkg/analysis/analyzer_test.go Update analyzer tests to use entities.StateHash.
cmd/bots/internal/bots/templates_internal_test.go Update template tests to use entities.StateHash.
go.mod Bump gowaves + adjust indirect requirements.
go.sum Update sums for bumped/added dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nickeskov nickeskov merged commit 1a89c0c into main Apr 28, 2026
18 checks passed
@nickeskov nickeskov deleted the bump-gowaves branch April 28, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement New feature or request go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants