Skip to content

Instantly share code, notes, and snippets.

View maxgillett's full-sized avatar

Max Gillett maxgillett

View GitHub Profile
func ecdsa_raw_recover{range_check_ptr}(
msg_hash : BigInt3, v : felt, r : BigInt3, s : BigInt3) -> (res : EcPoint):
alloc_locals
let gen_pt = EcPoint(
BigInt3(0xe28d959f2815b16f81798, 0xa573a1c2c1c0a6ff36cb7, 0x79be667ef9dcbbac55a06),
BigInt3(0x554199c47d08ffb10d4b8, 0x2ff0384422a3f45ed1229a, 0x483ada7726a3c4655da4f))
# Compute y-coordinate of R
%{
from typing import List
from eth_account.messages import encode_defunct, _hash_eip191_message
from eth_utils import big_endian_to_int
from fastecdsa.curve import Curve
from fastecdsa import keys, ecdsa
P = 0x2523648240000001ba344d80000000086121000000000013a700000000000013
N = 0x2523648240000001ba344d8000000007ff9f800000000010a10000000000000d
from typing import (Tuple) # noqa: F401
import numpy as np
from web3 import Web3
from web3.auto import w3
from eth_account.messages import encode_defunct, _hash_eip191_message
from eth_keys import keys
from eth_keys.backends.native.ecdsa import (
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: semaphore17
Contributor # 143
Hash: bf23d121 797f834d a22c638f 4df43b95
4f9c742c d98ae0b8 cf5e0cf6 88238688
35c5656b 239e5a8c 47f6a594 e5868463
7ab1c005 e6ccc6d6 dcb4972d 48c714f2
@maxgillett
maxgillett / engine.c
Created October 20, 2023 22:52 — forked from druska/engine.c
Quant Cup 1's winning order book implementation
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list