diff --git a/Cargo.lock b/Cargo.lock index 8afe0c0421..4c65c456de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2176,8 +2176,8 @@ dependencies = [ "cosmwasm-std", "cosmwasm-storage", "cw-storage-plus", - "nym-coconut-dkg-common 0.1.0", - "nym-contracts-common 0.5.0", + "nym-coconut-dkg-common", + "nym-contracts-common", ] [[package]] @@ -2438,13 +2438,13 @@ dependencies = [ "itertools 0.13.0", "log", "maxminddb", - "nym-bin-common 0.6.0", - "nym-contracts-common 0.5.0", + "nym-bin-common", + "nym-contracts-common", "nym-explorer-api-requests", - "nym-mixnet-contract-common 0.6.0", - "nym-network-defaults 0.1.0", + "nym-mixnet-contract-common", + "nym-network-defaults", "nym-task", - "nym-validator-client 0.1.0", + "nym-validator-client", "okapi", "pretty_env_logger", "rand", @@ -3437,11 +3437,11 @@ dependencies = [ "clap 4.5.20", "dirs", "importer-contract", - "nym-bin-common 0.6.0", - "nym-mixnet-contract-common 0.6.0", - "nym-network-defaults 0.1.0", - "nym-validator-client 0.1.0", - "nym-vesting-contract-common 0.7.0", + "nym-bin-common", + "nym-mixnet-contract-common", + "nym-network-defaults", + "nym-validator-client", + "nym-vesting-contract-common", "serde", "serde_json", "tokio", @@ -4110,8 +4110,8 @@ dependencies = [ "async-trait", "futures", "js-sys", - "nym-bin-common 0.6.0", - "nym-http-api-client 0.1.0", + "nym-bin-common", + "nym-http-api-client", "nym-ordered-buffer", "nym-service-providers-common", "nym-socks5-requests", @@ -4476,37 +4476,37 @@ dependencies = [ "humantime-serde", "itertools 0.13.0", "k256", - "nym-api-requests 0.1.0", + "nym-api-requests", "nym-bandwidth-controller", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-coconut", - "nym-coconut-dkg-common 0.1.0", - "nym-compact-ecash 0.1.0", - "nym-config 0.1.0", - "nym-contracts-common 0.5.0", + "nym-coconut-dkg-common", + "nym-compact-ecash", + "nym-config", + "nym-contracts-common", "nym-credential-storage", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", + "nym-credentials-interface", + "nym-crypto", "nym-dkg", - "nym-ecash-contract-common 0.1.0", + "nym-ecash-contract-common", "nym-ecash-double-spending", - "nym-ecash-time 0.1.0", + "nym-ecash-time", "nym-gateway-client", "nym-http-api-common", "nym-inclusion-probability", - "nym-mixnet-contract-common 0.6.0", - "nym-multisig-contract-common 0.1.0", - "nym-node-requests 0.1.0", + "nym-mixnet-contract-common", + "nym-multisig-contract-common", + "nym-node-requests", "nym-node-tester-utils", - "nym-pemstore 0.3.0", - "nym-serde-helpers 0.1.0", + "nym-pemstore", + "nym-serde-helpers", "nym-sphinx", "nym-task", "nym-topology", "nym-types", - "nym-validator-client 0.1.0", - "nym-vesting-contract-common 0.7.0", + "nym-validator-client", + "nym-vesting-contract-common", "pin-project", "rand", "rand_chacha", @@ -4541,14 +4541,14 @@ dependencies = [ "cosmwasm-std", "ecdsa", "getset", - "nym-compact-ecash 0.1.0", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", - "nym-ecash-time 0.1.0", - "nym-mixnet-contract-common 0.6.0", - "nym-network-defaults 0.1.0", - "nym-node-requests 0.1.0", - "nym-serde-helpers 0.1.0", + "nym-compact-ecash", + "nym-credentials-interface", + "nym-crypto", + "nym-ecash-time", + "nym-mixnet-contract-common", + "nym-network-defaults", + "nym-node-requests", + "nym-serde-helpers", "schemars", "serde", "serde_json", @@ -4560,32 +4560,6 @@ dependencies = [ "utoipa", ] -[[package]] -name = "nym-api-requests" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "bs58", - "cosmrs 0.17.0-pre", - "cosmwasm-std", - "ecdsa", - "getset", - "nym-compact-ecash 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-credentials-interface 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-crypto 0.4.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-ecash-time 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-mixnet-contract-common 0.6.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-node-requests 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-serde-helpers 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "schemars", - "serde", - "sha2 0.10.8", - "tendermint 0.37.0", - "thiserror", - "time", - "utoipa", -] - [[package]] name = "nym-async-file-watcher" version = "0.1.0" @@ -4611,16 +4585,16 @@ dependencies = [ "ipnetwork 0.20.0", "log", "nym-authenticator-requests", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-client-core", - "nym-config 0.1.0", + "nym-config", "nym-credential-verification", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", + "nym-credentials-interface", + "nym-crypto", "nym-gateway-requests", "nym-gateway-storage", "nym-id", - "nym-network-defaults 0.1.0", + "nym-network-defaults", "nym-sdk", "nym-service-provider-requests-common", "nym-service-providers-common", @@ -4628,7 +4602,7 @@ dependencies = [ "nym-task", "nym-types", "nym-wireguard", - "nym-wireguard-types 0.1.0", + "nym-wireguard-types", "rand", "serde", "serde_json", @@ -4646,11 +4620,11 @@ dependencies = [ "base64 0.22.1", "bincode", "hmac", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", + "nym-credentials-interface", + "nym-crypto", "nym-service-provider-requests-common", "nym-sphinx", - "nym-wireguard-types 0.1.0", + "nym-wireguard-types", "rand", "serde", "sha2 0.10.8", @@ -4666,12 +4640,12 @@ dependencies = [ "log", "nym-credential-storage", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", - "nym-ecash-contract-common 0.1.0", - "nym-ecash-time 0.1.0", - "nym-network-defaults 0.1.0", - "nym-validator-client 0.1.0", + "nym-credentials-interface", + "nym-crypto", + "nym-ecash-contract-common", + "nym-ecash-time", + "nym-network-defaults", + "nym-validator-client", "rand", "thiserror", "url", @@ -4701,21 +4675,6 @@ dependencies = [ "vergen", ] -[[package]] -name = "nym-bin-common" -version = "0.6.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "const-str", - "log", - "pretty_env_logger", - "schemars", - "semver 1.0.23", - "serde", - "utoipa", - "vergen", -] - [[package]] name = "nym-bity-integration" version = "0.1.0" @@ -4725,7 +4684,7 @@ dependencies = [ "eyre", "k256", "nym-cli-commands", - "nym-validator-client 0.1.0", + "nym-validator-client", "serde", "serde_json", "thiserror", @@ -4745,10 +4704,10 @@ dependencies = [ "dotenvy", "inquire", "log", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-cli-commands", - "nym-network-defaults 0.1.0", - "nym-validator-client 0.1.0", + "nym-network-defaults", + "nym-validator-client", "pretty_env_logger", "serde", "serde_json", @@ -4779,26 +4738,26 @@ dependencies = [ "k256", "log", "nym-bandwidth-controller", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-client-core", - "nym-coconut-dkg-common 0.1.0", - "nym-config 0.1.0", - "nym-contracts-common 0.5.0", + "nym-coconut-dkg-common", + "nym-config", + "nym-contracts-common", "nym-credential-storage", "nym-credential-utils", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", - "nym-ecash-contract-common 0.1.0", + "nym-credentials-interface", + "nym-crypto", + "nym-ecash-contract-common", "nym-id", - "nym-mixnet-contract-common 0.6.0", - "nym-multisig-contract-common 0.1.0", - "nym-network-defaults 0.1.0", - "nym-pemstore 0.3.0", + "nym-mixnet-contract-common", + "nym-multisig-contract-common", + "nym-network-defaults", + "nym-pemstore", "nym-sphinx", "nym-types", - "nym-validator-client 0.1.0", - "nym-vesting-contract-common 0.7.0", + "nym-validator-client", + "nym-vesting-contract-common", "rand", "serde", "serde_json", @@ -4822,21 +4781,21 @@ dependencies = [ "futures", "log", "nym-bandwidth-controller", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-client-core", "nym-client-websocket-requests", - "nym-config 0.1.0", + "nym-config", "nym-credential-storage", "nym-credentials", - "nym-crypto 0.4.0", + "nym-crypto", "nym-gateway-requests", "nym-id", - "nym-network-defaults 0.1.0", - "nym-pemstore 0.3.0", + "nym-network-defaults", + "nym-pemstore", "nym-sphinx", "nym-task", "nym-topology", - "nym-validator-client 0.1.0", + "nym-validator-client", "rand", "serde", "serde_json", @@ -4870,24 +4829,24 @@ dependencies = [ "nym-client-core-config-types", "nym-client-core-gateways-storage", "nym-client-core-surb-storage", - "nym-config 0.1.0", + "nym-config", "nym-country-group", "nym-credential-storage", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", - "nym-ecash-time 0.1.0", + "nym-credentials-interface", + "nym-crypto", + "nym-ecash-time", "nym-explorer-client", "nym-gateway-client", "nym-gateway-requests", "nym-id", "nym-metrics", - "nym-network-defaults 0.1.0", + "nym-network-defaults", "nym-nonexhaustive-delayqueue", - "nym-pemstore 0.3.0", + "nym-pemstore", "nym-sphinx", "nym-task", "nym-topology", - "nym-validator-client 0.1.0", + "nym-validator-client", "rand", "rand_chacha", "serde", @@ -4915,9 +4874,9 @@ name = "nym-client-core-config-types" version = "0.1.0" dependencies = [ "humantime-serde", - "nym-config 0.1.0", + "nym-config", "nym-country-group", - "nym-pemstore 0.3.0", + "nym-pemstore", "nym-sphinx-addressing", "nym-sphinx-params", "serde", @@ -4932,7 +4891,7 @@ dependencies = [ "async-trait", "cosmrs 0.17.0-pre", "log", - "nym-crypto 0.4.0", + "nym-crypto", "nym-gateway-requests", "serde", "sqlx", @@ -4950,7 +4909,7 @@ dependencies = [ "async-trait", "dashmap", "log", - "nym-crypto 0.4.0", + "nym-crypto", "nym-sphinx", "nym-task", "sqlx", @@ -4966,7 +4925,7 @@ dependencies = [ "anyhow", "futures", "js-sys", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-node-tester-utils", "nym-node-tester-wasm", "rand", @@ -5005,7 +4964,7 @@ dependencies = [ "group", "itertools 0.13.0", "nym-dkg", - "nym-pemstore 0.3.0", + "nym-pemstore", "rand", "rand_chacha", "serde", @@ -5022,44 +4981,20 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "nym-multisig-contract-common 0.1.0", -] - -[[package]] -name = "nym-coconut-bandwidth-contract-common" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "nym-multisig-contract-common 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", -] - -[[package]] -name = "nym-coconut-dkg-common" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-utils", - "cw2", - "cw4", - "nym-contracts-common 0.5.0", - "nym-multisig-contract-common 0.1.0", + "nym-multisig-contract-common", ] [[package]] name = "nym-coconut-dkg-common" version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-utils", "cw2", "cw4", - "nym-contracts-common 0.5.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-multisig-contract-common 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", + "nym-contracts-common", + "nym-multisig-contract-common", ] [[package]] @@ -5082,8 +5017,8 @@ dependencies = [ "ff", "group", "itertools 0.13.0", - "nym-network-defaults 0.1.0", - "nym-pemstore 0.3.0", + "nym-network-defaults", + "nym-pemstore", "rand", "rayon", "serde", @@ -5093,50 +5028,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "nym-compact-ecash" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "bincode", - "bls12_381", - "bs58", - "cfg-if", - "digest 0.9.0", - "ff", - "group", - "itertools 0.12.1", - "nym-network-defaults 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-pemstore 0.3.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "rand", - "serde", - "sha2 0.9.9", - "thiserror", - "zeroize", -] - -[[package]] -name = "nym-config" -version = "0.1.0" -dependencies = [ - "dirs", - "handlebars", - "log", - "nym-network-defaults 0.1.0", - "serde", - "toml 0.8.14", - "url", -] - [[package]] name = "nym-config" version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" dependencies = [ "dirs", "handlebars", "log", - "nym-network-defaults 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", + "nym-network-defaults", "serde", "toml 0.8.14", "url", @@ -5157,21 +5056,6 @@ dependencies = [ "vergen", ] -[[package]] -name = "nym-contracts-common" -version = "0.5.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "bs58", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "schemars", - "serde", - "thiserror", - "vergen", -] - [[package]] name = "nym-country-group" version = "0.1.0" @@ -5187,7 +5071,7 @@ dependencies = [ "anyhow", "bs58", "lazy_static", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-ffi-shared", "nym-sdk", "nym-sphinx-anonymous-replies", @@ -5209,16 +5093,16 @@ dependencies = [ "dotenvy", "futures", "humantime 2.1.0", - "nym-bin-common 0.6.0", - "nym-compact-ecash 0.1.0", - "nym-config 0.1.0", + "nym-bin-common", + "nym-compact-ecash", + "nym-config", "nym-credential-proxy-requests", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", + "nym-credentials-interface", + "nym-crypto", "nym-http-api-common", - "nym-network-defaults 0.1.0", - "nym-validator-client 0.1.0", + "nym-network-defaults", + "nym-validator-client", "rand", "reqwest 0.12.4", "serde", @@ -5247,10 +5131,10 @@ version = "0.1.0" dependencies = [ "async-trait", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-http-api-client 0.1.0", + "nym-credentials-interface", + "nym-http-api-client", "nym-http-api-common", - "nym-serde-helpers 0.1.0", + "nym-serde-helpers", "reqwest 0.12.4", "schemars", "serde", @@ -5270,9 +5154,9 @@ dependencies = [ "async-trait", "bincode", "log", - "nym-compact-ecash 0.1.0", + "nym-compact-ecash", "nym-credentials", - "nym-ecash-time 0.1.0", + "nym-ecash-time", "serde", "sqlx", "thiserror", @@ -5287,12 +5171,12 @@ dependencies = [ "log", "nym-bandwidth-controller", "nym-client-core", - "nym-config 0.1.0", + "nym-config", "nym-credential-storage", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-ecash-time 0.1.0", - "nym-validator-client 0.1.0", + "nym-credentials-interface", + "nym-ecash-time", + "nym-validator-client", "thiserror", "time", "tokio", @@ -5306,15 +5190,15 @@ dependencies = [ "cosmwasm-std", "cw-utils", "futures", - "nym-api-requests 0.1.0", + "nym-api-requests", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-ecash-contract-common 0.1.0", + "nym-credentials-interface", + "nym-ecash-contract-common", "nym-ecash-double-spending", "nym-gateway-requests", "nym-gateway-storage", "nym-task", - "nym-validator-client 0.1.0", + "nym-validator-client", "rand", "si-scale", "thiserror", @@ -5331,14 +5215,14 @@ dependencies = [ "bls12_381", "cosmrs 0.17.0-pre", "log", - "nym-api-requests 0.1.0", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", - "nym-ecash-contract-common 0.1.0", - "nym-ecash-time 0.1.0", - "nym-network-defaults 0.1.0", - "nym-serde-helpers 0.1.0", - "nym-validator-client 0.1.0", + "nym-api-requests", + "nym-credentials-interface", + "nym-crypto", + "nym-ecash-contract-common", + "nym-ecash-time", + "nym-network-defaults", + "nym-serde-helpers", + "nym-validator-client", "rand", "serde", "thiserror", @@ -5351,25 +5235,9 @@ name = "nym-credentials-interface" version = "0.1.0" dependencies = [ "bls12_381", - "nym-compact-ecash 0.1.0", - "nym-ecash-time 0.1.0", - "nym-network-defaults 0.1.0", - "rand", - "serde", - "strum 0.26.3", - "thiserror", - "time", -] - -[[package]] -name = "nym-credentials-interface" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "bls12_381", - "nym-compact-ecash 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-ecash-time 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-network-defaults 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", + "nym-compact-ecash", + "nym-ecash-time", + "nym-network-defaults", "rand", "serde", "strum 0.26.3", @@ -5393,8 +5261,8 @@ dependencies = [ "generic-array 0.14.7", "hkdf", "hmac", - "nym-pemstore 0.3.0", - "nym-sphinx-types 0.2.0", + "nym-pemstore", + "nym-sphinx-types", "rand", "rand_chacha", "serde", @@ -5405,23 +5273,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "nym-crypto" -version = "0.4.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "bs58", - "ed25519-dalek", - "nym-pemstore 0.3.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-sphinx-types 0.2.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "serde", - "serde_bytes", - "subtle-encoding", - "thiserror", - "x25519-dalek", - "zeroize", -] - [[package]] name = "nym-data-observatory" version = "0.1.0" @@ -5430,9 +5281,9 @@ dependencies = [ "axum 0.7.7", "chrono", "clap 4.5.20", - "nym-bin-common 0.6.0", - "nym-network-defaults 0.1.0", - "nym-node-requests 0.1.0", + "nym-bin-common", + "nym-network-defaults", + "nym-node-requests", "nym-task", "serde", "serde_json", @@ -5458,8 +5309,8 @@ dependencies = [ "ff", "group", "lazy_static", - "nym-contracts-common 0.5.0", - "nym-pemstore 0.3.0", + "nym-contracts-common", + "nym-pemstore", "rand", "rand_chacha", "rand_core 0.6.4", @@ -5480,21 +5331,7 @@ dependencies = [ "cw-controllers", "cw-utils", "cw2", - "nym-multisig-contract-common 0.1.0", - "thiserror", -] - -[[package]] -name = "nym-ecash-contract-common" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "bs58", - "cosmwasm-schema", - "cosmwasm-std", - "cw-controllers", - "cw-utils", - "nym-multisig-contract-common 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", + "nym-multisig-contract-common", "thiserror", ] @@ -5504,22 +5341,14 @@ version = "0.1.0" dependencies = [ "bit-vec", "bloomfilter", - "nym-network-defaults 0.1.0", -] - -[[package]] -name = "nym-ecash-time" -version = "0.1.0" -dependencies = [ - "nym-compact-ecash 0.1.0", - "time", + "nym-network-defaults", ] [[package]] name = "nym-ecash-time" version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" dependencies = [ + "nym-compact-ecash", "time", ] @@ -5543,25 +5372,13 @@ dependencies = [ "utoipa", ] -[[package]] -name = "nym-exit-policy" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "serde", - "serde_json", - "thiserror", - "tracing", - "utoipa", -] - [[package]] name = "nym-explorer-api-requests" version = "0.1.0" dependencies = [ - "nym-api-requests 0.1.0", - "nym-contracts-common 0.5.0", - "nym-mixnet-contract-common 0.6.0", + "nym-api-requests", + "nym-contracts-common", + "nym-mixnet-contract-common", "schemars", "serde", "ts-rs", @@ -5587,7 +5404,7 @@ dependencies = [ "anyhow", "bs58", "lazy_static", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-sdk", "nym-sphinx-anonymous-replies", "tokio", @@ -5612,33 +5429,33 @@ dependencies = [ "futures", "humantime-serde", "ipnetwork 0.20.0", - "nym-api-requests 0.1.0", + "nym-api-requests", "nym-authenticator", - "nym-bin-common 0.6.0", - "nym-config 0.1.0", + "nym-bin-common", + "nym-config", "nym-credential-verification", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", + "nym-credentials-interface", + "nym-crypto", "nym-gateway-requests", "nym-gateway-stats-storage", "nym-gateway-storage", "nym-ip-packet-router", "nym-mixnet-client", "nym-mixnode-common", - "nym-network-defaults 0.1.0", + "nym-network-defaults", "nym-network-requester", "nym-node-http-api", - "nym-pemstore 0.3.0", + "nym-pemstore", "nym-sdk", "nym-sphinx", "nym-statistics-common", "nym-task", "nym-topology", "nym-types", - "nym-validator-client 0.1.0", + "nym-validator-client", "nym-wireguard", - "nym-wireguard-types 0.1.0", + "nym-wireguard-types", "once_cell", "rand", "serde", @@ -5667,14 +5484,14 @@ dependencies = [ "nym-bandwidth-controller", "nym-credential-storage", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", + "nym-credentials-interface", + "nym-crypto", "nym-gateway-requests", - "nym-network-defaults 0.1.0", - "nym-pemstore 0.3.0", + "nym-network-defaults", + "nym-pemstore", "nym-sphinx", "nym-task", - "nym-validator-client 0.1.0", + "nym-validator-client", "rand", "serde", "si-scale", @@ -5700,11 +5517,11 @@ dependencies = [ "bs58", "futures", "generic-array 0.14.7", - "nym-compact-ecash 0.1.0", + "nym-compact-ecash", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", - "nym-pemstore 0.3.0", + "nym-credentials-interface", + "nym-crypto", + "nym-pemstore", "nym-sphinx", "nym-task", "rand", @@ -5723,7 +5540,7 @@ dependencies = [ name = "nym-gateway-stats-storage" version = "0.1.0" dependencies = [ - "nym-credentials-interface 0.1.0", + "nym-credentials-interface", "nym-sphinx", "sqlx", "thiserror", @@ -5740,7 +5557,7 @@ dependencies = [ "bincode", "defguard_wireguard_rs", "log", - "nym-credentials-interface 0.1.0", + "nym-credentials-interface", "nym-gateway-requests", "nym-sphinx", "sqlx", @@ -5756,7 +5573,7 @@ version = "0.2.0" dependencies = [ "anyhow", "lazy_static", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-ffi-shared", "nym-sdk", "nym-sphinx-anonymous-replies", @@ -5777,42 +5594,13 @@ dependencies = [ "serde", ] -[[package]] -name = "nym-group-contract-common" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "cosmwasm-schema", - "cw-controllers", - "cw4", - "schemars", - "serde", -] - [[package]] name = "nym-http-api-client" version = "0.1.0" dependencies = [ "async-trait", "http 1.1.0", - "nym-bin-common 0.6.0", - "reqwest 0.12.4", - "serde", - "serde_json", - "thiserror", - "tracing", - "url", - "wasmtimer", -] - -[[package]] -name = "nym-http-api-client" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "async-trait", - "http 1.1.0", - "nym-bin-common 0.6.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", + "nym-bin-common", "reqwest 0.12.4", "serde", "serde_json", @@ -5857,7 +5645,7 @@ dependencies = [ "anyhow", "bs58", "clap 4.5.20", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-credential-storage", "nym-id", "tokio", @@ -5879,8 +5667,8 @@ version = "0.1.0" dependencies = [ "bincode", "bytes", - "nym-bin-common 0.6.0", - "nym-crypto 0.4.0", + "nym-bin-common", + "nym-crypto", "nym-sphinx", "rand", "serde", @@ -5902,14 +5690,14 @@ dependencies = [ "etherparse", "futures", "log", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-client-core", - "nym-config 0.1.0", - "nym-crypto 0.4.0", - "nym-exit-policy 0.1.0", + "nym-config", + "nym-crypto", + "nym-exit-policy", "nym-id", "nym-ip-packet-requests", - "nym-network-defaults 0.1.0", + "nym-network-defaults", "nym-network-requester", "nym-sdk", "nym-service-providers-common", @@ -5918,7 +5706,7 @@ dependencies = [ "nym-tun", "nym-types", "nym-wireguard", - "nym-wireguard-types 0.1.0", + "nym-wireguard-types", "rand", "reqwest 0.12.4", "serde", @@ -5977,7 +5765,7 @@ dependencies = [ "cw2", "humantime-serde", "log", - "nym-contracts-common 0.5.0", + "nym-contracts-common", "rand_chacha", "schemars", "serde", @@ -5989,26 +5777,6 @@ dependencies = [ "utoipa", ] -[[package]] -name = "nym-mixnet-contract-common" -version = "0.6.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "bs58", - "cosmwasm-schema", - "cosmwasm-std", - "cw-controllers", - "humantime-serde", - "log", - "nym-contracts-common 0.5.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "schemars", - "serde", - "serde-json-wasm", - "serde_repr", - "thiserror", - "time", -] - [[package]] name = "nym-mixnode" version = "1.1.37" @@ -6024,24 +5792,24 @@ dependencies = [ "humantime-serde", "lazy_static", "log", - "nym-bin-common 0.6.0", - "nym-config 0.1.0", - "nym-contracts-common 0.5.0", - "nym-crypto 0.4.0", + "nym-bin-common", + "nym-config", + "nym-contracts-common", + "nym-crypto", "nym-http-api-common", "nym-metrics", "nym-mixnet-client", "nym-mixnode-common", "nym-node-http-api", "nym-nonexhaustive-delayqueue", - "nym-pemstore 0.3.0", + "nym-pemstore", "nym-sphinx", "nym-sphinx-params", - "nym-sphinx-types 0.2.0", + "nym-sphinx-types", "nym-task", "nym-topology", "nym-types", - "nym-validator-client 0.1.0", + "nym-validator-client", "rand", "serde", "serde_json", @@ -6062,19 +5830,19 @@ dependencies = [ "futures", "humantime-serde", "log", - "nym-bin-common 0.6.0", - "nym-crypto 0.4.0", + "nym-bin-common", + "nym-crypto", "nym-metrics", - "nym-network-defaults 0.1.0", + "nym-network-defaults", "nym-node-http-api", "nym-sphinx-acknowledgements", "nym-sphinx-addressing", "nym-sphinx-forwarding", "nym-sphinx-framing", "nym-sphinx-params", - "nym-sphinx-types 0.2.0", + "nym-sphinx-types", "nym-task", - "nym-validator-client 0.1.0", + "nym-validator-client", "rand", "serde", "thiserror", @@ -6099,38 +5867,9 @@ dependencies = [ "thiserror", ] -[[package]] -name = "nym-multisig-contract-common" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "cw-utils", - "cw3", - "cw4", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "nym-network-defaults" -version = "0.1.0" -dependencies = [ - "dotenvy", - "log", - "schemars", - "serde", - "url", - "utoipa", -] - [[package]] name = "nym-network-defaults" version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" dependencies = [ "dotenvy", "log", @@ -6150,14 +5889,14 @@ dependencies = [ "dashmap", "futures", "log", - "nym-bin-common 0.6.0", - "nym-crypto 0.4.0", - "nym-network-defaults 0.1.0", + "nym-bin-common", + "nym-crypto", + "nym-network-defaults", "nym-sdk", "nym-sphinx", "nym-topology", "nym-types", - "nym-validator-client 0.1.0", + "nym-validator-client", "petgraph", "rand", "rand_chacha", @@ -6185,16 +5924,16 @@ dependencies = [ "ipnetwork 0.20.0", "log", "nym-async-file-watcher", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-client-core", "nym-client-websocket-requests", - "nym-config 0.1.0", + "nym-config", "nym-credential-storage", "nym-credentials", - "nym-crypto 0.4.0", - "nym-exit-policy 0.1.0", + "nym-crypto", + "nym-exit-policy", "nym-id", - "nym-network-defaults 0.1.0", + "nym-network-defaults", "nym-ordered-buffer", "nym-sdk", "nym-service-providers-common", @@ -6236,22 +5975,22 @@ dependencies = [ "humantime-serde", "ipnetwork 0.20.0", "nym-authenticator", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-client-core-config-types", - "nym-config 0.1.0", - "nym-crypto 0.4.0", + "nym-config", + "nym-crypto", "nym-gateway", "nym-ip-packet-router", "nym-mixnode", "nym-network-requester", "nym-node-http-api", - "nym-pemstore 0.3.0", + "nym-pemstore", "nym-sphinx-acknowledgements", "nym-sphinx-addressing", "nym-task", "nym-types", "nym-wireguard", - "nym-wireguard-types 0.1.0", + "nym-wireguard-types", "rand", "semver 1.0.23", "serde", @@ -6279,10 +6018,10 @@ dependencies = [ "hmac", "hyper 1.4.1", "ipnetwork 0.20.0", - "nym-crypto 0.4.0", + "nym-crypto", "nym-http-api-common", "nym-metrics", - "nym-node-requests 0.1.0", + "nym-node-requests", "nym-task", "nym-wireguard", "rand", @@ -6307,11 +6046,11 @@ dependencies = [ "celes", "humantime 2.1.0", "humantime-serde", - "nym-bin-common 0.6.0", - "nym-crypto 0.4.0", - "nym-exit-policy 0.1.0", - "nym-http-api-client 0.1.0", - "nym-wireguard-types 0.1.0", + "nym-bin-common", + "nym-crypto", + "nym-exit-policy", + "nym-http-api-client", + "nym-wireguard-types", "rand_chacha", "schemars", "serde", @@ -6322,36 +6061,13 @@ dependencies = [ "utoipa", ] -[[package]] -name = "nym-node-requests" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "async-trait", - "base64 0.22.1", - "celes", - "humantime 2.1.0", - "humantime-serde", - "nym-bin-common 0.6.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-crypto 0.4.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-exit-policy 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-http-api-client 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-wireguard-types 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "schemars", - "serde", - "serde_json", - "thiserror", - "time", - "utoipa", -] - [[package]] name = "nym-node-status-agent" -version = "0.1.0" +version = "0.1.4" dependencies = [ "anyhow", "clap 4.5.20", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-common-models", "reqwest 0.12.4", "serde_json", @@ -6363,7 +6079,7 @@ dependencies = [ [[package]] name = "nym-node-status-api" -version = "0.1.0" +version = "0.1.5" dependencies = [ "anyhow", "axum 0.7.7", @@ -6373,13 +6089,13 @@ dependencies = [ "envy", "futures-util", "moka", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-common-models", "nym-explorer-client", - "nym-network-defaults 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-node-requests 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", + "nym-network-defaults", + "nym-node-requests", "nym-task", - "nym-validator-client 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", + "nym-validator-client", "regex", "reqwest 0.12.4", "serde", @@ -6406,7 +6122,7 @@ version = "0.1.0" dependencies = [ "futures", "log", - "nym-crypto 0.4.0", + "nym-crypto", "nym-sphinx", "nym-sphinx-params", "nym-task", @@ -6457,8 +6173,8 @@ dependencies = [ "anyhow", "clap 4.5.20", "log", - "nym-bin-common 0.6.0", - "nym-network-defaults 0.1.0", + "nym-bin-common", + "nym-network-defaults", "nym-sdk", "nym-service-providers-common", "nym-socks5-requests", @@ -6500,14 +6216,6 @@ dependencies = [ "pem", ] -[[package]] -name = "nym-pemstore" -version = "0.3.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "pem", -] - [[package]] name = "nym-sdk" version = "0.1.0" @@ -6527,15 +6235,15 @@ dependencies = [ "httpcodec", "log", "nym-bandwidth-controller", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-client-core", "nym-credential-storage", "nym-credential-utils", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", + "nym-credentials-interface", + "nym-crypto", "nym-gateway-requests", - "nym-network-defaults 0.1.0", + "nym-network-defaults", "nym-ordered-buffer", "nym-service-providers-common", "nym-socks5-client-core", @@ -6543,7 +6251,7 @@ dependencies = [ "nym-sphinx", "nym-task", "nym-topology", - "nym-validator-client 0.1.0", + "nym-validator-client", "parking_lot", "pretty_env_logger", "rand", @@ -6573,17 +6281,6 @@ dependencies = [ "time", ] -[[package]] -name = "nym-serde-helpers" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "base64 0.22.1", - "bs58", - "serde", - "time", -] - [[package]] name = "nym-service-provider-requests-common" version = "0.1.0" @@ -6598,7 +6295,7 @@ dependencies = [ "anyhow", "async-trait", "log", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-sdk", "nym-socks5-requests", "nym-sphinx-anonymous-replies", @@ -6615,21 +6312,21 @@ dependencies = [ "bs58", "clap 4.5.20", "log", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-client-core", - "nym-config 0.1.0", + "nym-config", "nym-credential-storage", "nym-credentials", - "nym-crypto 0.4.0", + "nym-crypto", "nym-gateway-requests", "nym-id", - "nym-network-defaults 0.1.0", + "nym-network-defaults", "nym-ordered-buffer", - "nym-pemstore 0.3.0", + "nym-pemstore", "nym-socks5-client-core", "nym-sphinx", "nym-topology", - "nym-validator-client 0.1.0", + "nym-validator-client", "rand", "serde", "serde_json", @@ -6651,17 +6348,17 @@ dependencies = [ "log", "nym-bandwidth-controller", "nym-client-core", - "nym-config 0.1.0", - "nym-contracts-common 0.5.0", + "nym-config", + "nym-contracts-common", "nym-credential-storage", - "nym-mixnet-contract-common 0.6.0", - "nym-network-defaults 0.1.0", + "nym-mixnet-contract-common", + "nym-network-defaults", "nym-service-providers-common", "nym-socks5-proxy-helpers", "nym-socks5-requests", "nym-sphinx", "nym-task", - "nym-validator-client 0.1.0", + "nym-validator-client", "pin-project", "rand", "reqwest 0.12.4", @@ -6683,11 +6380,11 @@ dependencies = [ "jni", "lazy_static", "log", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-client-core", - "nym-config 0.1.0", + "nym-config", "nym-credential-storage", - "nym-crypto 0.4.0", + "nym-crypto", "nym-socks5-client-core", "rand", "safer-ffi", @@ -6716,7 +6413,7 @@ version = "0.1.0" dependencies = [ "bincode", "log", - "nym-exit-policy 0.1.0", + "nym-exit-policy", "nym-service-providers-common", "nym-sphinx-addressing", "serde", @@ -6730,9 +6427,9 @@ name = "nym-sphinx" version = "0.1.0" dependencies = [ "log", - "nym-crypto 0.4.0", + "nym-crypto", "nym-metrics", - "nym-mixnet-contract-common 0.6.0", + "nym-mixnet-contract-common", "nym-sphinx-acknowledgements", "nym-sphinx-addressing", "nym-sphinx-anonymous-replies", @@ -6742,7 +6439,7 @@ dependencies = [ "nym-sphinx-framing", "nym-sphinx-params", "nym-sphinx-routing", - "nym-sphinx-types 0.2.0", + "nym-sphinx-types", "nym-topology", "rand", "rand_chacha", @@ -6756,12 +6453,12 @@ name = "nym-sphinx-acknowledgements" version = "0.1.0" dependencies = [ "generic-array 0.14.7", - "nym-crypto 0.4.0", - "nym-pemstore 0.3.0", + "nym-crypto", + "nym-pemstore", "nym-sphinx-addressing", "nym-sphinx-params", "nym-sphinx-routing", - "nym-sphinx-types 0.2.0", + "nym-sphinx-types", "nym-topology", "rand", "serde", @@ -6773,8 +6470,8 @@ dependencies = [ name = "nym-sphinx-addressing" version = "0.1.0" dependencies = [ - "nym-crypto 0.4.0", - "nym-sphinx-types 0.2.0", + "nym-crypto", + "nym-sphinx-types", "rand", "serde", "thiserror", @@ -6785,11 +6482,11 @@ name = "nym-sphinx-anonymous-replies" version = "0.1.0" dependencies = [ "bs58", - "nym-crypto 0.4.0", + "nym-crypto", "nym-sphinx-addressing", "nym-sphinx-params", "nym-sphinx-routing", - "nym-sphinx-types 0.2.0", + "nym-sphinx-types", "nym-topology", "rand", "rand_chacha", @@ -6804,11 +6501,11 @@ version = "0.1.0" dependencies = [ "dashmap", "log", - "nym-crypto 0.4.0", + "nym-crypto", "nym-metrics", "nym-sphinx-addressing", "nym-sphinx-params", - "nym-sphinx-types 0.2.0", + "nym-sphinx-types", "rand", "serde", "thiserror", @@ -6819,14 +6516,14 @@ dependencies = [ name = "nym-sphinx-cover" version = "0.1.0" dependencies = [ - "nym-crypto 0.4.0", + "nym-crypto", "nym-sphinx-acknowledgements", "nym-sphinx-addressing", "nym-sphinx-chunking", "nym-sphinx-forwarding", "nym-sphinx-params", "nym-sphinx-routing", - "nym-sphinx-types 0.2.0", + "nym-sphinx-types", "nym-topology", "rand", "thiserror", @@ -6839,7 +6536,7 @@ dependencies = [ "nym-outfox", "nym-sphinx-addressing", "nym-sphinx-params", - "nym-sphinx-types 0.2.0", + "nym-sphinx-types", "thiserror", ] @@ -6854,7 +6551,7 @@ dependencies = [ "nym-sphinx-addressing", "nym-sphinx-forwarding", "nym-sphinx-params", - "nym-sphinx-types 0.2.0", + "nym-sphinx-types", "thiserror", "tokio", "tokio-util", @@ -6864,8 +6561,8 @@ dependencies = [ name = "nym-sphinx-params" version = "0.1.0" dependencies = [ - "nym-crypto 0.4.0", - "nym-sphinx-types 0.2.0", + "nym-crypto", + "nym-sphinx-types", "serde", "thiserror", ] @@ -6875,7 +6572,7 @@ name = "nym-sphinx-routing" version = "0.1.0" dependencies = [ "nym-sphinx-addressing", - "nym-sphinx-types 0.2.0", + "nym-sphinx-types", "thiserror", ] @@ -6888,21 +6585,12 @@ dependencies = [ "thiserror", ] -[[package]] -name = "nym-sphinx-types" -version = "0.2.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "sphinx-packet", - "thiserror", -] - [[package]] name = "nym-statistics-common" version = "0.1.0" dependencies = [ "futures", - "nym-credentials-interface 0.1.0", + "nym-credentials-interface", "nym-sphinx", "time", ] @@ -6942,14 +6630,14 @@ dependencies = [ "async-trait", "bs58", "log", - "nym-api-requests 0.1.0", - "nym-bin-common 0.6.0", - "nym-config 0.1.0", - "nym-crypto 0.4.0", - "nym-mixnet-contract-common 0.6.0", + "nym-api-requests", + "nym-bin-common", + "nym-config", + "nym-crypto", + "nym-mixnet-contract-common", "nym-sphinx-addressing", "nym-sphinx-routing", - "nym-sphinx-types 0.2.0", + "nym-sphinx-types", "rand", "reqwest 0.12.4", "semver 1.0.23", @@ -6967,7 +6655,7 @@ version = "0.1.0" dependencies = [ "etherparse", "log", - "nym-wireguard-types 0.1.0", + "nym-wireguard-types", "thiserror", "tokio", "tokio-tun", @@ -6984,11 +6672,11 @@ dependencies = [ "hmac", "itertools 0.13.0", "log", - "nym-config 0.1.0", - "nym-crypto 0.4.0", - "nym-mixnet-contract-common 0.6.0", - "nym-validator-client 0.1.0", - "nym-vesting-contract-common 0.7.0", + "nym-config", + "nym-crypto", + "nym-mixnet-contract-common", + "nym-validator-client", + "nym-vesting-contract-common", "reqwest 0.12.4", "schemars", "serde", @@ -7022,20 +6710,20 @@ dependencies = [ "flate2", "futures", "itertools 0.13.0", - "nym-api-requests 0.1.0", - "nym-coconut-bandwidth-contract-common 0.1.0", - "nym-coconut-dkg-common 0.1.0", - "nym-compact-ecash 0.1.0", - "nym-config 0.1.0", - "nym-contracts-common 0.5.0", - "nym-ecash-contract-common 0.1.0", - "nym-group-contract-common 0.1.0", - "nym-http-api-client 0.1.0", - "nym-mixnet-contract-common 0.6.0", - "nym-multisig-contract-common 0.1.0", - "nym-network-defaults 0.1.0", - "nym-serde-helpers 0.1.0", - "nym-vesting-contract-common 0.7.0", + "nym-api-requests", + "nym-coconut-bandwidth-contract-common", + "nym-coconut-dkg-common", + "nym-compact-ecash", + "nym-config", + "nym-contracts-common", + "nym-ecash-contract-common", + "nym-group-contract-common", + "nym-http-api-client", + "nym-mixnet-contract-common", + "nym-multisig-contract-common", + "nym-network-defaults", + "nym-serde-helpers", + "nym-vesting-contract-common", "prost 0.12.6", "reqwest 0.12.4", "serde", @@ -7052,55 +6740,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "nym-validator-client" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "async-trait", - "base64 0.22.1", - "bip32", - "bip39", - "colored", - "cosmrs 0.17.0-pre", - "cosmwasm-std", - "cw-controllers", - "cw-utils", - "cw2", - "cw3", - "cw4", - "eyre", - "flate2", - "futures", - "itertools 0.13.0", - "nym-api-requests 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-coconut-bandwidth-contract-common 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-coconut-dkg-common 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-compact-ecash 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-config 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-contracts-common 0.5.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-ecash-contract-common 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-group-contract-common 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-http-api-client 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-mixnet-contract-common 0.6.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-multisig-contract-common 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-network-defaults 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-vesting-contract-common 0.7.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "prost 0.12.6", - "reqwest 0.12.4", - "serde", - "serde_json", - "sha2 0.9.9", - "tendermint-rpc", - "thiserror", - "time", - "tokio", - "tracing", - "url", - "wasmtimer", - "zeroize", -] - [[package]] name = "nym-validator-rewarder" version = "0.1.0" @@ -7112,18 +6751,18 @@ dependencies = [ "futures", "humantime 2.1.0", "humantime-serde", - "nym-bin-common 0.6.0", - "nym-coconut-bandwidth-contract-common 0.1.0", - "nym-coconut-dkg-common 0.1.0", - "nym-compact-ecash 0.1.0", - "nym-config 0.1.0", + "nym-bin-common", + "nym-coconut-bandwidth-contract-common", + "nym-coconut-dkg-common", + "nym-compact-ecash", + "nym-config", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", - "nym-ecash-time 0.1.0", - "nym-network-defaults 0.1.0", + "nym-credentials-interface", + "nym-crypto", + "nym-ecash-time", + "nym-network-defaults", "nym-task", - "nym-validator-client 0.1.0", + "nym-validator-client", "nyxd-scraper", "rand_chacha", "serde", @@ -7145,26 +6784,13 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "nym-contracts-common 0.5.0", - "nym-mixnet-contract-common 0.6.0", + "nym-contracts-common", + "nym-mixnet-contract-common", "serde", "thiserror", "ts-rs", ] -[[package]] -name = "nym-vesting-contract-common" -version = "0.7.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "nym-contracts-common 0.5.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-mixnet-contract-common 0.6.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "serde", - "thiserror", -] - [[package]] name = "nym-vpn-api-lib-wasm" version = "0.1.0" @@ -7172,13 +6798,13 @@ dependencies = [ "bs58", "getrandom", "js-sys", - "nym-bin-common 0.6.0", - "nym-compact-ecash 0.1.0", + "nym-bin-common", + "nym-compact-ecash", "nym-credential-proxy-requests", "nym-credentials", - "nym-credentials-interface 0.1.0", - "nym-crypto 0.4.0", - "nym-ecash-time 0.1.0", + "nym-credentials-interface", + "nym-crypto", + "nym-ecash-time", "serde", "serde-wasm-bindgen 0.6.5", "serde_json", @@ -7197,12 +6823,12 @@ dependencies = [ "cosmrs 0.15.0", "cosmwasm-std", "hex-literal", - "nym-config 0.1.0", - "nym-mixnet-contract-common 0.6.0", - "nym-network-defaults 0.1.0", + "nym-config", + "nym-mixnet-contract-common", + "nym-network-defaults", "nym-types", - "nym-validator-client 0.1.0", - "nym-vesting-contract-common 0.7.0", + "nym-validator-client", + "nym-vesting-contract-common", "serde", "serde_json", "strum 0.23.0", @@ -7223,11 +6849,11 @@ dependencies = [ "log", "nym-authenticator-requests", "nym-credential-verification", - "nym-crypto 0.4.0", + "nym-crypto", "nym-gateway-storage", - "nym-network-defaults 0.1.0", + "nym-network-defaults", "nym-task", - "nym-wireguard-types 0.1.0", + "nym-wireguard-types", "thiserror", "tokio", "tokio-stream", @@ -7240,29 +6866,15 @@ version = "0.1.0" dependencies = [ "base64 0.22.1", "log", - "nym-config 0.1.0", - "nym-crypto 0.4.0", - "nym-network-defaults 0.1.0", + "nym-config", + "nym-crypto", + "nym-network-defaults", "rand", "serde", "thiserror", "x25519-dalek", ] -[[package]] -name = "nym-wireguard-types" -version = "0.1.0" -source = "git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork#8d68cf88dac1adf1f68726a9b6e0740f8cddcf32" -dependencies = [ - "base64 0.22.1", - "log", - "nym-config 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "nym-network-defaults 0.1.0 (git+https://github.com/nymtech/nym?branch=pre-dir-v2-fork)", - "serde", - "thiserror", - "x25519-dalek", -] - [[package]] name = "nymvisor" version = "0.1.8" @@ -7278,8 +6890,8 @@ dependencies = [ "humantime-serde", "nix 0.27.1", "nym-async-file-watcher", - "nym-bin-common 0.6.0", - "nym-config 0.1.0", + "nym-bin-common", + "nym-config", "nym-task", "reqwest 0.12.4", "serde", @@ -10052,19 +9664,19 @@ dependencies = [ "cw-utils", "dkg-bypass-contract", "indicatif", - "nym-bin-common 0.6.0", - "nym-coconut-dkg-common 0.1.0", - "nym-compact-ecash 0.1.0", - "nym-config 0.1.0", - "nym-contracts-common 0.5.0", - "nym-crypto 0.4.0", - "nym-ecash-contract-common 0.1.0", - "nym-group-contract-common 0.1.0", - "nym-mixnet-contract-common 0.6.0", - "nym-multisig-contract-common 0.1.0", - "nym-pemstore 0.3.0", - "nym-validator-client 0.1.0", - "nym-vesting-contract-common 0.7.0", + "nym-bin-common", + "nym-coconut-dkg-common", + "nym-compact-ecash", + "nym-config", + "nym-contracts-common", + "nym-crypto", + "nym-ecash-contract-common", + "nym-group-contract-common", + "nym-mixnet-contract-common", + "nym-multisig-contract-common", + "nym-pemstore", + "nym-validator-client", + "nym-vesting-contract-common", "rand", "serde", "serde_json", @@ -10658,11 +10270,11 @@ name = "ts-rs-cli" version = "0.1.0" dependencies = [ "anyhow", - "nym-api-requests 0.1.0", - "nym-mixnet-contract-common 0.6.0", + "nym-api-requests", + "nym-mixnet-contract-common", "nym-types", - "nym-validator-client 0.1.0", - "nym-vesting-contract-common 0.7.0", + "nym-validator-client", + "nym-vesting-contract-common", "nym-wallet-types", "ts-rs", "walkdir", @@ -11306,15 +10918,15 @@ dependencies = [ "js-sys", "nym-bandwidth-controller", "nym-client-core", - "nym-config 0.1.0", + "nym-config", "nym-credential-storage", - "nym-crypto 0.4.0", + "nym-crypto", "nym-gateway-client", "nym-sphinx", "nym-sphinx-acknowledgements", "nym-task", "nym-topology", - "nym-validator-client 0.1.0", + "nym-validator-client", "rand", "serde", "serde-wasm-bindgen 0.6.5", @@ -11869,12 +11481,12 @@ dependencies = [ "bs58", "getrandom", "js-sys", - "nym-bin-common 0.6.0", + "nym-bin-common", "nym-coconut", - "nym-compact-ecash 0.1.0", + "nym-compact-ecash", "nym-credentials", - "nym-crypto 0.4.0", - "nym-http-api-client 0.1.0", + "nym-crypto", + "nym-http-api-client", "rand", "reqwest 0.12.4", "serde", diff --git a/common/models/src/ns_api.rs b/common/models/src/ns_api.rs index 9c3373802a..5d875420e2 100644 --- a/common/models/src/ns_api.rs +++ b/common/models/src/ns_api.rs @@ -2,7 +2,6 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Deserialize, Serialize)] pub struct TestrunAssignment { - /// has nothing to do with GW identity key. This is PK from `gateways` table pub testrun_id: i64, - pub gateway_pk_id: i64, + pub gateway_identity_key: String, } diff --git a/nym-node-status-agent/Cargo.toml b/nym-node-status-agent/Cargo.toml index a2ce8cdf97..f89065b5b3 100644 --- a/nym-node-status-agent/Cargo.toml +++ b/nym-node-status-agent/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "nym-node-status-agent" -version = "0.1.0" +version = "0.1.4" authors.workspace = true repository.workspace = true homepage.workspace = true diff --git a/nym-node-status-agent/run.sh b/nym-node-status-agent/run.sh index 5054a90825..675e39c109 100755 --- a/nym-node-status-agent/run.sh +++ b/nym-node-status-agent/run.sh @@ -2,7 +2,11 @@ set -eu -export RUST_LOG=${RUST_LOG:-debug} +environment="qa" + +source ../envs/${environment}.env + +export RUST_LOG="debug" crate_root=$(dirname $(realpath "$0")) gateway_probe_src=$(dirname $(dirname "$crate_root"))/nym-vpn-client/nym-vpn-core @@ -14,6 +18,8 @@ export NODE_STATUS_AGENT_PROBE_PATH="$crate_root/nym-gateway-probe" # build & copy over GW probe function copy_gw_probe() { pushd $gateway_probe_src + git switch main + git pull cargo build --release --package nym-gateway-probe cp target/release/nym-gateway-probe "$crate_root" $crate_root/nym-gateway-probe --version @@ -30,8 +36,8 @@ function swarm() { build_agent - for ((i=1; i<=$workers; i++)); do - ../target/release/nym-node-status-agent run-probe & + for ((i = 1; i <= $workers; i++)); do + ../target/release/nym-node-status-agent run-probe & done wait @@ -44,6 +50,6 @@ export NODE_STATUS_AGENT_SERVER_PORT="8000" copy_gw_probe -swarm 30 +swarm 8 # cargo run -- run-probe diff --git a/nym-node-status-agent/src/cli.rs b/nym-node-status-agent/src/cli.rs index c4465797d0..81e70e2da9 100644 --- a/nym-node-status-agent/src/cli.rs +++ b/nym-node-status-agent/src/cli.rs @@ -31,24 +31,19 @@ pub(crate) enum Command { /// path of binary to run #[arg(long, env = "NODE_STATUS_AGENT_PROBE_PATH")] probe_path: String, - #[arg(short, long, env = "NODE_STATUS_AGENT_GATEWAY_ID")] - gateway_id: Option, }, } impl Args { pub(crate) async fn execute(&self) -> anyhow::Result<()> { match &self.command { - Command::RunProbe { - probe_path, - gateway_id, - } => self.run_probe(probe_path, gateway_id).await?, + Command::RunProbe { probe_path } => self.run_probe(probe_path).await?, } Ok(()) } - async fn run_probe(&self, probe_path: &str, gateway_id: &Option) -> anyhow::Result<()> { + async fn run_probe(&self, probe_path: &str) -> anyhow::Result<()> { let server_address = format!("{}:{}", &self.server_address, self.server_port); let probe = GwProbe::new(probe_path.to_string()); @@ -58,7 +53,7 @@ impl Args { let testrun = request_testrun(&server_address).await?; - let log = probe.run_and_get_log(gateway_id); + let log = probe.run_and_get_log(&Some(testrun.gateway_identity_key)); submit_results(&server_address, testrun.testrun_id, log).await?; @@ -97,6 +92,7 @@ async fn submit_results( ) -> anyhow::Result<()> { let target_url = format!("{}/{}/{}", server_addr, URL_BASE, testrun_id); let client = reqwest::Client::new(); + let res = client .post(target_url) .body(probe_outcome) diff --git a/nym-node-status-agent/src/probe.rs b/nym-node-status-agent/src/probe.rs index c75900e936..f779f3af53 100644 --- a/nym-node-status-agent/src/probe.rs +++ b/nym-node-status-agent/src/probe.rs @@ -40,6 +40,12 @@ impl GwProbe { match command.spawn() { Ok(child) => { if let Ok(output) = child.wait_with_output() { + if !output.status.success() { + let out = String::from_utf8_lossy(&output.stdout); + let err = String::from_utf8_lossy(&output.stderr); + tracing::error!("Probe exited with {:?}:\n{}\n{}", output.status, out, err); + } + return String::from_utf8(output.stdout) .unwrap_or("Unable to get log from test run".to_string()); } diff --git a/nym-node-status-api/.sqlx/query-06b17d1e5f61201a1b7542896ba55c69cd5c1a7e7d87073c94600c783a0a3984.json b/nym-node-status-api/.sqlx/query-06b17d1e5f61201a1b7542896ba55c69cd5c1a7e7d87073c94600c783a0a3984.json new file mode 100644 index 0000000000..ad57224826 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-06b17d1e5f61201a1b7542896ba55c69cd5c1a7e7d87073c94600c783a0a3984.json @@ -0,0 +1,20 @@ +{ + "db_name": "SQLite", + "query": "SELECT\n gateway_identity_key\n FROM\n gateways\n WHERE\n id = ?", + "describe": { + "columns": [ + { + "name": "gateway_identity_key", + "ordinal": 0, + "type_info": "Text" + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false + ] + }, + "hash": "06b17d1e5f61201a1b7542896ba55c69cd5c1a7e7d87073c94600c783a0a3984" +} diff --git a/nym-node-status-api/.sqlx/query-1327b5118f9144dddbcf8edb11f7dc549cf503409fd6dfedcdc02dbcd61d5454.json b/nym-node-status-api/.sqlx/query-1327b5118f9144dddbcf8edb11f7dc549cf503409fd6dfedcdc02dbcd61d5454.json new file mode 100644 index 0000000000..8b69daa6a3 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-1327b5118f9144dddbcf8edb11f7dc549cf503409fd6dfedcdc02dbcd61d5454.json @@ -0,0 +1,32 @@ +{ + "db_name": "SQLite", + "query": "SELECT\n key as \"key!\",\n value_json as \"value_json!\",\n last_updated_utc as \"last_updated_utc!\"\n FROM summary", + "describe": { + "columns": [ + { + "name": "key!", + "ordinal": 0, + "type_info": "Text" + }, + { + "name": "value_json!", + "ordinal": 1, + "type_info": "Text" + }, + { + "name": "last_updated_utc!", + "ordinal": 2, + "type_info": "Int64" + } + ], + "parameters": { + "Right": 0 + }, + "nullable": [ + true, + true, + false + ] + }, + "hash": "1327b5118f9144dddbcf8edb11f7dc549cf503409fd6dfedcdc02dbcd61d5454" +} diff --git a/nym-node-status-api/.sqlx/query-18abc8fde56cf86baed7b4afa38f2c63cdf90f2f3b6d81afb9000bb0968dcaea.json b/nym-node-status-api/.sqlx/query-18abc8fde56cf86baed7b4afa38f2c63cdf90f2f3b6d81afb9000bb0968dcaea.json new file mode 100644 index 0000000000..9bc2966149 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-18abc8fde56cf86baed7b4afa38f2c63cdf90f2f3b6d81afb9000bb0968dcaea.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE mixnodes\n SET bonded = ?, last_updated_utc = ?\n WHERE id = ?;", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "18abc8fde56cf86baed7b4afa38f2c63cdf90f2f3b6d81afb9000bb0968dcaea" +} diff --git a/nym-node-status-api/.sqlx/query-2236299f9f691376db54cbd58ec5ceb89b9925cba46efcf4ed79ef0759a01129.json b/nym-node-status-api/.sqlx/query-2236299f9f691376db54cbd58ec5ceb89b9925cba46efcf4ed79ef0759a01129.json new file mode 100644 index 0000000000..d9bf0dd6aa --- /dev/null +++ b/nym-node-status-api/.sqlx/query-2236299f9f691376db54cbd58ec5ceb89b9925cba46efcf4ed79ef0759a01129.json @@ -0,0 +1,26 @@ +{ + "db_name": "SQLite", + "query": "\n SELECT\n id,\n gateway_identity_key\n FROM gateways\n WHERE id = ?\n LIMIT 1", + "describe": { + "columns": [ + { + "name": "id", + "ordinal": 0, + "type_info": "Int64" + }, + { + "name": "gateway_identity_key", + "ordinal": 1, + "type_info": "Text" + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false + ] + }, + "hash": "2236299f9f691376db54cbd58ec5ceb89b9925cba46efcf4ed79ef0759a01129" +} diff --git a/nym-node-status-api/.sqlx/query-3c584e211d07c511644c8079187965acf3bcfb3f84ba8d24ed645d79976cf784.json b/nym-node-status-api/.sqlx/query-3c584e211d07c511644c8079187965acf3bcfb3f84ba8d24ed645d79976cf784.json new file mode 100644 index 0000000000..56898ca5ad --- /dev/null +++ b/nym-node-status-api/.sqlx/query-3c584e211d07c511644c8079187965acf3bcfb3f84ba8d24ed645d79976cf784.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "INSERT INTO testruns (gateway_id, status, ip_address, timestamp_utc, log) VALUES (?, ?, ?, ?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 5 + }, + "nullable": [] + }, + "hash": "3c584e211d07c511644c8079187965acf3bcfb3f84ba8d24ed645d79976cf784" +} diff --git a/nym-node-status-api/.sqlx/query-3d3a1fa429e3090741c6b6a8e82e692afc04b51e8782bcbf59f1eb4116112536.json b/nym-node-status-api/.sqlx/query-3d3a1fa429e3090741c6b6a8e82e692afc04b51e8782bcbf59f1eb4116112536.json new file mode 100644 index 0000000000..10158436b6 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-3d3a1fa429e3090741c6b6a8e82e692afc04b51e8782bcbf59f1eb4116112536.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE gateways\n SET bonded = ?, last_updated_utc = ?\n WHERE id = ?;", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "3d3a1fa429e3090741c6b6a8e82e692afc04b51e8782bcbf59f1eb4116112536" +} diff --git a/nym-node-status-api/.sqlx/query-3d5fc502f976f5081f01352856b8632c29c81bfafb043bb8744129cf9e0266ad.json b/nym-node-status-api/.sqlx/query-3d5fc502f976f5081f01352856b8632c29c81bfafb043bb8744129cf9e0266ad.json new file mode 100644 index 0000000000..2a834fe87e --- /dev/null +++ b/nym-node-status-api/.sqlx/query-3d5fc502f976f5081f01352856b8632c29c81bfafb043bb8744129cf9e0266ad.json @@ -0,0 +1,38 @@ +{ + "db_name": "SQLite", + "query": "SELECT\n id as \"id!\",\n gateway_identity_key as \"gateway_identity_key!\",\n self_described as \"self_described?\",\n explorer_pretty_bond as \"explorer_pretty_bond?\"\n FROM gateways\n WHERE gateway_identity_key = ?\n ORDER BY gateway_identity_key\n LIMIT 1", + "describe": { + "columns": [ + { + "name": "id!", + "ordinal": 0, + "type_info": "Int64" + }, + { + "name": "gateway_identity_key!", + "ordinal": 1, + "type_info": "Text" + }, + { + "name": "self_described?", + "ordinal": 2, + "type_info": "Text" + }, + { + "name": "explorer_pretty_bond?", + "ordinal": 3, + "type_info": "Text" + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + true, + false, + true, + true + ] + }, + "hash": "3d5fc502f976f5081f01352856b8632c29c81bfafb043bb8744129cf9e0266ad" +} diff --git a/nym-node-status-api/.sqlx/query-418944f2eccb838cb3882f34469203c8569f03fdd39ce09d7b74177896e52a8c.json b/nym-node-status-api/.sqlx/query-418944f2eccb838cb3882f34469203c8569f03fdd39ce09d7b74177896e52a8c.json new file mode 100644 index 0000000000..f9eb3657e7 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-418944f2eccb838cb3882f34469203c8569f03fdd39ce09d7b74177896e52a8c.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE testruns SET status = ? WHERE id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "418944f2eccb838cb3882f34469203c8569f03fdd39ce09d7b74177896e52a8c" +} diff --git a/nym-node-status-api/.sqlx/query-46d76bc6d3fba2dae3b21511a36289dd776749dd7a20cda61b0480f2fba60889.json b/nym-node-status-api/.sqlx/query-46d76bc6d3fba2dae3b21511a36289dd776749dd7a20cda61b0480f2fba60889.json new file mode 100644 index 0000000000..2cb8760009 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-46d76bc6d3fba2dae3b21511a36289dd776749dd7a20cda61b0480f2fba60889.json @@ -0,0 +1,50 @@ +{ + "db_name": "SQLite", + "query": "SELECT\n id as \"id!\",\n gateway_id as \"gateway_id!\",\n status as \"status!\",\n timestamp_utc as \"timestamp_utc!\",\n ip_address as \"ip_address!\",\n log as \"log!\"\n FROM testruns\n WHERE gateway_id = ? AND status != 2\n ORDER BY id DESC\n LIMIT 1", + "describe": { + "columns": [ + { + "name": "id!", + "ordinal": 0, + "type_info": "Int64" + }, + { + "name": "gateway_id!", + "ordinal": 1, + "type_info": "Int64" + }, + { + "name": "status!", + "ordinal": 2, + "type_info": "Int64" + }, + { + "name": "timestamp_utc!", + "ordinal": 3, + "type_info": "Int64" + }, + { + "name": "ip_address!", + "ordinal": 4, + "type_info": "Text" + }, + { + "name": "log!", + "ordinal": 5, + "type_info": "Text" + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + false, + false, + false, + false + ] + }, + "hash": "46d76bc6d3fba2dae3b21511a36289dd776749dd7a20cda61b0480f2fba60889" +} diff --git a/nym-node-status-api/.sqlx/query-4afcc6673890f795c2793f1e2f8570ee787fc7daf00fcb916f18d1cb7d6c8f08.json b/nym-node-status-api/.sqlx/query-4afcc6673890f795c2793f1e2f8570ee787fc7daf00fcb916f18d1cb7d6c8f08.json new file mode 100644 index 0000000000..6a9fd9d4eb --- /dev/null +++ b/nym-node-status-api/.sqlx/query-4afcc6673890f795c2793f1e2f8570ee787fc7daf00fcb916f18d1cb7d6c8f08.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE gateways SET last_probe_log = ? WHERE id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "4afcc6673890f795c2793f1e2f8570ee787fc7daf00fcb916f18d1cb7d6c8f08" +} diff --git a/nym-node-status-api/.sqlx/query-4b61a4bc32333c92a8f5ad4ad0017b40dc01845f554b5479f37855d89b309e6f.json b/nym-node-status-api/.sqlx/query-4b61a4bc32333c92a8f5ad4ad0017b40dc01845f554b5479f37855d89b309e6f.json new file mode 100644 index 0000000000..8b9c9699f8 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-4b61a4bc32333c92a8f5ad4ad0017b40dc01845f554b5479f37855d89b309e6f.json @@ -0,0 +1,32 @@ +{ + "db_name": "SQLite", + "query": "SELECT\n id as \"id!\",\n gateway_identity_key as \"identity_key!\",\n bonded as \"bonded: bool\"\n FROM gateways\n WHERE bonded = ?", + "describe": { + "columns": [ + { + "name": "id!", + "ordinal": 0, + "type_info": "Int64" + }, + { + "name": "identity_key!", + "ordinal": 1, + "type_info": "Text" + }, + { + "name": "bonded: bool", + "ordinal": 2, + "type_info": "Int64" + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "4b61a4bc32333c92a8f5ad4ad0017b40dc01845f554b5479f37855d89b309e6f" +} diff --git a/nym-node-status-api/.sqlx/query-670b7ed7d57a6986181b24be24ca667e8cacdf677ccb906415b3fe92be0c436b.json b/nym-node-status-api/.sqlx/query-670b7ed7d57a6986181b24be24ca667e8cacdf677ccb906415b3fe92be0c436b.json new file mode 100644 index 0000000000..38fe641a3a --- /dev/null +++ b/nym-node-status-api/.sqlx/query-670b7ed7d57a6986181b24be24ca667e8cacdf677ccb906415b3fe92be0c436b.json @@ -0,0 +1,20 @@ +{ + "db_name": "SQLite", + "query": "SELECT count(id) FROM mixnodes", + "describe": { + "columns": [ + { + "name": "count(id)", + "ordinal": 0, + "type_info": "Int" + } + ], + "parameters": { + "Right": 0 + }, + "nullable": [ + false + ] + }, + "hash": "670b7ed7d57a6986181b24be24ca667e8cacdf677ccb906415b3fe92be0c436b" +} diff --git a/nym-node-status-api/.sqlx/query-6d7967b831b355d5f2c77950abc56f816956b0824c66a25da611dce688105d36.json b/nym-node-status-api/.sqlx/query-6d7967b831b355d5f2c77950abc56f816956b0824c66a25da611dce688105d36.json new file mode 100644 index 0000000000..e12434a85a --- /dev/null +++ b/nym-node-status-api/.sqlx/query-6d7967b831b355d5f2c77950abc56f816956b0824c66a25da611dce688105d36.json @@ -0,0 +1,50 @@ +{ + "db_name": "SQLite", + "query": "SELECT\n id as \"id!\",\n gateway_id as \"gateway_id!\",\n status as \"status!\",\n timestamp_utc as \"timestamp_utc!\",\n ip_address as \"ip_address!\",\n log as \"log!\"\n FROM testruns\n WHERE\n id = ?\n AND\n status = ?\n ORDER BY timestamp_utc", + "describe": { + "columns": [ + { + "name": "id!", + "ordinal": 0, + "type_info": "Int64" + }, + { + "name": "gateway_id!", + "ordinal": 1, + "type_info": "Int64" + }, + { + "name": "status!", + "ordinal": 2, + "type_info": "Int64" + }, + { + "name": "timestamp_utc!", + "ordinal": 3, + "type_info": "Int64" + }, + { + "name": "ip_address!", + "ordinal": 4, + "type_info": "Text" + }, + { + "name": "log!", + "ordinal": 5, + "type_info": "Text" + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false, + false, + false, + false, + false, + false + ] + }, + "hash": "6d7967b831b355d5f2c77950abc56f816956b0824c66a25da611dce688105d36" +} diff --git a/nym-node-status-api/.sqlx/query-6eb1a682cf13205cf701590021cdf795147ac3724e89df5b2f24f7215d87dce1.json b/nym-node-status-api/.sqlx/query-6eb1a682cf13205cf701590021cdf795147ac3724e89df5b2f24f7215d87dce1.json new file mode 100644 index 0000000000..86b61631a6 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-6eb1a682cf13205cf701590021cdf795147ac3724e89df5b2f24f7215d87dce1.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "INSERT INTO mixnodes\n (mix_id, identity_key, bonded, total_stake,\n host, http_api_port, blacklisted, full_details,\n self_described, last_updated_utc, is_dp_delegatee)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT(mix_id) DO UPDATE SET\n bonded=excluded.bonded,\n total_stake=excluded.total_stake, host=excluded.host,\n http_api_port=excluded.http_api_port,blacklisted=excluded.blacklisted,\n full_details=excluded.full_details,self_described=excluded.self_described,\n last_updated_utc=excluded.last_updated_utc,\n is_dp_delegatee = excluded.is_dp_delegatee;", + "describe": { + "columns": [], + "parameters": { + "Right": 11 + }, + "nullable": [] + }, + "hash": "6eb1a682cf13205cf701590021cdf795147ac3724e89df5b2f24f7215d87dce1" +} diff --git a/nym-node-status-api/.sqlx/query-6ef3efde571d46961244cd90420f3de5949a5ff2083453cb879af8a1689efe2f.json b/nym-node-status-api/.sqlx/query-6ef3efde571d46961244cd90420f3de5949a5ff2083453cb879af8a1689efe2f.json new file mode 100644 index 0000000000..9d93b219f9 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-6ef3efde571d46961244cd90420f3de5949a5ff2083453cb879af8a1689efe2f.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE gateways SET last_probe_result = ? WHERE id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "6ef3efde571d46961244cd90420f3de5949a5ff2083453cb879af8a1689efe2f" +} diff --git a/nym-node-status-api/.sqlx/query-71a455c705f9c25d3843ff2fb8629d1320a5eb10797cdb5a435455d22c6aeac1.json b/nym-node-status-api/.sqlx/query-71a455c705f9c25d3843ff2fb8629d1320a5eb10797cdb5a435455d22c6aeac1.json new file mode 100644 index 0000000000..f061747404 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-71a455c705f9c25d3843ff2fb8629d1320a5eb10797cdb5a435455d22c6aeac1.json @@ -0,0 +1,98 @@ +{ + "db_name": "SQLite", + "query": "SELECT\n gw.gateway_identity_key as \"gateway_identity_key!\",\n gw.bonded as \"bonded: bool\",\n gw.blacklisted as \"blacklisted: bool\",\n gw.performance as \"performance!\",\n gw.self_described as \"self_described?\",\n gw.explorer_pretty_bond as \"explorer_pretty_bond?\",\n gw.last_probe_result as \"last_probe_result?\",\n gw.last_probe_log as \"last_probe_log?\",\n gw.last_testrun_utc as \"last_testrun_utc?\",\n gw.last_updated_utc as \"last_updated_utc!\",\n COALESCE(gd.moniker, \"NA\") as \"moniker!\",\n COALESCE(gd.website, \"NA\") as \"website!\",\n COALESCE(gd.security_contact, \"NA\") as \"security_contact!\",\n COALESCE(gd.details, \"NA\") as \"details!\"\n FROM gateways gw\n LEFT JOIN gateway_description gd\n ON gw.gateway_identity_key = gd.gateway_identity_key\n ORDER BY gw.gateway_identity_key", + "describe": { + "columns": [ + { + "name": "gateway_identity_key!", + "ordinal": 0, + "type_info": "Text" + }, + { + "name": "bonded: bool", + "ordinal": 1, + "type_info": "Int64" + }, + { + "name": "blacklisted: bool", + "ordinal": 2, + "type_info": "Int64" + }, + { + "name": "performance!", + "ordinal": 3, + "type_info": "Int64" + }, + { + "name": "self_described?", + "ordinal": 4, + "type_info": "Text" + }, + { + "name": "explorer_pretty_bond?", + "ordinal": 5, + "type_info": "Text" + }, + { + "name": "last_probe_result?", + "ordinal": 6, + "type_info": "Text" + }, + { + "name": "last_probe_log?", + "ordinal": 7, + "type_info": "Text" + }, + { + "name": "last_testrun_utc?", + "ordinal": 8, + "type_info": "Int64" + }, + { + "name": "last_updated_utc!", + "ordinal": 9, + "type_info": "Int64" + }, + { + "name": "moniker!", + "ordinal": 10, + "type_info": "Text" + }, + { + "name": "website!", + "ordinal": 11, + "type_info": "Text" + }, + { + "name": "security_contact!", + "ordinal": 12, + "type_info": "Text" + }, + { + "name": "details!", + "ordinal": 13, + "type_info": "Text" + } + ], + "parameters": { + "Right": 0 + }, + "nullable": [ + false, + false, + false, + false, + true, + true, + true, + true, + true, + false, + false, + false, + false, + false + ] + }, + "hash": "71a455c705f9c25d3843ff2fb8629d1320a5eb10797cdb5a435455d22c6aeac1" +} diff --git a/nym-node-status-api/.sqlx/query-7600823da7ce80b8ffda933608603a2752e28df775d1af8fd943a5fc8d7dc00d.json b/nym-node-status-api/.sqlx/query-7600823da7ce80b8ffda933608603a2752e28df775d1af8fd943a5fc8d7dc00d.json new file mode 100644 index 0000000000..9cba203bdb --- /dev/null +++ b/nym-node-status-api/.sqlx/query-7600823da7ce80b8ffda933608603a2752e28df775d1af8fd943a5fc8d7dc00d.json @@ -0,0 +1,38 @@ +{ + "db_name": "SQLite", + "query": "SELECT\n id as \"id!\",\n date as \"date!\",\n timestamp_utc as \"timestamp_utc!\",\n value_json as \"value_json!\"\n FROM summary_history\n ORDER BY date DESC\n LIMIT 30", + "describe": { + "columns": [ + { + "name": "id!", + "ordinal": 0, + "type_info": "Int64" + }, + { + "name": "date!", + "ordinal": 1, + "type_info": "Text" + }, + { + "name": "timestamp_utc!", + "ordinal": 2, + "type_info": "Int64" + }, + { + "name": "value_json!", + "ordinal": 3, + "type_info": "Text" + } + ], + "parameters": { + "Right": 0 + }, + "nullable": [ + true, + false, + false, + true + ] + }, + "hash": "7600823da7ce80b8ffda933608603a2752e28df775d1af8fd943a5fc8d7dc00d" +} diff --git a/nym-node-status-api/.sqlx/query-788515c34588aec352773df4b6e6c5e41f3c0bb56a27648b5e25466b8634a578.json b/nym-node-status-api/.sqlx/query-788515c34588aec352773df4b6e6c5e41f3c0bb56a27648b5e25466b8634a578.json new file mode 100644 index 0000000000..5252ccf2e7 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-788515c34588aec352773df4b6e6c5e41f3c0bb56a27648b5e25466b8634a578.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "INSERT INTO summary_history\n (date, timestamp_utc, value_json)\n VALUES (?, ?, ?)\n ON CONFLICT(date) DO UPDATE SET\n timestamp_utc=excluded.timestamp_utc,\n value_json=excluded.value_json;", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "788515c34588aec352773df4b6e6c5e41f3c0bb56a27648b5e25466b8634a578" +} diff --git a/nym-node-status-api/.sqlx/query-8571faad2f66e08f24acfbfe036d17ca6eb090df7f6d52ef89c5d51564f8b45c.json b/nym-node-status-api/.sqlx/query-8571faad2f66e08f24acfbfe036d17ca6eb090df7f6d52ef89c5d51564f8b45c.json new file mode 100644 index 0000000000..3f171170db --- /dev/null +++ b/nym-node-status-api/.sqlx/query-8571faad2f66e08f24acfbfe036d17ca6eb090df7f6d52ef89c5d51564f8b45c.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE gateways\n SET blacklisted = true\n WHERE gateway_identity_key = ?;", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "8571faad2f66e08f24acfbfe036d17ca6eb090df7f6d52ef89c5d51564f8b45c" +} diff --git a/nym-node-status-api/.sqlx/query-86ff64db477a1d6235179b0b88d86b86d1b9be62336c9eac0eef44987a5451b5.json b/nym-node-status-api/.sqlx/query-86ff64db477a1d6235179b0b88d86b86d1b9be62336c9eac0eef44987a5451b5.json new file mode 100644 index 0000000000..60583ed8b2 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-86ff64db477a1d6235179b0b88d86b86d1b9be62336c9eac0eef44987a5451b5.json @@ -0,0 +1,20 @@ +{ + "db_name": "SQLite", + "query": "SELECT count(id) FROM gateways", + "describe": { + "columns": [ + { + "name": "count(id)", + "ordinal": 0, + "type_info": "Int" + } + ], + "parameters": { + "Right": 0 + }, + "nullable": [ + false + ] + }, + "hash": "86ff64db477a1d6235179b0b88d86b86d1b9be62336c9eac0eef44987a5451b5" +} diff --git a/nym-node-status-api/.sqlx/query-930a41e612b4e964ae214843da190f6c66c14d4267a2cc2ca73354becc2c8bb8.json b/nym-node-status-api/.sqlx/query-930a41e612b4e964ae214843da190f6c66c14d4267a2cc2ca73354becc2c8bb8.json new file mode 100644 index 0000000000..6c2a194e80 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-930a41e612b4e964ae214843da190f6c66c14d4267a2cc2ca73354becc2c8bb8.json @@ -0,0 +1,26 @@ +{ + "db_name": "SQLite", + "query": "SELECT\n gateway_identity_key as \"gateway_identity_key!\",\n bonded as \"bonded: bool\"\n FROM gateways\n ORDER BY last_testrun_utc", + "describe": { + "columns": [ + { + "name": "gateway_identity_key!", + "ordinal": 0, + "type_info": "Text" + }, + { + "name": "bonded: bool", + "ordinal": 1, + "type_info": "Int64" + } + ], + "parameters": { + "Right": 0 + }, + "nullable": [ + false, + false + ] + }, + "hash": "930a41e612b4e964ae214843da190f6c66c14d4267a2cc2ca73354becc2c8bb8" +} diff --git a/nym-node-status-api/.sqlx/query-c214c001acbbf79fa499816f36ec586c4c29c03efb4cf0c40b73a5c76159cf5c.json b/nym-node-status-api/.sqlx/query-c214c001acbbf79fa499816f36ec586c4c29c03efb4cf0c40b73a5c76159cf5c.json new file mode 100644 index 0000000000..8cc95e72de --- /dev/null +++ b/nym-node-status-api/.sqlx/query-c214c001acbbf79fa499816f36ec586c4c29c03efb4cf0c40b73a5c76159cf5c.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE gateways SET last_testrun_utc = ?, last_updated_utc = ? WHERE id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "c214c001acbbf79fa499816f36ec586c4c29c03efb4cf0c40b73a5c76159cf5c" +} diff --git a/nym-node-status-api/.sqlx/query-c5e3cd7284b334df5aa979b1627ea1f6dc2aed00cedde25f2be3567e47064351.json b/nym-node-status-api/.sqlx/query-c5e3cd7284b334df5aa979b1627ea1f6dc2aed00cedde25f2be3567e47064351.json new file mode 100644 index 0000000000..2e4f34fd85 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-c5e3cd7284b334df5aa979b1627ea1f6dc2aed00cedde25f2be3567e47064351.json @@ -0,0 +1,44 @@ +{ + "db_name": "SQLite", + "query": "\n SELECT\n date_utc as \"date_utc!\",\n packets_received as \"total_packets_received!: i64\",\n packets_sent as \"total_packets_sent!: i64\",\n packets_dropped as \"total_packets_dropped!: i64\",\n total_stake as \"total_stake!: i64\"\n FROM (\n SELECT\n date_utc,\n SUM(packets_received) as packets_received,\n SUM(packets_sent) as packets_sent,\n SUM(packets_dropped) as packets_dropped,\n SUM(total_stake) as total_stake\n FROM mixnode_daily_stats\n GROUP BY date_utc\n ORDER BY date_utc DESC\n LIMIT 30\n )\n GROUP BY date_utc\n ORDER BY date_utc\n ", + "describe": { + "columns": [ + { + "name": "date_utc!", + "ordinal": 0, + "type_info": "Text" + }, + { + "name": "total_packets_received!: i64", + "ordinal": 1, + "type_info": "Int64" + }, + { + "name": "total_packets_sent!: i64", + "ordinal": 2, + "type_info": "Int64" + }, + { + "name": "total_packets_dropped!: i64", + "ordinal": 3, + "type_info": "Int64" + }, + { + "name": "total_stake!: i64", + "ordinal": 4, + "type_info": "Int64" + } + ], + "parameters": { + "Right": 0 + }, + "nullable": [ + false, + true, + true, + true, + false + ] + }, + "hash": "c5e3cd7284b334df5aa979b1627ea1f6dc2aed00cedde25f2be3567e47064351" +} diff --git a/nym-node-status-api/.sqlx/query-c7ba2621becb9ac4b5dee0ce303dadfcf19095935867a51cbd5b8362d1505fcc.json b/nym-node-status-api/.sqlx/query-c7ba2621becb9ac4b5dee0ce303dadfcf19095935867a51cbd5b8362d1505fcc.json new file mode 100644 index 0000000000..4d0edd1e88 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-c7ba2621becb9ac4b5dee0ce303dadfcf19095935867a51cbd5b8362d1505fcc.json @@ -0,0 +1,32 @@ +{ + "db_name": "SQLite", + "query": "SELECT\n id as \"id!\",\n identity_key as \"identity_key!\",\n bonded as \"bonded: bool\"\n FROM mixnodes\n WHERE bonded = ?", + "describe": { + "columns": [ + { + "name": "id!", + "ordinal": 0, + "type_info": "Int64" + }, + { + "name": "identity_key!", + "ordinal": 1, + "type_info": "Text" + }, + { + "name": "bonded: bool", + "ordinal": 2, + "type_info": "Int64" + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "c7ba2621becb9ac4b5dee0ce303dadfcf19095935867a51cbd5b8362d1505fcc" +} diff --git a/nym-node-status-api/.sqlx/query-d8ea93e781666e6267902170709ee2aa37f6163525bbdce1a4cebef4a285f8d9.json b/nym-node-status-api/.sqlx/query-d8ea93e781666e6267902170709ee2aa37f6163525bbdce1a4cebef4a285f8d9.json new file mode 100644 index 0000000000..94e5513279 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-d8ea93e781666e6267902170709ee2aa37f6163525bbdce1a4cebef4a285f8d9.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "INSERT INTO gateways\n (gateway_identity_key, bonded, blacklisted,\n self_described, explorer_pretty_bond,\n last_updated_utc, performance)\n VALUES (?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT(gateway_identity_key) DO UPDATE SET\n bonded=excluded.bonded,\n blacklisted=excluded.blacklisted,\n self_described=excluded.self_described,\n explorer_pretty_bond=excluded.explorer_pretty_bond,\n last_updated_utc=excluded.last_updated_utc,\n performance = excluded.performance;", + "describe": { + "columns": [], + "parameters": { + "Right": 7 + }, + "nullable": [] + }, + "hash": "d8ea93e781666e6267902170709ee2aa37f6163525bbdce1a4cebef4a285f8d9" +} diff --git a/nym-node-status-api/.sqlx/query-e0c76a959276e3b0f44c720af9c74a5bf4912ee73468e62e7d0d96b1d9074cbe.json b/nym-node-status-api/.sqlx/query-e0c76a959276e3b0f44c720af9c74a5bf4912ee73468e62e7d0d96b1d9074cbe.json new file mode 100644 index 0000000000..5f7443bd50 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-e0c76a959276e3b0f44c720af9c74a5bf4912ee73468e62e7d0d96b1d9074cbe.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "INSERT INTO summary\n (key, value_json, last_updated_utc)\n VALUES (?, ?, ?)\n ON CONFLICT(key) DO UPDATE SET\n value_json=excluded.value_json,\n last_updated_utc=excluded.last_updated_utc;", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "e0c76a959276e3b0f44c720af9c74a5bf4912ee73468e62e7d0d96b1d9074cbe" +} diff --git a/nym-node-status-api/.sqlx/query-f0a4316081d1be9444a87b95d933d31cb4bcc4071d31d8d2f7755e2d2c2e3e35.json b/nym-node-status-api/.sqlx/query-f0a4316081d1be9444a87b95d933d31cb4bcc4071d31d8d2f7755e2d2c2e3e35.json new file mode 100644 index 0000000000..d3f7611ba2 --- /dev/null +++ b/nym-node-status-api/.sqlx/query-f0a4316081d1be9444a87b95d933d31cb4bcc4071d31d8d2f7755e2d2c2e3e35.json @@ -0,0 +1,86 @@ +{ + "db_name": "SQLite", + "query": "SELECT\n mn.mix_id as \"mix_id!\",\n mn.bonded as \"bonded: bool\",\n mn.blacklisted as \"blacklisted: bool\",\n mn.is_dp_delegatee as \"is_dp_delegatee: bool\",\n mn.total_stake as \"total_stake!\",\n mn.full_details as \"full_details!\",\n mn.self_described as \"self_described\",\n mn.last_updated_utc as \"last_updated_utc!\",\n COALESCE(md.moniker, \"NA\") as \"moniker!\",\n COALESCE(md.website, \"NA\") as \"website!\",\n COALESCE(md.security_contact, \"NA\") as \"security_contact!\",\n COALESCE(md.details, \"NA\") as \"details!\"\n FROM mixnodes mn\n LEFT JOIN mixnode_description md ON mn.mix_id = md.mix_id\n ORDER BY mn.mix_id", + "describe": { + "columns": [ + { + "name": "mix_id!", + "ordinal": 0, + "type_info": "Int64" + }, + { + "name": "bonded: bool", + "ordinal": 1, + "type_info": "Int64" + }, + { + "name": "blacklisted: bool", + "ordinal": 2, + "type_info": "Int64" + }, + { + "name": "is_dp_delegatee: bool", + "ordinal": 3, + "type_info": "Int64" + }, + { + "name": "total_stake!", + "ordinal": 4, + "type_info": "Int64" + }, + { + "name": "full_details!", + "ordinal": 5, + "type_info": "Text" + }, + { + "name": "self_described", + "ordinal": 6, + "type_info": "Text" + }, + { + "name": "last_updated_utc!", + "ordinal": 7, + "type_info": "Int64" + }, + { + "name": "moniker!", + "ordinal": 8, + "type_info": "Text" + }, + { + "name": "website!", + "ordinal": 9, + "type_info": "Text" + }, + { + "name": "security_contact!", + "ordinal": 10, + "type_info": "Text" + }, + { + "name": "details!", + "ordinal": 11, + "type_info": "Text" + } + ], + "parameters": { + "Right": 0 + }, + "nullable": [ + false, + false, + false, + false, + false, + true, + true, + false, + false, + false, + false, + false + ] + }, + "hash": "f0a4316081d1be9444a87b95d933d31cb4bcc4071d31d8d2f7755e2d2c2e3e35" +} diff --git a/nym-node-status-api/.sqlx/query-f5048d9926a5f5329f7f3b96d43b925e033ceec4f8112258feb4ac9e96fc5924.json b/nym-node-status-api/.sqlx/query-f5048d9926a5f5329f7f3b96d43b925e033ceec4f8112258feb4ac9e96fc5924.json new file mode 100644 index 0000000000..06d098bebc --- /dev/null +++ b/nym-node-status-api/.sqlx/query-f5048d9926a5f5329f7f3b96d43b925e033ceec4f8112258feb4ac9e96fc5924.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE\n testruns\n SET\n status = ?\n WHERE\n status = ?\n AND\n timestamp_utc < ?\n ", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "f5048d9926a5f5329f7f3b96d43b925e033ceec4f8112258feb4ac9e96fc5924" +} diff --git a/nym-node-status-api/.sqlx/query-ff9334ba7b670b218b2f9100e9ab5d2f2d08b2e53203aab9f07ea9b52acbd407.json b/nym-node-status-api/.sqlx/query-ff9334ba7b670b218b2f9100e9ab5d2f2d08b2e53203aab9f07ea9b52acbd407.json new file mode 100644 index 0000000000..24e735e96d --- /dev/null +++ b/nym-node-status-api/.sqlx/query-ff9334ba7b670b218b2f9100e9ab5d2f2d08b2e53203aab9f07ea9b52acbd407.json @@ -0,0 +1,26 @@ +{ + "db_name": "SQLite", + "query": "UPDATE testruns\n SET status = ?\n WHERE rowid =\n (\n SELECT rowid\n FROM testruns\n WHERE status = ?\n ORDER BY timestamp_utc asc\n LIMIT 1\n )\n RETURNING\n id as \"id!\",\n gateway_id\n ", + "describe": { + "columns": [ + { + "name": "id!", + "ordinal": 0, + "type_info": "Int64" + }, + { + "name": "gateway_id", + "ordinal": 1, + "type_info": "Int64" + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + true, + false + ] + }, + "hash": "ff9334ba7b670b218b2f9100e9ab5d2f2d08b2e53203aab9f07ea9b52acbd407" +} diff --git a/nym-node-status-api/Cargo.toml b/nym-node-status-api/Cargo.toml index 4cc9ff5d28..0969d31045 100644 --- a/nym-node-status-api/Cargo.toml +++ b/nym-node-status-api/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "nym-node-status-api" -version = "0.1.0" +version = "0.1.5" authors.workspace = true repository.workspace = true homepage.workspace = true @@ -24,14 +24,10 @@ moka = { workspace = true, features = ["future"] } nym-bin-common = { path = "../common/bin-common", features = ["models"]} nym-common-models = { path = "../common/models" } nym-explorer-client = { path = "../explorer-api/explorer-client" } -# TODO dz: before Nym API client breaking changes. Update to latest develop once new Nym API is live -nym-network-defaults = { git = "https://github.com/nymtech/nym", branch = "pre-dir-v2-fork" } -nym-validator-client = { git = "https://github.com/nymtech/nym", branch = "pre-dir-v2-fork" } -# nym-network-defaults = { path = "../common/network-defaults" } -# nym-validator-client = { path = "../common/client-libs/validator-client" } +nym-network-defaults = { path = "../common/network-defaults" } +nym-validator-client = { path = "../common/client-libs/validator-client" } nym-task = { path = "../common/task" } -nym-node-requests = { git = "https://github.com/nymtech/nym", branch = "pre-dir-v2-fork" } -# nym-node-requests = { path = "../nym-node/nym-node-requests", features = ["openapi"] } +nym-node-requests = { path = "../nym-node/nym-node-requests", features = ["openapi"] } regex = { workspace = true } reqwest = { workspace = true } serde = { workspace = true, features = ["derive"] } diff --git a/nym-node-status-api/build.rs b/nym-node-status-api/build.rs index bfe6e54e74..025e755088 100644 --- a/nym-node-status-api/build.rs +++ b/nym-node-status-api/build.rs @@ -11,7 +11,7 @@ const SQLITE_DB_FILENAME: &str = "nym-node-status-api.sqlite"; #[tokio::main(flavor = "current_thread")] async fn main() -> Result<()> { let out_dir = read_env_var("OUT_DIR")?; - let database_path = format!("sqlite://{}/{}?mode=rwc", out_dir, SQLITE_DB_FILENAME); + let database_path = format!("{}/{}?mode=rwc", out_dir, SQLITE_DB_FILENAME); write_db_path_to_file(&out_dir, SQLITE_DB_FILENAME).await?; let mut conn = SqliteConnection::connect(&database_path).await?; @@ -25,7 +25,6 @@ async fn main() -> Result<()> { // not a valid windows path... but hey, it works... println!("cargo::rustc-env=DATABASE_URL=sqlite:///{}", &database_path); - rerun_if_changed(); Ok(()) } @@ -33,11 +32,6 @@ fn read_env_var(var: &str) -> Result { std::env::var(var).map_err(|_| anyhow!("You need to set {} env var", var)) } -fn rerun_if_changed() { - println!("cargo::rerun-if-changed=migrations"); - println!("cargo::rerun-if-changed=src/db/queries"); -} - /// use `./enter_db.sh` to inspect DB async fn write_db_path_to_file(out_dir: &str, db_filename: &str) -> anyhow::Result<()> { let mut file = File::create("enter_db.sh").await?; diff --git a/nym-node-status-api/launch_node_status_api.sh b/nym-node-status-api/launch_node_status_api.sh index f9ebd364a9..5d92675412 100755 --- a/nym-node-status-api/launch_node_status_api.sh +++ b/nym-node-status-api/launch_node_status_api.sh @@ -6,8 +6,9 @@ export RUST_LOG=${RUST_LOG:-debug} export NYM_API_CLIENT_TIMEOUT=60 export EXPLORER_CLIENT_TIMEOUT=60 +export NODE_STATUS_API_TESTRUN_REFRESH_INTERVAL=60 -export ENVIRONMENT="mainnet.env" +export ENVIRONMENT="qa.env" function run_bare() { # export necessary env vars diff --git a/nym-node-status-api/migrations/000_init.sql b/nym-node-status-api/migrations/000_init.sql index 1e5683e2c9..4f9fd7da60 100644 --- a/nym-node-status-api/migrations/000_init.sql +++ b/nym-node-status-api/migrations/000_init.sql @@ -2,7 +2,7 @@ CREATE TABLE gateways ( id INTEGER PRIMARY KEY AUTOINCREMENT, gateway_identity_key VARCHAR NOT NULL UNIQUE, - self_described VARCHAR, + self_described VARCHAR NOT NULL, explorer_pretty_bond VARCHAR, last_probe_result VARCHAR, last_probe_log VARCHAR, @@ -103,7 +103,7 @@ CREATE TABLE CREATE TABLE testruns ( id INTEGER PRIMARY KEY AUTOINCREMENT, - gateway_id INTEGER, + gateway_id INTEGER NOT NULL, status INTEGER NOT NULL, -- 0=pending, 1=in-progress, 2=complete timestamp_utc INTEGER NOT NULL, ip_address VARCHAR NOT NULL, diff --git a/nym-node-status-api/src/db/models.rs b/nym-node-status-api/src/db/models.rs index f704c1ed8a..a5511787f9 100644 --- a/nym-node-status-api/src/db/models.rs +++ b/nym-node-status-api/src/db/models.rs @@ -11,7 +11,7 @@ pub(crate) struct GatewayRecord { pub(crate) identity_key: String, pub(crate) bonded: bool, pub(crate) blacklisted: bool, - pub(crate) self_described: Option, + pub(crate) self_described: String, pub(crate) explorer_pretty_bond: Option, pub(crate) last_updated_utc: i64, pub(crate) performance: u8, @@ -300,6 +300,7 @@ pub(crate) mod gateway { } } +#[allow(dead_code)] // not dead code, this is SQL data model #[derive(Debug, Clone)] pub struct TestRunDto { pub id: i64, @@ -315,7 +316,7 @@ pub struct TestRunDto { pub(crate) enum TestRunStatus { Complete = 2, InProgress = 1, - Pending = 0, + Queued = 0, } #[derive(Debug, Clone)] diff --git a/nym-node-status-api/src/db/queries/gateways.rs b/nym-node-status-api/src/db/queries/gateways.rs index 02b5d05dc3..bcf9c2d6ca 100644 --- a/nym-node-status-api/src/db/queries/gateways.rs +++ b/nym-node-status-api/src/db/queries/gateways.rs @@ -6,9 +6,29 @@ use crate::{ http::models::Gateway, }; use futures_util::TryStreamExt; -use nym_validator_client::models::DescribedGateway; +use nym_validator_client::models::NymNodeDescription; +use sqlx::{pool::PoolConnection, Sqlite}; use tracing::error; +pub(crate) async fn select_gateway_identity( + conn: &mut PoolConnection, + gateway_pk: i64, +) -> anyhow::Result { + let record = sqlx::query!( + r#"SELECT + gateway_identity_key + FROM + gateways + WHERE + id = ?"#, + gateway_pk + ) + .fetch_one(conn.as_mut()) + .await?; + + Ok(record.gateway_identity_key) +} + pub(crate) async fn insert_gateways( pool: &DbPool, gateways: Vec, @@ -68,13 +88,13 @@ where /// Ensure all gateways that are set as bonded, are still bonded pub(crate) async fn ensure_gateways_still_bonded( pool: &DbPool, - gateways: &[DescribedGateway], + gateways: &[&NymNodeDescription], ) -> anyhow::Result { let bonded_gateways_rows = get_all_bonded_gateways_row_ids_by_status(pool, true).await?; let unbonded_gateways_rows = bonded_gateways_rows.iter().filter(|v| { !gateways .iter() - .any(|bonded| *bonded.bond.identity() == v.identity_key) + .any(|bonded| *bonded.ed25519_identity_key().to_base58_string() == v.identity_key) }); let recently_unbonded_gateways = unbonded_gateways_rows.to_owned().count(); diff --git a/nym-node-status-api/src/db/queries/mod.rs b/nym-node-status-api/src/db/queries/mod.rs index 349e62e7c7..fe22ec27aa 100644 --- a/nym-node-status-api/src/db/queries/mod.rs +++ b/nym-node-status-api/src/db/queries/mod.rs @@ -5,7 +5,7 @@ mod summary; pub(crate) mod testruns; pub(crate) use gateways::{ - ensure_gateways_still_bonded, get_all_gateways, insert_gateways, + ensure_gateways_still_bonded, get_all_gateways, insert_gateways, select_gateway_identity, write_blacklisted_gateways_to_db, }; pub(crate) use misc::insert_summaries; diff --git a/nym-node-status-api/src/db/queries/testruns.rs b/nym-node-status-api/src/db/queries/testruns.rs index cf5b8a3bbf..91a3a86b13 100644 --- a/nym-node-status-api/src/db/queries/testruns.rs +++ b/nym-node-status-api/src/db/queries/testruns.rs @@ -1,12 +1,14 @@ +use crate::db::DbPool; use crate::http::models::TestrunAssignment; use crate::{ db::models::{TestRunDto, TestRunStatus}, testruns::now_utc, }; use anyhow::Context; +use chrono::Duration; use sqlx::{pool::PoolConnection, Sqlite}; -pub(crate) async fn get_testrun_by_id( +pub(crate) async fn get_in_progress_testrun_by_id( conn: &mut PoolConnection, testrun_id: i64, ) -> anyhow::Result { @@ -20,22 +22,58 @@ pub(crate) async fn get_testrun_by_id( ip_address as "ip_address!", log as "log!" FROM testruns - WHERE id = ? + WHERE + id = ? + AND + status = ? ORDER BY timestamp_utc"#, - testrun_id + testrun_id, + TestRunStatus::InProgress as i64, ) .fetch_one(conn.as_mut()) .await .context(format!("Couldn't retrieve testrun {testrun_id}")) } +pub(crate) async fn update_testruns_older_than(db: &DbPool, age: Duration) -> anyhow::Result { + let mut conn = db.acquire().await?; + let previous_run = now_utc() - age; + let cutoff_timestamp = previous_run.timestamp(); + + let res = sqlx::query!( + r#"UPDATE + testruns + SET + status = ? + WHERE + status = ? + AND + timestamp_utc < ? + "#, + TestRunStatus::Queued as i64, + TestRunStatus::InProgress as i64, + cutoff_timestamp + ) + .execute(conn.as_mut()) + .await?; + + let stale_testruns = res.rows_affected(); + if stale_testruns > 0 { + tracing::debug!( + "Refreshed {} stale testruns, scheduled before {} but not yet finished", + stale_testruns, + previous_run + ); + } + + Ok(stale_testruns) +} + pub(crate) async fn get_oldest_testrun_and_make_it_pending( - // TODO dz accept mut reference, repeat in all similar functions - conn: PoolConnection, + conn: &mut PoolConnection, ) -> anyhow::Result> { - let mut conn = conn; - let assignment = sqlx::query_as!( - TestrunAssignment, + // find & mark as "In progress" in the same transaction to avoid race conditions + let returning = sqlx::query!( r#"UPDATE testruns SET status = ? WHERE rowid = @@ -47,16 +85,36 @@ pub(crate) async fn get_oldest_testrun_and_make_it_pending( LIMIT 1 ) RETURNING - id as "testrun_id!", - gateway_id as "gateway_pk_id!" + id as "id!", + gateway_id "#, TestRunStatus::InProgress as i64, - TestRunStatus::Pending as i64, + TestRunStatus::Queued as i64, ) - .fetch_optional(&mut *conn) + .fetch_optional(conn.as_mut()) .await?; - Ok(assignment) + if let Some(testrun) = returning { + let gw_identity = sqlx::query!( + r#" + SELECT + id, + gateway_identity_key + FROM gateways + WHERE id = ? + LIMIT 1"#, + testrun.gateway_id + ) + .fetch_one(conn.as_mut()) + .await?; + + Ok(Some(TestrunAssignment { + testrun_id: testrun.id, + gateway_identity_key: gw_identity.gateway_identity_key, + })) + } else { + Ok(None) + } } pub(crate) async fn update_testrun_status( diff --git a/nym-node-status-api/src/http/api/mod.rs b/nym-node-status-api/src/http/api/mod.rs index ed24fa80f5..4e4693ac1f 100644 --- a/nym-node-status-api/src/http/api/mod.rs +++ b/nym-node-status-api/src/http/api/mod.rs @@ -1,7 +1,10 @@ use anyhow::anyhow; use axum::{response::Redirect, Router}; use tokio::net::ToSocketAddrs; -use tower_http::{cors::CorsLayer, trace::TraceLayer}; +use tower_http::{ + cors::CorsLayer, + trace::{DefaultOnResponse, TraceLayer}, +}; use utoipa::OpenApi; use utoipa_swagger_ui::SwaggerUi; @@ -58,7 +61,10 @@ impl RouterBuilder { // CORS layer needs to wrap other API layers .layer(setup_cors()) // logger should be outermost layer - .layer(TraceLayer::new_for_http()) + .layer( + TraceLayer::new_for_http() + .on_response(DefaultOnResponse::new().level(tracing::Level::DEBUG)), + ) } } diff --git a/nym-node-status-api/src/http/api/testruns.rs b/nym-node-status-api/src/http/api/testruns.rs index 4bbc4d6295..e55e462110 100644 --- a/nym-node-status-api/src/http/api/testruns.rs +++ b/nym-node-status-api/src/http/api/testruns.rs @@ -1,3 +1,4 @@ +use axum::extract::DefaultBodyLimit; use axum::Json; use axum::{ extract::{Path, State}, @@ -23,31 +24,32 @@ pub(crate) fn routes() -> Router { Router::new() .route("/", axum::routing::get(request_testrun)) .route("/:testrun_id", axum::routing::post(submit_testrun)) + .layer(DefaultBodyLimit::max(1024 * 1024 * 5)) } #[tracing::instrument(level = "debug", skip_all)] async fn request_testrun(State(state): State) -> HttpResult> { // TODO dz log agent's key // TODO dz log agent's network probe version - tracing::debug!("Agent X requested testrun"); + tracing::debug!("Agent requested testrun"); let db = state.db_pool(); - let conn = db + let mut conn = db .acquire() .await .map_err(HttpError::internal_with_logging)?; - return match db::queries::testruns::get_oldest_testrun_and_make_it_pending(conn).await { + return match db::queries::testruns::get_oldest_testrun_and_make_it_pending(&mut conn).await { Ok(res) => { if let Some(testrun) = res { - // TODO dz consider adding a column to testruns table with agent's public key tracing::debug!( - "🏃‍ Assigned testrun row_id {} to agent X", - &testrun.testrun_id + "🏃‍ Assigned testrun row_id {} gateway {} to agent", + &testrun.testrun_id, + testrun.gateway_identity_key ); Ok(Json(testrun)) } else { - Err(HttpError::not_found("No testruns available")) + Err(HttpError::no_available_testruns()) } } Err(err) => Err(HttpError::internal_with_logging(err)), @@ -61,25 +63,32 @@ async fn submit_testrun( State(state): State, body: String, ) -> HttpResult { - tracing::debug!( - "Agent submitted testrun {}. Total length: {}", - testrun_id, - body.len(), - ); - // TODO dz store testrun results - let db = state.db_pool(); let mut conn = db .acquire() .await .map_err(HttpError::internal_with_logging)?; - let testrun = queries::testruns::get_testrun_by_id(&mut conn, testrun_id) + let testrun = queries::testruns::get_in_progress_testrun_by_id(&mut conn, testrun_id) .await .map_err(|e| { tracing::error!("{e}"); HttpError::not_found(testrun_id) })?; + + let gw_identity = db::queries::select_gateway_identity(&mut conn, testrun.gateway_id) + .await + .map_err(|_| { + // should never happen: + HttpError::internal_with_logging("No gateway found for testrun") + })?; + tracing::debug!( + "Agent submitted testrun {} for gateway {} ({} bytes)", + testrun_id, + gw_identity, + body.len(), + ); + // TODO dz this should be part of a single transaction: commit after everything is done queries::testruns::update_testrun_status(&mut conn, testrun_id, TestRunStatus::Complete) .await @@ -99,7 +108,7 @@ async fn submit_testrun( tracing::info!( "✅ Testrun row_id {} for gateway {} complete", testrun.id, - testrun.gateway_id + gw_identity ); Ok(StatusCode::CREATED) diff --git a/nym-node-status-api/src/http/error.rs b/nym-node-status-api/src/http/error.rs index 81a61e2d3e..808ace9cec 100644 --- a/nym-node-status-api/src/http/error.rs +++ b/nym-node-status-api/src/http/error.rs @@ -8,9 +8,9 @@ pub(crate) struct HttpError { } impl HttpError { - pub(crate) fn invalid_input(message: String) -> Self { + pub(crate) fn invalid_input(msg: impl Display) -> Self { Self { - message, + message: serde_json::json!({"message": msg.to_string()}).to_string(), status: axum::http::StatusCode::BAD_REQUEST, } } @@ -27,6 +27,12 @@ impl HttpError { } } + pub(crate) fn no_available_testruns() -> Self { + Self { + message: serde_json::json!({"message": "No available testruns"}).to_string(), + status: axum::http::StatusCode::SERVICE_UNAVAILABLE, + } + } pub(crate) fn not_found(msg: impl Display) -> Self { Self { message: serde_json::json!({"message": msg.to_string()}).to_string(), diff --git a/nym-node-status-api/src/http/models.rs b/nym-node-status-api/src/http/models.rs index 315bf085dc..82011fc286 100644 --- a/nym-node-status-api/src/http/models.rs +++ b/nym-node-status-api/src/http/models.rs @@ -1,4 +1,3 @@ -use crate::db::models::TestRunDto; use nym_node_requests::api::v1::node::models::NodeDescription; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; @@ -75,12 +74,3 @@ pub(crate) struct SummaryHistory { pub value_json: serde_json::Value, pub timestamp_utc: String, } - -impl From for TestrunAssignment { - fn from(value: TestRunDto) -> Self { - Self { - gateway_pk_id: value.gateway_id, - testrun_id: value.id, - } - } -} diff --git a/nym-node-status-api/src/monitor/mod.rs b/nym-node-status-api/src/monitor/mod.rs index 680a9ce312..a9f3761f35 100644 --- a/nym-node-status-api/src/monitor/mod.rs +++ b/nym-node-status-api/src/monitor/mod.rs @@ -10,7 +10,9 @@ use cosmwasm_std::Decimal; use nym_explorer_client::{ExplorerClient, PrettyDetailedGatewayBond}; use nym_network_defaults::NymNetworkDetails; use nym_validator_client::client::NymApiClientExt; -use nym_validator_client::models::{DescribedGateway, DescribedMixNode, MixNodeBondAnnotated}; +use nym_validator_client::models::{ + LegacyDescribedMixNode, MixNodeBondAnnotated, NymNodeDescription, +}; use nym_validator_client::nym_nodes::SkimmedNode; use nym_validator_client::nyxd::contract_traits::PagedMixnetQueryClient; use nym_validator_client::nyxd::{AccountId, NyxdClient}; @@ -91,20 +93,39 @@ async fn run( let explorer_client = ExplorerClient::new_with_timeout(default_explorer_url, explorer_client_timeout)?; let explorer_gateways = explorer_client - .get_gateways() + .unstable_get_gateways() .await - .log_error("get_gateways")?; + .log_error("unstable_get_gateways")?; let api_client = NymApiClient::new_with_timeout(default_api_url, nym_api_client_timeout); - let gateways = api_client - .get_cached_described_gateways() + + let all_nodes = api_client + .get_all_described_nodes() .await - .log_error("get_described_gateways")?; - tracing::debug!("Fetched {} gateways", gateways.len()); - let skimmed_gateways = api_client - .get_basic_gateways(None) + .log_error("get_all_described_nodes")?; + tracing::debug!("Fetched {} total nodes", all_nodes.len()); + + let gateways = all_nodes + .iter() + .filter(|node| node.description.declared_role.entry) + .collect::>(); + tracing::debug!("Of those, {} gateways", gateways.len()); + for gw in gateways.iter() { + tracing::debug!("{}", gw.ed25519_identity_key().to_base58_string()); + } + + let mixnodes = all_nodes + .iter() + .filter(|node| node.description.declared_role.mixnode) + .collect::>(); + tracing::debug!("Of those, {} mixnodes", mixnodes.len()); + + log_gw_in_explorer_not_api(explorer_gateways.as_slice(), gateways.as_slice()); + + let all_skimmed_nodes = api_client + .get_all_basic_nodes(None) .await - .log_error("get_basic_gateways")?; + .log_error("get_all_basic_nodes")?; let mixnodes = api_client .get_cached_mixnodes() @@ -112,11 +133,12 @@ async fn run( .log_error("get_cached_mixnodes")?; tracing::debug!("Fetched {} mixnodes", mixnodes.len()); - let gateways_blacklisted = skimmed_gateways + // let gateways_blacklisted = gateways.iter().filter(|gw|gw.) + let gateways_blacklisted = all_skimmed_nodes .iter() - .filter_map(|gw| { - if gw.performance.round_to_integer() <= 50 { - Some(gw.ed25519_identity_pubkey.to_owned()) + .filter_map(|node| { + if node.performance.round_to_integer() <= 50 && node.supported_roles.entry { + Some(node.ed25519_identity_pubkey.to_base58_string()) } else { None } @@ -153,7 +175,7 @@ async fn run( &gateways, &gateways_blacklisted, explorer_gateways, - skimmed_gateways, + all_skimmed_nodes, )?; queries::insert_gateways(pool, gateway_records) .await @@ -165,8 +187,8 @@ async fn run( let count_gateways_blacklisted = gateways .iter() .filter(|gw| { - let gw_identity = gw.bond.identity(); - gateways_blacklisted.contains(gw_identity) + let gw_identity = gw.ed25519_identity_key().to_base58_string(); + gateways_blacklisted.contains(&gw_identity) }) .count(); @@ -277,7 +299,7 @@ async fn run( } fn prepare_gateway_data( - gateways: &[DescribedGateway], + gateways: &[&NymNodeDescription], gateways_blacklisted: &HashSet, explorer_gateways: Vec, skimmed_gateways: Vec, @@ -285,24 +307,25 @@ fn prepare_gateway_data( let mut gateway_records = Vec::new(); for gateway in gateways { - let identity_key = gateway.bond.identity(); + let identity_key = gateway.ed25519_identity_key().to_base58_string(); let bonded = true; let last_updated_utc = chrono::offset::Utc::now().timestamp(); - let blacklisted = gateways_blacklisted.contains(identity_key); + let blacklisted = gateways_blacklisted.contains(&identity_key); - let self_described = gateway - .self_described - .as_ref() - .and_then(|v| serde_json::to_string(&v).ok()); + let self_described = serde_json::to_string(&gateway.description)?; let explorer_pretty_bond = explorer_gateways .iter() - .find(|g| g.gateway.identity_key.eq(identity_key)); + .find(|g| g.gateway.identity_key.eq(&identity_key)); let explorer_pretty_bond = explorer_pretty_bond.and_then(|g| serde_json::to_string(g).ok()); let performance = skimmed_gateways .iter() - .find(|g| g.ed25519_identity_pubkey.eq(identity_key)) + .find(|g| { + g.ed25519_identity_pubkey + .to_base58_string() + .eq(&identity_key) + }) .map(|g| g.performance) .unwrap_or_default() .round_to_integer(); @@ -323,7 +346,7 @@ fn prepare_gateway_data( fn prepare_mixnode_data( mixnodes: &[MixNodeBondAnnotated], - mixnodes_described: Vec, + mixnodes_described: Vec, delegation_program_members: Vec, ) -> anyhow::Result> { let mut mixnode_records = Vec::new(); @@ -364,6 +387,28 @@ fn prepare_mixnode_data( Ok(mixnode_records) } +fn log_gw_in_explorer_not_api( + explorer: &[PrettyDetailedGatewayBond], + api_gateways: &[&NymNodeDescription], +) { + let api_gateways = api_gateways + .iter() + .map(|gw| gw.ed25519_identity_key().to_base58_string()) + .collect::>(); + let explorer_only = explorer + .iter() + .filter(|gw| !api_gateways.contains(&gw.gateway.identity_key.to_string())) + .collect::>(); + + tracing::debug!( + "Gateways listed by explorer but not by Nym API: {}", + explorer_only.len() + ); + for gw in explorer_only.iter() { + tracing::debug!("{}", gw.gateway.identity_key.to_string()); + } +} + // TODO dz is there a common monorepo place this can be put? pub trait NumericalCheckedCast where @@ -423,7 +468,7 @@ async fn get_delegation_program_details( let mix_ids: Vec = delegations .iter() - .map(|delegation| delegation.mix_id) + .map(|delegation| delegation.node_id) .collect(); Ok(mix_ids) diff --git a/nym-node-status-api/src/testruns/mod.rs b/nym-node-status-api/src/testruns/mod.rs index 86b36cf48e..f487523f36 100644 --- a/nym-node-status-api/src/testruns/mod.rs +++ b/nym-node-status-api/src/testruns/mod.rs @@ -11,10 +11,12 @@ pub(crate) use queue::now_utc; pub(crate) async fn spawn(pool: DbPool, refresh_interval: Duration) { tokio::spawn(async move { loop { - tracing::info!("Spawning testruns..."); + if let Err(e) = refresh_stale_testruns(&pool, refresh_interval).await { + tracing::error!("{e}"); + } if let Err(e) = run(&pool).await { - tracing::error!("Cron job failed: {}", e); + tracing::error!("Assigning testruns failed: {}", e); } tracing::debug!("Sleeping for {}s...", refresh_interval.as_secs()); tokio::time::sleep(refresh_interval).await; @@ -24,9 +26,9 @@ pub(crate) async fn spawn(pool: DbPool, refresh_interval: Duration) { // TODO dz make number of max agents configurable -// TODO dz periodically clean up stale pending testruns #[instrument(level = "debug", name = "testrun_queue", skip_all)] async fn run(pool: &DbPool) -> anyhow::Result<()> { + tracing::info!("Spawning testruns..."); if pool.is_closed() { tracing::debug!("DB pool closed, returning early"); return Ok(()); @@ -74,3 +76,11 @@ async fn run(pool: &DbPool) -> anyhow::Result<()> { Ok(()) } + +#[instrument(level = "debug", skip_all)] +async fn refresh_stale_testruns(pool: &DbPool, refresh_interval: Duration) -> anyhow::Result<()> { + let chrono_duration = chrono::Duration::from_std(refresh_interval)?; + crate::db::queries::testruns::update_testruns_older_than(pool, chrono_duration).await?; + + Ok(()) +} diff --git a/nym-node-status-api/src/testruns/queue.rs b/nym-node-status-api/src/testruns/queue.rs index aa0ce32fa2..88804fff1b 100644 --- a/nym-node-status-api/src/testruns/queue.rs +++ b/nym-node-status-api/src/testruns/queue.rs @@ -82,7 +82,7 @@ pub(crate) async fn try_queue_testrun( // // save test run // - let status = TestRunStatus::Pending as u32; + let status = TestRunStatus::Queued as u32; let log = format!( "Test for {identity_key} requested at {} UTC\n\n", timestamp_pretty @@ -103,7 +103,7 @@ pub(crate) async fn try_queue_testrun( Ok(TestRun { id: id as u32, identity_key, - status: format!("{}", TestRunStatus::Pending), + status: format!("{}", TestRunStatus::Queued), log, }) }