
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@substrate/node-watcher
Advanced tools
Extract, Transform, Load Kusama/Polkadot history into a PostgreSQL DB
Long living script that reads from an archive node and loads select information to a Postgresql DB, a.k.a ETL.
The tasks specific to Nomidot are in src/tasks
The script itself lives in nodeWatcher.ts, and anyone can write their own tasks suited to their needs as long as they conform to the Task interface. It is agnostic of what server or db one decides to use.
docker-compose up -dyarn startminikube startkubectl cluster-infokubectl create -f path/to/secrets.yamlkubectl create -f path/to/namespace.yamlkubectl config set-context --current --namespace<namespace>kubectl config view --minify | grep namespace:kubectl create -f path/to/nodewatcher_deployment.yamlkubectl create -f path/to/service.yamlkubectl describe deployments nodewatcherPRISMA_ENDPOINT in nomidotwatcher-deployment.yaml to External IP from step 6.gcloud compute firewall-rules create allow-nodewatcher-nodeport --allow=tcp:31000docker tag node_watcher_main eu.gcr.io/kusama-etl/node_watcher:v1.0docker push eu.gcr.io/kusama-etl/node_watcher:v1.0kubectl describe pods ${POD_NAME}kubectl set image ${current_image} ${new_image}kubectl rollout status deployments/${new_image}curl -o cloud_sql_proxy https://dl.google.com/cloudsql/cloud_sql_proxy.darwin.amd64chmod +x cloud_sql_proxycredentials.json file containing credentials to the service account../cloud_sql_proxy -instances=test-installations-222013:europe-west1:kusama-etl=tcp:0.0.0.0:5432 -credential_file=./key.json Listening on 127.0.0.1:5432 for test-installations-222013:europe-west1:kusama-etl
2020/01/30 17:05:37 Ready for new connections
Get pgadmin: https://hub.docker.com/r/dpage/pgadmin4/
Run it: docker run -p 80:80 -e PGADMIN_DEFAULT_EMAIL="name@parity.io" -e PGADMIN_DEFAULT_PASSWORD="****" -d dpage/pgadmin4
Navigate to localhost:80 in a browser
Login with the above credentials
Click "New Server"
In "Connection" tab, fill in the DB_NAME (e.g. nomidot-node-watcher), DB_USER (e.g. admin), and DB_PASS, as appropriate.
Make sure SSL mode is set to Disabled. n.b. "Even though the sslmode parameter is set to disabled, the proxy does provide an encrypted connection."
Click Connect.
It is also possible to forward our localhost:4467 to our cluster port :4466 with, port forwarding. This will allow us to go to open the GraphQl interface from our local machine.
kubectl get pods --namespace nomidotwatcher-stagingkubectl port-forward --namespace nomidotwatcher-staging <the-pod-name> 4467:4466Then just go to localhost:4467 in a browser and that will forward your requests to the cluster's 4466 port (where the deployed Prisma server lives).
You can also deploy a new prisma schema by setting the PRISMA_ENDPOINT environment variable to be localhost:4467, and running prisma deploy, e.g. PRISMA_ENDPOINT="http://127.0.0.1:4467" START_FROM="66647" yarn prisma deploy

gcloud auth configure-dockergcloud container images list-tags eu.gcr.io/test-installations-222013/nomidot_watcherdocker build -t nomidot_watcher:v1.2.15 .

docker tag nomidot_watcher:v1.2.15 eu.gcr.io/test-installations-222013/nomidot_watcher:v1.2.15

docker push eu.gcr.io/test-installations-222013/nomidot_watcher:v1.2.15



kubectl create -f /path/to/config.yaml

kubectl get jobs, kubectl logs -l job-name={jobname} -n nodewatcher-staging

kubectl delete jobs old-job-nameFAQs
Extract, Transform, Load Kusama/Polkadot history into a PostgreSQL DB
We found that @substrate/node-watcher demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.