fix: rename jsonCodec to avoid overriding gRPC default proto codec#9
Open
envestcc wants to merge 1 commit intoiotexproject:mainfrom
Open
fix: rename jsonCodec to avoid overriding gRPC default proto codec#9envestcc wants to merge 1 commit intoiotexproject:mainfrom
envestcc wants to merge 1 commit intoiotexproject:mainfrom
Conversation
The coordinator's codec was renamed from "proto" to "ioswarm-json" to avoid overriding gRPC's default protobuf codec. This client must use the same codec name for interoperability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renamed the jsonCodec from
"proto"to"ioswarm-json"to avoid globallyoverriding gRPC's default protobuf codec.
Problem
The previous implementation registered a JSON codec with the name
"proto", whichoverwrote gRPC's default protobuf codec globally. This caused all gRPC services in
the same process to use JSON encoding instead of protobuf, breaking compatibility
with standard gRPC clients.
Solution
Changed the codec name from
"proto"to"ioswarm-json":Changes
codec.go: ChangedjsonCodec.Name()return value from"proto"to"ioswarm-json"Related
This PR should be merged together with the coordinator fix in iotex-core.