Skip to content

Commit

Permalink
Add read-only request paragraph
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Besancon committed Aug 12, 2024
1 parent ba3d333 commit 3b3f1de
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/learn/architecture/operation-lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 3b3f1de

Please sign in to comment.