Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE migrate codebase to jsonrpsee #534

Conversation

librelois
Copy link
Contributor

Draft migration from jsonrpc to jsonrpsee.

@librelois librelois changed the title DO NOT MERGE migrate codebase to jsonrpsee (template not compile yet) DO NOT MERGE migrate codebase to jsonrpsee Dec 9, 2021
@librelois
Copy link
Contributor Author

jsonrpsee is missing a feature needed to implement the ethereum rpc api, so we are stuck until it is added: paritytech/jsonrpsee#599

@niklasad1
Copy link
Contributor

@librelois I think you should be unblocked now, the APIs differ a bit from the jsonrpc crate, you need to configure that subscription ID generation here before starting the server

let fut = async move {
stream
.take_while(|item| {
std::future::ready(sink.send(&item).map_or_else(
Copy link
Contributor

@niklasad1 niklasad1 Feb 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the stream API instead

this might leak if the stream never terminates see paritytech/jsonrpsee#627

@librelois
Copy link
Contributor Author

librelois commented Feb 5, 2022

Thanks @niklasad1, I plan to resume this integration (taking into account your remarks), as soon as we have a polkadot-jsonrpsee-v0.9.16 branch on the substrate repository, or jsonrpsee will be merged in substrate master :)

@niklasad1
Copy link
Contributor

https:/paritytech/substrate/tree/jsonrpsee-polkadot-v0.9.16

jsonrpsee will not be merged into master until polkadot v0.9.19

@librelois
Copy link
Contributor Author

https:/paritytech/substrate/tree/jsonrpsee-polkadot-v0.9.16

Thank, I'll use this branch :)

@librelois
Copy link
Contributor Author

@niklasad1 the substrate branch jsonrpsee-polkadot-v0.9.16 not include the API to configure the subscription ID generation, so we still stuck for now.

@niklasad1
Copy link
Contributor

@librelois

It should be, can't you use https:/paritytech/substrate/blob/jsonrpsee-polkadot-v0.9.16/client/service/src/config.rs#L103 or am I missing something?

@librelois
Copy link
Contributor Author

It should be, can't you use https:/paritytech/substrate/blob/jsonrpsee-polkadot-v0.9.16/client/service/src/config.rs#L103 or am I missing something?

I'm sorry, it's because I had checked the branch 10 days ago when you told me, I didn't expect it to be updated in the meantime.

@librelois
Copy link
Contributor Author

Ok, for frontier it's good, but for moonbeam we also need a branch like jsonrpsee-v0.9.16 on the polkadot repository :)

@niklasad1
Copy link
Contributor

Ok, for frontier it's good, but for moonbeam we also need a branch like jsonrpsee-v0.9.16 on the polkadot repository :)

I guess that you need to update all substrate and polkadot deps in another branch for moonbeam along with some glue code but can't you do this yourself or please elaborate why it has to be in the polkadot repo?

@librelois
Copy link
Contributor Author

Ok, for frontier it's good, but for moonbeam we also need a branch like jsonrpsee-v0.9.16 on the polkadot repository :)

I guess that you need to update all substrate and polkadot deps in another branch for moonbeam along with some glue code but can't you do this yourself or please elaborate why it has to be in the polkadot repo?

All parachains based on polkadot v0.916 need such a branch to test jsonrpsee. You had made one for v0.9.13: https:/paritytech/polkadot/tree/jsonrpsee-0.9.13

@niklasad1
Copy link
Contributor

niklasad1 commented Feb 17, 2022

Sorry my bad there is already such branch: https:/paritytech/polkadot/tree/jsonrpsee-v0.9.16

EDIT: I misunderstood I thought you meant something else :)

@sorpaas
Copy link
Member

sorpaas commented May 11, 2022

This looks staled. I'm going to close it. Feel free to open a new PR when it's ready.

@sorpaas sorpaas closed this May 11, 2022
@librelois
Copy link
Contributor Author

Yes too many things have changed since then, I started over on a new branch, the PR is here: #695

It's not ready yet but I'm working on it, I hope to finish tomorrow.

@librelois librelois deleted the polkadot-jsonrpsee-v0.9.13 branch May 19, 2022 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants