Can someone please explain these concepts in a simplified manner and highlight their key distinctions? I would greatly appreciate any help in clarifying these concepts.
I'm relatively new to Substrate and I'm finding it challenging to grasp the concepts of runtime calls, RPC calls, and extrinsics. I've been reading the Substrate documentation, but I still have some confusion regarding these terms and their differences.
From what I understand, runtime calls are functions or methods defined within the runtime of a Substrate-based blockchain. They play a crucial role in executing the blockchain's functionalities and interacting with its state. However, I'm unsure about how they differ from RPC calls and extrinsics.
Extrinsics, as far as I know, are transactions or actions submitted to the blockchain by users or external entities. They package runtime calls along with additional information such as the sender's account, signature, and other transaction-specific details. When included in a block, these extrinsics trigger the execution of their associated runtime calls, resulting in modifications to the blockchain's state.
On the other hand, I've come across the term RPC calls, which appear to be a way for external entities (clients, services, etc.) to interact with a Substrate-based blockchain. From what I gather, RPC calls enable querying or invoking specific functionalities of the blockchain without necessarily submitting a full extrinsic. I believe they are primarily used for off-chain interactions and retrieving on-chain data.
I would greatly appreciate it if someone could provide a simplified explanation of these concepts and help me understand their key differences. How do runtime calls, RPC calls, and extrinsics relate to each other? When should I use one over the other? Clearing up these concepts would greatly enhance my understanding of Substrate. Thank you in advance for any assistance you can provide!