
The State of Cryptocurrency Mining - dsr12
https://blog.sia.tech/the-state-of-cryptocurrency-mining-538004a37f9b
======
latchkey
I'm running a fairly large mining farm. This article is spot on.

Another point that isn't discussed is that the software solutions to manage
large numbers of Pi/Beaglebone class machines is non-existent.

Because of the fast time to market, these machines are unstable... parts burn
out all the time, they go offline randomly, a bad PSU can make a machine
reboot every 10 minutes (making doing anything with it difficult), etc. Never
mind, just keeping track of where an individual machine is in a data center
(needle in a haystack).

There is a couple commercial and open source offerings, but the majority of
them were built for when farms were only a handful of machines. Scaling to
thousands of machines across different data centers has a lot of the same
scaling issues I'd have running the same number of EC2 instances.

If you look on Github, you can see that most public development in the mining
community stopped around 2014-2015 and hasn't picked up again. Even the
largest pools have taken things closed source.

I find it amazing that literally billions of dollars is flowing through this
stuff. If it wasn't for math being so factual, I'd really question it all
because it is all barely held together with heat sink grease.

~~~
sanxiyn
> Never mind, just keeping track of where an individual machine is in a data
> center (needle in a haystack).

I have a friend who contracted to develop a custom DHCP server to allocate
addresses based on Ethernet ports. This is superior to static IP configuration
because you invariably make configuration mistakes.

Cisco provides this feature, but Cisco is expensive, hence a lucrative side
job for my friend. There seems to be lots and lots of opportunities like this
to provide custom softwares for mining farm.

~~~
latchkey
Actually, no. DHCP is the common misconception in this industry.

The machines are originally come out of the box booting with DHCP and I
immediately switch to static when we deploy them. This is based on experience
running a large number of these machines originally with DHCP.

There is a few reasons:

1\. They are physical machines in a physical location. Every DC, Row, Rack,
Shelf, Position is defined and set with an IP address before the machine is
even installed. It is very important to track which machine is where for
maintenance reasons (remote hands, etc). If I don't use IP address, I'm stuck
using MAC addresses and now I'm keeping track of two pieces of information
instead of one. Oh and MAC address isn't printed on the outside, sigh.

2\. DHCP can leave gaps in IP ranges. Unless you deploy your own custom server
that is smart about always giving out the next IP, in practice, I see gaps
form. You end up wasting private space and having machines cross subnets. I
don't run the network in my DC, so if I want more IP space, I have to ask for
it. One more thing to do, no thanks.

3\. These machines tend to reboot a lot since they are basically hastily made
junk from China. Time is money. Every second they are down means lost revenue.
DHCP takes a minimum of 5-30 seconds to assign an IP. It adds up when you have
thousands of machines.

4\. More network load. 100mbit at best. Even updating software on them all can
take hours.

5\. An extra dependency, what happens if my DHCP server dies? The fewer moving
parts, the better.

6\. Speeds up the installation process, which uses DHCP to assign the initial
IP range. Can't have two DHCP servers on the network conflicting with each
other.

Installation is as follows:

1\. Set the DHCP server to the range I want to use.

2\. Unplug ethernet on all machines.

3\. Turn them all on and get them warmed up.

4\. Plug ethernet in one at a time, in order (to match their location) and
watch the leases file.

5\. Run a script that bulk sets their IP address as static (same address).

When you're turning on 500 new machines and it is an all day ordeal, this is
the fastest process I've found so far.

In the future, I'd like to have a custom DHCP server (there is a DHCP golang
server that I'd like to use) that already knows the ranges necessary,
allocates the IP and pings my management system to set the location of the
machine. Right now, I just keep the data in a Google Sheet, which works well
enough.

~~~
sanxiyn
Eh... your conclusion is that you'd like to have a custom DHCP server. I
mentioned such custom DHCP server. Why do you start with "Actually, no"? We
seem to be in agreement.

~~~
latchkey
The DHCP server is just to get the machines booted, not to assign IP's on an
ongoing basis. I don't keep it turned on (reference to your 'superior to
static IP configuration').

In other words, if I could have the machines come out of the box with the
correct static IP address (flashed at the factory), I would go that route and
not have a DHCP server at all. That would be the absolute optimal solution. We
aren't there yet.

Some of our hardware has a serial usb port for TTL. For those, we can set the
IP address before we even put it on the shelf.

~~~
sanxiyn
I also mentioned why it is superior to static IP configuration. If you never
make mistakes settings static IP addresses static IP is okay. But you will
make mistakes.

