Bitcoin Forum
May 27, 2024, 08:18:35 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How reliable is this browser based full node?  (Read 724 times)
RocketSingh (OP)
Legendary
*
Offline Offline

Activity: 1662
Merit: 1050


View Profile
June 06, 2016, 12:51:04 PM
 #1

http://bcoin.io/browser.html

Documentation: http://bcoin.io/docs/index.html

Code: https://github.com/bcoin-org/bcoin

ca333
Hero Member
*****
Offline Offline

Activity: 520
Merit: 522


Developer - EthicHacker - BTC enthusiast


View Profile
June 06, 2016, 09:14:22 PM
 #2


you need to read through the source and do proper test to answer this question. Its nodeJS based and fully browserifiable. I think it will use a lot of RAM and diskmem and maybe overload your browser (it has full block database). But i have not tested this yet. Anyway seems to be a very interesting project from researchers point of view. Thank you for pointing out - Will watch the progress.

#edit: i see, other people may abuse this project.. i hope not.

this space is available (free) for humanitarian nonprofit organizations - please contact me
chjj
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
June 08, 2016, 11:17:29 AM
 #3

Maintainer of bcoin here. Running it in the browser was my proof of concept. I always thought it would be cool to say "just visit this web page and you have a full node." Its target platform is node.js, but I will keep it compatible with the browser in case anyone wants to do some cool browser stuff. (The web app I made is garbage and looks terrible, but I just wanted to prove it was possible).

A few things about how it works in the browser:

It uses IndexedDB to store the blockchain in the browser. Unfortunately, IndexedDB has varied limits depending on the browser. Storing the mainnet blockchain is probably unrealistic unless it is pruned: as long as the browser can allow a ~2gb database (1288 blocks + 415k headers + 38 million utxos), you should theoretically be able to sync main in the browser.

It uses Web Workers when executing scripts, so transaction verification is parallelized and also will not block the main browser thread.

In order to connect to the p2p network, it uses websockets to connect to a server which proxies the websockets to tcp sockets (if someone were to make a chrome extension with bcoin, this part wouldn't be necessary since the chrome api allows raw tcp access).

As far as reliability/stability goes, it's hard to say. What I _can_ tell you is that I've had bcoin running on a server for several weeks now, fully synced. It's running on main, testnet, and segnet4. It's validated all three of those blockchains. It's been verifying/serving blocks, maintaining its mempool, relaying txs, etc. The tough little bastard is holding up.

I can also tell you that during the last 6 months, my time has been spent painstakingly reimplementing consensus code. BCoin passes all of the bitcoin unit tests for scripts and transactions, but at the end of the day, it's tough to test all consensus rules and edge cases. The only way to really test its reliability is to run it, which I've been doing. I hope others find the time to play around with it if they're interested.

Just a warning, it is in an alpha state. The API might change over time.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!