From 6232e376617365d7925df3b3be4ae7a9d8bf6cbc Mon Sep 17 00:00:00 2001 From: Julien Tesson Date: Thu, 4 Apr 2024 12:51:58 +0200 Subject: [PATCH 1/2] contrib/ai-simulator: don't `watch` on make css --- contrib/ai-simulator/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ai-simulator/package.json b/contrib/ai-simulator/package.json index 84dd7ea594cb..841e17b09ec3 100644 --- a/contrib/ai-simulator/package.json +++ b/contrib/ai-simulator/package.json @@ -6,7 +6,7 @@ "scripts": { "watch": "watch 'npm run build' ./src/ ./site/", "build": "esbuild src/source.js --bundle --outfile=site/app.js --format=esm", - "css": "npx tailwindcss -i ./src/source.css -o ./site/app.css --watch", + "css": "npx tailwindcss -i ./src/source.css -o ./site/app.css", "server": "npx http-server site/ -p 8080" }, "keywords": [], -- GitLab From e37a328efe7c0ac83f78850cccd8ea769f4ac7c3 Mon Sep 17 00:00:00 2001 From: Julien Tesson Date: Thu, 4 Apr 2024 12:52:40 +0200 Subject: [PATCH 2/2] contrib/ai-simulator/README: explanation of the simulator code --- contrib/ai-simulator/README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/contrib/ai-simulator/README.md b/contrib/ai-simulator/README.md index b15dda07680c..18953e7847b2 100644 --- a/contrib/ai-simulator/README.md +++ b/contrib/ai-simulator/README.md @@ -1,7 +1,26 @@ Adaptive Issuance Simulator =========================== -This is work in progress. +This simulator aims to provide an approximation of the behavior of the new +adaptive issuance and an estimation of average baking rewards according to a +given delegate configuration. + +# Simulation Business Code Architecture + +The `Simulator` class is responsible for computing the issuance rate evolution +cycle by cycle for a given evolution of the total stake and total supply at each +cycle end. + +Given a `Simulator` object and a delegate configuration, the `Delegate` class +provides a simulation of the expected per-cycle rewards of the delegate. + +Detailed API of the classes can be found in the generated documentation. + +# Demo Visualization +The simulator comes with a visualization page meant to demonstrate its usage (see `site/index.html`). It +loads the Simulator with the stake and total supply data extracted from an +iteration of weekly-net. + # Build -- GitLab