Skip to content

Instantly share code, notes, and snippets.

Avatar
🕶️
Being a cool guy

Haseeb Qureshi Haseeb-Qureshi

🕶️
Being a cool guy
View GitHub Profile
View flasherc20.js
interface Lender {
function goWild() external;
}
contract FlashERC20 is ERC20 {
using SafeMath for uint256;
function flash(uint256 amount) external {
balances[msg.sender] = balances[msg.sender].add(amount);
Lender(msg.sender).goWild();
View seeds.cpp
// From: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp
vSeeds.emplace_back("seed.bitcoin.sipa.be"); // Pieter Wuille, only supports x1, x5, x9, and xd
vSeeds.emplace_back("dnsseed.bluematt.me"); // Matt Corallo, only supports x9
vSeeds.emplace_back("dnsseed.bitcoin.dashjr.org"); // Luke Dashjr
vSeeds.emplace_back("seed.bitcoinstats.com"); // Christian Decker, supports x1 - xf
vSeeds.emplace_back("seed.bitcoin.jonasschnelli.ch"); // Jonas Schnelli, only supports x1, x5, x9, and xd
vSeeds.emplace_back("seed.btc.petertodd.org"); // Peter Todd, only supports x1, x5, x9, and xd
vSeeds.emplace_back("seed.bitcoin.sprovoost.nl"); // Sjors Provoost
vSeeds.emplace_back("dnsseed.emzy.de"); // Stephan Oeste
@Haseeb-Qureshi
Haseeb-Qureshi / ethereum_2_dot_0.md
Last active May 26, 2020
Ethereum 2.0 and Beyond (SBC19)
View ethereum_2_dot_0.md

Ethereum 2.0 and beyond

Vitalik Buterin (Ethereum Foundation)

  • Ethereum 2.0 spec pre-release
    • Released yesterday!
  • Proof of stake and sharding have been part of the ETH roadmap since 2014
    • Started with Slasher in 2014, which is totally broken
    • But since then have made a lot of progress
    • Casper FFG devised and formally verified
    • Sharding is now better specified
@Haseeb-Qureshi
Haseeb-Qureshi / zexe.md
Created Feb 4, 2019
Zexe: Enabling Decentralized Private Computation (SBC19)
View zexe.md

Zexe: Enabling Decentralized Private Computation

Speaker: Pratyush Mishra

  • How can we do computing on distributed ledgers?
    • Many existing systems for smart contract execution
      • Ethereum, Tezos, EOS, etc.
    • They all work through re-computation—every party redundantly performs the computations to agree on state
    • This comes with scalability tradeoffs
      • Recomputing all of these programs is costly
      • Weakest computers (e.g. cell phones) can't keep up recomputing all transactions
@Haseeb-Qureshi
Haseeb-Qureshi / fantomette.md
Created Feb 4, 2019
Betting on Blockchain Consensus with Fantômette (SBC19)
View fantomette.md

Betting on Blockchain Consensus with Fantômette

Speaker: Sarah Azouvi

  • Bitcoin vs Traditional Consensus
    • Bitcoin is open memberships, participants unknown
    • One message broadcast per round
    • Incentives are at the core of its security
    • High energy consumption!
    • Slow...
  • Blockchain without PoW?
@Haseeb-Qureshi
Haseeb-Qureshi / formal_verification_makerdao.md
Created Feb 3, 2019
Formal verification: the road to complete security of smart contracts (SBC19)
View formal_verification_makerdao.md

Formal verification: the road to complete security of smart contracts

Martin Lundfall (MakerDao)

  • What is formal verification?
    • Process of specifying and verifying the behavior of programs
    • Specification: mathematical description of intended program behavior
    • Verification: operational semantics of a language -> spec -> proof
    • There are 4 different "flavors" of assurances that formal verification can provide
        1. Smart contract bytecode verification - "Full description of EVM behavior"
        • What can happen over the course of one transaction?
@Haseeb-Qureshi
Haseeb-Qureshi / multi_hop_locks.md
Created Feb 3, 2019
Privacy-preserving Multi-hop Locks for Blockchain Scalability and Interoperability (SBC19)
View multi_hop_locks.md

Privacy-preserving Multi-hop Locks for Blockchain Scalability and Interoperability

Speaker: Pedro Monero-Sanchez

  • Payment channels are a widely pursued layer 2 scaling solution
    • But they only solve for bidirectional payments (between the two parties who open the channel)
  • What if we build a payment channel network?
    • Naive solution—every pair of parties (N^2) opens a channel with each other
      • But then we need to lock up an exorbitant amount of capital in all these channels
    • Instead, let's open a few channels for each party
      • And rely on other intermediary channels to reach the intended receiver
@Haseeb-Qureshi
Haseeb-Qureshi / thunder_mainnet.md
Created Feb 3, 2019
New and Simple Consensus Algorithms for ThunderCore’s MainNet (SBC19)
View thunder_mainnet.md

New and Simple Consensus Algorithms for ThunderCore’s MainNet

Speaker: Elaine Shi

  • Synchronous, with a change of partition tolerance
  • State machine replication (e.g., blockchain consensus)
    • Requires safety (nothing bad ever happens), and liveness (eventually something good happens)
  • Thunderella
    • If you don't know Thunderella, go look it up (check out the BPASE '18 talk)
  • Wait, there's a flaw in Thunderella?!
    • A confirmed transaction can be undone, even in a somewhat benign setting
@Haseeb-Qureshi
Haseeb-Qureshi / urkel.md
Created Feb 3, 2019
# Urkel Trees: An optimized and cryptographically provable key-value store for decentralized naming (SBC19)
View urkel.md

Urkel Trees: An optimized and cryptographically provable key-value store for decentralized naming

Boyma Fahnbulleh (Handshake)

  • Merkle Trees are great, but can we do better?
  • Ethereum's Wish List on better Merkle Trees:
    • Wanted a key-value store for the state
    • Allow updates without having to reconstruct the entire tree
    • Has bounded depth
    • History independent: root hash doesn't depend on ordering among updates (i.e., commutative updates)
    • Merkle Patricia Tree is basically a fancy radix hash tree
@Haseeb-Qureshi
Haseeb-Qureshi / quisquis.md
Created Feb 3, 2019
Quisquis: A New Design for Anonymous Cryptocurrencies (SBC19)
View quisquis.md

Quisquis: A New Design for Anonymous Cryptocurrencies

Speaker: Prastudy Fauzi

  • Bitcoin and Anonymity
    • "Bitcoin is like Twitter for your bank account" — Ian Miers
  • Current Anonymous Cryptocurrencies and Their Limitations
    • Dash, Monero, Zcash
    • What technologies do they use?
    • Tumblers (Dash), Ring signatures (Monero), SNARKs (Zcash)
    • Questions you should ask yourself:
You can’t perform that action at this time.