Script simulation invocation

INCOMPLETE
This commit is contained in:
Mark Evenson 2022-09-01 16:09:19 +02:00
parent c7ff75234d
commit 5835bbc453
3 changed files with 54 additions and 2 deletions

View File

@ -0,0 +1,7 @@
(defsystem glacier
:version "0.0.1"
:depends-on (jsown)
:components ((:module source
:pathname "./"
:components ((:file "glacier")))))

View File

@ -0,0 +1,44 @@
(defpackage glacier
(:use :cl)
(:export #:grind))
(in-package glacier)
(defun json-parameters ()
`($.consensus_settings.glacier.evidence_alpha
4/5
$.consensus_settings.glacier.evidence_alpha_2
2/5
$.consensus_settings.glacier.look_ahead
997
$.consensus_settings.query.initial_query_size
100
$.consensus_settings.query_multiplier
2
$.consensus_settings.max_multiplier
1
$.byzantine_settings.total_size
,(expt 10 4)
$.byzantine_settings.honest
1
$.distribution.yes
1/2
$.distribution.no
1/2))
(defun grind ()
(let* ((template
(probe-file "~/work/consensus-prototypes/etc/glacier.json"))
(json
(alexandria:read-file-into-string template))
(result
(jsown:parse json)))
;; TODO set the template based on the parameters
(values
(uiop:run-program '("./target/release-opt/consensus-simulations"
"--input-settings" "etc/glacier.json"
"--output-file" "var/glacier.output")) ;; name the output something sensible
result
template)))

View File

@ -32,7 +32,7 @@ Simulate up to 10^4 nodes adding 10, 100, 1000?
#+caption: use these on a base templateo
| a1 | $.consensus_settings.glacier.evidence_alpha |
| a2 | $.consensus_settings |
| a2 | $.consensus_settings.glacier.evidence_alpha_2 |
| l | $.consensus_settings.glacier.look_ahead |
| k | $.consensus_settings.query.initial_query_size |
| k_multiplier | $.consensus_settings.query_multiplier |
@ -40,7 +40,8 @@ Simulate up to 10^4 nodes adding 10, 100, 1000?
| n | $.byzantine_settings.total_size |
| n_honest | $.byzantine_settings.honest |
| initial yes | $.distribution.yes |
| intial no | $.distribution.no |
| intial no | $.distribution.no |
| | |
** TODO Double check that this is all we need.