Register historical nested pulsar types for tx queries - #985
Closed
zale144 wants to merge 2 commits into
Closed
Conversation
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Architecture diagram
sequenceDiagram
participant App as Allora Chain Application
participant Registry as gogoproto Global Registry
participant Client as Client (REST/gRPC)
participant SDK as Cosmos SDK Tx Service
participant UnknownProto as unknownproto Utility
participant DB as State DB / Indexer
Note over App, Registry: Application Startup
App->>Registry: NEW: init() registers emissions.v9.* types
App->>Registry: Register emissions.v10.* types (Current)
Note over Client, DB: Runtime: Historical TX Query Flow
Client->>SDK: GET /cosmos/tx/v1beta1/txs (Historical Height)
SDK->>DB: Fetch raw Protobuf bytes
DB-->>SDK: v9 encoded transaction bytes
SDK->>UnknownProto: RejectUnknownFieldsStrict(bytes, v9Type)
loop For each nested field in payload
UnknownProto->>Registry: CHANGED: MessageType("emissions.v9.InputWorkerDataBundle")
alt Type found in registry
Registry-->>UnknownProto: Return v9 Go type definition
UnknownProto->>UnknownProto: Continue recursive walk
else Type missing (Pre-PR Failure)
Registry-->>UnknownProto: nil
UnknownProto-->>SDK: Error: "failed to retrieve message of type..."
end
end
alt Walk Successful
UnknownProto-->>SDK: Validation passed
SDK-->>Client: 200 OK (Decoded JSON Response)
else Validation Failed
SDK-->>Client: 500 Internal Server Error
end
Note over Client, Registry: Runtime: New TX Flow
Client->>SDK: Broadcast v10 Transaction
SDK->>Registry: MessageName(v10StructInstance)
Registry-->>SDK: "emissions.v10.InputWorkerDataBundle"
Note over SDK: Encodes using latest v10 schema (Unchanged)
After the v10 proto bump, unknownproto could not resolve emissions.v9.InputWorkerDataBundle (and OptionalParams) when decoding pre-upgrade txs, because only the v10 gogo names were registered. Co-authored-by: Cursor <cursoragent@cursor.com>
…eries. Co-authored-by: Cursor <cursoragent@cursor.com>
zale144
force-pushed
the
alek/fix-v9-inputworker-gogo-registry
branch
from
August 21, 2026 17:14
08da511 to
8a8f164
Compare
Contributor
Author
|
closing in favor of #986 |
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
/cosmos/tx/v1beta1/txsfailed to decode pre-upgrade payloads:unknownprotolooks up nested (non-Any) fields in the gogo registry, butx/emissions/typesnow registers those names asemissions.v10.*.mint.v1beta1.Params). These are distinct Go types from the live gogo structs, so new txs still encode as v10 / mint v5.v0.17.1(release-v0.17.1).Test plan
go test ./x/emissions/api/emissions/v2/ ./x/emissions/api/emissions/v3/ ./x/emissions/api/emissions/v9/ ./x/mint/api/mint/v1beta1/GET /cosmos/tx/v1beta1/txs?query=tx.height=...returns worker txs instead of the parse error