~~~
latchkey
I know exactly how many machines I have, where they are located and what IP
address they should have. If a single machine isn't doing what I expect, it is
immediately obvious in the pretty graphs that I have with Grafana/Prometheus.
Any 'mistakes' are easily rectified, but so far, we haven't had a single issue
along these lines. I've tried it both ways, the benefits of static IP, for the
reasons I mentioned, far outweigh any negatives.

DHCP is great for a coffee shop, workplace or college campus, where you don't
know anything about your clients or care to. In my case, I need to know
exactly who is on my network at all times and exactly where they are located,
without having to cross reference switch ports and MAC addresses. In one DC, I
don't even have access to the switches.

~~~
sanxiyn
Eh... the point of port-based DHCP is exactly not to cross referene switch
ports... Cross referencing MAC addresses is stupid and unworkable. Full
agreement there.

There is location and cabling, and static IP addresses. You seem to make sure
they agree, going so far as "plug ethernet in one at a time", WTF. Port-based
DHCP makes those two agree, automatically.

~~~
latchkey
Like I said, I don't have access to the switches.

You're also assuming that someone in the DC doesn't mix up the cables. I've
seen that happen multiple times.

Agreed, plugging one in at a time isn't the best, but it works and only
happens once per machine. Short of writing a lot of code, it is not the end of
the world.

------
JoeCoder_
To achieve asic resistance, why not switch between a large pool of different
algorithms sequentially, with their order and various parameters determined by
the hash of the previous block?

~~~
dagw
Serious question. Why is ASIC resistance a good or desirable quality for
crypto currencies to strive for?

~~~
lopatin
One reason to stop it I guess is to prevent a small group of miners from
carrying out a 51% attack.

~~~
aiCeivi9
Doesn't it achieve opposite effect? All smaller, non ASIC resistant currencies
can be bullied by someone with a lot of (rented) PCs. Ignore 51% attack, just
sudden changes in difficulty & time between blocks would introduce chaos.

~~~
zaarn
ASICs are specialized equipment which usually costs a lot. That leads to
centralization, which is not something you want for a cryptocoin. Just look at
bitcoin with their four people controlling a majority of hashpower.

------
vasilipupkin
the most notable part of this for me is that instead of working on their main
business, they are veering off in an unrelated direction just because it's
potentially lucrative. Does it mean they've given up on storage as a business
to go after?

~~~
vertexFarm
Ha. I really hope we start seeing some truly useful and widely adopted
decentralized apps, but everyone seems to get stuck in get-rich-quick schemes.
I can't blame people for going where the money is. But this is starting to
look bad for blockchain tech. Eventually the economy has to be about something
other than buying in and hoping the next guy buys in for more or trying to
make more and more effective mining hardware.

~~~
vasilipupkin
they sold a token. Right? so, people who bought this token can probably sue
them.

------
Paperweight
Hopefully plain Bitcoin SHA-256 ASICs become more-or-less perfected and
commoditized, leading to mining decentralization around local electricity
deals.

~~~
Alex3917
> leading to mining decentralization around local electricity deals.

The amount of electricity it takes to secure the network is directly
proportional to price. In order for BTC to replace traditional currency, it
would require more electricity than the world currently produces each year.

~~~
deegles
Only if the expected return of mining is greater than the cost of the
electricity. No one will spend $2 to get $1 worth of crypto.

~~~
n1c
Some people take the short-term risk, on the assumption that the crypto will
be worth more in the future.

~~~
kgwgk
Even if they could buy twice as much at a exchange?

~~~
aeternus
Yes, but it isn't rational and probably won't persist once the novelty of
mining wears off.

------
cies
From the, really well written, article:

> as ASICs continue to infiltrate every coin on the market

I think he means "every PoW coin", because PoS coins will change the game
significantly (or am I missing something). In the comments at Medium we see
several question being asked about this (at this point all unanswered).

~~~
undersuit
You can still use an ASIC with a PoS coin, it just doesn't benefit you as
much. PoS coins still perform work on a blockchain with cryptography, but
there is no reward to be the fastest. An ASIC for a PoS would allow you to
lower the power requirements(Wattage and compute) of the machine running the
PoS coin.

------
angel_j
Good article with lots of epic photos that are not credited to anybody.

------
seibelj
Once proof of stake becomes the norm, this phenomenon will be an interesting
exhibit in the Museum of Cryptocurrency

~~~
__blockcipher__
Why do you think PoS is workable in the long run? I'm hesitant about the
implications of solely tying voting power to how much currency you hold.

Hash rate isn't much better, since it's the definition of a capital-intensive
business, but there's still some possibility of getting better performance
through clever innovations

