Skip to content

Instantly share code, notes, and snippets.

View gakonst's full-sized avatar

Georgios Konstantopoulos gakonst

View GitHub Profile
@gakonst
gakonst / zkp2p-trusted-setup-ceremony-v2-1-hdfc_attestation.log
Created January 17, 2024 21:46
Attestation for ZKP2P Trusted Setup Ceremony V2.1 HDFC MPC Phase 2 Trusted Setup ceremony
Hey, I'm gakonst-17802178 and I have contributed to the ZKP2P Trusted Setup Ceremony V2.1 HDFC.
The following are my contribution signatures:
Circuit # 1 (zkp2p-hdfc-send-v2)
Contributor # 6
Contribution Hash: 4129d1a1 16e3e942 323037bc d0dcd64f
24a87792 422d693b b40ffea5 a904b4e8
9287853f 350e019f aa7a2cd9 abc4dd5b
4e7e176f ae9147e5 32931ded 32697e9d
@gakonst
gakonst / nocturne-v1_attestation.log
Created October 30, 2023 23:45
Attestation for nocturne-v1 MPC Phase 2 Trusted Setup ceremony
Hey, I'm gakonst-17802178 and I have contributed to the nocturne-v1 MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (canonaddrsigcheck)
Contributor # 40
Contribution Hash: 187ce374 e6e07ecd 14bef325 43547fd4
72edbc2b c360053d ec7c1e5f d86d372e
d7af126f 555146c7 9e3a076d db0e4a5a
1964978b 1fc8a659 dadf716e fe0ab62d
@gakonst
gakonst / prob.py
Last active September 8, 2022 23:57
Probability of a malicious validator controlling majority of a 6125-size committee
import math
def choose(n, k): return math.factorial(n) // math.factorial(k) // math.factorial(n-k)
def prob(n, k, p): return math.exp(math.log(p) * k + math.log(1-p) * (n-k) + math.log(choose(n, k)))
def probge(n, k, p): return sum([prob(n, i, p) for i in range(k, n+1)])
committee = 6125
half = committee / 2
for p in [0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51]:
@gakonst
gakonst / lista_petsa.csv
Last active March 12, 2021 08:23
lista_petsa.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 6 columns, instead of 9 in line 1.
ΚΑΤΗΓΟΡΙΑ ΜΕΣΟΥ,ΟΝΟΜΑ ΜΕΣΟΥ,ΝΟΜΟΣ,ΠΟΣΟ ΒΑΣΕΙ ΕΝΤΟΛΩΝ,ΤΙΜΟΛΟΓΗΜΕΝΟ ΠΟΣΟ (ΠΡΟ ΚΡΑΤΗΣΕΩΝ),ΣΥΝΟΛΙΚΗ ΑΞΙΑ ΜΕ ΦΠΑ
ΕΝΤΥΠΟ,AGRENDA,,6.000,00,6.000,00,7.440,00
ΕΝΤΥΠΟ,ANAΓΝΩΣΤΗΣ ΕΛΑΣΣΟΝΑΣ,ΛΑΡΙΣΗΣ,1.500,00,1.500,00,1.860,00
ΕΝΤΥΠΟ,ATHENS REVIEW OF BOOKS,ΑΤΤΙΚΗΣ,5.000,00,5.000,00,6.200,00
ΕΝΤΥΠΟ,AXIANEWS,,6.000,00,6.000,00,7.440,00
ΕΝΤΥΠΟ,DEAL NEWS,,5.000,00,5.000,00,6.200,00
ΕΝΤΥΠΟ,DYTIKH FREE PRESS,ΑΤΤΙΚΗΣ,2.000,00,2.000,00,2.480,00
ΕΝΤΥΠΟ,KONTRA NEWS,,36.000,00,36.000,00,44.640,00
ΕΝΤΥΠΟ,LIVE SPORT,,4.000,00,4.000,00,4.960,00
ΕΝΤΥΠΟ,METROSPORT,ΘΕΣΣΑΛΟΝΙΚΗΣ,8.000,00,8.000,00,9.920,00
@gakonst
gakonst / Hegic.sol
Created April 25, 2020 09:46
Slimmed Down Version of the Hegic Options contract so that you can try to spot the bug, ref: https://twitter.com/HegicOptions/status/1253954145113038849
pragma solidity ^0.6.6;
contract HegicReproduceBug {
Option[] public options;
enum State { Active, Exercised, Expired }
struct Option {
State state;
uint expiration;
}
pragma solidity ^0.6.2;
contract Test {
function test1() external {
numOfPeaks(200);
}
function test2() external {
numOfPeaks2(200);
@gakonst
gakonst / covid19.py
Last active March 12, 2020 21:33
Greece #COVID-19
import pandas as pd
import matplotlib.pyplot as plt
import pylab
from scipy.optimize import curve_fit
import numpy as np
import datetime
# load the data
names = ["date", "infections", "age", "gender", "area", "source"]
df = pd.read_csv(

Keybase proof

I hereby claim:

  • I am gakonst on github.
  • I am gakonst (https://keybase.io/gakonst) on keybase.
  • I have a public key ASAigclj3x7AuazeWQkVupHUdx1XOv8oAUilNCSMaL3eTgo

To claim this, I am signing this object:

@gakonst
gakonst / signed-contract.ts
Created September 30, 2018 14:22
Allows offline signing of a contract instance with web3.js
import Web3 from 'web3'
import { Contract, Account, Signature } from 'web3/types';
// Converts any contract to a signed contract
class SignedContract {
account: Account
contract: Contract
address: string
web3: Web3
Verifying my identity on Peepeth.com 0x867b5ec95ef7d6cfe460e5ae2b88fc3d10ac9098