Skip to content

Add a way to customize SubscriptionId generation #599

@librelois

Description

@librelois

I started to migrate the codebase of frontier on jsonrpsee based on the branch polkadot-jsonrpsee-v0.9.13 and I notice that jsonrpsee lacks an essential feature that makes it impossible to use it in frontier: the possibility to customize the way to generate SubscriptionId.

Indeed, frontier must reproduce the ethereum RPC api with accuracy, this includes providing SubscriptionId in string form with 16 bytes in hexadecimal representation prefixed by "0x".

Frontier currently uses jsonrpc, which allows custom generation of subscription ids with the with_id_provider function: https://github.com/paritytech/jsonrpc/blob/609d7a6cc160742d035510fa89fb424ccf077660/pubsub/src/manager.rs#L154

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