Skip to content

Wait for txs to be included before returning response in celestia-grpc-client #332

@damiannolan

Description

@damiannolan

Description

The celestia-grpc-client crate does not wait for txs to be included and thus just returns immediately with a success = true value and a tx hash. This is indicative of how the underlying client is used, since transactions are broadcast asynchronously.
The sync broadcast mode has been removed from cosmos-sdk blockchain for quite a while and therefore the normal approach here is to poll the node using the txHash from the initial request, until a fulfilled response is returned.

The response is currently returned here: https://github.com/celestiaorg/celestia-zkevm/blob/main/crates/celestia-grpc-client/src/client.rs#L120-L126
Note the hardcoded success value and gasUsed.

An option here is to support two approaches:

  • client.send_tx() - polls for the fulfilled response when included in a block
  • client.send_tx_async() - maintains the current behaviour but adds a flag in the response to indicate async

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions