From 64c1026975f267f7089d92a1a07ffb725c0b09ec Mon Sep 17 00:00:00 2001 From: Roman Petriv Date: Fri, 22 Dec 2023 18:00:21 +0200 Subject: [PATCH 1/2] feat: automatic system alerts (#141) --- package-lock.json | 693 +----------------- packages/app/src/App.vue | 4 +- .../app/src/components/IndexerDelayAlert.vue | 68 ++ packages/app/src/components/IssuesBanner.vue | 31 - .../app/src/components/NetworkDeprecated.vue | 26 +- .../app/src/components/common/SystemAlert.vue | 22 + .../app/src/components/header/TheHeader.vue | 8 - packages/app/src/locales/en.json | 4 + packages/app/src/locales/uk.json | 4 + .../app/tests/e2e/features/copying.feature | 4 +- .../e2e/src/steps/blockexplorer.steps.ts | 7 + packages/worker/package.json | 1 - .../src/health/health.controller.spec.ts | 10 +- .../worker/src/health/health.controller.ts | 6 +- packages/worker/src/main.ts | 43 -- 15 files changed, 163 insertions(+), 768 deletions(-) create mode 100644 packages/app/src/components/IndexerDelayAlert.vue delete mode 100644 packages/app/src/components/IssuesBanner.vue create mode 100644 packages/app/src/components/common/SystemAlert.vue diff --git a/package-lock.json b/package-lock.json index c2249f4f77..b5e9876c27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4006,540 +4006,6 @@ "node": ">=14" } }, - "node_modules/@firebase/analytics": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.0.tgz", - "integrity": "sha512-Locv8gAqx0e+GX/0SI3dzmBY5e9kjVDtD+3zCFLJ0tH2hJwuCAiL+5WkHuxKj92rqQj/rvkBUCfA1ewlX2hehg==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/installations": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/analytics-compat": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.6.tgz", - "integrity": "sha512-4MqpVLFkGK7NJf/5wPEEP7ePBJatwYpyjgJ+wQHQGHfzaCDgntOnl9rL2vbVGGKCnRqWtZDIWhctB86UWXaX2Q==", - "dependencies": { - "@firebase/analytics": "0.10.0", - "@firebase/analytics-types": "0.8.0", - "@firebase/component": "0.6.4", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/analytics-types": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.8.0.tgz", - "integrity": "sha512-iRP+QKI2+oz3UAh4nPEq14CsEjrjD6a5+fuypjScisAh9kXKFvdJOZJDwk7kikLvWVLGEs9+kIUS4LPQV7VZVw==" - }, - "node_modules/@firebase/app": { - "version": "0.9.25", - "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.9.25.tgz", - "integrity": "sha512-fX22gL5USXhOK21Hlh3oTeOzQZ6th6S2JrjXNEpBARmwzuUkqmVGVdsOCIFYIsLpK0dQE3o8xZnLrRg5wnzZ/g==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "idb": "7.1.1", - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/app-check": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.1.tgz", - "integrity": "sha512-zi3vbM5tb/eGRWyiqf+1DXbxFu9Q07dnm46rweodgUpH9B8svxYkHfNwYWx7F5mjHU70SQDuaojH1We5ws9OKA==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/app-check-compat": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.8.tgz", - "integrity": "sha512-EaETtChR4UgMokJFw+r6jfcIyCTUZSe0a6ivF37D9MxlG9G3wzK1COyXgxoX96GzXmDPc2aubX4PxCrdVHhrnA==", - "dependencies": { - "@firebase/app-check": "0.8.1", - "@firebase/app-check-types": "0.5.0", - "@firebase/component": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/app-check-interop-types": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.0.tgz", - "integrity": "sha512-xAxHPZPIgFXnI+vb4sbBjZcde7ZluzPPaSK7Lx3/nmuVk4TjZvnL8ONnkd4ERQKL8WePQySU+pRcWkh8rDf5Sg==" - }, - "node_modules/@firebase/app-check-types": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.5.0.tgz", - "integrity": "sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ==" - }, - "node_modules/@firebase/app-compat": { - "version": "0.2.25", - "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.25.tgz", - "integrity": "sha512-B/JtCp1FsTuzlh1tIGQpYM2AXps21/zlzpFsk5LRsROOTRhBcR2N45AyaONPFD06C0yS0Tw19foxADzHyOSC3A==", - "dependencies": { - "@firebase/app": "0.9.25", - "@firebase/component": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/app-types": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.0.tgz", - "integrity": "sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q==" - }, - "node_modules/@firebase/auth-compat": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.5.1.tgz", - "integrity": "sha512-rgDZnrDoekRvtzXVji8Z61wxxkof6pTkjYEkybILrjM8tGP9tx4xa9qGpF4ax3AzF+rKr7mIa9NnoXEK4UNqmQ==", - "dependencies": { - "@firebase/auth": "1.5.1", - "@firebase/auth-types": "0.12.0", - "@firebase/component": "0.6.4", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0", - "undici": "5.26.5" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/auth-compat/node_modules/@firebase/auth": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.5.1.tgz", - "integrity": "sha512-sVi7rq2YneLGJFqHa5S6nDfCHix9yuVV3RLhj/pWPlB4a36ofXal4E6PJwpeMc8uLjWEr1aovYN1jkXWNB6Avw==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0", - "undici": "5.26.5" - }, - "peerDependencies": { - "@firebase/app": "0.x", - "@react-native-async-storage/async-storage": "^1.18.1" - }, - "peerDependenciesMeta": { - "@react-native-async-storage/async-storage": { - "optional": true - } - } - }, - "node_modules/@firebase/auth-compat/node_modules/undici": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz", - "integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/@firebase/auth-interop-types": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.1.tgz", - "integrity": "sha512-VOaGzKp65MY6P5FI84TfYKBXEPi6LmOCSMMzys6o2BN2LOsqy7pCuZCup7NYnfbk5OkkQKzvIfHOzTm0UDpkyg==" - }, - "node_modules/@firebase/auth-types": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.12.0.tgz", - "integrity": "sha512-pPwaZt+SPOshK8xNoiQlK5XIrS97kFYc3Rc7xmy373QsOJ9MmqXxLaYssP5Kcds4wd2qK//amx/c+A8O2fVeZA==", - "peerDependencies": { - "@firebase/app-types": "0.x", - "@firebase/util": "1.x" - } - }, - "node_modules/@firebase/component": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.4.tgz", - "integrity": "sha512-rLMyrXuO9jcAUCaQXCMjCMUsWrba5fzHlNK24xz5j2W6A/SRmK8mZJ/hn7V0fViLbxC0lPMtrK1eYzk6Fg03jA==", - "dependencies": { - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/database": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.0.2.tgz", - "integrity": "sha512-8X6NBJgUQzDz0xQVaCISoOLINKat594N2eBbMR3Mu/MH/ei4WM+aAMlsNzngF22eljXu1SILP5G3evkyvsG3Ng==", - "dependencies": { - "@firebase/app-check-interop-types": "0.3.0", - "@firebase/auth-interop-types": "0.2.1", - "@firebase/component": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "faye-websocket": "0.11.4", - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/database-compat": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-1.0.2.tgz", - "integrity": "sha512-09ryJnXDvuycsxn8aXBzLhBTuCos3HEnCOBWY6hosxfYlNCGnLvG8YMlbSAt5eNhf7/00B095AEfDsdrrLjxqA==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/database": "1.0.2", - "@firebase/database-types": "1.0.0", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/database-types": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.0.tgz", - "integrity": "sha512-SjnXStoE0Q56HcFgNQ+9SsmJc0c8TqGARdI/T44KXy+Ets3r6x/ivhQozT66bMnCEjJRywYoxNurRTMlZF8VNg==", - "dependencies": { - "@firebase/app-types": "0.9.0", - "@firebase/util": "1.9.3" - } - }, - "node_modules/@firebase/firestore": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.4.0.tgz", - "integrity": "sha512-VeDXD9PUjvcWY1tInBOMTIu2pijR3YYy+QAe5cxCo1Q1vW+aA/mpQHhebPM1J6b4Zd1MuUh8xpBRvH9ujKR56A==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "@firebase/webchannel-wrapper": "0.10.5", - "@grpc/grpc-js": "~1.9.0", - "@grpc/proto-loader": "^0.7.8", - "tslib": "^2.1.0", - "undici": "5.26.5" - }, - "engines": { - "node": ">=10.10.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/firestore-compat": { - "version": "0.3.23", - "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.23.tgz", - "integrity": "sha512-uUTBiP0GLVBETaOCfB11d33OWB8x1r2G1Xrl0sRK3Va0N5LJ/GRvKVSGfM7VScj+ypeHe8RpdwKoCqLpN1e+uA==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/firestore": "4.4.0", - "@firebase/firestore-types": "3.0.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/firestore-types": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-3.0.0.tgz", - "integrity": "sha512-Meg4cIezHo9zLamw0ymFYBD4SMjLb+ZXIbuN7T7ddXN6MGoICmOTq3/ltdCGoDCS2u+H1XJs2u/cYp75jsX9Qw==", - "peerDependencies": { - "@firebase/app-types": "0.x", - "@firebase/util": "1.x" - } - }, - "node_modules/@firebase/firestore/node_modules/undici": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz", - "integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/@firebase/functions": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.11.0.tgz", - "integrity": "sha512-n1PZxKnJ++k73Q8khTPwihlbeKo6emnGzE0hX6QVQJsMq82y/XKmNpw2t/q30VJgwaia3ZXU1fd1C5wHncL+Zg==", - "dependencies": { - "@firebase/app-check-interop-types": "0.3.0", - "@firebase/auth-interop-types": "0.2.1", - "@firebase/component": "0.6.4", - "@firebase/messaging-interop-types": "0.2.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0", - "undici": "5.26.5" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/functions-compat": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.6.tgz", - "integrity": "sha512-RQpO3yuHtnkqLqExuAT2d0u3zh8SDbeBYK5EwSCBKI9mjrFeJRXBnd3pEG+x5SxGJLy56/5pQf73mwt0OuH5yg==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/functions": "0.11.0", - "@firebase/functions-types": "0.6.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/functions-types": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.6.0.tgz", - "integrity": "sha512-hfEw5VJtgWXIRf92ImLkgENqpL6IWpYaXVYiRkFY1jJ9+6tIhWM7IzzwbevwIIud/jaxKVdRzD7QBWfPmkwCYw==" - }, - "node_modules/@firebase/functions/node_modules/undici": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz", - "integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/@firebase/installations": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.4.tgz", - "integrity": "sha512-u5y88rtsp7NYkCHC3ElbFBrPtieUybZluXyzl7+4BsIz4sqb4vSAuwHEUgCgCeaQhvsnxDEU6icly8U9zsJigA==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/util": "1.9.3", - "idb": "7.0.1", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/installations-compat": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.4.tgz", - "integrity": "sha512-LI9dYjp0aT9Njkn9U4JRrDqQ6KXeAmFbRC0E7jI7+hxl5YmRWysq5qgQl22hcWpTk+cm3es66d/apoDU/A9n6Q==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/installations": "0.6.4", - "@firebase/installations-types": "0.5.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/installations-types": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@firebase/installations-types/-/installations-types-0.5.0.tgz", - "integrity": "sha512-9DP+RGfzoI2jH7gY4SlzqvZ+hr7gYzPODrbzVD82Y12kScZ6ZpRg/i3j6rleto8vTFC8n6Len4560FnV1w2IRg==", - "peerDependencies": { - "@firebase/app-types": "0.x" - } - }, - "node_modules/@firebase/installations/node_modules/idb": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", - "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" - }, - "node_modules/@firebase/logger": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.4.0.tgz", - "integrity": "sha512-eRKSeykumZ5+cJPdxxJRgAC3G5NknY2GwEbKfymdnXtnT0Ucm4pspfR6GT4MUQEDuJwRVbVcSx85kgJulMoFFA==", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/messaging": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.5.tgz", - "integrity": "sha512-i/rrEI2k9ueFhdIr8KQsptWGskrsnkC5TkohCTrJKz9P0C/PbNv14IAMkwhMJTqIur5VwuOnrUkc9Kdz7awekw==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/installations": "0.6.4", - "@firebase/messaging-interop-types": "0.2.0", - "@firebase/util": "1.9.3", - "idb": "7.1.1", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/messaging-compat": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.5.tgz", - "integrity": "sha512-qHQZxm4hEG8/HFU/ls5/bU+rpnlPDoZoqi3ATMeb6s4hovYV9+PfV5I7ZrKV5eFFv47Hx1PWLe5uPnS4e7gMwQ==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/messaging": "0.12.5", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/messaging-interop-types": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.0.tgz", - "integrity": "sha512-ujA8dcRuVeBixGR9CtegfpU4YmZf3Lt7QYkcj693FFannwNuZgfAYaTmbJ40dtjB81SAu6tbFPL9YLNT15KmOQ==" - }, - "node_modules/@firebase/performance": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.4.tgz", - "integrity": "sha512-HfTn/bd8mfy/61vEqaBelNiNnvAbUtME2S25A67Nb34zVuCSCRIX4SseXY6zBnOFj3oLisaEqhVcJmVPAej67g==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/installations": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/performance-compat": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.4.tgz", - "integrity": "sha512-nnHUb8uP9G8islzcld/k6Bg5RhX62VpbAb/Anj7IXs/hp32Eb2LqFPZK4sy3pKkBUO5wcrlRWQa6wKOxqlUqsg==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/performance": "0.6.4", - "@firebase/performance-types": "0.2.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/performance-types": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.2.0.tgz", - "integrity": "sha512-kYrbr8e/CYr1KLrLYZZt2noNnf+pRwDq2KK9Au9jHrBMnb0/C9X9yWSXmZkFt4UIdsQknBq8uBB7fsybZdOBTA==" - }, - "node_modules/@firebase/remote-config": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.4.4.tgz", - "integrity": "sha512-x1ioTHGX8ZwDSTOVp8PBLv2/wfwKzb4pxi0gFezS5GCJwbLlloUH4YYZHHS83IPxnua8b6l0IXUaWd0RgbWwzQ==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/installations": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/remote-config-compat": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.4.tgz", - "integrity": "sha512-FKiki53jZirrDFkBHglB3C07j5wBpitAaj8kLME6g8Mx+aq7u9P7qfmuSRytiOItADhWUj7O1JIv7n9q87SuwA==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/remote-config": "0.4.4", - "@firebase/remote-config-types": "0.3.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/remote-config-types": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.3.0.tgz", - "integrity": "sha512-RtEH4vdcbXZuZWRZbIRmQVBNsE7VDQpet2qFvq6vwKLBIQRQR5Kh58M4ok3A3US8Sr3rubYnaGqZSurCwI8uMA==" - }, - "node_modules/@firebase/storage": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.12.0.tgz", - "integrity": "sha512-SGs02Y/mmWBRsqZiYLpv4Sf7uZYZzMWVNN+aKiDqPsFBCzD6hLvGkXz+u98KAl8FqcjgB8BtSu01wm4pm76KHA==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0", - "undici": "5.26.5" - }, - "peerDependencies": { - "@firebase/app": "0.x" - } - }, - "node_modules/@firebase/storage-compat": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.3.tgz", - "integrity": "sha512-WNtjYPhpOA1nKcRu5lIodX0wZtP8pI0VxDJnk6lr+av7QZNS1s6zvr+ERDTve+Qu4Hq/ZnNaf3kBEQR2ccXn6A==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/storage": "0.12.0", - "@firebase/storage-types": "0.8.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" - } - }, - "node_modules/@firebase/storage-types": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.8.0.tgz", - "integrity": "sha512-isRHcGrTs9kITJC0AVehHfpraWFui39MPaU7Eo8QfWlqW7YPymBmRgjDrlOgFdURh6Cdeg07zmkLP5tzTKRSpg==", - "peerDependencies": { - "@firebase/app-types": "0.x", - "@firebase/util": "1.x" - } - }, - "node_modules/@firebase/storage/node_modules/undici": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz", - "integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/@firebase/util": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.9.3.tgz", - "integrity": "sha512-DY02CRhOZwpzO36fHpuVysz6JZrscPiBXD0fXp6qSrL9oNOx5KWICKdR95C0lSITzxp0TZosVyHqzatE8JbcjA==", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/@firebase/webchannel-wrapper": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.5.tgz", - "integrity": "sha512-eSkJsnhBWv5kCTSU1tSUVl9mpFu+5NXXunZc83le8GMjMlsWwQArSc7cJJ4yl+aDFY0NGLi0AjZWMn1axOrkRg==" - }, "node_modules/@gar/promisify": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", @@ -4550,6 +4016,8 @@ "version": "1.9.13", "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.13.tgz", "integrity": "sha512-OEZZu9v9AA+7/tghMDE8o5DAMD5THVnwSqDWuh7PPYO5287rTyqy0xEHT6/e4pbqSrhyLPdQFsam4TwFQVVIIw==", + "optional": true, + "peer": true, "dependencies": { "@grpc/proto-loader": "^0.7.8", "@types/node": ">=12.12.47" @@ -4562,6 +4030,8 @@ "version": "0.7.10", "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.10.tgz", "integrity": "sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ==", + "optional": true, + "peer": true, "dependencies": { "lodash.camelcase": "^4.3.0", "long": "^5.0.0", @@ -8200,27 +7670,37 @@ "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "optional": true, + "peer": true }, "node_modules/@protobufjs/base64": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "optional": true, + "peer": true }, "node_modules/@protobufjs/codegen": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "optional": true, + "peer": true }, "node_modules/@protobufjs/eventemitter": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "optional": true, + "peer": true }, "node_modules/@protobufjs/fetch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "optional": true, + "peer": true, "dependencies": { "@protobufjs/aspromise": "^1.1.1", "@protobufjs/inquire": "^1.1.0" @@ -8229,27 +7709,37 @@ "node_modules/@protobufjs/float": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "optional": true, + "peer": true }, "node_modules/@protobufjs/inquire": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "optional": true, + "peer": true }, "node_modules/@protobufjs/path": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "optional": true, + "peer": true }, "node_modules/@protobufjs/pool": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "optional": true, + "peer": true }, "node_modules/@protobufjs/utf8": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "optional": true, + "peer": true }, "node_modules/@remix-run/router": { "version": "1.10.0", @@ -26784,17 +26274,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/faye-websocket": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", - "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", - "dependencies": { - "websocket-driver": ">=0.5.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/fb-watchman": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", @@ -27156,71 +26635,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/firebase": { - "version": "10.7.1", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-10.7.1.tgz", - "integrity": "sha512-Mlt7y7zQ43FtKp4SCyYie3tnrOL3UMF2XXiV4ZXMrC0d0wtcOYmABuybhkJpJCKILpdekxr39wjnaai0DZlWFg==", - "dependencies": { - "@firebase/analytics": "0.10.0", - "@firebase/analytics-compat": "0.2.6", - "@firebase/app": "0.9.25", - "@firebase/app-check": "0.8.1", - "@firebase/app-check-compat": "0.3.8", - "@firebase/app-compat": "0.2.25", - "@firebase/app-types": "0.9.0", - "@firebase/auth": "1.5.1", - "@firebase/auth-compat": "0.5.1", - "@firebase/database": "1.0.2", - "@firebase/database-compat": "1.0.2", - "@firebase/firestore": "4.4.0", - "@firebase/firestore-compat": "0.3.23", - "@firebase/functions": "0.11.0", - "@firebase/functions-compat": "0.3.6", - "@firebase/installations": "0.6.4", - "@firebase/installations-compat": "0.2.4", - "@firebase/messaging": "0.12.5", - "@firebase/messaging-compat": "0.2.5", - "@firebase/performance": "0.6.4", - "@firebase/performance-compat": "0.2.4", - "@firebase/remote-config": "0.4.4", - "@firebase/remote-config-compat": "0.2.4", - "@firebase/storage": "0.12.0", - "@firebase/storage-compat": "0.3.3", - "@firebase/util": "1.9.3" - } - }, - "node_modules/firebase/node_modules/@firebase/auth": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.5.1.tgz", - "integrity": "sha512-sVi7rq2YneLGJFqHa5S6nDfCHix9yuVV3RLhj/pWPlB4a36ofXal4E6PJwpeMc8uLjWEr1aovYN1jkXWNB6Avw==", - "dependencies": { - "@firebase/component": "0.6.4", - "@firebase/logger": "0.4.0", - "@firebase/util": "1.9.3", - "tslib": "^2.1.0", - "undici": "5.26.5" - }, - "peerDependencies": { - "@firebase/app": "0.x", - "@react-native-async-storage/async-storage": "^1.18.1" - }, - "peerDependenciesMeta": { - "@react-native-async-storage/async-storage": { - "optional": true - } - } - }, - "node_modules/firebase/node_modules/undici": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz", - "integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, "node_modules/flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", @@ -28868,11 +28282,6 @@ "node": ">= 0.8" } }, - "node_modules/http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==" - }, "node_modules/http-proxy-agent": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", @@ -28992,11 +28401,6 @@ "node": ">=0.10.0" } }, - "node_modules/idb": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", - "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==" - }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -34669,7 +34073,8 @@ "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "devOptional": true }, "node_modules/lodash.capitalize": { "version": "4.2.1", @@ -35009,7 +34414,9 @@ "node_modules/long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "optional": true, + "peer": true }, "node_modules/loose-envify": { "version": "1.4.0", @@ -42338,6 +41745,8 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", "hasInstallScript": true, + "optional": true, + "peer": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -54403,27 +53812,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dependencies": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/whatwg-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", @@ -55786,7 +55174,6 @@ "@willsoto/nestjs-prometheus": "^4.7.0", "axios": "^1.4.0", "ethers": "^5.7.1", - "firebase": "^10.7.1", "nest-winston": "^1.7.0", "pg": "^8.8.0", "prom-client": "^14.1.0", diff --git a/packages/app/src/App.vue b/packages/app/src/App.vue index 152c702d1a..f6e453715a 100644 --- a/packages/app/src/App.vue +++ b/packages/app/src/App.vue @@ -3,7 +3,7 @@
- +
@@ -14,7 +14,7 @@ diff --git a/packages/app/src/components/IssuesBanner.vue b/packages/app/src/components/IssuesBanner.vue deleted file mode 100644 index bb8a896928..0000000000 --- a/packages/app/src/components/IssuesBanner.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - diff --git a/packages/app/src/components/NetworkDeprecated.vue b/packages/app/src/components/NetworkDeprecated.vue index 4bd027695c..a963d8bfa8 100644 --- a/packages/app/src/components/NetworkDeprecated.vue +++ b/packages/app/src/components/NetworkDeprecated.vue @@ -1,26 +1,20 @@ diff --git a/packages/app/src/components/common/SystemAlert.vue b/packages/app/src/components/common/SystemAlert.vue new file mode 100644 index 0000000000..4dd6e3c059 --- /dev/null +++ b/packages/app/src/components/common/SystemAlert.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/app/src/components/header/TheHeader.vue b/packages/app/src/components/header/TheHeader.vue index b87b4cdffd..68948b4abc 100644 --- a/packages/app/src/components/header/TheHeader.vue +++ b/packages/app/src/components/header/TheHeader.vue @@ -305,10 +305,6 @@ const hasContent = computed(() => { .hero-banner-container { @apply absolute left-0 top-full flex h-64 w-full items-end justify-end overflow-hidden bg-primary-900; - &.mainnet { - @apply h-[27rem] md:h-[23rem] lg:h-[20rem]; - } - &.goerli { @apply h-[25rem] md:h-[23rem] lg:h-[19rem]; } @@ -320,10 +316,6 @@ const hasContent = computed(() => { .home-banner { @apply h-80; - &.mainnet { - @apply h-[32rem] md:h-[28rem] lg:h-[25rem]; - } - &.goerli { @apply h-[30rem] md:h-[27rem] lg:h-[24rem]; } diff --git a/packages/app/src/locales/en.json b/packages/app/src/locales/en.json index 0824960ad3..662856dcc6 100644 --- a/packages/app/src/locales/en.json +++ b/packages/app/src/locales/en.json @@ -721,5 +721,9 @@ "callData": "calldata" } } + }, + "systemAlert": { + "indexerDelayed": "Transaction indexing is {indexerDelayInHours} hours behind. Transactions are being processed normally and will gradually show up. You can also use other explorers meanwhile.", + "indexerDelayedDueToHeavyLoad": "The network is under a heavy load at the moment and transaction indexing on the explorer is {indexerDelayInHours} hours behind. Transactions are being processed normally and will gradually show up. You can also use other explorers meanwhile." } } \ No newline at end of file diff --git a/packages/app/src/locales/uk.json b/packages/app/src/locales/uk.json index 8358c9482c..b37af6f27c 100644 --- a/packages/app/src/locales/uk.json +++ b/packages/app/src/locales/uk.json @@ -438,5 +438,9 @@ "callData": "дані виклику" } } + }, + "systemAlert": { + "indexerDelayed": "Індексація транзакцій відстає на {indexerDelayInHours} годин. Транзакції будуть поступово оброблені та відображені. Ви також можете скористатися іншими блок експлорерами наразі.", + "indexerDelayedDueToHeavyLoad": "Мережа наразі перебуває під великим навантаженням, індексація транзакцій відстає на {indexerDelayInHours} годин. Транзакції будуть поступово оброблені та відображені. Ви також можете скористатися іншими блок експлорерами наразі." } } diff --git a/packages/app/tests/e2e/features/copying.feature b/packages/app/tests/e2e/features/copying.feature index 6aa9b48c39..5a2e8a46ba 100644 --- a/packages/app/tests/e2e/features/copying.feature +++ b/packages/app/tests/e2e/features/copying.feature @@ -105,11 +105,11 @@ Feature: Copying Given I go to page "/address/0x000000000000000000000000000000000000800A" When I select "Contract" tab on "Contract" page And I click on the copy button for deployed bytecode - Then Clipboard contains "" value + Then Clipboard includes "" value Examples: | Text | - | 0x00030000000000020005000000000002000200000001035500000060011002700000010f0010019d000100000000001f0000008001000039000000400010043f00000001012001900000003c0000c13d0000000002000031000000040120008c000002990000413d0000000201000367000000000301043b000000e003300270000001110430009c000000440000a13d000001120430009c000000650000a13d000001130430009c000000e50000613d000001140130009c000002880000613d000001150130009c000002990000c13d0000000001000416000000000101004b000002990000c13d000000040100008a00000000011000310000011d02000041000000200310008c000000000300001900000000030240190000011d01100197000000000401004b000000000200a0190000011d0110009c00000000010300190000000001026019000000000101004b000002990000c13d00000004010000390000000201100367000000000101043b0000011e011001970000000000100435000000200000043f0000000001000019043503fb0000040f000000000101041a000000400200043d00000000001204350000010f010000410000010f0320009c000000000102401900000040011002100000011f011001c7000004360001042e0000000001000416000000000101004b000002990000c13d0000002001000039000001000010044300000120000004430000011001000041000004360001042e000001180130009c000000a20000213d0000011b0130009c000002080000613d0000011c0130009c000002990000c13d0000000001000416000000000101004b000002990000c13d000000040100008a00000000011000310000011d02000041000000000301004b000000000300001900000000030240190000011d01100197000000000401004b000000000200a0190000011d0110009c00000000010300190000000001026019000000000101004b000002990000c13d0000000101000039000000000101041a000000400200043d00000000001204350000010f010000410000010f0320009c000000000102401900000040011002100000011f011001c7000004360001042e000001160430009c000002300000613d000001170130009c000002990000c13d0000000001000416000000000101004b000002990000c13d000000040100008a00000000011000310000011d02000041000000600310008c000000000300001900000000030240190000011d01100197000000000401004b000000000200a0190000011d0110009c00000000010300190000000001026019000000000101004b000002990000c13d00000002010003670000000402100370000000000402043b0000011e0240009c000002990000213d0000002402100370000000000202043b0000011e052001970000011e0220009c000002990000213d00000000020004110000004401100370000000000301043b000080060120008c0000033b0000613d000000090100008a000000000112016f000080010110008c0000033b0000613d000000400100043d00000064021000390000012703000041000000000032043500000044021000390000012803000041000000000032043500000024021000390000003e030000390000000000320435000001290200004100000000002104350000000402100039000000200300003900000000003204350000010f020000410000010f0310009c000000000102801900000040011002100000012a011001c70000043700010430000001190130009c0000026e0000613d0000011a0130009c000002990000c13d0000000001000416000000000101004b000002990000c13d000000040100008a00000000011000310000011d02000041000000400310008c000000000300001900000000030240190000011d01100197000000000401004b000000000200a0190000011d0110009c00000000010300190000000001026019000000000101004b000002990000c13d00000002010003670000000402100370000000000402043b0000011e0240009c000002990000213d0000002401100370000000000501043b0000000001000411000080010110008c000002b50000c13d0000000101000039000000000301041a0000000002530019000000000332004b000000000300001900000001030040390000000103300190000000df0000c13d000400000005001d000000000021041b0000000000400435000000200000043f0000010f0100004100000000020004140000010f0320009c0000000001024019000000c00110021000000122011001c70000801002000039000500000004001d043504300000040f00000005050000290000000102200190000002990000613d000000000101043b000000000201041a0000000403000029000000000232001a000000df0000413d000003880000013d000001310100004100000000001004350000001101000039000000040010043f00000132010000410000043700010430000000040320008a0000011d04000041000000400530008c000000000500001900000000050440190000011d03300197000000000603004b000000000400a0190000011d0330009c00000000030500190000000003046019000000000303004b000002990000c13d0000000403100370000000000803043b0000011e0380009c000002990000213d0000002403100370000000000303043b000001210430009c000002990000213d00000023043000390000011d05000041000000000624004b000000000600001900000000060580190000011d022001970000011d04400197000000000724004b0000000005008019000000000224013f0000011d0220009c00000000020600190000000002056019000000000202004b000002990000c13d0000000402300039000000000121034f000000000101043b000001210210009c000002680000213d000000bf02100039000000200500008a000000000252016f000001210420009c000002680000213d000000400020043f000000800010043f000000240330003900000000023100190000000004000031000000000242004b000002990000213d000400000005001d0000001f0210018f00000002033003670000000504100272000001280000613d00000000050000190000000506500210000000000763034f000000000707043b000000a00660003900000000007604350000000105500039000000000645004b000001200000413d000500000008001d000000000502004b000001380000613d0000000504400210000000000343034f0000000302200210000000a004400039000000000504043300000000052501cf000000000525022f000000000303043b0000010002200089000000000323022f00000000022301cf000000000252019f0000000000240435000000a00110003900000000000104350000000001000416000300000001001d00000000010004100000000000100435000000200000043f0000010f0100004100000000020004140000010f0320009c0000000001024019000000c00110021000000122011001c70000801002000039043504300000040f000000010220019000000005040000290000000407000029000002990000613d000000000101043b000000000201041a00000003090000290000000002920049000000000021041b0000000101000039000000000201041a0000000002920049000000000021041b0000012302000041000000400100043d000000200310003900000000002304350000006002400210000000240310003900000000002304350000000008000411000000600280021000000058031000390000000000230435000000380210003900000000009204350000006c03100039000000800200043d000000000402004b0000016d0000613d00000000040000190000000005340019000000a006400039000000000606043300000000006504350000002004400039000000000524004b000001660000413d000000000332001900000000000304350000004c0320003900000000003104350000008b02200039000000000272016f000000000a12001900000000022a004b000000000200001900000001020040390000012103a0009c000002680000213d0000000102200190000002680000c13d000100000008001d0000004000a0043f000001240200004100000000002a04350000000402a000390000002003000039000000000032043500000000020104330000002403a0003900000000002304350000004403a00039000000000402004b000001900000613d000000000400001900000000053400190000002004400039000000000614001900000000060604330000000000650435000000000524004b000001890000413d000000000132001900000000000104350000001f01200039000000000171016f0000010f020000410000010f03a0009c000000000302001900000000030a4019000000400330021000000044011000390000010f0410009c00000000010280190000006001100210000000000131019f00000000030004140000010f0430009c0000000002034019000000c002200210000000000112019f000080080200003900020000000a001d0435042b0000040f000000020a000029000000000301001900000060033002700000010f03300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000001b90000613d0000000007000019000000050870021000000000098a0019000000000881034f000000000808043b00000000008904350000000107700039000000000867004b000001b10000413d000000000705004b000001c80000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000100000003001f0000000102200190000003d50000613d0000001f01400039000000600210018f0000000001a20019000000000221004b00000000020000190000000102004039000001210410009c00000005040000290000000305000029000002680000213d0000000102200190000002680000c13d000000400010043f000000200230008c000002990000413d00000020021000390000004003000039000000000032043500000000005104350000004003100039000000800200043d000000000023043500000060031000390000011e06400197000000000402004b000001ed0000613d00000000040000190000000005340019000000a007400039000000000707043300000000007504350000002004400039000000000524004b000001e60000413d000000000332001900000000000304350000007f022000390000000403000029000000000232016f0000010f030000410000010f0410009c000000000103801900000040011002100000010f0420009c00000000020380190000006002200210000000000112019f00000000020004140000010f0420009c0000000002038019000000c002200210000000000112019f00000125011001c70000800d020000390000000303000039000001260400004100000001050000290435042b0000040f0000000101200190000003d30000c13d000002990000013d0000000001000416000000000101004b000002990000c13d000000040100008a00000000011000310000011d02000041000000000301004b000000000300001900000000030240190000011d01100197000000000401004b000000000200a0190000011d0110009c00000000010300190000000001026019000000000101004b000002990000c13d000000c001000039000000400010043f0000000501000039000000800010043f0000013501000041000000a00010043f0000002001000039000000400200043d000500000002001d000000000212043600000080010000390435040d0000040f000000050400002900000000014100490000010f020000410000010f0310009c00000000010280190000010f0340009c000000000204401900000040022002100000006001100210000000000121019f000004360001042e000000040220008a0000011d03000041000000200420008c000000000400001900000000040340190000011d02200197000000000502004b000000000300a0190000011d0220009c00000000020400190000000002036019000000000202004b000002990000c13d0000000401100370000000000401043b0000011e0140009c000002990000213d0000000001000416000400000001001d00000000010004100000000000100435000000200000043f0000010f0100004100000000020004140000010f0320009c0000000001024019000000c00110021000000122011001c70000801002000039000500000004001d043504300000040f00000005040000290000000102200190000002990000613d000000000101043b000000000201041a00000004050000290000000002520049000000000021041b0000000101000039000000000201041a0000000002520049000000000021041b0000012302000041000000400100043d0000002003100039000000000023043500000060024002100000002403100039000000000023043500000038021000390000000000520435000000380200003900000000002104350000012f0210009c000002c70000413d000001310100004100000000001004350000004101000039000000040010043f000001320100004100000437000104300000000001000416000000000101004b000002990000c13d000000040100008a00000000011000310000011d02000041000000000301004b000000000300001900000000030240190000011d01100197000000000401004b000000000200a0190000011d0110009c00000000010300190000000001026019000000000101004b000002990000c13d000000400100043d000000120200003900000000002104350000010f020000410000010f0310009c000000000102801900000040011002100000011f011001c7000004360001042e0000000001000416000000000101004b000002990000c13d000000040100008a00000000011000310000011d02000041000000000301004b000000000300001900000000030240190000011d01100197000000000401004b000000000200a0190000011d0110009c00000000010300190000000001026019000000000101004b0000029b0000613d00000000010000190000043700010430000000400100043d000400000001001d043504200000040f00000004030000290000002001300039000001200200004100000000002104350000000301000039000000000013043500000000010300190000002002000039000000400300043d000500000003001d00000000022304360435040d0000040f000000050400002900000000014100490000010f020000410000010f0310009c00000000010280190000010f0340009c000000000204401900000040022002100000006001100210000000000121019f000004360001042e000000400100043d00000044021000390000013303000041000000000032043500000024021000390000001f030000390000000000320435000001290200004100000000002104350000000402100039000000200300003900000000003204350000010f020000410000010f0310009c000000000102801900000040011002100000012e011001c700000437000104300000006007100039000000400070043f00000124020000410000000000270435000000640210003900000020030000390000000000320435000000840310003900000000020104330000000000230435000000a403100039000000000402004b000002dc0000613d000000000400001900000000053400190000002004400039000000000614001900000000060604330000000000650435000000000524004b000002d50000413d000000000132001900000000000104350000001f01200039000000200200008a000000000121016f0000010f020000410000010f0370009c00000000030200190000000003074019000000400330021000000044011000390000010f0410009c00000000010280190000006001100210000000000131019f00000000030004140000010f0430009c0000000002034019000000c002200210000000000112019f0000800802000039000300000007001d0435042b0000040f000000030a000029000000000301001900000060033002700000010f03300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000003060000613d0000000007000019000000050870021000000000098a0019000000000881034f000000000808043b00000000008904350000000107700039000000000867004b000002fe0000413d000000000705004b000003150000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000100000003001f0000000102200190000003620000613d0000001f01400039000000600210018f0000000001a20019000000000221004b00000000020000190000000102004039000001210410009c00000005050000290000000404000029000002680000213d0000000102200190000002680000c13d000000400010043f000000200230008c000002990000413d00000000004104350000010f0200004100000000030004140000010f0430009c00000000030280190000010f0410009c00000000010280190000004001100210000000c002300210000000000112019f0000012b011001c70000011e065001970000800d020000390000000303000039000001300400004100000000050004110435042b0000040f0000000101200190000003d30000c13d000002990000013d000400000003001d0000000000400435000000200000043f0000010f0100004100000000020004140000010f0320009c0000000001024019000000c00110021000000122011001c70000801002000039000500000004001d000300000005001d043504300000040f00000005030000290000000102200190000002990000613d000000000101043b000000000201041a0000000401000029000000000112004b0000039c0000813d000000400100043d00000044021000390000012d03000041000000000032043500000024021000390000001f030000390000000000320435000001290200004100000000002104350000000402100039000000200300003900000000003204350000010f020000410000010f0310009c000000000102801900000040011002100000012e011001c70000043700010430000000400200043d0000001f0430018f00000005033002720000036f0000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b000003670000413d000000000504004b0000037e0000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000010f0100004100000001030000310000010f0430009c00000000030180190000010f0420009c000000000102401900000040011002100000006002300210000000000112019f0000043700010430000000000021041b000000400100043d00000000003104350000010f0200004100000000030004140000010f0430009c00000000030280190000010f0410009c00000000010280190000004001100210000000c002300210000000000112019f0000012b011001c70000800d02000039000000020300003900000134040000410435042b0000040f0000000101200190000002990000613d000003d30000013d000200000002001d0000000000300435000000200000043f0000010f0100004100000000020004140000010f0320009c0000000001024019000000c00110021000000122011001c70000801002000039043504300000040f00000003030000290000000102200190000002990000613d000000040200002900000002040000290000000002240049000000000101043b000000000021041b00000000003004350000010f0100004100000000020004140000010f0320009c0000000001024019000000c00110021000000122011001c70000801002000039043504300000040f000000030600002900000005050000290000000102200190000002990000613d000000000101043b000000000201041a00000004030000290000000002320019000000000021041b000000400100043d00000000003104350000010f0200004100000000030004140000010f0430009c00000000030280190000010f0410009c00000000010280190000004001100210000000c002300210000000000112019f0000012b011001c70000800d0200003900000003030000390000012c040000410435042b0000040f0000000101200190000002990000613d0000000001000019000004360001042e000000400200043d0000001f0430018f0000000503300272000003e20000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b000003da0000413d000000000504004b000003f10000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000010f0100004100000001030000310000010f0430009c00000000030180190000010f0420009c000000000102401900000040011002100000006002300210000000000112019f00000437000104300000010f0200004100000000030004140000010f0430009c00000000030280190000010f0410009c00000000010280190000004001100210000000c002300210000000000112019f00000122011001c70000801002000039043504300000040f00000001022001900000040b0000613d000000000101043b000000000001042d0000000001000019000004370001043000000000030104330000000002320436000000000403004b000004190000613d000000000400001900000000052400190000002004400039000000000614001900000000060604330000000000650435000000000534004b000004120000413d000000000123001900000000000104350000001f01300039000000200300008a000000000131016f0000000001120019000000000001042d000001360210009c000004250000813d0000004001100039000000400010043f000000000001042d000001310100004100000000001004350000004101000039000000040010043f000001320100004100000437000104300000042e002104210000000102000039000000000001042d0000000002000019000000000001042d00000433002104230000000102000039000000000001042d0000000002000019000000000001042d0000043500000432000004360001042e0000043700010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000002000000000000000000000000000000400000010000000000000000000000000000000000000000000000000000000000000000000000000051cff8d80000000000000000000000000000000000000000000000000000000084bc3eaf0000000000000000000000000000000000000000000000000000000084bc3eb00000000000000000000000000000000000000000000000000000000095d89b41000000000000000000000000000000000000000000000000000000009cc7f7080000000000000000000000000000000000000000000000000000000051cff8d900000000000000000000000000000000000000000000000000000000579952fc00000000000000000000000000000000000000000000000000000000313ce56600000000000000000000000000000000000000000000000000000000313ce5670000000000000000000000000000000000000000000000000000000040c10f190000000000000000000000000000000000000000000000000000000006fdde030000000000000000000000000000000000000000000000000000000018160ddd8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000200000000000000000000000004554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff02000000000000000000000000000000000000400000000000000000000000006c0960f90000000000000000000000000000000000000000000000000000000062f84b24000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c405fe8958410bbaf0c73b7a0c3e20859e86ca168a4c9b0def9c54d2555a306b616c206163636573732063616e2063616c6c2074686973206d6574686f6400004f6e6c792073797374656d20636f6e747261637473207769746820737065636908c379a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000840000000000000000000000000200000000000000000000000000000000000020000000000000000000000000ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5472616e7366657220616d6f756e7420657863656564732062616c616e6365000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffa02717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b63984e487b7100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000043616c6c61626c65206f6e6c792062792074686520626f6f746c6f61646572000f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968854574686572000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffc000000000000000000000000000000000000000000000000000000000000000007b3ba959bf7eac2739d6ef137ed2b810585c27a9dbd1782f8efe2a761831b7e4 | + | 0x | @id266:I @testnet Scenario Outline: Check "" hashes copying on Block page diff --git a/packages/app/tests/e2e/src/steps/blockexplorer.steps.ts b/packages/app/tests/e2e/src/steps/blockexplorer.steps.ts index 507e977eab..6a6651aeb0 100644 --- a/packages/app/tests/e2e/src/steps/blockexplorer.steps.ts +++ b/packages/app/tests/e2e/src/steps/blockexplorer.steps.ts @@ -377,6 +377,13 @@ Then("Clipboard contains {string} value", async function (this: ICustomWorld, te await expect(result).toBe(text); }); +Then("Clipboard includes {string} value", async function (this: ICustomWorld, text: string) { + helper = new Helper(this); + result = await helper.getClipboardValue(); + + await expect(result.includes(text)).toBe(true); +}); + Then("Clipboard value is not empty", async function (this: ICustomWorld) { helper = new Helper(this); result = await helper.getClipboardValue(); diff --git a/packages/worker/package.json b/packages/worker/package.json index 6feeda9675..bf5368de2d 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -42,7 +42,6 @@ "@willsoto/nestjs-prometheus": "^4.7.0", "axios": "^1.4.0", "ethers": "^5.7.1", - "firebase": "^10.7.1", "nest-winston": "^1.7.0", "pg": "^8.8.0", "prom-client": "^14.1.0", diff --git a/packages/worker/src/health/health.controller.spec.ts b/packages/worker/src/health/health.controller.spec.ts index d250cb3341..6dc59e2200 100644 --- a/packages/worker/src/health/health.controller.spec.ts +++ b/packages/worker/src/health/health.controller.spec.ts @@ -47,11 +47,11 @@ describe("HealthController", () => { }); describe("check", () => { - // it("checks health of the DB", async () => { - // await healthController.check(); - // expect(dbHealthCheckerMock.pingCheck).toHaveBeenCalledTimes(1); - // expect(dbHealthCheckerMock.pingCheck).toHaveBeenCalledWith("database"); - // }); + it("checks health of the DB", async () => { + await healthController.check(); + expect(dbHealthCheckerMock.pingCheck).toHaveBeenCalledTimes(1); + expect(dbHealthCheckerMock.pingCheck).toHaveBeenCalledWith("database"); + }); it("checks health of the JSON RPC provider", async () => { await healthController.check(); diff --git a/packages/worker/src/health/health.controller.ts b/packages/worker/src/health/health.controller.ts index 3f43b6297d..ae5678e812 100644 --- a/packages/worker/src/health/health.controller.ts +++ b/packages/worker/src/health/health.controller.ts @@ -1,5 +1,5 @@ import { Logger, Controller, Get } from "@nestjs/common"; -import { HealthCheckService, /*TypeOrmHealthIndicator,*/ HealthCheck, HealthCheckResult } from "@nestjs/terminus"; +import { HealthCheckService, TypeOrmHealthIndicator, HealthCheck, HealthCheckResult } from "@nestjs/terminus"; import { JsonRpcHealthIndicator } from "./jsonRpcProvider.health"; @Controller(["health", "ready"]) @@ -8,7 +8,7 @@ export class HealthController { constructor( private readonly healthCheckService: HealthCheckService, - //private readonly dbHealthChecker: TypeOrmHealthIndicator, + private readonly dbHealthChecker: TypeOrmHealthIndicator, private readonly jsonRpcHealthIndicator: JsonRpcHealthIndicator ) { this.logger = new Logger(HealthController.name); @@ -19,7 +19,7 @@ export class HealthController { public async check(): Promise { try { return await this.healthCheckService.check([ - //() => this.dbHealthChecker.pingCheck("database"), + () => this.dbHealthChecker.pingCheck("database"), () => this.jsonRpcHealthIndicator.isHealthy("jsonRpcProvider"), ]); } catch (error) { diff --git a/packages/worker/src/main.ts b/packages/worker/src/main.ts index 5d25423dbf..a033fce0cb 100644 --- a/packages/worker/src/main.ts +++ b/packages/worker/src/main.ts @@ -3,55 +3,12 @@ import { ConfigService } from "@nestjs/config"; import logger from "./logger"; import { AppModule } from "./app.module"; -import { initializeApp } from "firebase/app"; -import { getFirestore, onSnapshot, doc } from "firebase/firestore"; - -const firebaseApp = initializeApp({ - projectId: "scan-v2", -}); -const db = getFirestore(firebaseApp); - -const getConfig = async (instanceId: string): Promise<{ fromBlock: string; toBlock: string }> => { - return new Promise((resolve, reject) => { - const unsubscribe = onSnapshot( - doc(db, "config", "worker"), - (data) => { - if (data.exists()) { - const config = data.data() as Record; - if (config[instanceId] && config[instanceId].fromBlock && config[instanceId].toBlock) { - unsubscribe(); - resolve(config[instanceId]); - } - } - }, - (e) => { - logger.error(e); - reject(e); - } - ); - }); -}; - async function bootstrap() { process.on("uncaughtException", function (error) { logger.error(error.message, error.stack, "UnhandledExceptions"); process.exit(1); }); - if (process.env.USE_REMOTE_CONFIG === "true") { - const config = await getConfig(process.env.HOSTNAME); - if (!config.fromBlock || !config.toBlock) { - throw new Error("Missing fromBlock or toBlock in config"); - } - logger.log(`Using fromBlock: ${config.fromBlock}, toBlock: ${config.toBlock}`); - process.env.FROM_BLOCK = config.fromBlock; - process.env.TO_BLOCK = config.toBlock; - process.env.DISABLE_BATCHES_PROCESSING = "true"; - process.env.DISABLE_COUNTERS_PROCESSING = "true"; - process.env.DISABLE_OLD_BALANCES_CLEANER = "true"; - process.env.DISABLE_BLOCKS_REVERT = "true"; - } - const app = await NestFactory.create(AppModule, { logger, }); From 82491ac0e4215040768093df14d5036a74bcd06a Mon Sep 17 00:00:00 2001 From: Roman Petriv Date: Wed, 3 Jan 2024 11:55:19 +0200 Subject: [PATCH 2/2] fix: tests for unit of work changes (#144) --- packages/worker/package.json | 2 +- .../worker/src/block/block.processor.spec.ts | 31 ++- .../blocksRevert/blocksRevert.service.spec.ts | 8 +- .../src/counter/counter.processor.spec.ts | 11 +- .../rpcProvider/webSocketProviderExtended.ts | 2 +- .../unitOfWork/unitOfWork.provider.spec.ts | 182 ++++++++++++------ .../worker/src/utils/splitIntoChunks.spec.ts | 16 ++ 7 files changed, 186 insertions(+), 66 deletions(-) create mode 100644 packages/worker/src/utils/splitIntoChunks.spec.ts diff --git a/packages/worker/package.json b/packages/worker/package.json index bf5368de2d..cfbb583e14 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -19,7 +19,7 @@ "test": "jest", "test:watch": "jest --watch", "test:cov": "jest --coverage", - "test:ci": "echo tests are disabled on ci temporarily", + "test:ci": "jest --coverage", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", "test:e2e": "jest --config ./test/jest-e2e.json", "typeorm": "typeorm-ts-node-commonjs", diff --git a/packages/worker/src/block/block.processor.spec.ts b/packages/worker/src/block/block.processor.spec.ts index eda82a36ea..7e6fc7440c 100644 --- a/packages/worker/src/block/block.processor.spec.ts +++ b/packages/worker/src/block/block.processor.spec.ts @@ -21,6 +21,9 @@ describe("BlockProcessor", () => { let blockProcessor: BlockProcessor; let blockWatcherMock: BlockWatcher; let unitOfWorkMock: UnitOfWork; + let waitForTransactionExecutionMock: jest.Mock; + let commitTransactionMock: jest.Mock; + let ensureRollbackIfNotCommittedTransactionMock: jest.Mock; let blockchainServiceMock: BlockchainService; let transactionProcessorMock: TransactionProcessor; let logProcessorMock: LogProcessor; @@ -110,8 +113,15 @@ describe("BlockProcessor", () => { }; beforeEach(async () => { + waitForTransactionExecutionMock = jest.fn(); + commitTransactionMock = jest.fn(); + ensureRollbackIfNotCommittedTransactionMock = jest.fn(); unitOfWorkMock = mock({ - useTransaction: jest.fn().mockImplementation((action: () => Promise) => action()), + useTransaction: jest.fn().mockImplementation((action: () => Promise) => ({ + waitForExecution: waitForTransactionExecutionMock.mockResolvedValue(action()), + commit: commitTransactionMock.mockResolvedValue(null), + ensureRollbackIfNotCommitted: ensureRollbackIfNotCommittedTransactionMock.mockResolvedValue(null), + })), }); blockWatcherMock = mock({ getNextBlocksToProcess: jest.fn().mockResolvedValue([]), @@ -492,9 +502,11 @@ describe("BlockProcessor", () => { expect(startBlocksBatchDurationMetricMock).toHaveBeenCalledTimes(1); }); - it("uses transaction when adding blocks", async () => { + it("uses transaction with disabled automatic commit when adding blocks", async () => { await blockProcessor.processNextBlocksRange(); expect(unitOfWorkMock.useTransaction).toHaveBeenCalledTimes(1); + expect((unitOfWorkMock.useTransaction as jest.Mock).mock.calls[0][1]).toBe(true); + expect(waitForTransactionExecutionMock).toBeCalledTimes(1); }); it("starts the duration metric", async () => { @@ -524,6 +536,11 @@ describe("BlockProcessor", () => { ); }); + it("commits db transactions after execution", async () => { + await blockProcessor.processNextBlocksRange(); + expect(commitTransactionMock).toBeCalledTimes(1); + }); + describe("when processing fails with an error", () => { beforeEach(() => { jest.spyOn(blockRepositoryMock, "add").mockRejectedValue(new Error("getBlock error")); @@ -574,6 +591,16 @@ describe("BlockProcessor", () => { expect(balanceServiceMock.clearTrackedState).toHaveBeenCalledTimes(1); } }); + + it("does not commit db transactions", async () => { + await Promise.allSettled([blockProcessor.processNextBlocksRange()]); + expect(commitTransactionMock).not.toBeCalled(); + }); + + it("ensures all the db transactions for a given batch of blocks are reverted if not committed", async () => { + await Promise.allSettled([blockProcessor.processNextBlocksRange()]); + expect(ensureRollbackIfNotCommittedTransactionMock).toBeCalledTimes(1); + }); }); describe("when block does not contain transactions", () => { diff --git a/packages/worker/src/blocksRevert/blocksRevert.service.spec.ts b/packages/worker/src/blocksRevert/blocksRevert.service.spec.ts index 0f9dcfa0cf..e415487368 100644 --- a/packages/worker/src/blocksRevert/blocksRevert.service.spec.ts +++ b/packages/worker/src/blocksRevert/blocksRevert.service.spec.ts @@ -17,6 +17,7 @@ describe("BlocksRevertService", () => { let blockRepositoryMock: BlockRepository; let counterServiceMock: CounterService; let unitOfWorkMock: UnitOfWork; + let waitForTransactionExecutionMock: jest.Mock; let revertDurationMetricMock: jest.Mock; let stopRevertDurationMetricMock: jest.Mock; @@ -24,8 +25,13 @@ describe("BlocksRevertService", () => { let stopRevertDetectMetricMock: jest.Mock; beforeEach(async () => { + waitForTransactionExecutionMock = jest.fn(); unitOfWorkMock = mock({ - useTransaction: jest.fn().mockImplementation((action: () => Promise) => action()), + useTransaction: jest.fn().mockImplementation((action: () => Promise) => ({ + waitForExecution: waitForTransactionExecutionMock.mockResolvedValue(action()), + commit: jest.fn().mockResolvedValue(null), + ensureRollbackIfNotCommitted: jest.fn().mockResolvedValue(null), + })), }); blockchainServiceMock = mock({ getL1BatchDetails: jest.fn().mockResolvedValue(null), diff --git a/packages/worker/src/counter/counter.processor.spec.ts b/packages/worker/src/counter/counter.processor.spec.ts index c5d51ad09e..d16e8f1138 100644 --- a/packages/worker/src/counter/counter.processor.spec.ts +++ b/packages/worker/src/counter/counter.processor.spec.ts @@ -20,6 +20,7 @@ describe("CounterProcessor", () => { let repositoryMock: Repository; let counterRepositoryMock: CounterRepository; let unitOfWorkMock: UnitOfWork; + let waitForTransactionExecutionMock: jest.Mock; let counterProcessor: CounterProcessor; beforeEach(() => { @@ -31,8 +32,13 @@ describe("CounterProcessor", () => { decrementCounters: jest.fn().mockResolvedValue(null), getLastProcessedRecordNumber: jest.fn().mockResolvedValue(-1), }); + waitForTransactionExecutionMock = jest.fn(); unitOfWorkMock = mock({ - useTransaction: jest.fn().mockImplementation((fn) => fn()), + useTransaction: jest.fn().mockImplementation((fn) => ({ + waitForExecution: waitForTransactionExecutionMock.mockResolvedValue(fn()), + commit: jest.fn().mockResolvedValue(null), + ensureRollbackIfNotCommitted: jest.fn().mockResolvedValue(null), + })), }); counterProcessor = new CounterProcessor( Transaction, @@ -121,6 +127,7 @@ describe("CounterProcessor", () => { await counterProcessorWithNoCriteria.processNextRecordsBatch(); expect(unitOfWorkMock.useTransaction).toBeCalledTimes(1); + expect(waitForTransactionExecutionMock).toBeCalledTimes(1); expect(counterRepositoryMock.incrementCounters).toBeCalledTimes(1); expect(counterRepositoryMock.incrementCounters).toBeCalledWith( [ @@ -167,6 +174,7 @@ describe("CounterProcessor", () => { await counterProcessor.processNextRecordsBatch(); expect(unitOfWorkMock.useTransaction).toBeCalledTimes(1); + expect(waitForTransactionExecutionMock).toBeCalledTimes(1); expect(counterRepositoryMock.incrementCounters).toBeCalledTimes(1); expect(counterRepositoryMock.incrementCounters).toBeCalledWith( [ @@ -231,6 +239,7 @@ describe("CounterProcessor", () => { await counterProcessor.processNextRecordsBatch(); expect(unitOfWorkMock.useTransaction).toBeCalledTimes(1); + expect(waitForTransactionExecutionMock).toBeCalledTimes(1); expect(counterRepositoryMock.incrementCounters).toBeCalledTimes(1); expect(counterRepositoryMock.incrementCounters).toBeCalledWith( [ diff --git a/packages/worker/src/rpcProvider/webSocketProviderExtended.ts b/packages/worker/src/rpcProvider/webSocketProviderExtended.ts index d5f949f37f..0d777bc4b7 100644 --- a/packages/worker/src/rpcProvider/webSocketProviderExtended.ts +++ b/packages/worker/src/rpcProvider/webSocketProviderExtended.ts @@ -86,7 +86,7 @@ export class WebSocketProviderExtended extends providers.WebSocketProvider { message: "No response for the ping request. Web socket connection will be terminated", context: WebSocketProviderExtended.name, }); - //this._websocket.terminate(); + this._websocket.terminate(); }, expectedPongBack); if (Object.keys(this._requests).length > pendingRequestsLimit) { diff --git a/packages/worker/src/unitOfWork/unitOfWork.provider.spec.ts b/packages/worker/src/unitOfWork/unitOfWork.provider.spec.ts index 9c1a81becf..6b509a437a 100644 --- a/packages/worker/src/unitOfWork/unitOfWork.provider.spec.ts +++ b/packages/worker/src/unitOfWork/unitOfWork.provider.spec.ts @@ -59,28 +59,32 @@ describe("UnitOfWork", () => { describe("when UnitOfWork instance has queryRunner in scope", () => { it("returns entity manager from queryRunner", async () => { expect.assertions(1); - await unitOfWork.useTransaction(async () => { - const manager = unitOfWork.getTransactionManager(); - expect(manager).toEqual(entityManager); - }); + await unitOfWork + .useTransaction(async () => { + const manager = unitOfWork.getTransactionManager(); + expect(manager).toEqual(entityManager); + }) + .waitForExecution(); }); it("returns the same entity manager from queryRunner for nested transaction calls", async () => { expect.assertions(3); - await unitOfWork.useTransaction(async () => { - const manager1 = unitOfWork.getTransactionManager(); - expect(manager1).toEqual(entityManager); - - await (async () => { - const manager2 = unitOfWork.getTransactionManager(); - expect(manager2).toEqual(entityManager); + await unitOfWork + .useTransaction(async () => { + const manager1 = unitOfWork.getTransactionManager(); + expect(manager1).toEqual(entityManager); await (async () => { - const manager3 = unitOfWork.getTransactionManager(); - expect(manager3).toEqual(entityManager); + const manager2 = unitOfWork.getTransactionManager(); + expect(manager2).toEqual(entityManager); + + await (async () => { + const manager3 = unitOfWork.getTransactionManager(); + expect(manager3).toEqual(entityManager); + })(); })(); - })(); - }); + }) + .waitForExecution(); }); describe("when there are multiple concurrent transactions", () => { @@ -108,15 +112,19 @@ describe("UnitOfWork", () => { let manager2; transactionActions.push( - unitOfWork.useTransaction(async () => { - manager1 = unitOfWork.getTransactionManager(); - }) + unitOfWork + .useTransaction(async () => { + manager1 = unitOfWork.getTransactionManager(); + }) + .waitForExecution() ); transactionActions.push( - unitOfWork.useTransaction(async () => { - manager2 = unitOfWork.getTransactionManager(); - }) + unitOfWork + .useTransaction(async () => { + manager2 = unitOfWork.getTransactionManager(); + }) + .waitForExecution() ); await Promise.all(transactionActions); @@ -136,71 +144,125 @@ describe("UnitOfWork", () => { }); describe("useTransaction", () => { - // eslint-disable-next-line @typescript-eslint/no-empty-function - const emptyAction = async () => {}; + const emptyAction = jest.fn().mockResolvedValue(null); it("connects the query runner", async () => { - await unitOfWork.useTransaction(emptyAction); + const transaction = unitOfWork.useTransaction(emptyAction); + await transaction.waitForExecution(); expect(queryRunner.connect).toHaveBeenCalledTimes(1); }); it("starts the transaction with the specified isolation level", async () => { - await unitOfWork.useTransaction(emptyAction, null, "SERIALIZABLE"); + const transaction = unitOfWork.useTransaction(emptyAction, false, null, "SERIALIZABLE"); + await transaction.waitForExecution(); expect(queryRunner.startTransaction).toHaveBeenCalledTimes(1); expect(queryRunner.startTransaction).toHaveBeenCalledWith("SERIALIZABLE"); }); - it("starts db commit duration metric", async () => { - await unitOfWork.useTransaction(emptyAction); - expect(startDbCommitDurationMetricMock).toHaveBeenCalledTimes(1); + describe("when preventAutomaticCommit is set to false", () => { + it("starts db commit duration metric", async () => { + const transaction = unitOfWork.useTransaction(emptyAction); + await transaction.waitForExecution(); + expect(startDbCommitDurationMetricMock).toHaveBeenCalledTimes(1); + }); + + it("commits the transaction", async () => { + const transaction = unitOfWork.useTransaction(emptyAction); + await transaction.waitForExecution(); + expect(queryRunner.commitTransaction).toHaveBeenCalledTimes(1); + }); + + it("releases the transaction", async () => { + const transaction = unitOfWork.useTransaction(emptyAction); + await transaction.waitForExecution(); + expect(queryRunner.release).toHaveBeenCalledTimes(1); + }); + + it("stops db commit duration metric", async () => { + const transaction = unitOfWork.useTransaction(emptyAction); + await transaction.waitForExecution(); + expect(stopDbCommitDurationMetricMock).toHaveBeenCalledTimes(1); + }); }); - it("commits the transaction", async () => { - await unitOfWork.useTransaction(emptyAction); - expect(queryRunner.commitTransaction).toHaveBeenCalledTimes(1); + describe("when preventAutomaticCommit is set to true", () => { + it("does not commit transaction automatically", async () => { + const transaction = unitOfWork.useTransaction(emptyAction, true); + await transaction.waitForExecution(); + expect(queryRunner.commitTransaction).not.toHaveBeenCalled(); + }); + + it("commits transaction when commit is called from outside", async () => { + const transaction = unitOfWork.useTransaction(emptyAction, true); + await transaction.waitForExecution(); + await transaction.commit(); + expect(queryRunner.commitTransaction).toHaveBeenCalledTimes(1); + }); + + it("reverts transaction when ensureRollbackIfNotCommitted is called from outside", async () => { + const transaction = unitOfWork.useTransaction(emptyAction, true); + await transaction.waitForExecution(); + await transaction.ensureRollbackIfNotCommitted(); + expect(queryRunner.rollbackTransaction).toHaveBeenCalledTimes(1); + }); }); - it("releases the transaction", async () => { - await unitOfWork.useTransaction(emptyAction); - expect(queryRunner.release).toHaveBeenCalledTimes(1); + it("throws an error when commit is called for already committed transaction", async () => { + const transaction = unitOfWork.useTransaction(emptyAction); + await transaction.waitForExecution(); + await expect(transaction.commit()).rejects.toThrowError( + new Error("The transaction cannot be committed as it connection is released") + ); }); - it("stops db commit duration metric", async () => { - await unitOfWork.useTransaction(emptyAction); - expect(stopDbCommitDurationMetricMock).toHaveBeenCalledTimes(1); + it("does not try to rollback already committed transaction", async () => { + const transaction = unitOfWork.useTransaction(emptyAction); + await transaction.waitForExecution(); + await transaction.ensureRollbackIfNotCommitted(); + expect(queryRunner.rollbackTransaction).not.toBeCalled(); }); describe("when action throws an error", () => { - const errorAction = () => { - throw new Error("DB call error"); - }; + const error = new Error("DB call error"); + const errorAction = jest.fn().mockRejectedValue(error); it("rollbacks the transaction", async () => { - expect.assertions(1); - - try { - await unitOfWork.useTransaction(errorAction); - } catch { - expect(queryRunner.rollbackTransaction).toHaveBeenCalledTimes(1); - } + const transaction = unitOfWork.useTransaction(errorAction); + await Promise.allSettled([transaction.waitForExecution()]); + expect(queryRunner.rollbackTransaction).toHaveBeenCalledTimes(1); }); it("releases the transaction", async () => { - try { - await unitOfWork.useTransaction(errorAction); - } catch { - expect(queryRunner.release).toHaveBeenCalledTimes(1); - } + const transaction = unitOfWork.useTransaction(errorAction); + await Promise.allSettled([transaction.waitForExecution()]); + expect(queryRunner.release).toHaveBeenCalledTimes(1); }); it("throws generated error", async () => { - expect.assertions(2); - - try { - await unitOfWork.useTransaction(errorAction); - } catch (error) { - expect(error).toBeInstanceOf(Error); - expect(error.message).toBe("DB call error"); - } + const transaction = unitOfWork.useTransaction(errorAction); + await expect(transaction.waitForExecution()).rejects.toThrowError(error); + }); + }); + + describe("when commit transaction fails", () => { + beforeEach(() => { + jest.spyOn(queryRunner, "commitTransaction").mockRejectedValue(new Error("Failed to commit")); + }); + + it("rollbacks the transaction", async () => { + const transaction = unitOfWork.useTransaction(jest.fn()); + await Promise.allSettled([transaction.waitForExecution()]); + expect(queryRunner.rollbackTransaction).toHaveBeenCalledTimes(1); + }); + + it("releases the transaction", async () => { + const transaction = unitOfWork.useTransaction(jest.fn()); + await Promise.allSettled([transaction.waitForExecution()]); + expect(queryRunner.release).toHaveBeenCalledTimes(1); + }); + + it("throws error", async () => { + const transaction = unitOfWork.useTransaction(jest.fn()); + await expect(transaction.waitForExecution()).rejects.toThrowError(new Error("Failed to commit")); }); }); }); diff --git a/packages/worker/src/utils/splitIntoChunks.spec.ts b/packages/worker/src/utils/splitIntoChunks.spec.ts new file mode 100644 index 0000000000..dff61bbe1b --- /dev/null +++ b/packages/worker/src/utils/splitIntoChunks.spec.ts @@ -0,0 +1,16 @@ +import splitIntoChunks from "./splitIntoChunks"; + +describe("splitIntoChunks", () => { + it("splits array into chunks", () => { + const chunks = splitIntoChunks([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 3); + expect(chunks).toEqual([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10]]); + }); + + it("splits array into chunks with size 10 by default", () => { + const chunks = splitIntoChunks([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]); + expect(chunks).toEqual([ + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], + [11, 12], + ]); + }); +});