update aqua

This commit is contained in:
DieMyst 2021-06-22 12:52:34 +03:00
parent 39aacd86de
commit d8e8d59400
4 changed files with 134 additions and 170 deletions

68
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "fluence-admin", "name": "fluence-admin",
"version": "0.0.1", "version": "0.1.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -998,9 +998,9 @@
} }
}, },
"@fluencelabs/aqua-cli": { "@fluencelabs/aqua-cli": {
"version": "0.1.5-142", "version": "0.1.7-152",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-cli/-/aqua-cli-0.1.5-142.tgz", "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-cli/-/aqua-cli-0.1.7-152.tgz",
"integrity": "sha512-22BhF9j44FPTUc3JM6tGRz0SnyMthJM05cIuS98mHYTTTPU7i0jOS0dl/V7BYzSBJBAwEmZLA1Z/3bGr9PUBEA==", "integrity": "sha512-oVT9IWllJb8dhzKEMoIWd9FDFEKkBo8zKlzUbQxU7OCbjxkuozF+aiMqJEQlFNSbBL9z1b5KVkF1gcgmSkKWSg==",
"dev": true "dev": true
}, },
"@fluencelabs/aqua-lib": { "@fluencelabs/aqua-lib": {
@ -1010,9 +1010,9 @@
"dev": true "dev": true
}, },
"@fluencelabs/avm": { "@fluencelabs/avm": {
"version": "0.9.12", "version": "0.10.5",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.9.12.tgz", "resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.10.5.tgz",
"integrity": "sha512-NCRGJafLa1Zs98IIOIALrPUoOEjesITsB9of2/r+IDgGKunf0NjI2/tqU5pK+37ye/qro5W+FJsHyseDh7zSDQ==", "integrity": "sha512-R65qY8PeVdlF27UDlcODTnxSBfEbiqXivHWoM62e7mZYr4T/lcZEklqMPOkRrymJWs7y/zP/D8N7zxecDNLBOA==",
"requires": { "requires": {
"base64-js": "1.5.1" "base64-js": "1.5.1"
}, },
@ -1025,11 +1025,11 @@
} }
}, },
"@fluencelabs/fluence": { "@fluencelabs/fluence": {
"version": "0.9.47", "version": "0.9.53",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.9.47.tgz", "resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.9.53.tgz",
"integrity": "sha512-NueaISvOvE1dDoeyfDcVmcDteXLyMbhb/hU7Z9O+5rJEvMYo2CzhIGAQo9bTDFLNBoamXFJdpqV3iLBn/kRs9Q==", "integrity": "sha512-DxazRumUWM4idI55ZSbfI26lRm5tvrgBYPa4XwPmxSbjgkLE5OjZ+sUStesMiUSst6ROQkwMM4v8BK7WqAyMuw==",
"requires": { "requires": {
"@fluencelabs/avm": "0.9.12", "@fluencelabs/avm": "0.10.5",
"async": "3.2.0", "async": "3.2.0",
"base64-js": "1.3.1", "base64-js": "1.3.1",
"bs58": "4.0.1", "bs58": "4.0.1",
@ -1053,13 +1053,13 @@
"integrity": "sha512-TetSwl2PnLEoxkP/lr3MFpqSRKFO02PJMyjeN2TQbUUviQyfYLpL/IQFocaQZc0fRzOQWVg65aqSStHtA3rB6w==" "integrity": "sha512-TetSwl2PnLEoxkP/lr3MFpqSRKFO02PJMyjeN2TQbUUviQyfYLpL/IQFocaQZc0fRzOQWVg65aqSStHtA3rB6w=="
}, },
"@motrix/nat-api": { "@motrix/nat-api": {
"version": "0.3.1", "version": "0.3.2",
"resolved": "https://registry.npmjs.org/@motrix/nat-api/-/nat-api-0.3.1.tgz", "resolved": "https://registry.npmjs.org/@motrix/nat-api/-/nat-api-0.3.2.tgz",
"integrity": "sha512-mUsW8BlSK4bE5kjC5H4oQPjnXXuiRtE2V26tzW/AOroXl5CuhMEr9EDrr+wUFvDHlDwK4B0uSOBa8yILr6AfbQ==", "integrity": "sha512-T3LSHnEUULbSU1o1zCZZ1ul8l8Jm98f0fz/0BeF7DhNvrV63YllLCD4vUR9hFZWu/+WTIVPnbH8dBK5Ckuveuw==",
"requires": { "requires": {
"async": "^3.2.0", "async": "^3.2.0",
"debug": "^4.1.1", "debug": "^4.3.1",
"default-gateway": "^6.0.1", "default-gateway": "^6.0.3",
"request": "^2.88.2", "request": "^2.88.2",
"unordered-array-remove": "^1.0.2", "unordered-array-remove": "^1.0.2",
"xml2js": "^0.4.23" "xml2js": "^0.4.23"
@ -1074,9 +1074,9 @@
} }
}, },
"execa": { "execa": {
"version": "5.0.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.0.1.tgz", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-4hFTjFbFzQa3aCLobpbPJR/U+VoL1wdV5ozOWjeet0AWDeYr9UFGM1eUFWHX+VtOWFq4p0xXUXfW1YxUaP4fpw==", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"requires": { "requires": {
"cross-spawn": "^7.0.3", "cross-spawn": "^7.0.3",
"get-stream": "^6.0.0", "get-stream": "^6.0.0",
@ -8082,9 +8082,9 @@
}, },
"dependencies": { "dependencies": {
"cids": { "cids": {
"version": "1.1.6", "version": "1.1.7",
"resolved": "https://registry.npmjs.org/cids/-/cids-1.1.6.tgz", "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.7.tgz",
"integrity": "sha512-5P+Jas2bVpjiHibp/SOwKY+v7JhAjTChaAZN+vCIrsWXn/JZV0frX22Vp5zZgEyJRPco79pX+yNQ2S3LkRukHQ==", "integrity": "sha512-dlh+K0hMwFAFFjWQ2ZzxOhgGVNVREPdmk8cqHFui2U4sOodcemLMxdE5Ujga4cDcDQhWfldEPThkfu6KWBt1eA==",
"requires": { "requires": {
"multibase": "^4.0.1", "multibase": "^4.0.1",
"multicodec": "^3.0.1", "multicodec": "^3.0.1",
@ -8406,9 +8406,9 @@
}, },
"dependencies": { "dependencies": {
"cids": { "cids": {
"version": "1.1.6", "version": "1.1.7",
"resolved": "https://registry.npmjs.org/cids/-/cids-1.1.6.tgz", "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.7.tgz",
"integrity": "sha512-5P+Jas2bVpjiHibp/SOwKY+v7JhAjTChaAZN+vCIrsWXn/JZV0frX22Vp5zZgEyJRPco79pX+yNQ2S3LkRukHQ==", "integrity": "sha512-dlh+K0hMwFAFFjWQ2ZzxOhgGVNVREPdmk8cqHFui2U4sOodcemLMxdE5Ujga4cDcDQhWfldEPThkfu6KWBt1eA==",
"requires": { "requires": {
"multibase": "^4.0.1", "multibase": "^4.0.1",
"multicodec": "^3.0.1", "multicodec": "^3.0.1",
@ -9154,9 +9154,9 @@
}, },
"dependencies": { "dependencies": {
"cids": { "cids": {
"version": "1.1.6", "version": "1.1.7",
"resolved": "https://registry.npmjs.org/cids/-/cids-1.1.6.tgz", "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.7.tgz",
"integrity": "sha512-5P+Jas2bVpjiHibp/SOwKY+v7JhAjTChaAZN+vCIrsWXn/JZV0frX22Vp5zZgEyJRPco79pX+yNQ2S3LkRukHQ==", "integrity": "sha512-dlh+K0hMwFAFFjWQ2ZzxOhgGVNVREPdmk8cqHFui2U4sOodcemLMxdE5Ujga4cDcDQhWfldEPThkfu6KWBt1eA==",
"requires": { "requires": {
"multibase": "^4.0.1", "multibase": "^4.0.1",
"multicodec": "^3.0.1", "multicodec": "^3.0.1",
@ -10590,9 +10590,9 @@
}, },
"dependencies": { "dependencies": {
"cids": { "cids": {
"version": "1.1.6", "version": "1.1.7",
"resolved": "https://registry.npmjs.org/cids/-/cids-1.1.6.tgz", "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.7.tgz",
"integrity": "sha512-5P+Jas2bVpjiHibp/SOwKY+v7JhAjTChaAZN+vCIrsWXn/JZV0frX22Vp5zZgEyJRPco79pX+yNQ2S3LkRukHQ==", "integrity": "sha512-dlh+K0hMwFAFFjWQ2ZzxOhgGVNVREPdmk8cqHFui2U4sOodcemLMxdE5Ujga4cDcDQhWfldEPThkfu6KWBt1eA==",
"requires": { "requires": {
"multibase": "^4.0.1", "multibase": "^4.0.1",
"multicodec": "^3.0.1", "multicodec": "^3.0.1",
@ -15643,9 +15643,9 @@
"dev": true "dev": true
}, },
"ws": { "ws": {
"version": "7.4.6", "version": "7.5.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.0.tgz",
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" "integrity": "sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw=="
}, },
"xml2js": { "xml2js": {
"version": "0.4.23", "version": "0.4.23",

View File

@ -30,7 +30,7 @@
}, },
"homepage": "https://github.com/fluencelabs/fluence-admin#readme", "homepage": "https://github.com/fluencelabs/fluence-admin#readme",
"dependencies": { "dependencies": {
"@fluencelabs/fluence": "0.9.47", "@fluencelabs/fluence": "0.9.53",
"@fluencelabs/fluence-network-environment": "1.0.9", "@fluencelabs/fluence-network-environment": "1.0.9",
"css-spinners": "^1.0.1", "css-spinners": "^1.0.1",
"tachyons": "^4.12.0", "tachyons": "^4.12.0",
@ -39,7 +39,7 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.11.6", "@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5", "@babel/preset-env": "^7.11.5",
"@fluencelabs/aqua-cli": "^0.1.5-142", "@fluencelabs/aqua-cli": "^0.1.7-152",
"@fluencelabs/aqua-lib": "^0.1.5", "@fluencelabs/aqua-lib": "^0.1.5",
"@types/yup": "^0.29.11", "@types/yup": "^0.29.11",
"babel-loader": "^8.1.0", "babel-loader": "^8.1.0",

View File

@ -3,7 +3,7 @@
* This file is auto-generated. Do not edit manually: changes may be erased. * This file is auto-generated. Do not edit manually: changes may be erased.
* Generated by Aqua compiler: https://github.com/fluencelabs/aqua/. * 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 * If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues
* Aqua version: 0.1.5-142 * Aqua version: 0.1.7-152
* *
*/ */
import { RequestFlowBuilder } from '@fluencelabs/fluence/dist/api.unstable'; import { RequestFlowBuilder } from '@fluencelabs/fluence/dist/api.unstable';
@ -26,7 +26,7 @@ export async function askAllAndSend(client, peer) {
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-) (call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "peer") [] peer) (call %init_peer_id% ("getDataSrv" "peer") [] peer)
) )
(call -relay- ("op" "identity") []) (call -relay- ("op" "noop") [])
) )
(xor (xor
(seq (seq
@ -40,12 +40,12 @@ export async function askAllAndSend(client, peer) {
(call peer ("srv" "list") [] services) (call peer ("srv" "list") [] services)
) )
(seq (seq
(call -relay- ("op" "identity") []) (call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
) )
) )
) )
(call -relay- ("op" "identity") []) (call -relay- ("op" "noop") [])
) )
(call %init_peer_id% ("event" "all_info") [peer ident services blueprints modules]) (call %init_peer_id% ("event" "all_info") [peer ident services blueprints modules])
) )
@ -95,7 +95,7 @@ export async function findAndAskNeighboursSchema(client, relayPeerId, clientId)
) )
(call %init_peer_id% ("getDataSrv" "clientId") [] clientId) (call %init_peer_id% ("getDataSrv" "clientId") [] clientId)
) )
(call -relay- ("op" "identity") []) (call -relay- ("op" "noop") [])
) )
(xor (xor
(seq (seq
@ -108,24 +108,24 @@ export async function findAndAskNeighboursSchema(client, relayPeerId, clientId)
(fold neighbors2 n2 (fold neighbors2 n2
(seq (seq
(seq (seq
(seq (xor
(xor (seq
(seq (seq
(seq (seq
(seq (call n2 ("peer" "identify") [] ident)
(call n2 ("peer" "identify") [] ident) (call n2 ("dist" "list_blueprints") [] blueprints)
(call n2 ("dist" "list_blueprints") [] blueprints)
)
(call n2 ("dist" "list_modules") [] modules)
) )
(call n2 ("srv" "list") [] services) (call n2 ("dist" "list_modules") [] modules)
) )
(call n2 ("srv" "list") [] services)
)
(seq
(seq (seq
(call -relay- ("op" "identity") []) (call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
) )
(call -relay- ("op" "noop") [])
) )
(call -relay- ("op" "identity") [])
) )
(call n ("event" "all_info") [n2 ident services blueprints modules]) (call n ("event" "all_info") [n2 ident services blueprints modules])
) )
@ -134,36 +134,18 @@ export async function findAndAskNeighboursSchema(client, relayPeerId, clientId)
) )
) )
(seq (seq
(call -relay- ("op" "identity") []) (call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
) )
) )
(seq (next n)
(seq
(seq
(call -relay- ("op" "identity") [])
(next n)
)
(call -relay- ("op" "identity") [])
)
(call %init_peer_id% ("op" "identity") [])
)
) )
) )
) )
(seq (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
(seq
(call -relay- ("op" "identity") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
(call -relay- ("op" "identity") [])
)
) )
) )
(seq (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4])
(call -relay- ("op" "identity") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4])
)
) )
`, `,
@ -204,140 +186,122 @@ export async function getAll(client, relayPeerId, knownPeers) {
(seq (seq
(seq (seq
(seq (seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "relayPeerId") [] relayPeerId)
)
(call %init_peer_id% ("getDataSrv" "knownPeers") [] knownPeers)
)
(par
(par
(seq (seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "relayPeerId") [] relayPeerId)
)
(call %init_peer_id% ("getDataSrv" "knownPeers") [] knownPeers)
)
(par
(seq (seq
(seq (seq
(seq (call -relay- ("op" "noop") [])
(call -relay- ("op" "identity") []) (xor
(xor
(seq
(seq
(seq
(call relayPeerId ("peer" "identify") [] ident)
(call relayPeerId ("dist" "list_blueprints") [] blueprints)
)
(call relayPeerId ("dist" "list_modules") [] modules)
)
(call relayPeerId ("srv" "list") [] services)
)
(seq
(call -relay- ("op" "identity") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "identity") [])
)
(call %init_peer_id% ("event" "all_info") [relayPeerId ident services blueprints modules])
)
(fold knownPeers peer
(par
(seq
(seq (seq
(seq (seq
(call -relay- ("op" "identity") []) (seq
(xor (call relayPeerId ("peer" "identify") [] ident)
(call relayPeerId ("dist" "list_blueprints") [] blueprints)
)
(call relayPeerId ("dist" "list_modules") [] modules)
)
(call relayPeerId ("srv" "list") [] services)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "noop") [])
)
(call %init_peer_id% ("event" "all_info") [relayPeerId ident services blueprints modules])
)
(fold knownPeers peer
(par
(seq
(seq
(seq
(call -relay- ("op" "noop") [])
(xor
(seq
(seq (seq
(seq (seq
(seq (call peer ("peer" "identify") [] ident0)
(call peer ("peer" "identify") [] ident0) (call peer ("dist" "list_blueprints") [] blueprints0)
(call peer ("dist" "list_blueprints") [] blueprints0)
)
(call peer ("dist" "list_modules") [] modules0)
) )
(call peer ("srv" "list") [] services0) (call peer ("dist" "list_modules") [] modules0)
)
(seq
(call -relay- ("op" "identity") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
) )
(call peer ("srv" "list") [] services0)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
) )
) )
(call -relay- ("op" "identity") [])
) )
(call %init_peer_id% ("event" "all_info") [peer ident0 services0 blueprints0 modules0]) (call -relay- ("op" "noop") [])
) )
(next peer) (call %init_peer_id% ("event" "all_info") [peer ident0 services0 blueprints0 modules0])
) )
(next peer)
) )
) )
) )
(call -relay- ("op" "identity") [])
)
(xor
(seq (seq
(call relayPeerId ("kad" "neighborhood") [%init_peer_id% false] neighbors) (call -relay- ("op" "noop") [])
(fold neighbors n (xor
(par (seq
(xor (call relayPeerId ("kad" "neighborhood") [%init_peer_id% false] neighbors)
(seq (fold neighbors n
(call n ("kad" "neighborhood") [%init_peer_id% false] neighbors2) (par
(fold neighbors2 n2 (xor
(seq (seq
(seq (call n ("kad" "neighborhood") [%init_peer_id% false] neighbors2)
(fold neighbors2 n2
(seq (seq
(xor (seq
(seq (xor
(seq (seq
(seq (seq
(call n2 ("peer" "identify") [] ident1) (seq
(call n2 ("dist" "list_blueprints") [] blueprints1) (call n2 ("peer" "identify") [] ident1)
(call n2 ("dist" "list_blueprints") [] blueprints1)
)
(call n2 ("dist" "list_modules") [] modules1)
) )
(call n2 ("dist" "list_modules") [] modules1) (call n2 ("srv" "list") [] services1)
)
(seq
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
(call -relay- ("op" "noop") [])
) )
(call n2 ("srv" "list") [] services1)
)
(seq
(call -relay- ("op" "identity") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
) )
(call n ("event" "all_info") [n2 ident1 services1 blueprints1 modules1])
) )
(call -relay- ("op" "identity") []) (next n2)
) )
(call n ("event" "all_info") [n2 ident1 services1 blueprints1 modules1])
) )
(next n2) )
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4])
) )
) )
(next n)
) )
(seq
(call -relay- ("op" "identity") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4])
)
)
(seq
(seq
(seq
(call -relay- ("op" "identity") [])
(next n)
)
(call -relay- ("op" "identity") [])
)
(call %init_peer_id% ("op" "identity") [])
) )
) )
)
)
(seq
(seq
(call -relay- ("op" "identity") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 5]) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 5])
) )
(call -relay- ("op" "identity") [])
) )
) )
) )
(seq (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 6])
(call -relay- ("op" "identity") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 6])
)
) )
`, `,

View File

@ -69,7 +69,7 @@ function event(name, peer, peers, identify, services, modules, blueprints) {
/* eslint-enable */ /* eslint-enable */
(async () => { (async () => {
setLogLevel('DEBUG'); setLogLevel('INFO');
const pid = await generatePeerId(); const pid = await generatePeerId();
const flags = genFlags(pid.toB58String()); const flags = genFlags(pid.toB58String());