From 3b3f1de68dde6d862b0fd29982f2f1ba699f67f1 Mon Sep 17 00:00:00 2001 From: Leo-Besancon Date: Mon, 12 Aug 2024 12:07:14 +0200 Subject: [PATCH] Add read-only request paragraph --- docs/learn/architecture/operation-lifecycle.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/learn/architecture/operation-lifecycle.mdx b/docs/learn/architecture/operation-lifecycle.mdx index b3bca4aac..ee2485a62 100644 --- a/docs/learn/architecture/operation-lifecycle.mdx +++ b/docs/learn/architecture/operation-lifecycle.mdx @@ -56,4 +56,13 @@ simply stored in a diff compared to the finalized ledger 12. Eventually, the block will be marked as final and the ledger modification, including the operation changes, will become final in the finalized ledger. +# Read-only operations +Besides normal operations described previously, massa nodes can also execute read-only requests, aiming to simulate as closely as possible what would +happen if the user sent a real operation. These can be used for testing, or in order to get gas estimations (as the gas consumed by a read-only execution is +returned with the response). + +The Execution Module will handle read-only request, and revert back any changes made to the state during the execution of such requests. + +Different massa nodes may execute the same read-only requests under different contexts (and as such provide different responses), +as no consensus mechanism is used to ensure their are synced for these requests.