Show HN: Mako – a full Bitcoin implementation in C
51–60 of 129 posts
Re: Show HN: Mako – a full Bitcoin implementation in C
#52Earlier quoted context omitted.
Its placeholder name was originally "libsatoshi", but I was worried that would cause confusion between this project and bitcoin core. I spent the past few days thinking of names. Mako came to mind because I had recently been playing through the original FF7 (maybe the first time in ~10 years). It's short, memorable, looks cool. It checked all the boxes. On top of that, pretty much every name involving the words "btc"…
Mako was the thing that Shinra almost destroyed the planet trying to extract, so you may end up opening the project up to a lot of Barret+Bitcoin memes. That could be a win!
Re: Show HN: Mako – a full Bitcoin implementation in C
#53can something like this actually participate in the real bitcoin network or does everyone have to run the same client?
Re: Show HN: Mako – a full Bitcoin implementation in C
#54Earlier quoted context omitted.
Mako was the thing that Shinra almost destroyed the planet trying to extract, so you may end up opening the project up to a lot of Barret+Bitcoin memes. That could be a win!
Not to get in a pedantic FF7 debate, but I don't believe Mako was destroying the planet: Shinra's Mako reactors were destroying the planet. Mako energy was a tool, and it could be used for good or evil, just like cryptocurrency. In the case of bitcoin, I believe it is being used for good.
Edit: Hmmm.
"Mako (Japanese: 魔晄, Makō; literally meaning "magic light") is a liquid substance featured throughout Final Fantasy VII. It is the condensed form of lifestream and the primary source of energy used by human beings throughout the world. It is comparable to nuclear energy. Lifestream can condense into Mako via both natural and artificial processes. The terms "Mako" and "Lifestream" are often used interchangeably because one is a derivative of the other."
From here: https://finalfantasywiki.com/wiki/Mako
Re: Show HN: Mako – a full Bitcoin implementation in C
#55Cool to study. Disappointed there are zero comments and the most terse variable names as possible. Almost like it was js-minified.
The GMP naming convention is something like:
- Pointer/Data - single letter followed by a "p"
- Size/Length - single letter followed by an "n"
So a function declaration might look like:
static void
process_bytes(uint8_t *zp, const uint8_t *xp, size_t xn);
The above function would do some processing on `xn` bytes at `xp` and store the result in `zp` (assuming there are `xn` bytes also allocated here).A function which accepts more inputs might have `yp` and `yn` also, so conceptually: `zp = func(xp, xn, yp, yn);` or to simplify: `z = func(x, y)`.
Re: Show HN: Mako – a full Bitcoin implementation in C
#56Cool to study. Disappointed there are zero comments and the most terse variable names as possible. Almost like it was js-minified.
Some of the terse variable names are the result of my adherence to a GMP-like naming convention, which I find easy to read and aesthetically pleasing. The GMP naming convention is something like: - Pointer/Data - single letter followed by a "p" - Size/Length - single letter followed by an "n" So a function declaration might look like: static void process_bytes(uint8_t *zp, const uint8_t *xp, size_t xn); The above fun…
Re: Show HN: Mako – a full Bitcoin implementation in C
#57Earlier quoted context omitted.
Do you mind elaborating? I obsess over clean code, so any criticism is appreciated.
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 magi…
One way to do this, however is:
#define FOURCC(a, b, c, d) ... insert shifting-oring expression here ...
Then: ctx->state[0] = FOURCC('a', 'p', 'x', 'e');
That doesn't tell you where those characters came from but at least unmasks the ASCII connection.However, the code now breaks on EBCDIC compilers, where 'a' won't have the value 0x61.
Re: Show HN: Mako – a full Bitcoin implementation in C
#58Earlier quoted context omitted.
Not to get in a pedantic FF7 debate, but I don't believe Mako was destroying the planet: Shinra's Mako reactors were destroying the planet. Mako energy was a tool, and it could be used for good or evil, just like cryptocurrency. In the case of bitcoin, I believe it is being used for good.
I don't mind pedantic FF7 debates! I think Mako was Shinra's branding on the energy they obtained by mining the Lifestream via the Mako reactors; I don't think it was some natural force. Edit: Hmmm. "Mako (Japanese: 魔晄, Makō; literally meaning "magic light") is a liquid substance featured throughout Final Fantasy VII. It is the condensed form of lifestream and the primary source of energy used by human beings through…
The thing that catches my eye there is that they say lifestream can condense into mako through natural processes as well as artificial ones.
Re: Show HN: Mako – a full Bitcoin implementation in C
#59What is the official reference implementation written in? (I hope a purely functional language like Haskell.)
Re: Show HN: Mako – a full Bitcoin implementation in C
#60Earlier quoted context omitted.
Can I ask you why? I mean, I know about memory safety and stuff, but it is that bad?
Independent researches (Microsoft/Mozilla) showed that around 70% of security vulnerabilities are caused by memory safety bugs. That's one heck of a "memory safety and stuff" :) Here's one reference: https://msrc-blog.microsoft.com/2019/07/18/we-need-a-safer-s...