You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Enter the `nix` shell using either `nix develop` command or `direnv` hooked to your shell.
22
22
3. See available commands by entering `info` in the shell.
23
23
4. Run the script dump job using the `dump` command or script upload job with the `load` command.
24
+
25
+
## How to re-evaluate recorded Plutus Script evaluations locally
26
+
27
+
The database contains plutus script evaluation events from Mainnet which can be replayed locally to re-evaluate the scripts.
28
+
29
+
There is less value in re-evaluating scripts without any changes, as one would
30
+
simply re-obtain results that are already known. However, this can be useful
31
+
when the script evaluation logic has changed, and one wants to compare results
32
+
produced by the new logic with the old results.
33
+
34
+
The repository contains a program that can be used to re-evaluate the scripts
35
+
locally. You can use this program as a basis for your own re-evaluation, where
36
+
you can modify various parameters to suit your needs:
37
+
38
+
- The [Main module](plutus-script-evaluation/evaluate-scripts/Main.hs) of the `evaluate-scripts` executable.
39
+
- The main workhorse, function `evaluateScripts` in the [Evaluation module](plutus-script-evaluation/evaluate-scripts/Evaluation.hs) does the boring parts (aggregating relevant script evaluation inputs, streaming the data from DB to a local computer, decoding CBOR) so that you can do the interesting part: fold over the script evaluations from the Mainnet accessing all of the original evaluation inputs, to re-interpret them accordingly to your task, maintaining local state (accumulator) if needed.
0 commit comments