; This file is auto-generated. Do not edit manually: changes may be erased. ; Generated by Aqua compiler: https://github.com/fluencelabs/aqua/. ; If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues ; Aqua version: 0.10.3 (xor (seq (seq (seq (seq (seq (seq (seq (call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id) ) (call %init_peer_id% ("getDataSrv" "ipfs") [] ipfs) ) (call %init_peer_id% ("getDataSrv" "deal_id") [] deal_id) ) (call %init_peer_id% ("getDataSrv" "worker_def_cid") [] worker_def_cid) ) (new $array-inline (seq (seq (seq (seq (seq (ap "worker" $array-inline) (ap spell_id $array-inline) ) (ap deal_id $array-inline) ) (ap worker_def_cid $array-inline) ) (ap ipfs $array-inline) ) (canon %init_peer_id% $array-inline #array-inline-0) ) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-0]) ) (new $subnet_id (new $worker_spell (new $reg_errs (new $cre_errs (seq (seq (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-1) (xor (call %init_peer_id% ("srv" "resolve_alias") ["worker-spell"] $worker_spell) (seq (ap spell_id-1 $worker_spell) (xor (seq (seq (seq (seq (call %init_peer_id% ("srv" "add_alias") ["worker-spell" spell_id-1]) (new $array-inline-1 (seq (seq (ap "alias created 'worker-spell'" $array-inline-1) (ap spell_id-1 $array-inline-1) ) (canon %init_peer_id% $array-inline-1 #array-inline-1-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-2) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-1-0] str) ) (par (call %init_peer_id% (spell_id-2 "list_push_string") ["logs" str]) (seq (new $array-inline-2 (seq (seq (ap spell_id-2 $array-inline-2) (ap #array-inline-1-0 $array-inline-2) ) (canon %init_peer_id% $array-inline-2 #array-inline-2-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-2-0]) ) ) ) (seq (seq (seq (new $array-inline-3 (seq (seq (ap "error creating alias" $array-inline-3) (ap %last_error% $array-inline-3) ) (canon %init_peer_id% $array-inline-3 #array-inline-3-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-3) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-3-0] str-0) ) (par (call %init_peer_id% (spell_id-3 "list_push_string") ["logs" str-0]) (seq (new $array-inline-4 (seq (seq (ap spell_id-3 $array-inline-4) (ap #array-inline-3-0 $array-inline-4) ) (canon %init_peer_id% $array-inline-4 #array-inline-4-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-4-0]) ) ) ) ) ) ) ) (xor (seq (new $worker_spell_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] worker_spell_incr) (fold $worker_spell worker_spell_fold_var (seq (seq (ap worker_spell_fold_var $worker_spell_test) (canon %init_peer_id% $worker_spell_test #worker_spell_iter_canon) ) (xor (match #worker_spell_iter_canon.length worker_spell_incr (null) ) (next worker_spell_fold_var) ) ) (never) ) ) (canon %init_peer_id% $worker_spell_test #worker_spell_result_canon) ) (ap #worker_spell_result_canon worker_spell_gate) ) ) (mismatch worker_spell_gate.$.[0]! spell_id-1 (xor (seq (seq (seq (new $array-inline-5 (seq (seq (seq (seq (ap "Another worker spell is deployed on this worker (existing, current)" $array-inline-5) (new $worker_spell_test-0 (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] worker_spell_incr-0) (fold $worker_spell worker_spell_fold_var-0 (seq (seq (ap worker_spell_fold_var-0 $worker_spell_test-0) (canon %init_peer_id% $worker_spell_test-0 #worker_spell_iter_canon-0) ) (xor (match #worker_spell_iter_canon-0.length worker_spell_incr-0 (null) ) (next worker_spell_fold_var-0) ) ) (never) ) ) (canon %init_peer_id% $worker_spell_test-0 #worker_spell_result_canon-0) ) (ap #worker_spell_result_canon-0 worker_spell_gate-0) ) ) ) (ap worker_spell_gate-0.$.[0]! $array-inline-5) ) (ap spell_id-1 $array-inline-5) ) (canon %init_peer_id% $array-inline-5 #array-inline-5-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-4) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-5-0] str-1) ) (par (call %init_peer_id% (spell_id-4 "list_push_string") ["logs" str-1]) (seq (new $array-inline-6 (seq (seq (ap spell_id-4 $array-inline-6) (ap #array-inline-5-0 $array-inline-6) ) (canon %init_peer_id% $array-inline-6 #array-inline-6-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-6-0]) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) ) ) ) (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (new $array-inline-7 (seq (seq (ap "Installing worker for deal" $array-inline-7) (ap deal_id $array-inline-7) ) (canon %init_peer_id% $array-inline-7 #array-inline-7-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-5) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-7-0] str-2) ) (par (call %init_peer_id% (spell_id-5 "list_push_string") ["logs" str-2]) (seq (new $array-inline-8 (seq (seq (ap spell_id-5 $array-inline-8) (ap #array-inline-7-0 $array-inline-8) ) (canon %init_peer_id% $array-inline-8 #array-inline-8-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-8-0]) ) ) ) (xor (seq (call %init_peer_id% ("aqua-ipfs" "cat_from") [worker_def_cid ipfs] json) (xor (match json.$.success! true (xor (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (call %init_peer_id% ("json" "parse") [json.$.contents!] worker_definition) (new $array-inline-9 (seq (seq (seq (ap "parsed worker definition" $array-inline-9) (ap worker_def_cid $array-inline-9) ) (ap worker_definition $array-inline-9) ) (canon %init_peer_id% $array-inline-9 #array-inline-9-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-6) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-9-0] str-3) ) (par (call %init_peer_id% (spell_id-6 "list_push_string") ["logs" str-3]) (seq (new $array-inline-10 (seq (seq (ap spell_id-6 $array-inline-10) (ap #array-inline-9-0 $array-inline-10) ) (canon %init_peer_id% $array-inline-10 #array-inline-10-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-10-0]) ) ) ) (fold worker_definition.$.services! s-0 (seq (new $hashes (xor (seq (fold s-0.$.modules! m-0 (seq (seq (seq (seq (seq (call %init_peer_id% ("aqua-ipfs" "get_from") [m-0.$.wasm! ipfs] get_wasm) (call %init_peer_id% ("aqua-ipfs" "cat_from") [m-0.$.config! ipfs] json_cfg) ) (null) ) (new $res (seq (xor (match get_wasm.$.success! true (ap json_cfg.$.success! $res) ) (ap false $res) ) (new $res_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] res_incr) (fold $res res_fold_var (seq (seq (ap res_fold_var $res_test) (canon %init_peer_id% $res_test #res_iter_canon) ) (xor (match #res_iter_canon.length res_incr (null) ) (next res_fold_var) ) ) (never) ) ) (canon %init_peer_id% $res_test #res_result_canon) ) (ap #res_result_canon res_gate) ) ) ) ) ) (xor (match res_gate.$.[0]! true (xor (seq (call %init_peer_id% ("json" "parse") [json_cfg.$.contents!] cfg) (call %init_peer_id% ("dist" "add_module_from_vault") [get_wasm.$.path! cfg] $hashes) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) ) ) (seq (seq (seq (new $array-inline-11 (seq (seq (seq (seq (seq (seq (ap s-0.$.name! $array-inline-11) (ap "error retrieving module" $array-inline-11) ) (new $array-inline-12 (seq (seq (seq (ap "wasm" $array-inline-12) (ap m-0.$.wasm! $array-inline-12) ) (ap get_wasm $array-inline-12) ) (canon %init_peer_id% $array-inline-12 #array-inline-12-0) ) ) ) (ap #array-inline-12-0 $array-inline-11) ) (new $array-inline-13 (seq (seq (seq (ap "config" $array-inline-13) (ap m-0.$.config! $array-inline-13) ) (ap json_cfg $array-inline-13) ) (canon %init_peer_id% $array-inline-13 #array-inline-13-0) ) ) ) (ap #array-inline-13-0 $array-inline-11) ) (canon %init_peer_id% $array-inline-11 #array-inline-11-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-7) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-11-0] str-4) ) (par (call %init_peer_id% (spell_id-7 "list_push_string") ["logs" str-4]) (seq (new $array-inline-14 (seq (seq (ap spell_id-7 $array-inline-14) (ap #array-inline-11-0 $array-inline-14) ) (canon %init_peer_id% $array-inline-14 #array-inline-14-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-14-0]) ) ) ) ) ) (next m-0) ) ) (xor (seq (par (seq (canon %init_peer_id% $hashes #hashes_to_functor) (ap #hashes_to_functor.length hashes_length) ) (seq (seq (ap s-0.$.modules! s-0_flat) (ap s-0_flat s-0_flat_to_functor) ) (ap s-0_flat_to_functor.length s-0_flat_length) ) ) (match hashes_length s-0_flat_length (xor (seq (seq (seq (par (canon %init_peer_id% $hashes #hashes_canon) (null) ) (call %init_peer_id% ("dist" "make_blueprint") [s-0.$.name! #hashes_canon] blueprint) ) (call %init_peer_id% ("dist" "add_blueprint") [blueprint] blueprint_id) ) (xor (seq (new $result (seq (seq (call %init_peer_id% ("worker-spell" "get_string") [s-0.$.name!] deployed) (xor (seq (seq (null) (new $res-0 (seq (xor (match deployed.$.success! true (ap deployed.$.absent! $res-0) ) (ap false $res-0) ) (new $res-0_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] res-0_incr) (fold $res-0 res-0_fold_var (seq (seq (ap res-0_fold_var $res-0_test) (canon %init_peer_id% $res-0_test #res-0_iter_canon) ) (xor (match #res-0_iter_canon.length res-0_incr (null) ) (next res-0_fold_var) ) ) (never) ) ) (canon %init_peer_id% $res-0_test #res-0_result_canon) ) (ap #res-0_result_canon res-0_gate) ) ) ) ) ) (match res-0_gate.$.[0]! true (ap false $result) ) ) (seq (seq (ap deployed.$.str! deployed_flat) (call %init_peer_id% ("srv" "info") [deployed_flat] info) ) (xor (match info.$.blueprint_id! blueprint_id (ap true $result) ) (seq (seq (seq (seq (seq (new $array-inline-15 (seq (seq (ap s-0.$.name! $array-inline-15) (ap "blueprint changed, need to redeploy" $array-inline-15) ) (canon %init_peer_id% $array-inline-15 #array-inline-15-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-8) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-15-0] str-5) ) (par (call %init_peer_id% (spell_id-8 "list_push_string") ["logs" str-5]) (seq (new $array-inline-16 (seq (seq (ap spell_id-8 $array-inline-16) (ap #array-inline-15-0 $array-inline-16) ) (canon %init_peer_id% $array-inline-16 #array-inline-16-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-16-0]) ) ) ) (xor (seq (seq (seq (seq (seq (seq (seq (seq (new $array-inline-17 (seq (seq (seq (ap s-0.$.name! $array-inline-17) (ap "removing old service" $array-inline-17) ) (ap deployed_flat $array-inline-17) ) (canon %init_peer_id% $array-inline-17 #array-inline-17-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-9) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-17-0] str-6) ) (par (call %init_peer_id% (spell_id-9 "list_push_string") ["logs" str-6]) (seq (new $array-inline-18 (seq (seq (ap spell_id-9 $array-inline-18) (ap #array-inline-17-0 $array-inline-18) ) (canon %init_peer_id% $array-inline-18 #array-inline-18-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-18-0]) ) ) ) (call %init_peer_id% ("srv" "remove") [deployed_flat]) ) (new $array-inline-19 (seq (seq (seq (ap s-0.$.name! $array-inline-19) (ap "old service successfully removed" $array-inline-19) ) (ap deployed_flat $array-inline-19) ) (canon %init_peer_id% $array-inline-19 #array-inline-19-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-10) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-19-0] str-7) ) (par (call %init_peer_id% (spell_id-10 "list_push_string") ["logs" str-7]) (seq (new $array-inline-20 (seq (seq (ap spell_id-10 $array-inline-20) (ap #array-inline-19-0 $array-inline-20) ) (canon %init_peer_id% $array-inline-20 #array-inline-20-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-20-0]) ) ) ) (seq (seq (seq (new $array-inline-21 (seq (seq (seq (ap "Error removing service" $array-inline-21) (ap s-0.$.name! $array-inline-21) ) (ap %last_error% $array-inline-21) ) (canon %init_peer_id% $array-inline-21 #array-inline-21-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-11) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-21-0] str-8) ) (par (call %init_peer_id% (spell_id-11 "list_push_string") ["logs" str-8]) (seq (new $array-inline-22 (seq (seq (ap spell_id-11 $array-inline-22) (ap #array-inline-21-0 $array-inline-22) ) (canon %init_peer_id% $array-inline-22 #array-inline-22-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-22-0]) ) ) ) ) ) (ap false $result) ) ) ) ) ) (new $result_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] result_incr) (fold $result result_fold_var (seq (seq (ap result_fold_var $result_test) (canon %init_peer_id% $result_test #result_iter_canon) ) (xor (match #result_iter_canon.length result_incr (null) ) (next result_fold_var) ) ) (never) ) ) (canon %init_peer_id% $result_test #result_result_canon) ) (ap #result_result_canon result_gate) ) ) ) ) (match result_gate.$.[0]! false (xor (seq (seq (seq (seq (seq (seq (seq (seq (seq (call %init_peer_id% ("worker-spell" "set_string") ["status" "install in progress"]) (call %init_peer_id% ("srv" "create") [blueprint_id] service_id) ) (new $array-inline-23 (seq (seq (seq (ap "Created service" $array-inline-23) (ap s-0.$.name! $array-inline-23) ) (ap service_id $array-inline-23) ) (canon %init_peer_id% $array-inline-23 #array-inline-23-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-12) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-23-0] str-9) ) (par (call %init_peer_id% (spell_id-12 "list_push_string") ["logs" str-9]) (seq (new $array-inline-24 (seq (seq (ap spell_id-12 $array-inline-24) (ap #array-inline-23-0 $array-inline-24) ) (canon %init_peer_id% $array-inline-24 #array-inline-24-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-24-0]) ) ) ) (xor (call %init_peer_id% ("srv" "add_alias") [s-0.$.name! service_id]) (seq (seq (seq (new $array-inline-25 (seq (seq (seq (seq (ap "Error creating alias for deployed service" $array-inline-25) (ap s-0.$.name! $array-inline-25) ) (ap service_id $array-inline-25) ) (ap %last_error% $array-inline-25) ) (canon %init_peer_id% $array-inline-25 #array-inline-25-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-13) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-25-0] str-10) ) (par (call %init_peer_id% (spell_id-13 "list_push_string") ["logs" str-10]) (seq (new $array-inline-26 (seq (seq (ap spell_id-13 $array-inline-26) (ap #array-inline-25-0 $array-inline-26) ) (canon %init_peer_id% $array-inline-26 #array-inline-26-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-26-0]) ) ) ) ) ) (call %init_peer_id% ("worker-spell" "set_string") [s-0.$.name! service_id]) ) (call %init_peer_id% ("op" "concat_strings") ["blueprint:" s-0.$.name!] concat_strings) ) (call %init_peer_id% ("worker-spell" "set_string") [concat_strings blueprint_id]) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3]) ) ) ) (seq (seq (seq (new $array-inline-27 (seq (seq (ap s-0.$.name! $array-inline-27) (ap "service is already deployed, doing nothing" $array-inline-27) ) (canon %init_peer_id% $array-inline-27 #array-inline-27-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-14) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-27-0] str-11) ) (par (call %init_peer_id% (spell_id-14 "list_push_string") ["logs" str-11]) (seq (new $array-inline-28 (seq (seq (ap spell_id-14 $array-inline-28) (ap #array-inline-27-0 $array-inline-28) ) (canon %init_peer_id% $array-inline-28 #array-inline-28-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-28-0]) ) ) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4]) ) ) ) (seq (seq (seq (new $array-inline-29 (seq (seq (ap s-0.$.name! $array-inline-29) (ap "error retrieving some of the modules, see above" $array-inline-29) ) (canon %init_peer_id% $array-inline-29 #array-inline-29-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-15) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-29-0] str-12) ) (par (call %init_peer_id% (spell_id-15 "list_push_string") ["logs" str-12]) (seq (new $array-inline-30 (seq (seq (ap spell_id-15 $array-inline-30) (ap #array-inline-29-0 $array-inline-30) ) (canon %init_peer_id% $array-inline-30 #array-inline-30-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-30-0]) ) ) ) ) ) (seq (seq (seq (new $array-inline-31 (seq (seq (seq (ap s-0.$.name! $array-inline-31) (ap "error deploying service" $array-inline-31) ) (ap %last_error% $array-inline-31) ) (canon %init_peer_id% $array-inline-31 #array-inline-31-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-16) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-31-0] str-13) ) (par (call %init_peer_id% (spell_id-16 "list_push_string") ["logs" str-13]) (seq (new $array-inline-32 (seq (seq (ap spell_id-16 $array-inline-32) (ap #array-inline-31-0 $array-inline-32) ) (canon %init_peer_id% $array-inline-32 #array-inline-32-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-32-0]) ) ) ) ) ) (next s-0) ) ) ) (fold worker_definition.$.spells! sp-0 (seq (xor (seq (seq (seq (seq (new $array-inline-33 (seq (seq (ap "Deploying spell" $array-inline-33) (ap sp-0.$.name! $array-inline-33) ) (canon %init_peer_id% $array-inline-33 #array-inline-33-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-17) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-33-0] str-14) ) (par (call %init_peer_id% (spell_id-17 "list_push_string") ["logs" str-14]) (seq (new $array-inline-34 (seq (seq (ap spell_id-17 $array-inline-34) (ap #array-inline-33-0 $array-inline-34) ) (canon %init_peer_id% $array-inline-34 #array-inline-34-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-34-0]) ) ) ) (xor (xor (seq (new $result-0 (seq (xor (seq (call %init_peer_id% ("worker-spell" "get_string") [sp-0.$.name!] deployed-0) (xor (seq (seq (null) (new $res-1 (seq (xor (match deployed-0.$.success! true (ap deployed-0.$.absent! $res-1) ) (ap false $res-1) ) (new $res-1_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] res-1_incr) (fold $res-1 res-1_fold_var (seq (seq (ap res-1_fold_var $res-1_test) (canon %init_peer_id% $res-1_test #res-1_iter_canon) ) (xor (match #res-1_iter_canon.length res-1_incr (null) ) (next res-1_fold_var) ) ) (never) ) ) (canon %init_peer_id% $res-1_test #res-1_result_canon) ) (ap #res-1_result_canon res-1_gate) ) ) ) ) ) (match res-1_gate.$.[0]! true (ap false $result-0) ) ) (seq (seq (seq (seq (seq (seq (seq (ap deployed-0.$.str! deployed-0_flat) (call %init_peer_id% ("srv" "info") [deployed-0_flat]) ) (call %init_peer_id% (deployed-0_flat "script_cid") [] stored_script) ) (new $array-inline-35 (seq (seq (seq (seq (seq (ap deployed-0_flat $array-inline-35) (ap "script cid was:" $array-inline-35) ) (ap stored_script.$.v1_str! $array-inline-35) ) (ap "new:" $array-inline-35) ) (ap sp-0.$.script! $array-inline-35) ) (canon %init_peer_id% $array-inline-35 #array-inline-35-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-19) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-35-0] str-15) ) (par (call %init_peer_id% (spell_id-19 "list_push_string") ["logs" str-15]) (seq (new $array-inline-36 (seq (seq (ap spell_id-19 $array-inline-36) (ap #array-inline-35-0 $array-inline-36) ) (canon %init_peer_id% $array-inline-36 #array-inline-36-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-36-0]) ) ) ) (xor (seq (null) (match stored_script.$.v1_str! sp-0.$.script! (ap true $result-0) ) ) (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (new $array-inline-37 (seq (seq (ap sp-0.$.name! $array-inline-37) (ap "script changed, need to redeploy" $array-inline-37) ) (canon %init_peer_id% $array-inline-37 #array-inline-37-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-20) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-37-0] str-16) ) (par (call %init_peer_id% (spell_id-20 "list_push_string") ["logs" str-16]) (seq (new $array-inline-38 (seq (seq (ap spell_id-20 $array-inline-38) (ap #array-inline-37-0 $array-inline-38) ) (canon %init_peer_id% $array-inline-38 #array-inline-38-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-38-0]) ) ) ) (new $array-inline-39 (seq (seq (seq (ap sp-0.$.name! $array-inline-39) (ap "removing old spell" $array-inline-39) ) (ap deployed-0_flat $array-inline-39) ) (canon %init_peer_id% $array-inline-39 #array-inline-39-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-21) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-39-0] str-17) ) (par (call %init_peer_id% (spell_id-21 "list_push_string") ["logs" str-17]) (seq (new $array-inline-40 (seq (seq (ap spell_id-21 $array-inline-40) (ap #array-inline-39-0 $array-inline-40) ) (canon %init_peer_id% $array-inline-40 #array-inline-40-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-40-0]) ) ) ) (call %init_peer_id% ("spell" "remove") [deployed-0_flat]) ) (new $array-inline-41 (seq (seq (seq (ap sp-0.$.name! $array-inline-41) (ap "old spell successfully removed" $array-inline-41) ) (ap deployed-0_flat $array-inline-41) ) (canon %init_peer_id% $array-inline-41 #array-inline-41-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-22) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-41-0] str-18) ) (par (call %init_peer_id% (spell_id-22 "list_push_string") ["logs" str-18]) (seq (new $array-inline-42 (seq (seq (ap spell_id-22 $array-inline-42) (ap #array-inline-41-0 $array-inline-42) ) (canon %init_peer_id% $array-inline-42 #array-inline-42-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-42-0]) ) ) ) (ap false $result-0) ) ) ) ) ) (seq (seq (seq (seq (new $array-inline-43 (seq (seq (seq (ap "Error check spell deployed" $array-inline-43) (ap sp-0.$.name! $array-inline-43) ) (ap %last_error% $array-inline-43) ) (canon %init_peer_id% $array-inline-43 #array-inline-43-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-23) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-43-0] str-19) ) (par (call %init_peer_id% (spell_id-23 "list_push_string") ["logs" str-19]) (seq (new $array-inline-44 (seq (seq (ap spell_id-23 $array-inline-44) (ap #array-inline-43-0 $array-inline-44) ) (canon %init_peer_id% $array-inline-44 #array-inline-44-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-44-0]) ) ) ) (ap false $result-0) ) ) (new $result-0_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] result-0_incr) (fold $result-0 result-0_fold_var (seq (seq (ap result-0_fold_var $result-0_test) (canon %init_peer_id% $result-0_test #result-0_iter_canon) ) (xor (match #result-0_iter_canon.length result-0_incr (null) ) (next result-0_fold_var) ) ) (never) ) ) (canon %init_peer_id% $result-0_test #result-0_result_canon) ) (ap #result-0_result_canon result-0_gate) ) ) ) ) (match result-0_gate.$.[0]! true (xor (seq (seq (seq (seq (seq (seq (seq (seq (seq (new $array-inline-45 (seq (seq (ap sp-0.$.name! $array-inline-45) (ap "spell is already deployed, checking config and init_args" $array-inline-45) ) (canon %init_peer_id% $array-inline-45 #array-inline-45-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-24) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-45-0] str-20) ) (par (call %init_peer_id% (spell_id-24 "list_push_string") ["logs" str-20]) (seq (new $array-inline-46 (seq (seq (ap spell_id-24 $array-inline-46) (ap #array-inline-45-0 $array-inline-46) ) (canon %init_peer_id% $array-inline-46 #array-inline-46-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-46-0]) ) ) ) (call %init_peer_id% ("op" "concat_strings") ["trigger_config:" sp-0.$.name!] concat_strings-0) ) (call %init_peer_id% ("worker-spell" "get_string") [concat_strings-0] stored_config) ) (xor (seq (null) (mismatch stored_config.$.str! sp-0.$.config! (xor (seq (seq (seq (seq (seq (new $array-inline-47 (seq (seq (ap sp-0.$.name! $array-inline-47) (ap "config mismath, updating config" $array-inline-47) ) (canon %init_peer_id% $array-inline-47 #array-inline-47-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-25) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-47-0] str-21) ) (par (call %init_peer_id% (spell_id-25 "list_push_string") ["logs" str-21]) (seq (new $array-inline-48 (seq (seq (ap spell_id-25 $array-inline-48) (ap #array-inline-47-0 $array-inline-48) ) (canon %init_peer_id% $array-inline-48 #array-inline-48-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-48-0]) ) ) ) (call %init_peer_id% ("aqua-ipfs" "cat_from") [sp-0.$.config! ipfs] config_json) ) (xor (match config_json.$.success! true (xor (seq (seq (seq (seq (seq (seq (seq (seq (call %init_peer_id% ("json" "parse") [config_json.$.contents!] config) (call %init_peer_id% ("srv" "resolve_alias") [sp-0.$.name!] spell_id-18) ) (call %init_peer_id% ("spell" "update_trigger_config") [spell_id-18 config]) ) (par (call %init_peer_id% ("op" "concat_strings") ["trigger_config:" sp-0.$.name!] concat_strings-1) (null) ) ) (call %init_peer_id% ("worker-spell" "set_string") [concat_strings-1 sp-0.$.config!]) ) (new $array-inline-49 (seq (seq (ap sp-0.$.name! $array-inline-49) (ap "config successfully updated" $array-inline-49) ) (canon %init_peer_id% $array-inline-49 #array-inline-49-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-26) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-49-0] str-22) ) (par (call %init_peer_id% (spell_id-26 "list_push_string") ["logs" str-22]) (seq (new $array-inline-50 (seq (seq (ap spell_id-26 $array-inline-50) (ap #array-inline-49-0 $array-inline-50) ) (canon %init_peer_id% $array-inline-50 #array-inline-50-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-50-0]) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 5]) ) ) (seq (seq (seq (new $array-inline-51 (seq (seq (seq (seq (ap sp-0.$.name! $array-inline-51) (ap "error retrieving config" $array-inline-51) ) (ap sp-0.$.config! $array-inline-51) ) (ap config_json.$.error! $array-inline-51) ) (canon %init_peer_id% $array-inline-51 #array-inline-51-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-27) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-51-0] str-23) ) (par (call %init_peer_id% (spell_id-27 "list_push_string") ["logs" str-23]) (seq (new $array-inline-52 (seq (seq (ap spell_id-27 $array-inline-52) (ap #array-inline-51-0 $array-inline-52) ) (canon %init_peer_id% $array-inline-52 #array-inline-52-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-52-0]) ) ) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 6]) ) ) ) (call %init_peer_id% ("op" "noop") []) ) ) (call %init_peer_id% ("op" "concat_strings") ["init_args:" sp-0.$.name!] concat_strings-2) ) (call %init_peer_id% ("worker-spell" "get_string") [concat_strings-2] stored_init_args) ) (xor (seq (null) (mismatch stored_init_args.$.str! sp-0.$.init_args! (xor (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (new $array-inline-53 (seq (seq (ap sp-0.$.name! $array-inline-53) (ap "init_args changed, updating" $array-inline-53) ) (canon %init_peer_id% $array-inline-53 #array-inline-53-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-28) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-53-0] str-24) ) (par (call %init_peer_id% (spell_id-28 "list_push_string") ["logs" str-24]) (seq (new $array-inline-54 (seq (seq (ap spell_id-28 $array-inline-54) (ap #array-inline-53-0 $array-inline-54) ) (canon %init_peer_id% $array-inline-54 #array-inline-54-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-54-0]) ) ) ) (call %init_peer_id% ("aqua-ipfs" "cat_from") [sp-0.$.init_args! ipfs] new_init_args) ) (xor (match new_init_args.$.success! true (xor (call %init_peer_id% (sp-0.$.name! "set_json_fields") [new_init_args.$.contents!]) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 7]) ) ) (seq (seq (seq (new $array-inline-55 (seq (seq (seq (seq (ap sp-0.$.name! $array-inline-55) (ap "error retrieving init_args" $array-inline-55) ) (ap sp-0.$.init_args! $array-inline-55) ) (ap new_init_args.$.error! $array-inline-55) ) (canon %init_peer_id% $array-inline-55 #array-inline-55-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-29) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-55-0] str-25) ) (par (call %init_peer_id% (spell_id-29 "list_push_string") ["logs" str-25]) (seq (new $array-inline-56 (seq (seq (ap spell_id-29 $array-inline-56) (ap #array-inline-55-0 $array-inline-56) ) (canon %init_peer_id% $array-inline-56 #array-inline-56-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-56-0]) ) ) ) ) ) (par (call %init_peer_id% ("op" "concat_strings") ["init_args:" sp-0.$.name!] concat_strings-3) (null) ) ) (call %init_peer_id% ("worker-spell" "set_string") [concat_strings-3 sp-0.$.init_args!]) ) (new $array-inline-57 (seq (seq (ap sp-0.$.name! $array-inline-57) (ap "init_args successfully updated" $array-inline-57) ) (canon %init_peer_id% $array-inline-57 #array-inline-57-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-30) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-57-0] str-26) ) (par (call %init_peer_id% (spell_id-30 "list_push_string") ["logs" str-26]) (seq (new $array-inline-58 (seq (seq (ap spell_id-30 $array-inline-58) (ap #array-inline-57-0 $array-inline-58) ) (canon %init_peer_id% $array-inline-58 #array-inline-58-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-58-0]) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 8]) ) ) ) (call %init_peer_id% ("op" "noop") []) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 9]) ) ) ) (seq (seq (seq (seq (seq (seq (call %init_peer_id% ("worker-spell" "set_string") ["status" "install in progress"]) (call %init_peer_id% ("aqua-ipfs" "cat_from") [sp-0.$.script! ipfs] script) ) (call %init_peer_id% ("aqua-ipfs" "cat_from") [sp-0.$.config! ipfs] cfg_json) ) (call %init_peer_id% ("aqua-ipfs" "cat_from") [sp-0.$.init_args! ipfs] init_args_str) ) (par (seq (null) (new $res-2 (seq (xor (match script.$.success! true (ap cfg_json.$.success! $res-2) ) (ap false $res-2) ) (new $res-2_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] res-2_incr) (fold $res-2 res-2_fold_var (seq (seq (ap res-2_fold_var $res-2_test) (canon %init_peer_id% $res-2_test #res-2_iter_canon) ) (xor (match #res-2_iter_canon.length res-2_incr (null) ) (next res-2_fold_var) ) ) (never) ) ) (canon %init_peer_id% $res-2_test #res-2_result_canon) ) (ap #res-2_result_canon res-2_gate) ) ) ) ) ) (null) ) ) (new $res-3 (seq (xor (match res-2_gate.$.[0]! true (ap init_args_str.$.success! $res-3) ) (ap false $res-3) ) (new $res-3_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] res-3_incr) (fold $res-3 res-3_fold_var (seq (seq (ap res-3_fold_var $res-3_test) (canon %init_peer_id% $res-3_test #res-3_iter_canon) ) (xor (match #res-3_iter_canon.length res-3_incr (null) ) (next res-3_fold_var) ) ) (never) ) ) (canon %init_peer_id% $res-3_test #res-3_result_canon) ) (ap #res-3_result_canon res-3_gate) ) ) ) ) ) (xor (match res-3_gate.$.[0]! true (xor (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (seq (call %init_peer_id% ("json" "parse") [cfg_json.$.contents!] cfg-0) (call %init_peer_id% ("json" "parse") [init_args_str.$.contents!] init_args) ) (call %init_peer_id% ("spell" "install") [script.$.contents! init_args cfg-0] sp_id) ) (new $array-inline-59 (seq (seq (seq (ap "Installed spell" $array-inline-59) (ap sp-0.$.name! $array-inline-59) ) (ap sp_id $array-inline-59) ) (canon %init_peer_id% $array-inline-59 #array-inline-59-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-31) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-59-0] str-27) ) (par (call %init_peer_id% (spell_id-31 "list_push_string") ["logs" str-27]) (seq (new $array-inline-60 (seq (seq (ap spell_id-31 $array-inline-60) (ap #array-inline-59-0 $array-inline-60) ) (canon %init_peer_id% $array-inline-60 #array-inline-60-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-60-0]) ) ) ) (xor (call %init_peer_id% ("srv" "add_alias") [sp-0.$.name! sp_id]) (seq (seq (seq (new $array-inline-61 (seq (seq (seq (seq (ap "Error creating alias for deployed spell" $array-inline-61) (ap sp-0.$.name! $array-inline-61) ) (ap sp_id $array-inline-61) ) (ap %last_error% $array-inline-61) ) (canon %init_peer_id% $array-inline-61 #array-inline-61-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-32) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-61-0] str-28) ) (par (call %init_peer_id% (spell_id-32 "list_push_string") ["logs" str-28]) (seq (new $array-inline-62 (seq (seq (ap spell_id-32 $array-inline-62) (ap #array-inline-61-0 $array-inline-62) ) (canon %init_peer_id% $array-inline-62 #array-inline-62-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-62-0]) ) ) ) ) ) (call %init_peer_id% ("worker-spell" "set_string") [sp-0.$.name! sp_id]) ) (par (call %init_peer_id% ("op" "concat_strings") ["trigger_config:" sp-0.$.name!] concat_strings-4) (null) ) ) (call %init_peer_id% ("worker-spell" "set_string") [concat_strings-4 sp-0.$.config!]) ) (par (call %init_peer_id% ("op" "concat_strings") ["init_args:" sp-0.$.name!] concat_strings-5) (null) ) ) (call %init_peer_id% ("worker-spell" "set_string") [concat_strings-5 sp-0.$.init_args!]) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 10]) ) ) (seq (seq (seq (new $array-inline-63 (seq (seq (seq (seq (seq (seq (seq (seq (ap sp-0.$.name! $array-inline-63) (ap "error retrieving from IPFS" $array-inline-63) ) (new $array-inline-64 (seq (seq (seq (ap "script" $array-inline-64) (ap sp-0.$.script! $array-inline-64) ) (ap script $array-inline-64) ) (canon %init_peer_id% $array-inline-64 #array-inline-64-0) ) ) ) (ap #array-inline-64-0 $array-inline-63) ) (new $array-inline-65 (seq (seq (seq (ap "cfg_json" $array-inline-65) (ap sp-0.$.config! $array-inline-65) ) (ap cfg_json $array-inline-65) ) (canon %init_peer_id% $array-inline-65 #array-inline-65-0) ) ) ) (ap #array-inline-65-0 $array-inline-63) ) (new $array-inline-66 (seq (seq (seq (ap "init_args_str" $array-inline-66) (ap sp-0.$.init_args! $array-inline-66) ) (ap init_args_str $array-inline-66) ) (canon %init_peer_id% $array-inline-66 #array-inline-66-0) ) ) ) (ap #array-inline-66-0 $array-inline-63) ) (canon %init_peer_id% $array-inline-63 #array-inline-63-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-33) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-63-0] str-29) ) (par (call %init_peer_id% (spell_id-33 "list_push_string") ["logs" str-29]) (seq (new $array-inline-67 (seq (seq (ap spell_id-33 $array-inline-67) (ap #array-inline-63-0 $array-inline-67) ) (canon %init_peer_id% $array-inline-67 #array-inline-67-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-67-0]) ) ) ) ) ) ) (seq (seq (seq (new $array-inline-68 (seq (seq (seq (ap "Error deploy spell" $array-inline-68) (ap sp-0.$.name! $array-inline-68) ) (ap %last_error% $array-inline-68) ) (canon %init_peer_id% $array-inline-68 #array-inline-68-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-34) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-68-0] str-30) ) (par (call %init_peer_id% (spell_id-34 "list_push_string") ["logs" str-30]) (seq (new $array-inline-69 (seq (seq (ap spell_id-34 $array-inline-69) (ap #array-inline-68-0 $array-inline-69) ) (canon %init_peer_id% $array-inline-69 #array-inline-69-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-69-0]) ) ) ) ) ) (seq (seq (seq (new $array-inline-70 (seq (seq (seq (ap "Error deploying spell" $array-inline-70) (ap sp-0.$.name! $array-inline-70) ) (ap %last_error% $array-inline-70) ) (canon %init_peer_id% $array-inline-70 #array-inline-70-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-35) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-70-0] str-31) ) (par (call %init_peer_id% (spell_id-35 "list_push_string") ["logs" str-31]) (seq (new $array-inline-71 (seq (seq (ap spell_id-35 $array-inline-71) (ap #array-inline-70-0 $array-inline-71) ) (canon %init_peer_id% $array-inline-71 #array-inline-71-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-71-0]) ) ) ) ) (next sp-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-36) ) (call %init_peer_id% ("debug" "stringify") ["Installation finished"] str-32) ) (par (call %init_peer_id% (spell_id-36 "list_push_string") ["logs" str-32]) (seq (new $array-inline-72 (seq (seq (ap spell_id-36 $array-inline-72) (ap "Installation finished" $array-inline-72) ) (canon %init_peer_id% $array-inline-72 #array-inline-72-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-72-0]) ) ) ) (call %init_peer_id% ("worker-spell" "set_string") ["status" "install finished"]) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 11]) ) ) (seq (seq (seq (seq (new $array-inline-73 (seq (seq (seq (seq (ap "Error downloading worker definition from IPFS" $array-inline-73) (ap ipfs $array-inline-73) ) (ap worker_def_cid $array-inline-73) ) (ap json $array-inline-73) ) (canon %init_peer_id% $array-inline-73 #array-inline-73-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-37) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-73-0] str-33) ) (par (call %init_peer_id% (spell_id-37 "list_push_string") ["logs" str-33]) (seq (new $array-inline-74 (seq (seq (ap spell_id-37 $array-inline-74) (ap #array-inline-73-0 $array-inline-74) ) (canon %init_peer_id% $array-inline-74 #array-inline-74-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-74-0]) ) ) ) (call %init_peer_id% ("worker-spell" "set_string") ["status" "install error"]) ) ) ) (seq (seq (seq (seq (new $array-inline-75 (seq (seq (ap "Error installing worker" $array-inline-75) (ap %last_error% $array-inline-75) ) (canon %init_peer_id% $array-inline-75 #array-inline-75-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-38) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-75-0] str-34) ) (par (call %init_peer_id% (spell_id-38 "list_push_string") ["logs" str-34]) (seq (new $array-inline-76 (seq (seq (ap spell_id-38 $array-inline-76) (ap #array-inline-75-0 $array-inline-76) ) (canon %init_peer_id% $array-inline-76 #array-inline-76-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-76-0]) ) ) ) (call %init_peer_id% ("worker-spell" "set_string") ["status" "install error"]) ) ) ) (call %init_peer_id% (spell_id-1 "get_string") ["status"] status) ) (new $array-inline-77 (seq (seq (ap "Worker installation finished with status" $array-inline-77) (ap status.$.str! $array-inline-77) ) (canon %init_peer_id% $array-inline-77 #array-inline-77-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-39) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-77-0] str-35) ) (par (call %init_peer_id% (spell_id-39 "list_push_string") ["logs" str-35]) (seq (new $array-inline-78 (seq (seq (ap spell_id-39 $array-inline-78) (ap #array-inline-77-0 $array-inline-78) ) (canon %init_peer_id% $array-inline-78 #array-inline-78-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-78-0]) ) ) ) (xor (match status.$.str! "install finished" (xor (seq (seq (seq (seq (call %init_peer_id% ("peer" "timestamp_sec") [] now) (call %init_peer_id% (spell_id-1 "get_u32") ["subnet_created"] created) ) (call %init_peer_id% (spell_id-1 "get_u32") ["worker_registered"] registered) ) (xor (match created.$.success! true (xor (xor (match registered.$.success! true (xor (xor (seq (seq (call %init_peer_id% ("math" "sub") [now created.$.num!] sub) (call %init_peer_id% ("cmp" "gt") [sub 43200] gt) ) (match gt true (xor (seq (new $successful (new $subnetwork_id (seq (seq (seq (call %init_peer_id% ("peer" "timestamp_sec") [] t) (xor (seq (seq (seq (seq (call -relay- ("insecure_sig" "get_peer_id") [] peer_id) (new $option-inline (seq (xor (ap peer_id $option-inline) (null) ) (canon -relay- $option-inline #option-inline-0) ) ) ) (call -relay- ("registry" "get_key_bytes") [deal_id #option-inline-0 t [] ""] bytes) ) (call -relay- ("insecure_sig" "sign") [bytes] result-1) ) (xor (match result-1.$.success! false (ap result-1.$.error.[0]! $error) ) (seq (seq (seq (seq (seq (seq (ap result-1.$.signature! result-1_flat) (call -relay- ("registry" "get_key_id") [deal_id peer_id] id) ) (call -relay- ("op" "string_to_b58") [id] k) ) (call -relay- ("kad" "neighborhood") [k [] []] nodes) ) (xor (par (fold nodes n-0 (par (seq (xor (xor (seq (seq (seq (seq (call n-0 ("peer" "timestamp_sec") [] t-0) (call n-0 ("trust-graph" "get_weight") [peer_id t-0] weight) ) (new $option-inline-1 (seq (xor (ap peer_id $option-inline-1) (null) ) (canon n-0 $option-inline-1 #option-inline-1-0) ) ) ) (call n-0 ("registry" "register_key") [deal_id #option-inline-1-0 t [] "" result-1_flat.$.[0]! weight t-0] result-2) ) (xor (match result-2.$.success! true (ap true $successful) ) (ap result-2.$.error! $error) ) ) (call n-0 ("op" "noop") []) ) (seq (call -relay- ("op" "noop") []) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 12]) ) ) (call -relay- ("op" "noop") []) ) (next n-0) ) (never) ) (null) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 13]) ) ) (new $status-0 (new $result-3 (seq (seq (seq (par (seq (seq (seq (call -relay- ("math" "sub") [1 1] sub-0) (new $successful_test (seq (seq (seq (call -relay- ("math" "add") [sub-0 1] successful_incr) (fold $successful successful_fold_var (seq (seq (ap successful_fold_var $successful_test) (canon -relay- $successful_test #successful_iter_canon) ) (xor (match #successful_iter_canon.length successful_incr (null) ) (next successful_fold_var) ) ) (never) ) ) (canon -relay- $successful_test #successful_result_canon) ) (ap #successful_result_canon successful_gate) ) ) ) (call -relay- ("math" "sub") [1 1] sub-1) ) (ap "ok" $status-0) ) (call -relay- ("peer" "timeout") [6000 "timeout"] $status-0) ) (new $status-0_test (seq (seq (seq (call -relay- ("math" "add") [0 1] status-0_incr) (fold $status-0 status-0_fold_var (seq (seq (ap status-0_fold_var $status-0_test) (canon -relay- $status-0_test #status-0_iter_canon) ) (xor (match #status-0_iter_canon.length status-0_incr (null) ) (next status-0_fold_var) ) ) (never) ) ) (canon -relay- $status-0_test #status-0_result_canon) ) (ap #status-0_result_canon status-0_gate) ) ) ) (xor (match status-0_gate.$.[0]! "ok" (ap true $result-3) ) (ap false $result-3) ) ) (new $result-3_test (seq (seq (seq (call -relay- ("math" "add") [0 1] result-3_incr) (fold $result-3 result-3_fold_var (seq (seq (ap result-3_fold_var $result-3_test) (canon -relay- $result-3_test #result-3_iter_canon) ) (xor (match #result-3_iter_canon.length result-3_incr (null) ) (next result-3_fold_var) ) ) (never) ) ) (canon -relay- $result-3_test #result-3_result_canon) ) (ap #result-3_result_canon result-3_gate) ) ) ) ) ) ) (xor (match result-3_gate.$.[0]! false (ap "key wasn't created: timeout exceeded" $error) ) (ap id $subnetwork_id) ) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 14]) ) ) (canon %init_peer_id% $subnetwork_id #-subnetwork_id-fix-0) ) (ap #-subnetwork_id-fix-0 -subnetwork_id-flat-0) ) ) ) (xor (mismatch -subnetwork_id-flat-0 [] (xor (seq (seq (seq (seq (new $array-inline-79 (seq (seq (seq (ap "Subnet created" $array-inline-79) (canon %init_peer_id% $subnet_id #push-to-stream-1269) ) (ap #push-to-stream-1269 $array-inline-79) ) (canon %init_peer_id% $array-inline-79 #array-inline-79-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-40) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-79-0] str-36) ) (par (call %init_peer_id% (spell_id-40 "list_push_string") ["logs" str-36]) (seq (new $array-inline-80 (seq (seq (ap spell_id-40 $array-inline-80) (ap #array-inline-79-0 $array-inline-80) ) (canon %init_peer_id% $array-inline-80 #array-inline-80-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-80-0]) ) ) ) (ap -subnetwork_id-flat-0.$.[0]! $subnet_id) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 15]) ) ) (seq (seq (seq (new $array-inline-81 (seq (seq (seq (ap "error creating subnetwork" $array-inline-81) (canon %init_peer_id% $error #push-to-stream-1287) ) (ap #push-to-stream-1287 $array-inline-81) ) (canon %init_peer_id% $array-inline-81 #array-inline-81-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-41) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-81-0] str-37) ) (par (call %init_peer_id% (spell_id-41 "list_push_string") ["logs" str-37]) (seq (new $array-inline-82 (seq (seq (ap spell_id-41 $array-inline-82) (ap #array-inline-81-0 $array-inline-82) ) (canon %init_peer_id% $array-inline-82 #array-inline-82-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-82-0]) ) ) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 16]) ) ) ) (xor (seq (seq (call %init_peer_id% ("math" "sub") [now registered.$.num!] sub-2) (call %init_peer_id% ("cmp" "gt") [sub-2 43200] gt-0) ) (match gt-0 true (xor (seq (call %init_peer_id% (spell_id-1 "get_string") ["subnet_id"] sid) (xor (match sid.$.success! true (ap sid.$.str! $subnet_id) ) (seq (seq (seq (new $array-inline-83 (seq (seq (ap "error reading subnet_id" $array-inline-83) (ap sid $array-inline-83) ) (canon %init_peer_id% $array-inline-83 #array-inline-83-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-42) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-83-0] str-38) ) (par (call %init_peer_id% (spell_id-42 "list_push_string") ["logs" str-38]) (seq (new $array-inline-84 (seq (seq (ap spell_id-42 $array-inline-84) (ap #array-inline-83-0 $array-inline-84) ) (canon %init_peer_id% $array-inline-84 #array-inline-84-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-84-0]) ) ) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 17]) ) ) ) (call %init_peer_id% ("op" "noop") []) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 18]) ) ) (seq (seq (seq (new $array-inline-85 (seq (seq (ap "error reading worker_registered" $array-inline-85) (ap registered $array-inline-85) ) (canon %init_peer_id% $array-inline-85 #array-inline-85-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-43) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-85-0] str-39) ) (par (call %init_peer_id% (spell_id-43 "list_push_string") ["logs" str-39]) (seq (new $array-inline-86 (seq (seq (ap spell_id-43 $array-inline-86) (ap #array-inline-85-0 $array-inline-86) ) (canon %init_peer_id% $array-inline-86 #array-inline-86-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-86-0]) ) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 19]) ) ) (seq (seq (seq (new $array-inline-87 (seq (seq (ap "error reading subnet_created" $array-inline-87) (ap created $array-inline-87) ) (canon %init_peer_id% $array-inline-87 #array-inline-87-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-44) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-87-0] str-40) ) (par (call %init_peer_id% (spell_id-44 "list_push_string") ["logs" str-40]) (seq (new $array-inline-88 (seq (seq (ap spell_id-44 $array-inline-88) (ap #array-inline-87-0 $array-inline-88) ) (canon %init_peer_id% $array-inline-88 #array-inline-88-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-88-0]) ) ) ) ) ) (xor (seq (canon %init_peer_id% $subnet_id #subnet_id_canon) (mismatch #subnet_id_canon [] (xor (seq (seq (seq (seq (new $subnet_id_test (seq (seq (seq (call %init_peer_id% ("math" "add") [0 1] subnet_id_incr) (fold $subnet_id subnet_id_fold_var (seq (seq (ap subnet_id_fold_var $subnet_id_test) (canon %init_peer_id% $subnet_id_test #subnet_id_iter_canon) ) (xor (match #subnet_id_iter_canon.length subnet_id_incr (null) ) (next subnet_id_fold_var) ) ) (never) ) ) (canon %init_peer_id% $subnet_id_test #subnet_id_result_canon) ) (ap #subnet_id_result_canon subnet_id_gate) ) ) (call %init_peer_id% (spell_id-1 "set_string") ["subnet_id" subnet_id_gate.$.[0]!]) ) (call %init_peer_id% (spell_id-1 "set_u32") ["subnet_created" now]) ) (xor (seq (new $subnet_id_test-0 (seq (seq (seq (call -relay- ("math" "add") [0 1] subnet_id_incr-0) (fold $subnet_id subnet_id_fold_var-0 (seq (seq (ap subnet_id_fold_var-0 $subnet_id_test-0) (canon -relay- $subnet_id_test-0 #subnet_id_iter_canon-0) ) (xor (match #subnet_id_iter_canon-0.length subnet_id_incr-0 (null) ) (next subnet_id_fold_var-0) ) ) (never) ) ) (canon -relay- $subnet_id_test-0 #subnet_id_result_canon-0) ) (ap #subnet_id_result_canon-0 subnet_id_gate-0) ) ) (new $successful-0 (new $error_get (new $success (seq (seq (seq (new $error-1 (new $result-4 (seq (seq (seq (seq (seq (seq (seq (seq (call -relay- ("peer" "timestamp_sec") [] t-2) (new $option-inline-2 (seq (xor (ap -relay- $option-inline-2) (null) ) (canon -relay- $option-inline-2 #option-inline-2-0) ) ) ) (call -relay- ("registry" "get_record_metadata_bytes") [subnet_id_gate-0.$.[0]! %init_peer_id% t-2 "" %init_peer_id% #option-inline-2-0 [] []] bytes-0) ) (xor (call %init_peer_id% ("sig" "sign") [bytes-0] sig_result-0) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 20]) ) ) (xor (match sig_result-0.$.success! true (xor (call -relay- ("registry" "create_record_metadata") [subnet_id_gate-0.$.[0]! %init_peer_id% t-2 "" %init_peer_id% #option-inline-2-0 [] [] sig_result-0.$.signature.[0]!] $result-4) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 21]) ) ) (ap sig_result-0.$.error.[0]! $error-1) ) ) (canon -relay- $result-4 #-result-fix-0) ) (ap #-result-fix-0 -result-flat-0) ) (canon -relay- $error-1 #-error-fix-1) ) (ap #-error-fix-1 -error-flat-1) ) ) ) (xor (match -result-flat-0 [] (seq (ap false $success) (ap -error-flat-1.$.[0]! $error-0) ) ) (seq (seq (call -relay- ("peer" "timestamp_sec") [] t-1) (new $signature (seq (seq (call -relay- ("registry" "get_record_bytes") [-result-flat-0.$.[0]! t-1] bytes-1) (xor (call %init_peer_id% ("sig" "sign") [bytes-1] $signature) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 22]) ) ) (new $signature_test (seq (seq (seq (call -relay- ("math" "add") [0 1] signature_incr) (fold $signature signature_fold_var (seq (seq (ap signature_fold_var $signature_test) (canon -relay- $signature_test #signature_iter_canon) ) (xor (match #signature_iter_canon.length signature_incr (null) ) (next signature_fold_var) ) ) (never) ) ) (canon -relay- $signature_test #signature_result_canon) ) (ap #signature_result_canon signature_gate) ) ) ) ) ) (xor (match signature_gate.$.[0].success! false (seq (ap signature_gate.$.[0].error.[0]! $error-0) (ap false $success) ) ) (seq (new $resources (new $successful-1 (new $result-5 (seq (seq (seq (seq (seq (seq (call -relay- ("op" "string_to_b58") [subnet_id_gate-0.$.[0]!] k-0) (call -relay- ("kad" "neighborhood") [k-0 [] []] nodes-2) ) (par (fold nodes-2 n-2-0 (par (seq (xor (xor (seq (call n-2-0 ("registry" "get_key_metadata") [subnet_id_gate-0.$.[0]!] get_result) (xor (match get_result.$.success! true (seq (ap get_result.$.key! $resources) (ap true $successful-1) ) ) (seq (call n-2-0 ("op" "concat_strings") [get_result.$.error! " on "] e) (call n-2-0 ("op" "concat_strings") [e n-2-0] $error-2) ) ) ) (call n-2-0 ("op" "noop") []) ) (seq (call -relay- ("op" "noop") []) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 23]) ) ) (call -relay- ("op" "noop") []) ) (next n-2-0) ) (never) ) (null) ) ) (new $status-1 (new $result-6 (seq (seq (seq (par (seq (seq (seq (call -relay- ("math" "sub") [1 1] sub-3) (new $successful-1_test (seq (seq (seq (call -relay- ("math" "add") [sub-3 1] successful-1_incr) (fold $successful-1 successful-1_fold_var (seq (seq (ap successful-1_fold_var $successful-1_test) (canon -relay- $successful-1_test #successful-1_iter_canon) ) (xor (match #successful-1_iter_canon.length successful-1_incr (null) ) (next successful-1_fold_var) ) ) (never) ) ) (canon -relay- $successful-1_test #successful-1_result_canon) ) (ap #successful-1_result_canon successful-1_gate) ) ) ) (call -relay- ("math" "sub") [1 1] sub-4) ) (ap "ok" $status-1) ) (call -relay- ("peer" "timeout") [6000 "timeout"] $status-1) ) (new $status-1_test (seq (seq (seq (call -relay- ("math" "add") [0 1] status-1_incr) (fold $status-1 status-1_fold_var (seq (seq (ap status-1_fold_var $status-1_test) (canon -relay- $status-1_test #status-1_iter_canon) ) (xor (match #status-1_iter_canon.length status-1_incr (null) ) (next status-1_fold_var) ) ) (never) ) ) (canon -relay- $status-1_test #status-1_result_canon) ) (ap #status-1_result_canon status-1_gate) ) ) ) (xor (match status-1_gate.$.[0]! "ok" (ap true $result-6) ) (ap false $result-6) ) ) (new $result-6_test (seq (seq (seq (call -relay- ("math" "add") [0 1] result-6_incr) (fold $result-6 result-6_fold_var (seq (seq (ap result-6_fold_var $result-6_test) (canon -relay- $result-6_test #result-6_iter_canon) ) (xor (match #result-6_iter_canon.length result-6_incr (null) ) (next result-6_fold_var) ) ) (never) ) ) (canon -relay- $result-6_test #result-6_result_canon) ) (ap #result-6_result_canon result-6_gate) ) ) ) ) ) ) (xor (match result-6_gate.$.[0]! false (ap "resource not found: timeout exceeded" $error-2) ) (seq (seq (canon -relay- $resources #resources_canon) (call -relay- ("registry" "merge_keys") [#resources_canon] merge_result) ) (xor (match merge_result.$.success! true (ap merge_result.$.key! $result-5) ) (ap merge_result.$.error! $error-2) ) ) ) ) (canon -relay- $result-5 #-result-fix-0-0) ) (ap #-result-fix-0-0 -result-flat-0-0) ) ) ) ) (xor (match -result-flat-0-0 [] (xor (seq (seq (canon -relay- $error-2 #error-2_canon) (fold #error-2_canon e-0-0 (seq (ap e-0-0 $error-0) (next e-0-0) ) ) ) (ap false $success) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 24]) ) ) (seq (seq (seq (call -relay- ("peer" "timestamp_sec") [] t-3) (call -relay- ("trust-graph" "get_weight") [-result-flat-0-0.$.[0].owner_peer_id! t-3] weight-0) ) (call -relay- ("registry" "republish_key") [-result-flat-0-0.$.[0]! weight-0 t-3] result-7) ) (xor (match result-7.$.success! false (seq (ap result-7.$.error! $error-0) (ap false $success) ) ) (seq (seq (seq (seq (null) (call -relay- ("peer" "timestamp_sec") [] t-4) ) (call -relay- ("trust-graph" "get_weight") [-result-flat-0.$.[0].issued_by! t-4] weight-1) ) (call -relay- ("registry" "put_record") [-result-flat-0.$.[0]! t-1 signature_gate.$.[0].signature.[0]! weight-1 t-4] result-8) ) (xor (match result-8.$.success! false (seq (ap result-8.$.error! $error-0) (ap false $success) ) ) (seq (seq (seq (seq (call -relay- ("op" "string_to_b58") [subnet_id_gate-0.$.[0]!] k-1) (call -relay- ("kad" "neighborhood") [k-1 [] []] nodes-3) ) (par (fold nodes-3 n-1-0 (par (seq (xor (xor (seq (seq (seq (call n-1-0 ("peer" "timestamp_sec") [] t-5) (call n-1-0 ("trust-graph" "get_weight") [-result-flat-0-0.$.[0].owner_peer_id! t-5] weight-2) ) (call n-1-0 ("registry" "republish_key") [-result-flat-0-0.$.[0]! weight-2 t-5] result-9) ) (xor (match result-9.$.success! false (ap result-9.$.error! $error-0) ) (seq (seq (seq (seq (null) (call n-1-0 ("peer" "timestamp_sec") [] t-6) ) (call n-1-0 ("trust-graph" "get_weight") [-result-flat-0.$.[0].issued_by! t-6] weight-3) ) (call n-1-0 ("registry" "put_record") [-result-flat-0.$.[0]! t-1 signature_gate.$.[0].signature.[0]! weight-3 t-6] result-10) ) (xor (match result-10.$.success! true (ap true $successful-0) ) (ap result-10.$.error! $error-0) ) ) ) ) (call n-1-0 ("op" "noop") []) ) (seq (call -relay- ("op" "noop") []) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 25]) ) ) (call -relay- ("op" "noop") []) ) (next n-1-0) ) (never) ) (null) ) ) (new $status-2 (new $result-11 (seq (seq (seq (par (seq (seq (seq (call -relay- ("math" "sub") [1 1] sub-5) (new $successful-0_test (seq (seq (seq (call -relay- ("math" "add") [sub-5 1] successful-0_incr) (fold $successful-0 successful-0_fold_var (seq (seq (ap successful-0_fold_var $successful-0_test) (canon -relay- $successful-0_test #successful-0_iter_canon) ) (xor (match #successful-0_iter_canon.length successful-0_incr (null) ) (next successful-0_fold_var) ) ) (never) ) ) (canon -relay- $successful-0_test #successful-0_result_canon) ) (ap #successful-0_result_canon successful-0_gate) ) ) ) (call -relay- ("math" "sub") [1 1] sub-6) ) (ap "ok" $status-2) ) (call -relay- ("peer" "timeout") [6000 "timeout"] $status-2) ) (new $status-2_test (seq (seq (seq (call -relay- ("math" "add") [0 1] status-2_incr) (fold $status-2 status-2_fold_var (seq (seq (ap status-2_fold_var $status-2_test) (canon -relay- $status-2_test #status-2_iter_canon) ) (xor (match #status-2_iter_canon.length status-2_incr (null) ) (next status-2_fold_var) ) ) (never) ) ) (canon -relay- $status-2_test #status-2_result_canon) ) (ap #status-2_result_canon status-2_gate) ) ) ) (xor (match status-2_gate.$.[0]! "ok" (ap true $result-11) ) (ap false $result-11) ) ) (new $result-11_test (seq (seq (seq (call -relay- ("math" "add") [0 1] result-11_incr) (fold $result-11 result-11_fold_var (seq (seq (ap result-11_fold_var $result-11_test) (canon -relay- $result-11_test #result-11_iter_canon) ) (xor (match #result-11_iter_canon.length result-11_incr (null) ) (next result-11_fold_var) ) ) (never) ) ) (canon -relay- $result-11_test #result-11_result_canon) ) (ap #result-11_result_canon result-11_gate) ) ) ) ) ) ) (ap result-11_gate.$.[0]! $success) ) ) ) ) ) ) ) ) ) ) ) (new $success_test (seq (seq (seq (call -relay- ("math" "add") [0 1] success_incr) (fold $success success_fold_var (seq (seq (ap success_fold_var $success_test) (canon -relay- $success_test #success_iter_canon) ) (xor (match #success_iter_canon.length success_incr (null) ) (next success_fold_var) ) ) (never) ) ) (canon -relay- $success_test #success_result_canon) ) (ap #success_result_canon success_gate) ) ) ) (xor (match success_gate.$.[0]! false (ap "worker hasn't registered: timeout exceeded" $error-0) ) (call -relay- ("op" "noop") []) ) ) ) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 26]) ) ) (xor (match success_gate.$.[0]! true (xor (seq (seq (seq (seq (call %init_peer_id% (spell_id-1 "set_u32") ["worker_registered" now]) (new $array-inline-89 (seq (seq (ap "worker successfully registered in registry" $array-inline-89) (ap success_gate.$.[0]! $array-inline-89) ) (canon %init_peer_id% $array-inline-89 #array-inline-89-0) ) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-45) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-89-0] str-41) ) (par (call %init_peer_id% (spell_id-45 "list_push_string") ["logs" str-41]) (seq (new $array-inline-90 (seq (seq (ap spell_id-45 $array-inline-90) (ap #array-inline-89-0 $array-inline-90) ) (canon %init_peer_id% $array-inline-90 #array-inline-90-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-90-0]) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 27]) ) ) (seq (seq (seq (new $array-inline-91 (seq (seq (seq (ap "error registering worker" $array-inline-91) (canon %init_peer_id% $error-0 #push-to-stream-1724) ) (ap #push-to-stream-1724 $array-inline-91) ) (canon %init_peer_id% $array-inline-91 #array-inline-91-0) ) ) (call %init_peer_id% ("getDataSrv" "spell_id") [] spell_id-46) ) (call %init_peer_id% ("debug" "stringify") [#array-inline-91-0] str-42) ) (par (call %init_peer_id% (spell_id-46 "list_push_string") ["logs" str-42]) (seq (new $array-inline-92 (seq (seq (ap spell_id-46 $array-inline-92) (ap #array-inline-91-0 $array-inline-92) ) (canon %init_peer_id% $array-inline-92 #array-inline-92-0) ) ) (call %init_peer_id% ("run-console" "print") [#array-inline-92-0]) ) ) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 28]) ) ) ) (call %init_peer_id% ("op" "noop") []) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 29]) ) ) (call %init_peer_id% ("op" "noop") []) ) ) ) ) ) ) ) ) ) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 30]) )