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

[Feature Request]: No need for both GRPC and Tendermint URLs #3901

Closed
ranlavanet opened this issue Oct 29, 2024 · 7 comments
Closed

[Feature Request]: No need for both GRPC and Tendermint URLs #3901

ranlavanet opened this issue Oct 29, 2024 · 7 comments
Labels
enhancement New feature or request external Issues created by non node team members

Comments

@ranlavanet
Copy link

ranlavanet commented Oct 29, 2024

Implementation ideas

Light node requires both grpc and tendermint URLs to be provided which is not necessary in cosmos.

github.com/cosmos/cosmos-sdk/client can be used by providing just the tendermint RPC endpoint.
Making it easier for the users to set up their client.

RunE: func(cmd *cobra.Command, args []string) error {
    clientCtx, err := client.GetClientTxContext(cmd)
    // any module query client
    <anymodule>.NewQueryClient(clientCtx)
    // as well as any tendermint rpc calls, for example status. 
    status, err := clientCtx.Client.Status(ctx)

Also, If you prefer to keeping the optionality to set up two endpoints, please allow the users to set up different URLs for both grpc and tendermint

I.E
Tendermint URL:
https://celestia.tendermint.rpc:443
gRPC URL:
celestia.grpc.rpc:443

currently the binary allows only port configuration while using the same IP address.

@ranlavanet ranlavanet added the enhancement New feature or request label Oct 29, 2024
@github-actions github-actions bot added the external Issues created by non node team members label Oct 29, 2024
@Wondertan
Copy link
Member

Unfortunately, that's not possible, as we still need the ability to fetch Block data, Commits, and Validator sets, and that's not accessible from GRPC.

We are working on moving necessary endpoints to GRPC to make it work with a single endpoint only, also avoiding the overhead JSON brings over the wire for big blocks

@ranlavanet
Copy link
Author

Tendermint can make "GRPC" calls internally using abci_query.

@Wondertan
Copy link
Member

These are only limited to App's state. It can't serve the data I listed above.

@Wondertan
Copy link
Member

Wondertan commented Oct 29, 2024

You can follow the development of the new required endpoints here: celestiaorg/celestia-core#1513

@Wondertan Wondertan closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 2024
@omerlavanet
Copy link

omerlavanet commented Oct 29, 2024

@Wondertan using only the tendermint api that can fetch block data AND app state using the query abci_query which is routed to the app via tendermint, it is possible to fetch all of the data, the code example provided shows how you can use the client query context to bring the status (which is a tendermint api call), this can also be used to create a grpc query client, it wraps the grpc server under tendermint with abci_query

to showcase this is possible you can see any cosmos cli including the celestia cli run queries and txs on the app when you provide only --node of tendermintrpc

@Wondertan
Copy link
Member

Wondertan commented Oct 29, 2024

@omerlavanet, It is possible to do almost* everything with TM's JSON RPC only. Our goal, on the other hand, is to make everything work over GRPC as JSON brings noticeable overhead. This change will land in a not-so-distant future, effectively resolving the unification you requested.

@Wondertan
Copy link
Member

JSON brings noticeable overhead

FYI, passing over 8mb blocks requires the Bridge Node to have at least 40GB of RAM, with 95% of allocations coming from JSON deserialization as per profiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request external Issues created by non node team members
Projects
None yet
Development

No branches or pull requests

3 participants