Update jsonrpsee to v0.21#707
Conversation
|
|
||
| # websocket dependent features | ||
| jsonrpsee = { version = "0.16", optional = true, features = ["async-client", "client-ws-transport", "jsonrpsee-types"] } | ||
| jsonrpsee = { version = "0.21", optional = true, features = ["async-client", "client-ws-transport-native-tls", "jsonrpsee-types"] } |
There was a problem hiding this comment.
This is less on this PR but a general question: It seems wrong to me, that we explicitly reference the different websocket libraries here. This does mean, that I have to include tungstenite, even when I'm using the api client with jsonrpsee. Is this correct?
On the specific code here: What if I want to use the api client with jsonrpsee, but without the native-tls feature? As far as I understand, there's no reason to not allow this. But it seems to be prevented by this.
There was a problem hiding this comment.
This does mean, that I have to include tungstenite, even when I'm using the api client with jsonrpsee. Is this correct?
No, that is not correct. The dependency imports of the rpc-clients are optional and only included if the correspondent feature is chosen.
What if I want to use the api client with jsonrpsee, but without the native-tls feature? As far as I understand, there's no reason to not allow this. But it seems to be prevented by this.
Do you have something in mind? We could forward the features of the jsonrpsee client, but that would mean more features on our side, I believe… or is there a way around it?
Or we could allow that the user constructs his/her own jsonrpsee client and just wraps our wrapper struct around it: https://github.com/scs/substrate-api-client/blob/master/src/rpc/jsonrpsee_client/mod.rs#L30-L33:
// Something like this:
let jsonrpsee_client = ClientBuilder::default()
.max_buffer_capacity_per_subscription(4096)
.build_with_tokio(tx, rx);
let api_client = JsonrpseeClient { inner: Arc::new(client) };There was a problem hiding this comment.
Actually, I'm not sure if my first approach would work as long as we are constructing our own jsonrpsee-client.
masapr
left a comment
There was a problem hiding this comment.
After our discussion and the new PR I think it's fine. Thank you!
|
|
||
| # websocket dependent features | ||
| jsonrpsee = { version = "0.16", optional = true, features = ["async-client", "client-ws-transport", "jsonrpsee-types"] } | ||
| jsonrpsee = { version = "0.21", optional = true, features = ["async-client", "client-ws-transport-native-tls", "jsonrpsee-types"] } |
fix clippy add call_raw and automatic decoding add missing await use vec instead of option readd Option once again add some runtime api calls and first test add authority test fix build fix no-std build fix build fix result return values remove unnecessary result return add finalize block add core runtime api fix build add RutimeApiClient for clear distinguishion add transaction, staking , mmr and session_keys api fix build fix build fix clippy fix naming of session keys function add mmr tests add session key tests fix no-std error by defining types by self for now add sakintapi test and fix fix build fix tets update tests add runtime api example update README add example of self creation of call add metadata decoding add list functions add some nice printing fix build remove mmr fix async build update jsonrspee to v21 (#707)
fix clippy add call_raw and automatic decoding add missing await use vec instead of option readd Option once again add some runtime api calls and first test add authority test fix build fix no-std build fix build fix result return values remove unnecessary result return add finalize block add core runtime api fix build add RutimeApiClient for clear distinguishion add transaction, staking , mmr and session_keys api fix build fix build fix clippy fix naming of session keys function add mmr tests add session key tests fix no-std error by defining types by self for now add sakintapi test and fix fix build fix tets update tests add runtime api example update README add example of self creation of call add metadata decoding add list functions add some nice printing fix build remove mmr fix async build update jsonrspee to v21 (#707)
* add state_call to rpc api fix clippy add call_raw and automatic decoding add missing await use vec instead of option readd Option once again add some runtime api calls and first test add authority test fix build fix no-std build fix build fix result return values remove unnecessary result return add finalize block add core runtime api fix build add RutimeApiClient for clear distinguishion add transaction, staking , mmr and session_keys api fix build fix build fix clippy fix naming of session keys function add mmr tests add session key tests fix no-std error by defining types by self for now add sakintapi test and fix fix build fix tets update tests add runtime api example update README add example of self creation of call add metadata decoding add list functions add some nice printing fix build remove mmr fix async build update jsonrspee to v21 (#707) * rename authority_discovery to authorities * use Bytes instead of Vec<u8> * fix clippy
closes #702