~~~
jacoblambda
Something I am interested in but haven't seen much on is the idea of creating
a proof of stake system where the value of one's stake is directly related to
how liquid it is. i.e. how much they actually use their funds. Think currency
regularly moving in and out of their account, providing smart contract loans,
etc.

I feel as if a proof of stake system that requires those staking to not only
support the network but also be heavily involved in it as well would resolve
some of the issues with current proof of stake systems.

~~~
__blockcipher__
How do you deal with spam tx? In other words pretending to use your stake but
you’re not actually?

The same issue as what i’ve encountered when trying to imagine a
cryptocurrency that is slightly inflationary, like 1% yearly. There is no
objective way to decide how much the money supply should grow, as far as I can
tell, because there is no way to separate “real” from “fake” usage.

~~~
jacoblambda
One aspect that wouldn't eliminate the issue of "useless" or fake tx would be
to have the liquidity aspect be a modifier where stakes being il-liquid
devalue but over some threshold, the stake modifier is at a constant 1x.

Another potential mitigation tool would be to have the protocol look for tight
tx loops (i.e. Naive liquidity falsifying) and either negate or reduce their
influence on the liquidity calculation. Whether this is actually possible I
have absolutely no idea. If I was to have any real trust in this idea I would
have to look for/develop either formal proofs or some real demonstrable
examples of it working.

Beyond that I think it boils down to game theory and economics. If it could
work, it would likely require careful calibration to minimise the benefit of
gaming the system or otherwise being a bad actor.

~~~
__blockcipher__
My brain isn't working very well right now so I'm having trouble understanding
what you're saying, but is what you're getting at similar to the metric of
"coin days destroyed"? (ie if you send 5 BTC to address foo and those 5 BTC
haven't been moved for 365 days then you've destroyed 365*5 coindays

~~~
jacoblambda
More or less ya that is about right. Now that would still only be part of the
overall calculation as I think that assets such as loans and smart contracts
should be considered in the calculation. The money from loans and such is in
use by people on the network but its owner should still be able to claim it
for staking purposes.

------
beagle3
I'm not sure if this qualifies as proof of stake, proof of work, or neither -
but I've just heard of SpaceMesh[0], which seems to be a well thought out
alternative to Ethereum. If I understand correctly, it's "proof of space" (in
the sense that scrypt requires space whereas bcrypt requires just work;
spacemesh requires space, not just work).

Haven't had a chance to really look at the implementation though (its on
github)

[0] [https://spacemesh.io/](https://spacemesh.io/)

------
AlexCoventry
Is there a hashing algorithm whose sequence of operations is heavily
determined by the input, so that an ASIC targeting it would need to be roughly
as flexible as a standard CPU?

~~~
__blockcipher__
An interesting question.

One potential issue perhaps would be that it would presumably violate the
memorylessness principle, which really changes the mining dynamics.

Is there a difference between what you're proposing and the more memory-
intensive hash algos like Scrypt, etc?

~~~
AlexCoventry
I think so. I'm suggesting that small programs which use most CPU features be
generated from the input, and used to transform parts of it.

------
priitmaxx
Interesting no mention of Ravencoin?

~~~
TylerE
Even by the standards of altcoins, it's sort of hard to take a project
seriously when the homepage starts out by rambling about Game of Thrones.

~~~
AlexCoventry
I think he's probably referring to their PoW hashing algorithm:
[https://ravencoin.org/wp-
content/uploads/2018/03/X16R-Whitep...](https://ravencoin.org/wp-
content/uploads/2018/03/X16R-Whitepaper.pdf)

~~~
TylerE
and I'm referring to the hero spot on their homepage which literally starts
with "In the fictional world of Westeros, ravens are used as the messengers
who carry statements of truth"

------
ericjang
The authors of the blog post make pretty liberal use of fantasy artwork. The
art doesn't add any educational value for me. If I stretch my imagination I
can see how the last image gives a connotation of "an impressive, highly
skilled, well refined entity", but to be it's... cringey for a company to be
doing this. Like, I see my high school self in this aesthetic.

Also, the authors would do well to credit the original sources / authors.

~~~
jlrubin
Lots of people have 'cringey' aesthetics in tech -- e.g., the anti-ego
depletion 'own everything the same' uniform, the VC Patagonia+AllBirds, the
'free tshirts only' nerd outfit, etc. It's better to judge people on the merit
of their ideas than their appearances or aesthetics. I support David choosing
to present himself, and his work, as he pleases.

~~~
toomanybeersies
Haha, I used to work at a startup where I was the only one who didn't own a
pair of Allbirds.

