Skip to content

Instantly share code, notes, and snippets.

View vivekteega's full-sized avatar
💭
Booyakasha

Vivek Teega vivekteega

💭
Booyakasha
View GitHub Profile
Log file created at: 2024/06/25 20:34:27
Running on machine: ranchimall-turing
Binary: Built with gc go1.19.2 for linux/amd64
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0625 20:34:27.855804 234429 blockbook.go:139] Blockbook: {Version:0.4.0 GitCommit:fc52acbd BuildTime:2023-06-23T21:59:47+00:00 GoVersion:go1.19.2 OSArch:linux/amd64}, debug mode false
I0625 20:34:27.869234 234429 florpc.go:41] Chain name main
I0625 20:34:27.869273 234429 florpc.go:56] rpc: block chain mainnet
I0625 20:34:27.869312 234429 mempool_bitcoin_type.go:80] mempool: starting with 8*2 sync workers
I0625 20:34:27.869327 234429 rocksdb.go:131] rocksdb: opening /opt/coins/data/flo/blockbook/db, required data version 6, cache size 1073741824, max open files 16384
I0625 20:34:44.145290 234429 internalstate.go:235] set 6844062 block times, average block period 31s
@vivekteega
vivekteega / Dockerfile
Created June 7, 2024 17:59
Dockerfile for blockbook backend frontend
FROM ubuntu:22.04
COPY ./blockbook-deb-files/ubuntu22.04-VM-on-intelMac/backend-flo_0.15.1.1-satoshilabs-1_amd64.deb /opt/backend.deb
COPY ./blockbook-deb-files/ubuntu22.04-VM-on-intelMac/blockbook-flo_0.4.0_amd64.deb /opt/blockbook.deb
RUN apt update && apt install -y /opt/backend.deb
# WORKDIR /opt/coins/nodes/flo
# RUN /opt/coins/nodes/flo/bin/flod -datadir=/opt/coins/data/flo/backend -conf=/opt/coins/nodes/flo/flo.conf -pid=/run/flo/flo.pid &&
RUN apt update && apt install -y /opt/blockbook.deb
@vivekteega
vivekteega / extract_propublica.py
Last active February 5, 2024 10:05
Pulling data from ProPublica into an Excel file
import requests
import pandas as pd
import pdb
def fetch_org_data(ein):
org_data = requests.get(f"https://projects.propublica.org/nonprofits/api/v2/organizations/{ein}.json")
if org_data.status_code == 200:
org_data = org_data.json()
print(f"Processing {org_data['organization']['name']}")
org_df = pd.DataFrame()
@vivekteega
vivekteega / ftt-error.log
Last active January 15, 2024 05:16
Token Tracker error log
2024-01-14 12:09:33,983:__main__:Before tx loop
Processing stateF
2024-01-14 12:09:33,984:__main__:Completed tx loop
2024-01-14 12:09:34,275:__main__:Received: {"id":"0","data":{"height":6523402,"hash":"9f0a41b77c58f9ce01a19ce10290976fbf16b6b1331ef624b3982676b55328c1"}}
/home/production/deployed/ftt-blockbook-migration-rescan/py3/lib/python3.8/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host '0.0.0.0'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
warnings.warn(
2024-01-14 12:10:00,422:__main__:Before tx loop
2024-01-14 12:10:00,422:__main__:Completed tx loop
2024-01-14 12:10:00,688:__main__:Connection error: sent 1011 (internal error) keepalive ping timeout; no close frame received
@vivekteega
vivekteega / ftt-blockbook-migration-rescan.err.log
Created January 13, 2024 07:38
ftt-blockbook-migration-rescan error logs
Running on 0.0.0.0:5017 over http (CTRL + C to quit)
Running on 0.0.0.0:5017 over http (CTRL + C to quit)
Running on 0.0.0.0:5017 over http (CTRL + C to quit)
Running on 0.0.0.0:5017 over http (CTRL + C to quit)
Running on 0.0.0.0:5017 over http (CTRL + C to quit)
Running on 0.0.0.0:5017 over http (CTRL + C to quit)
Running on 0.0.0.0:5017 over http (CTRL + C to quit)
Running on 0.0.0.0:5017 over http (CTRL + C to quit)
Running on 0.0.0.0:5017 over http (CTRL + C to quit)
Running on 0.0.0.0:5017 over http (CTRL + C to quit)
@vivekteega
vivekteega / draw-pi-circle.py
Created November 1, 2023 11:48
Draw pi circle
import pygame
import math
'''----------------------- pygame setup -----------------------'''
pygame.init()
screen = pygame.display.set_mode((1000, 1000))
clock = pygame.time.Clock()
running = True
'''---------------------------------------------'''
@vivekteega
vivekteega / install-flo-core-wallet.yml
Created November 1, 2023 06:54
Ansible playbook for FLO core wallet
- name: Build-Setup FLO Core wallet
hosts: turing.ranchimall.net
remote_user: production
gather_facts: true
tasks:
- name: Installing build requirements
become: true
package:
name: "{{item}}"
@vivekteega
vivekteega / flosight-address-search1.log
Last active March 24, 2023 07:23
Flosight address search logs
This file has been truncated, but you can view the full file.
FLO address being searched : FHDqCJUGdHKHTHdLa8wuQ9NKXNNawfoDJ6
Line number 9 shows the first search
[2023-03-23T13:23:41.087Z] info: ::ffff:127.0.0.1 "GET /api/addr/FHZZnLFJ9nLseDgaSu6RpenvL1uyCAn5Ss/balance" 200 6 52.272 "-"
[2023-03-23T13:23:41.309Z] info: ::ffff:127.0.0.1 "GET /api/addr/FHZZnLFJ9nLseDgaSu6RpenvL1uyCAn5Ss/balance" 200 6 92.736 "-"
[2023-03-23T13:23:41.565Z] info: ::ffff:127.0.0.1 "GET /api/addr/FQ1qEtfR2GGb6EBU3rySUnxpfUVSjqyaVN/balance" 200 6 89.581 "-"
[2023-03-23T13:23:41.868Z] info: ::ffff:127.0.0.1 "GET /api/addr/FUGCbrrvjnjNqjwEYddHVrwjZyoS4qjGrz/balance" 200 6 173.423 "-"
[2023-03-23T13:23:42.090Z] info: ::ffff:127.0.0.1 "GET /api/addr/FHZZnLFJ9nLseDgaSu6RpenvL1uyCAn5Ss/balance" 200 6 74.180 "-"
[2023-03-23T13:23:42.165Z] info: ::ffff:127.0.0.1 "GET /api/addrs/FHDqCJUGdHKHTHdLa8wuQ9NKXNNawfoDJ6/txs?from=0&to=1" 200 27 8.046 "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0"
[2023-03-23T13:23:42.298Z] info: ::ffff:127.0.0.1 "GET /api/addrs/FHDq
@vivekteega
vivekteega / problem.md
Last active March 20, 2023 16:26
RegEx parsing for Smart Contract

Regex parsing problem for Smart Contract

Problem

Write Regex to match amount and magnitude from the given string. The match should happen in two groups: Group 1 is amount, Group 2 magnitude.

For each match Group 1 - amount Group 2 - magnitude

Sample strings

@vivekteega
vivekteega / 6-jan-2023-10-40-pm.log
Last active January 8, 2023 13:19
Testing raw block
[2023-01-06T17:07:32.528Z] info: ::ffff:127.0.0.1 "GET /api/blocks?limit=1" 200 - 1.987 "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
[2023-01-06T17:08:03.692Z] info: ::ffff:127.0.0.1 "GET /api/sync" 200 121 0.531 "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
[2023-01-06T17:08:03.695Z] info: ::ffff:127.0.0.1 "GET /api/blocks?limit=1" 200 - 2.024 "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
[info] (chain) Block f0c8cc093c389029a4eafb5918cb85c111882143084a26c2452f1130a1f1198d (5891112) added to chain (size=241 txs=1 time=15.89699).
[info] (chain) Block 4400dcda2c8093b3bb6a6f8f5bab8313f0d176b89ed609a6c476db09307d3acb (5891113) added to chain (size=241 txs=1 time=3.904943).
[2023-01-06T17:08:34.129Z] info: ::ffff:127.0.0.1 "GET /api/sync" 200 121 0.498 "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
[2023-01-06T17:08:34.133Z] info: ::ffff:127.0.0.1 "GET /api/blocks?limit=1" 200 - 2.063 "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
[info] (chain) Block 21902998