-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(anomaly): new anomaly criteria [fixes vm-426] (#2037)
* feat(anomaly): new anomaly criteria [fixes vm-426] * WIP review changes --------- Co-authored-by: folex <[email protected]> Co-authored-by: Nick <[email protected]>
- Loading branch information
1 parent
f56db61
commit d59b885
Showing
16 changed files
with
315 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
crates/particle-node-tests/tests/builtins/services/registry/blueprint.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "registry", | ||
"dependencies": [ | ||
"name:sqlite3", | ||
"name:registry" | ||
] | ||
} |
Binary file added
BIN
+1.67 MB
crates/particle-node-tests/tests/builtins/services/registry/registry.wasm
Binary file not shown.
8 changes: 8 additions & 0 deletions
8
crates/particle-node-tests/tests/builtins/services/registry/registry_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "registry", | ||
"max_heap_size": "8 MiB", | ||
"preopened_files": ["/tmp"], | ||
"mapped_dirs": { | ||
"tmp": "./tmp" | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...ts/builtins/services/registry/scheduled/registry-scheduled-scripts.clearExpired_86400.air
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
; 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.7.3-319 | ||
|
||
(xor | ||
(xor | ||
(seq | ||
(call %init_peer_id% ("peer" "timestamp_sec") [] t) | ||
(call %init_peer_id% ("registry" "clear_expired") [t]) | ||
) | ||
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) | ||
) | ||
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) | ||
) |
62 changes: 62 additions & 0 deletions
62
.../tests/builtins/services/registry/scheduled/registry-scheduled-scripts.replicate_3600.air
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
; 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.7.3-319 | ||
|
||
(xor | ||
(xor | ||
(seq | ||
(seq | ||
(call %init_peer_id% ("peer" "timestamp_sec") [] t) | ||
(call %init_peer_id% ("registry" "evict_stale") [t] res) | ||
) | ||
(par | ||
(fold res.$.results! r-0 | ||
(par | ||
(seq | ||
(seq | ||
(call %init_peer_id% ("op" "string_to_b58") [r-0.$.key.id!] k) | ||
(call %init_peer_id% ("kad" "neighborhood") [k [] []] nodes) | ||
) | ||
(par | ||
(fold nodes n-0 | ||
(par | ||
(new $records_weights | ||
(xor | ||
(seq | ||
(seq | ||
(seq | ||
(seq | ||
(call n-0 ("peer" "timestamp_sec") [] tt) | ||
(call n-0 ("trust-graph" "get_weight") [r-0.$.key.owner_peer_id! tt] key_weight) | ||
) | ||
(call n-0 ("registry" "republish_key") [r-0.$.key! key_weight tt]) | ||
) | ||
(fold r-0.$.records! record-0 | ||
(seq | ||
(call n-0 ("trust-graph" "get_weight") [record-0.$.peer_id! tt] $records_weights) | ||
(next record-0) | ||
) | ||
) | ||
) | ||
(call n-0 ("registry" "republish_records") [r-0.$.records! $records_weights tt]) | ||
) | ||
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) | ||
) | ||
) | ||
(next n-0) | ||
) | ||
) | ||
(null) | ||
) | ||
) | ||
(next r-0) | ||
) | ||
) | ||
(null) | ||
) | ||
) | ||
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) | ||
) | ||
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3]) | ||
) |
Binary file added
BIN
+886 KB
crates/particle-node-tests/tests/builtins/services/registry/sqlite3.wasm
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
crates/particle-node-tests/tests/builtins/services/registry/sqlite3_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "sqlite3", | ||
"max_heap_size": "64 MiB" | ||
} |
7 changes: 7 additions & 0 deletions
7
particle-node/tests/builtins/services/registry/blueprint.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "registry", | ||
"dependencies": [ | ||
"name:sqlite3", | ||
"name:registry" | ||
] | ||
} |
Binary file not shown.
8 changes: 8 additions & 0 deletions
8
particle-node/tests/builtins/services/registry/registry_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "registry", | ||
"max_heap_size": "8 MiB", | ||
"preopened_files": ["/tmp"], | ||
"mapped_dirs": { | ||
"tmp": "./tmp" | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...ts/builtins/services/registry/scheduled/registry-scheduled-scripts.clearExpired_86400.air
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
; 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.7.3-319 | ||
|
||
(xor | ||
(xor | ||
(seq | ||
(call %init_peer_id% ("peer" "timestamp_sec") [] t) | ||
(call %init_peer_id% ("registry" "clear_expired") [t]) | ||
) | ||
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) | ||
) | ||
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) | ||
) |
Oops, something went wrong.