upgrade: update to chainflip-monthly-2022-06#2061
Conversation
| // This occurs when a transaction with the same nonce is in the transaction pool (and the priority is | ||
| // <= priority of that existing tx) | ||
| RpcError::JsonRpcError(Error { | ||
| // this is the error returned when the "priority is too low" i.e. nonce is too low |
There was a problem hiding this comment.
would like to keep something in the comment about "priority is too low" since this is the message that might be seen in the logs.
There was a problem hiding this comment.
It has passed all unit tests...
About comment @kylezs, will sort it out now. It seemed to me that both comments were saying the same thing, ie. the one above and below were referring to the same error case. Will clarify that a bit.
There was a problem hiding this comment.
Actually, looking at it again, the comments to seem to be duplicates of each other, and the doc string of InvalidTransaction::Stale also contains the same information. Gonna leave as is, seems clear enough to me.
| // This occurs when the nonce has already been *consumed* i.e a transaction with that nonce | ||
| // is in a block | ||
| RpcError::JsonRpcError(Error { | ||
| // this is the error returned when the "transaction is outdated" i.e. nonce is too low |
There was a problem hiding this comment.
Same situation - this comment just says the same as the one above, in a slightly different manner.
|
Just to check, I'm leaving the review until the polkadot.js issue is understood? As discussed. If you still want the review done now anyway, just let me know. |
|
Thanks - yes you can leave it for now, I want to dig into why the api is inaccessible when deployed on a testnet. FWIW it works fine when I run it locally. |
|
(And I need to rebase it again.) |
Mainly: - adapt remaining dependencies: jsonrpsee, libp2p On the CFE: - use jsonrpsee throughout - adapt error conversions In the runtime: - replace uses of generate_storage_alias! with #[storage_alias] - remove_prefix is deprecated
772516d to
4dfad22
Compare
| // This occurs when a transaction with the same nonce is in the transaction pool (and the priority is | ||
| // <= priority of that existing tx) | ||
| RpcError::JsonRpcError(Error { | ||
| // this is the error returned when the "priority is too low" i.e. nonce is too low |
| ); | ||
| struct Pallet; | ||
|
|
||
| impl StorageInstance for Pallet { |
There was a problem hiding this comment.
Good question - I thought I had to implement this trait manually but in fact it's taken care of by the storage_alias macro. Will delete it.
utilities/Cargo.toml
Outdated
| anyhow = {version = '1.0', optional = true} | ||
| jsonrpc-core = {version = "18.0.0", optional = true} | ||
| jsonrpc-core-client = {version = '18.0.0', optional = true} | ||
| jsonrpsee = { version = "0.13.0", optional = true, features = ["client"] } |
There was a problem hiding this comment.
I don't believe this dependency is still needed
| sparse_finalized_block_header_stream.next().await.unwrap()?; | ||
|
|
||
| let chain_rpc_client = state_chain_rpc_client.chain_rpc_client.clone(); | ||
| let chain_rpc_client = state_chain_rpc_client.rpc_client.clone(); |
There was a problem hiding this comment.
Prob should rename this variable to rpc_client.
AlastairHolmes
left a comment
There was a problem hiding this comment.
I've made a few more comments but looks good
|
@kylezs I think i've addressed all remaining comments, if there are no objections I'll merge this tomorrow. |
|
@dandanlen I pushed as you said. |
Overview:
On the CFE:
In the runtime:
clear(u32::MAX, None)instead (see here).Most of the code changes are in commit 7b3a05a.