Skip to content

Instantly share code, notes, and snippets.

View msinkec's full-sized avatar
🤓

Mihael Šinkec msinkec

🤓
View GitHub Profile
@deanmlittle
deanmlittle / mapi.md
Last active May 9, 2022 22:42
Why mAPI is shit

A far from exhaustive list of reasons why mAPI is shit

  1. While it's an acceptable bandaid for now, we probably shouldn't just wrap JSON-RPC. It's really slow, and there's no reason to run an HTTP server that accesses another HTTP server. It's pretty silly tbh.
  2. Nobody likes C#. Like, nobody.
  3. You shouldn't have to go and install an entire postgres database in parallel to a mining node (both of which just love to compete with eachother to consume maximum resources) just to offer people different fee rates. If you had to do something like this, SQLite would be a much more lightweight alternative, however in almost all cases, miners will probably want to just run their own mining consoles (like any other kind of API service provider would) where they manage all this stuff themselves, so in reality, a simple JWT with an exp field, a fee field and a signing secret without any kind of user management whatsoever is probably already sufficient. If you have strong opinions to the contrary about thi
@cgcardona
cgcardona / Escrow.cash
Created August 25, 2019 20:27
Escrow CashScript Contract for blind escrow based on local.bitcoin.com
contract Escrow(
bytes20 sellerPHK, // Hash160 of seller's public key
bytes20 buyerPKH, // Hash160 of buyer's public key
bytes20 arbitratorPKH, // Hash160 of arbitrator's public key
bytes escrowKey // Nonce (just some unimportant random bytes unique per exchange)
) {
function spend(
sig spenderSig,
pubkey spenderPK,
datasig oracleSig,
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active May 9, 2024 07:54
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@artjomb
artjomb / PairingLibs.md
Last active March 26, 2024 06:14
List of Pairing Libraries

Pairings can be used for all kinds of advanced cryptographic schemes such as Encryption (Identity-based, Attribute-based, Predicate-based, etc.), Signatures, Zero-Knowledge Proofs, etc. It is in no particular order.

Provides multiple types of Elliptic Curve groups with appropriate pairings on top of them. Code repository resides here.

License: LGPL
Language: C
Thesis: On the Implementation of Pairing-Based Cryptography by Ben Lynn (2007)