polkadot-js / apps

Basic Polkadot/Substrate UI for interacting with a Polkadot and Substrate node. This is the main user-facing application, allowing access to all features available on Substrate chains.
https://dotapps.io
Apache License 2.0
1.73k stars 1.52k forks source link

Stop using `system_accountNextIndex` #10641

Open bkchr opened 1 month ago

bkchr commented 1 month ago

Pjs should stop using the Rpc and instead switch to the runtime api. The rpc requires that the node is aware of the accountid, which contradicts the "omni node future".

This has one downside, the rpc is adjusting the nonce based on the content in the local transaction pool. However, this will also not really work for light clients as they only keep their own transactions and not external transactions. Users are expected to not use their account from different devices/apps at once.

bkchr commented 3 weeks ago

@TarikGul do you know if there is any way to skip this RPC right now?

TarikGul commented 3 weeks ago

If Im not mistaken this needs to be adjusted in the api layer. I am doing a release of the api tomorrow - It's a must need urgent release. I will try and get this adjusted as well!

If I am not mistaken all that needs to be changed is the rpc call needs to be replaced with the runtime api call?

TarikGul commented 3 weeks ago

To further clarify why this is an api level issue: api.derive.tx.signingInfo is where the rpc call is used.