
Show HN: A Browser-based Blockchain - Capira
https://nimiq.com/betanet
======
buttershakes
This is a neat. However, there is nothing explaining fundamental operation I
can find except the source code itself, and it seems to me that it suffers
from pretty serious scale limitations. I.e its ability to deliver on the value
proposition in its current form is low.

Also, your proof of work is Sha256 which means that the moment this thing goes
live and there is any value attached it won't work. You have to switch to a
memory hard proof of work to even begin doing this.

Finally, most of what you are trying to accomplish can already be done using
SPV onto existing digital currency networks. Pushing the entire network into
the browser doesn't really help. The cynic in me wants to say this is an ICO
pump for people who don't know any better.

~~~
Capira
I agree that our technical documentation is not strong and well presented yet.
Have you read this? [https://medium.com/nimiq-network/introducing-the-browser-
bas...](https://medium.com/nimiq-network/introducing-the-browser-based-
blockchain-63d408add368)

~~~
asciimo
> Partner with VISA payment services to create a VISA-to-Nimiq exchange
> (centralized in the first place).

By Q4 2017? This sounds outrageous, if not impossible. This also seems to
contradict your comment that "'demystify blockchain technology'" is a perfect
description for our intention!" Your intention seems to be to build a
mainstream, browser-based cryptocurrency. Good luck.

------
gallerdude
So far looks sweet, I have a small bit of advice.

I'd double down on the simplicity aspect - for a lot of people cryptocurrency
is a weird thing to get into and hard to understand. You guys have taken
something as ultra-complex as mining and blockchain and stuck it in the
browser, no small task. Make your focus a cryptocurrency for everyone -
include demos of how cryptocurrency itself works.

~~~
fiatjaf
Well, it is not good to do Proof-of-Work in the browser. It's inefficient and
people will not keep mining if they have very small chances of getting a
block.

I don't know how this could be solved, maybe you should experiment with other
forms of ledger consensus that would fit better in a browser environment and
at the same would not exclude normal people from participating in benefit of
specialized miners.

The network part of this thing is amazing by itself.

------
hopfog
I have a soft spot for removing barriers and making things accessible so this
really resonates with me. With a single click of a button I'm connected to the
network and have started mining. Pretty awesome!

I also love how the P2P is visualized in a straight-forward way. I definitely
think this will help demystify blockchain technology. You immediately realize
that you're part of a decentralized network and that blockchain nodes are
nothing else than other nodes like you.

~~~
Capira
"demystify blockchain technology" is a perfect description for our intention!
thanks!

