Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

RPC: Extrinsic submission & inclusion notification pub/sub #134

Closed
@gavofyork

Description

Websockets/pub-sub RPCs should be expanded to allow RPC clients to submit extrinsics and get full lifetime notifications of them.

  • -> author_submitExtrinsic(xt: Vec<u8>) -> Result<ExtrinsicHash, Error>
  • <- author_extrinsicUpdate(xt: ExtrinsicHash, status: Status)

Error may be:

  • InvalidFormat (i.e. it's plain old invalid and will never become valid)
  • Dead (i.e. it was once valid but has now become invalid)
  • Immature (i.e. it's currently invalid and while it may become valid at some point, that's too far ahead to care about)
  • PoolFull (i.e. there's no room at the inn)
  • AlreadyKnown If we already know about it but yet it's valid for inclusion, then it's not an error - we carry on as before and trace the pre-existing extrinsic instead.

Status may be:

  • Finalised(BlockHash) (it's finalised and all is well)
  • Usurped(ExtrinsicHash) (some state change (perhaps another extrinsic was included) rendered this extrinsic invalid)
  • Broadcast(Vec<PeerId>) (it has been broadcast to the given peers) version 2.0 only

Metadata

Assignees

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