Skip to content

HTTP transaction submit API #2107

@HinsonSIDAN

Description

@HinsonSIDAN

Description

Currently websocket is the only way to submit transaction to hydra node, while it works, it creates software overhead to client & toolings (e.g. sdks). Suggest to create a http tx submission API

Suggested solution

Suggested to create an API for http transaction submit with same behaviour as any L1 provider tx submission (like blockforst). Hydra specific suggestion:

  • Return a txHash as response if the transaction is TxValid and accepted to the mempool
  • Not exactly have to wait for snapshot confirm

Alternative

It is also possible to:

  • Return a txHash as response if the transaction is TxValid + SnapshotConfirmed
  • While it might not be commonplace for L1 provider as it takes long time to be included in blocks in general, it has much faster response on confirming in snapshot of hydra technically, so make this alternative possible

If that's evaluated to be also a good idea, suggest to provide both options:

  • http tx submit, response on TxValid
  • http tx submit, response on SnapshotConfirmed

So for different users, they can choose which one to use.

Additional context

No response

Metadata

Metadata

Assignees

Labels

💬 featureA feature on our roadmapgood first issueHighlight opportunities for people to contribute to the projectgreen 💚Low complexity or well understood feature

Projects

Status

Done ✔

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions