cosmos / chain-registry

Creative Commons Attribution 4.0 International
515 stars 1.24k forks source link

solving proto management with chain-registry #2524

Open pyramation opened 1 year ago

pyramation commented 1 year ago

re: https://twitter.com/pyramation/status/1666574876516442112?s=20

It seems that indexers, wallets, and explorers have the multi-chain issue of dealing with different versions of protos

While it would be nice if everyone used the same method, some are using git submodules, some are copy/pasting protos, and others are using buf.build or other methods.

Why not just store the git repos inside of chain-registry, and their respective git tags for the current production version, this would allow us to fetch protos of any chain, no matter how they store the protos! Thoughts?

cc @JeremyParish69 @sunnya97

e.g.

{
    "codebase": {
        "protos": {
            "cosmos-sdk": {
                "method": "raw-protos" //if not present, defaults to raw, but could also be "buf.build" or "git-submodules"
                "repo": "git@github.com:osmosis-labs/cosmos-sdk.git",
                "tag": "v0.45.0-rc1.0.20230703010110-ed4eb883f2a6"
            },
            "osmosis": {
                "repo": "git@github.com:osmosis-labs/osmosis.git",
                "tag": "v16.0.0"
            },
            "wasmd": {
                "repo": "git@github.com:CosmWasm/wasmd.git",
                "tag": "v0.31.0-osmo-v16"
            },
            "ibc-go": {
                "repo": "git@github.com:cosmos/ibc-go.git",
                "tag": "v.a.b.c"
            },
            "ics23": {
                "repo": "git@github.com:cosmos/ics23.git",
                "tag": "v0.x.y.z"
            }
        }
    }
}
jamesbayly commented 1 year ago

This would certainly help us locate and retrieve the latest protobuf files for decoding each new chain that SubQuery provides indexing support for