~~~
asciimo
If this is an educational product then it would be even better to expose more
details to the user. For example, the fundamental steps illustrated in the
Blockchain Demo
([https://anders.com/blockchain/](https://anders.com/blockchain/)). A nimiq
blockchain explorer would also be a nice feature.

~~~
elionchin
A blockchain viewer (showing most recent blocks) is in the works for the
Betanet and should go live soon. Full chain explorer will follow for the
feature-complete Testnet.

------
fslkjhjdfhgj4j
Left this running all day at about 30kh/s and got 200 coins

Couple of hints:

* Have a way of backing up your private keys! Many people delete browser local storage and this is not a safe or long term place for them to live! NAG THE USER TO DO THIS. 99% of the people here betanet will lose their keys, fo sure

* Consider hierarchical deterministic (HD) generated keys, so a single seed can generate all future keys

* Consider brainwallet seed (must be long, suggest at least 256 bits entropy), custom dictionary words

Most cryptocurrencies use secp256k1 or ed25519 for ecdsa/xeddsa as their
curve, this is using P-256. Satoshi was suspicious of the NIST curves, thats
why he didn't use P-256 for bitcoin.

You will need something better than SHA256 for PoW function too, others have
identified memory hard hash as idea. Look at Momentum (ProtoShares), EtHash
(Ethereum) and CryptoNight (Bytecoin/Monero) as approaches to this. All have
rolled their own in this space, keep you tx hashes standard but use something
creative for PoW function.

~~~
Capira
Thanks a lot for your feedback!

The protocol we've deployed in our Betanet is not final. The Betanet is just
about getting early community feedback and testing in the wild. There will be
lots of breaking changes.

We will not use NIST curves in our mainnet for the reasons you mentioned. We
are working on an implementation of ed25519 in WebAssembly.

We will not use sha256 as in our mainnet. We are already working on a
WebAssembly implementation of a memory hard POW.

We want to bring blockchain technology to the masses. So in the long run we
are explicitly targeting users who are not yet familiar with cryptocurrencies.
Following from that we will put a lot of effort in creating user interfaces
that take users by the hand and explain important aspects like "How to keep
your private key secure".

------
codefined
Interestingly, I'm getting a _significantly_ higher hash rate in Chrome than
in Firefox (12,000 vs. 600). This is despite the fact that Firefox has a
higher priority on my OS (High vs. Normal) and they're both using the same
amount of CPU.

What hash rates are you seeing on your machine/browser?

~~~
victorantos
I was getting ~4KH/sec then I've done some tuning and got to 20KH/sec with
Chrome. I plugged in the power cord, changed from Balanced performance to High
performance option. Also enabled GPU for use with Chrome instead of integrated
graphics.

~~~
victorantos
"At your current hashrate you can expect to mine 50 Nimiqs every 2.3 hours"

------
Mao_Zedang
Before anyone gets too excited because the page doenst make this clear, you
are all mining on the Test block chain, not the release block chain, the coins
are worthless, they are fine for playing around with though.

~~~
Capira
There is a disclaimer under the "Connect to Network" button stating "Testnet
Mining does not create permanent Nimiqs." Do you think this we should make
that more prominent?

~~~
Mao_Zedang
I dont think it matters, just saying its easy to click through without seeing
it, some people might leave it open thinking they are mining for real.

------
joantune
Ok, you have a roadmap, but I'm left with more questions than answers, e.g.:
if a blockchain relies on every node having a ledger of the whole
transactions, and bitcoin's ledger now occupies more than 100GB, then how is
this supposed to work when the ledger becomes big?

Also, how do the 'instant' transactions work?

~~~
herve76
it uses the Mini Blockchain scheme [https://cryptonite.info/files/mbc-scheme-
rev3.pdf](https://cryptonite.info/files/mbc-scheme-rev3.pdf)

------
postozoan
I like how it starts you up instantly and how simple mining, helping the
network and transactions seem to be. Really well done. I found a quick block
too and sending/receiving transactions and getting the confirmations seems
nice and fast. As a user it makes me pretty happy.

However, turning your coins 'permanent' somehow doesn't seem nearly as
intuitive. I have no real idea how these coins are now tied to me. I found my
block on chrome, and launching the site in incognito mode / firefox doesn't
show the funds in my wallet. This would make me worry about deleting my
browser history/cookies/etc and I'd have no idea how to access these coins on
another computer. How do I go about making these coins tied to me beyond some
form of browser storage, and why isn't that process explained somewhere? Right
now it feels like a mild breeze might erase my wallet and the coins in it. Is
this something that'll be dealt with in the future?

------
nyxtom
I like the idea of reducing the barrier to entry in the multitude of markets,
but I'm also a bit cynical in that any web-based wallet seems extremely risky
to me in terms of the potential for attacks and stolen coins.

------
schickling
This seems really interesting! For someone without too much knowledge about
blockchain and digital currencies: How does this compare to Bitcoin and
Ethereum?

~~~
Capira
It is written in Javascript, communicates over WebRTC + WebSockets and
therefore you can connect to the network from your browser without an
intermediary. Additionally it is designed for light-clients (such as low-end
devices) and transaction speed.

~~~
slice_of_life
How does this compare to BTC with regards to privacy?

My thoughts: most regular users don't really care about privacy at the level
that BTC promises. If people really cared that much about privacy, then social
media platforms like FB wouldn't be where most people are today.

Combine what I've said above with the easy on-boarding facility that Nimiq
provides and I think this solution carries the day. This might be the 'style'
with which most first time cryptocurrency users (emphasis on miners) get
started with cryptocurrency. With mass adoption, computing and securing the
network might be easier (read cheaper) than is the case with BTC as it stands.

I really like what you've done.

------
larma
Just ask here if you need some test coins. I already mined a first block.

~~~
geoah
Mined 50 as well, reply with addresses :)

~~~
alastair
08CB2993E1B8234AAC23C25B5EEF666EABCE712A thanks :)

~~~
geoah
On its way!

[edit] Sent.

------
fiatjaf
Is it possible/easy to compile stellar-core to the browser? If we could do it
and use the networking module/part of this Nimiq it would be awesome.

------
daxfohl
Where is their office? Looks like they're all working out of some beach house
somewhere in the South Pacific.

~~~
herve76
in Santa Teresa Costa Rica

~~~
daxfohl
Okay, looks like this place:
[http://www.skyloftcostarica.com/](http://www.skyloftcostarica.com/). Wonder
if that's full time or just a field trip.

~~~
Jasseltov
There you get an insight how hard they work on this project
[https://www.youtube.com/watch?v=MOgOWWVinfY&list=PLuhSf5DE3F...](https://www.youtube.com/watch?v=MOgOWWVinfY&list=PLuhSf5DE3FFQSP4NtO-
rVJqd34WRVMv5O)

------
kristianp
Lets get this out of the way now: what are the block size rules as transaction
numbers increase?

~~~
elionchin
The Mini Blockchain Scheme is being implemented and should be coming into
effect later this week: [https://cryptonite.info/files/mbc-scheme-
rev3.pdf](https://cryptonite.info/files/mbc-scheme-rev3.pdf)

------
chenster
So is this a mining program _inside_ the browser? Can someone please explain?

~~~
elionchin
Yes. You connect and sync to the Nimiq Network through your browser and run
Block mining inside your browser. No installation necessary.

------
himlion
Network bandwidth just doubled. Don't think my thinkpad is going to mine any.

------
wildbunny
This is interesting - but how can a browser serve incoming connection
requests?

~~~
elionchin
WebRTC is a web protocol designed for peer to peer connections.

------
eriknstr
That's pretty cool. Will you also make a native miner?

------
chenster
Why another cryptocurrency? I can't keep track!!

~~~
elionchin
Because this one is built with one thing in mind: making it so simple that
your mom can use it. Even the combined market cap of all Cryptocurrencies to
date still only represents a small fraction of our financial transactions and
monetary system ([http://virtualrealitytimes.com/2017/05/30/chart-bitcoin-
vers...](http://virtualrealitytimes.com/2017/05/30/chart-bitcoin-versus-other-
wealth)). This is far from mainstream by any means. Nimiqs browser-based
approach and clear focus on ease of use brings blockchain technology to
everyone, everyday.

------
geoah
Is the betanet app code available somewhere?

~~~
Mao_Zedang
Top right of the page is a github link

~~~
geoah
The miner repo was empty and now has been removed, the core repo doesn't
contain this app.

~~~
Mao_Zedang
[https://github.com/nimiq-
network/core/blob/master/clients/br...](https://github.com/nimiq-
network/core/blob/master/clients/browser/index.html)

Is this not it, I havent tried it.

------
stefanv
What does "nimiq" means?

~~~
larma
On the bottom of the website it says: "Nimiq is an Inuit word used for an
object or a force which binds things together."

------
_jezell_
I thought general opinion from security experts was browser based crypto is
DOA...

~~~
aruss
There's nothing inherently wrong with browser-based crypto. Most issues arise
when you try to e.g. replace like TLS with JavaScript to encrypt passwords
before sending them to a server. SHA256 doesn't become broken simply because
it's run in a browser.

------
bbcbasic
This is good until the ASICS come in force and make mining in the browser
useless.

~~~
elionchin
This is the Betanet. We will not use sha256 as in our Mainnet. We are already
working on a WebAssembly implementation of a memory hard ASIC resistant POW.

~~~
bbcbasic
Thanks, but while ASICs may not be a threat, in general finely tuned beefy
machines might be? So that running this in a browser would be as efficient as
mining litecoin in a browser?

------
imaginenore
17% CPU utilization when mining. You need to multithread that.

Or better yet, implement it in a WebGL shader.

~~~
s_ngularity
Looks like they've already added GPU mining as a MainNet milestone.
([https://github.com/nimiq-network/core/issues/39](https://github.com/nimiq-
network/core/issues/39))

