News for hackers. Stuff that matters.
Re:Decentralized Naming and Certificate Authority by RL_Quine on Wednesday February 12, 2020 @12:51PM (#22310940)
They've somehow managed to make the two least optimal choices of language possible.

    The full node daemon, hsd, is written in Javascript.
A non type safe language with poor package management for consensus critical code.

    We also have a light client, hnsd, which is written in C
A non memory safe and error prone language for client code people would run on their systems as root.
Re:Decentralized Naming and Certificate Authority by pinhead26 on Wednesday February 12, 2020 @01:17PM (#22311183)
Well at least you don't have to worry about package management, all the dependencies are built by the organization either from scratch or with vendored code.

Re: JavaScript, you should take a look at the code in repo, it's excellent. There is a such thing as great Javascript code and bcoin/hsd are prime examples.

Re:Decentralized Naming and Certificate Authority by RL_Quine on Wednesday February 12, 2020 @01:55PM (#22311591)
I'm very aware of bcoin.

https://npm.anvaka.com/#/view/2d/bcoin

Many steps of indirection away we find things like this include.

https://github.com/juliangruber/isarray/blob/master/index.js

    module.exports = Array.isArray || function (arr) {
      return toString.call(arr) == '[object Array]';
    };
Javascript is an absolute joke of a language.
Re:Decentralized Naming and Certificate Authority by Ajedi32 on Wednesday February 12, 2020 @04:39PM (#22313084)
I don't really see the problem. On any remotely modern version of Node that's just a noop. On ancient versions of Node its a very useful polyfill.
Re:Decentralized Naming and Certificate Authority by judge2020 on Wednesday February 12, 2020 @02:06PM (#22311699)
Re:Decentralized Naming and Certificate Authority by chirss on Wednesday February 12, 2020 @02:16PM (#22311783)
For real, it can't even work with regular expressions decently.
Re:Decentralized Naming and Certificate Authority by heartbeats on Wednesday February 12, 2020 @01:32PM (#22311358)
Better the cannot open shared object file: No such file or directory you know than the left-pad you don't.
Re:Decentralized Naming and Certificate Authority by skilgarriff on Wednesday February 12, 2020 @01:25PM (#22311263)
We have a Rust implementation in the works: https://github.com/UrkelLabs/rsd

It's not a full node implementation yet, but will be there soon!

Re:Decentralized Naming and Certificate Authority by lifty on Wednesday February 12, 2020 @12:59PM (#22311012)
I hope more implementations will become available. It’s a decent start, since the C based light client doesn’t expose any services.
Re:Decentralized Naming and Certificate Authority by RL_Quine on Wednesday February 12, 2020 @01:02PM (#22311046)
You can't say that a C daemon interacting with a network has no attack surface, especially as the thing runs as root.

It promiscuously makes outgoing TCP connections to an unauthenticated P2P network, so given enough time you'll eventually interact with an attacker if there is one.