Skip to content

Move or remove the mutex on the application when applicable  #2329

@evan-forbes

Description

@evan-forbes

Currently, comet holds a mutex for each ABCI call

  • func (app *localClient) CheckTx(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) {
    app.mtx.Lock()
    defer app.mtx.Unlock()
    return app.Application.CheckTx(ctx, req)
    }

For obvious reasons, this is terrible. We cannot process txs in the mempool while PrepareProposal, ProcessProposal, or FinalizeBlock is being called. Even RPC queries can holdup consensus as we utilize the Query method to generate inclusion proofs.

In theory, most of these we should be able to remove. The extent of work that is required to make this doable is TBD. afaik, this lock has always been included in comet. Some projects such as SEI have removed it

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions