Skip to content

Instantly share code, notes, and snippets.

View mksh's full-sized avatar
🚲

mksh

🚲
  • Kyiv, Ukraine
  • 08:24 (UTC +02:00)
View GitHub Profile

This document explains how to build automated health checking proxy to serve the beacon API to validator client processes.

An Ethereum validator client process needs to periodically perform actions on chain, such as attesting blocks proposed by other validators, publishing sync committee message digests, or, if lucky, proposing their own blocks.

Despite the validator always posess the mechanism to produce message data necessary for on-chain action, it has no mechanism to distribute it to other Ethereum nodes. An Ethereum beacon node is another process,

### Keybase proof
I hereby claim:
* I am mksh on github.
* I am mksh (https://keybase.io/mksh) on keybase.
* I have a public key ASB5ZXpiARizuVl18P7oha2hBQ2LBlIk5b7TTApwjwl07Ao
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am mksh on github.
* I am mksh (https://keybase.io/mksh) on keybase.
* I have a public key ASCAjm8kaK-c5djdPzHezKw2CHINpJftTiy2njzU8zVjiwo
To claim this, I am signing this object:
## Milestone 1 (YT PoC)
- define schema for YT, high-level:
Account:
yt_acc:
- uid
- next_scan_time
Video:
@mksh
mksh / crisis.sh
Last active August 29, 2015 14:11
#!/bin/bash
touch fin_info.txt
xterm -e bash -c "sleep 2 && watch -n 1 'tail -n10 fin_info.txt' "
while [ 1 -eq 1 ]
do
date=`date +"%Y/%m/%d %H:%M"`
eur=$(wget --load-cookies=cook_b --save-cookies=cook_b --keep-session-cookies -q 'http://ru.investing.com/currencies/usd-rub' -O - | grep -A 3 'last_last' | tr -d '\n' | awk -F '>' '{print $2,$4,$8}' | awk -F '<' '{print $1,$2,$3}' | awk '{print $1,$3,$5}')
rub=$(wget --load-cookies=cook_r --save-cookies=cook_r --keep-session-cookies -q 'http://ru.investing.com/currencies/eur-uah' -O - | grep -A 3 'last_last' | tr -d '\n' | awk -F '>' '{print $2,$4,$8}' | awk -F '<' '{print $1,$2,$3}' | awk '{print $1,$3,$5}')
usd=$(wget --load-cookies=cook_u --save-cookies=cook_u --keep-session-cookies -q 'http://ru.investing.com/currencies/usd-uah' -O - | grep -A 3 'last_last' | tr -d '\n' | awk -F '>' '{print $2,$4,$8}' | awk -F '<' '{print $1,$2,$3}' | awk '{print $1,$3,$5}')
echo "$date \t USD/RUB: $eur UAH/EUR: $rub UAH/USD: $usd" >> fin_info.txt
@mksh
mksh / onlock.py
Created February 15, 2014 22:20 — forked from glyph/onlock.py
from __future__ import print_function
import os, sys, pipes
import objc
from Foundation import NSObject
from CoreFoundation import (
CFRunLoopRun, CFRunLoopStop, CFFileDescriptorCreate,
CFFileDescriptorCreateRunLoopSource, CFRunLoopAddSource,
https://gist.github.com/
@mksh
mksh / gist:5642769
Last active December 17, 2015 16:59 — forked from anonymous/gist:5642763
from zmq.eventloop import ioloop
ioloop.install()
from tornado.httpclient import AsyncHTTPClient
from tornado import gen
def handle_request(response):
if response.error:
print "Error:", response.error
else: