Mako – a full Bitcoin implementation in C

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • mako

    Bitcoin node written in C (by chjj)

  • I wasn't originally going to look at it but this claim got me intrigued. I'd say compared to a lot of C code I've seen, yeah, you aren't lying, the average cleanliness is so clean it's sick ;) Well done!

    Perhaps the GP means the general crypto nature of the project lends to opaqueness. For example, I randomly clicked into https://github.com/chjj/mako/blob/master/src/crypto/chacha20... and one could ask where the magic numbers on lines 41-44 comes from. Maybe it's explained in the references, or just specified without explanation as part of the protocol. I looked at the reference implementation at https://cr.yp.to/streamciphers/timings/estreambench/submissi... which has the equivalent line at L66. After finding the implementation of U8TO32_LITTLE which does some bitwise-or'ing and shifting of the first 4 items ("expa" for either sigma or tau), in Lisp I quickly verified:

           (format nil "0x~x"

  • gui

    Bitcoin Core GUI staging repository

  • Call me old school, but I like looking at the number of lines of code to get a feel for how big of a project something is. Mako[1] is 265,618 lines of code. The most widely accepted Bitcoin implementation[2] is 639,074 lines of code. The common Bitcoin implementation is 2.5x bigger and written in a slew of languages. Mako looks like a super-impressive amount of work (and by a single person no less).

    [1] https://github.com/chjj/mako

    [2] https://github.com/bitcoin/bitcoin

    [3] How I calculated: find -type f | sed 's/.*/"&"/' | xargs wc -l

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • libtorsion

    C crypto library

  • Most of the crypto is from my more general crypto library libtorsion: https://github.com/bcoin-org/libtorsion

    I originally wanted to vendor my libtorsion code and link to it, but it felt clunky since libtorsion pulls in a ton of crypto that bitcoin doesn't need. Also, since I was focusing on just a few algorithms, it gave me the opportunity to optimize a lot of them (in particular, the ECC backend was optimized for secp256k1 whereas in libtorsion it supports all kinds of curves).

    Because of all of this, there's probably some leftover comments. That comment isn't true anymore. rand.c is definitely used internally for libmako, just not libtorsion.

    edit: fixed link.

  • Mako

    THIS IS NOT THE OFFICIAL REPO - PLEASE SUBMIT PRs ETC AT: http://github.com/sqlalchemy/mako (by zzzeek)

  • Mako is also a fairly popular python template library.

    https://www.makotemplates.org/

  • bcoin

    Javascript bitcoin library for node.js and browsers

  • My first bitcoin reimplementation was written in node.js and called bcoin[1]. So this is my second time reimplementing the bitcoin protocol, albeit in a very different language.

    Bcoin was frequently used as a reference along with bitcoin core v0.8.0-v0.11.0 when I felt like double checking consensus functions (among other things).

    As an aside, I personally think bitcoin core v0.8.0 is the best version of core if you want to learn bitcoin from it. It's a lot more straightforward than later versions. I personally don't enjoy reading any version beyond v0.11.0.

    This is also the reason mako doesn't support taproot yet. That code is very new and isn't present in upstream bcoin. I could try to implement it from the BIPs alone, but I won't know what intricacies are present in the actual bitcoin core code until I actually read it.

    [1] https://github.com/bcoin-org/bcoin

  • scc

    Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go

  • btcd

    An alternative full node bitcoin implementation written in Go (golang)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • tokei

    Count your code, quickly.

  • Romeo is my go to for counting lines of code in a project: https://github.com/XAMPPRocky/tokei

  • cloc

    cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • [media] Onefetch v2.13 is typically 2x faster and now supports ~100 programming languages

    3 projects | /r/rust | 16 Nov 2022
  • Debian Sid No-Feature KeePassXC Package

    1 project | news.ycombinator.com | 10 May 2024
  • Setting up PHP 8.2 + Laravel 11 dev environment on Multipass

    1 project | dev.to | 22 Apr 2024
  • XAMPPRocky/tokei: Count your code, quickly

    1 project | news.ycombinator.com | 9 Apr 2024
  • BEAKL – Balanced Effortless Advanced Keyboard Layout

    1 project | news.ycombinator.com | 2 Apr 2024