Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow gRPC clients codegen #441

Open
dimazhornyk opened this issue Oct 14, 2024 · 0 comments
Open

Allow gRPC clients codegen #441

dimazhornyk opened this issue Oct 14, 2024 · 0 comments
Assignees

Comments

@dimazhornyk
Copy link

dimazhornyk commented Oct 14, 2024

Hey! As gRPC is the main protocol used by Celestia, you need a client code to be generated for a .proto definitions (something like this).

The only way to achieve it now is to store all the proto files in any Celestia client implementation, which is a bit unnecessary, especially taking into account that you have a great celestia-proto package that could cover that.

Here is how it is done in Astria's codebase, it would be great if there was an opportunity to do something similar with celestia-proto using a feature flag. It doesn't necessarily have to be tonic and tonic_build, but those are kind of standard, so using them makes the most sense.

Also, here is the minimal list of methods required for a client, I don't remember which exactly, but some of the files weren't included in the list that you compile here:

use super::{
    celestia_proto::{
        query_client::QueryClient as BlobQueryClient, MsgPayForBlobs,
        QueryParamsRequest as QueryBlobParamsRequest,
    },
    cosmos::{
        auth::{
            query_client::QueryClient as AuthQueryClient, BaseAccount, QueryAccountRequest,
            QueryParamsRequest as QueryAuthParamsRequest,
        },
        base::{
            node::{
                service_client::ServiceClient as MinGasPriceClient,
                ConfigRequest as MinGasPriceRequest,
            },
            v1beta1::Coin,
        },
        crypto::secp256k1,
        tx::v1beta1::{
            mode_info::{Single, Sum},
            service_client::ServiceClient as TxClient,
            AuthInfo, BroadcastMode, BroadcastTxRequest, Fee, GetTxRequest, ModeInfo, SignDoc,
            SignerInfo, Tx, TxBody,
        },
    },
    tendermint::types::{Blob as PbBlob, BlobTx},
};
@fl0rek fl0rek self-assigned this Oct 17, 2024
@zvolin zvolin added this to Lumina Nov 18, 2024
@zvolin zvolin moved this to Todo in Lumina Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants