Bitcoin Forum
November 15, 2024, 09:41:14 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Java Electrum Server - jelectrum  (Read 3849 times)
fireduck (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
August 06, 2014, 06:26:17 AM
 #1

https://github.com/fireduck64/jelectrum

I have created a fresh electrum server that uses java and bitcoinj.  It replicates all features of the standard python electrum server (that I know about).

If anyone tried it in the last week, I just changed some things around in the database.  You'll have to nuke your mongodb DB and sync fresh.

Bitrated user: fireduck.
fireduck (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
August 06, 2014, 09:11:45 PM
 #2

With some recent improvements I've simplified the locking model for multi-threaded database updates and made it a bit faster.

I think we are looking at about a ~2-3 day sync for the entire blockchain, assuming SSD and a few CPU cores.


Bitrated user: fireduck.
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1008


Core dev leaves me neg feedback #abuse #political


View Profile
August 07, 2014, 01:55:05 AM
 #3

nice work fireduck...

I promised myself to run a full node electrum server when I get a new PC.

fireduck (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
August 09, 2014, 12:54:43 AM
 #4

After a fresh DB sync, I have a server up at b.1209k.com 50002 ssl.

If it doesn't connect, try deleting your cert for b.1209k.com.  I ran an electrum server with a different cert there before.


Bitrated user: fireduck.
fireduck (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
August 19, 2014, 05:46:13 PM
 #5

"Unknown method - blockchain.address.listunspent"

Looks like I have work to do.

Bitrated user: fireduck.
fireduck (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
August 22, 2014, 05:41:54 PM
 #6

jelectrum:
Saved block: 00000000000000001c5b4fd3a8ae6150f5a8c0e869ece137307cae59a8dd83b8 - 316980 - 1024 (1.138 seconds)
Saved block: 00000000000000001f9e4d8b0e9ae8d5a45f9d8f3afd249bc1b451ac9b556389 - 316981 - 1702 (2.313 seconds)
Saved block: 0000000000000000174fd2b47b1a8420217b7cdb3d2269c521cb9f35d06afeb2 - 316982 - 713 (0.924 seconds)
Saved block: 000000000000000029000da8903b3df605b111e91b9f18bea9503e53c22b3091 - 316983 - 1732 (2.068 seconds)
Saved block: 00000000000000001fc3cdede940822b24a29cbdda760547fcaab961b145c468 - 316983 - 1689 (0.955 seconds)

electrum-server:
INFO:electrum:blockchain: 316980 (15.073s)
INFO:electrum:blockchain: 316981 (35.007s)
INFO:electrum:blockchain: 316982 (21.482s)
INFO:electrum:blockchain: 316983 (39.583s)
INFO:electrum:blockchain reorg 316983 0000000000000000174fd2b47b1a8420217b7cdb3d2269c521cb9f35d06afeb2 000000000000000029000da8903b3df605b111e91b9f18bea9503e53c22b3091


Both of these were running at the same time on the same hardware.  Jelectrum does seem to import blocks a lot faster.

Bitrated user: fireduck.
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1008


Core dev leaves me neg feedback #abuse #political


View Profile
August 22, 2014, 09:58:51 PM
 #7

what do you see as benefits of java implementation over normal electrum server?

torusJKL
Hero Member
*****
Offline Offline

Activity: 619
Merit: 500


View Profile
October 09, 2014, 04:13:45 PM
 #8

I'm thinking about creating an Electrum server.
I'll definitely look into this release.

If you find my post useful send some Bitcoin: 167XM1Za8aG9CdbYuHFMpL2kvPsw6uC8da
Bitrated || bitcoin-otc || Moon Bitcoin Faucet
JWU42
Legendary
*
Offline Offline

Activity: 1666
Merit: 1000


View Profile
August 22, 2015, 10:37:24 PM
 #9

Bumping this as it is now relevant again...

JWU42
Legendary
*
Offline Offline

Activity: 1666
Merit: 1000


View Profile
August 29, 2015, 07:45:39 PM
 #10

Just to advise that jelectrum (with respect to creating a new DB) is 50+ times faster than the existing python implementation (yes, you can should download a database from the foundry for the python version but what fun is that).  There are "costs" to running the jelectrum server, however...

1.  The leveldb database is roughly 130GB

Code:
25G     ELDB/electrum-leveldb-utxo-1000

So over 100GB larger

2.  The amount of RAM needed on the server (and this could be tweaked more going forward I assume) is ideally 12+ GB

 - I have been running the python version on a server with 8 GB and could get away with as little as 4GB

All that said, I am enjoying trying something new and can foresee this being the evolution of the current server software.

SO, for the adventurous, come give it a try!

JWU42
Legendary
*
Offline Offline

Activity: 1666
Merit: 1000


View Profile
August 29, 2015, 07:50:11 PM
 #11


I think we are looking at about a ~2-3 day sync for the entire blockchain, assuming SSD and a few CPU cores.


In less than 20 hours I am currently at block 313,000 and at the Block rate of 1.25+/s it should be complete in another 14-16 hours.

Code:
AMD FX-6100
12GB RAM
DB on 4x120GB SSD Raid0

AussieHash
Hero Member
*****
Offline Offline

Activity: 692
Merit: 500



View Profile
September 02, 2015, 06:18:42 AM
 #12

Just to advise...  running the jelectrum server  ...
1.  The leveldb database is roughly 130GB
2.  The amount of RAM needed on the server (and this could be tweaked more going forward I assume) is ideally 12+ GB

Darn -- for ultimate privacy I was hoping to run it on either a 1GB RAM Odroid C1 or a 2GB RAM Odroid XU4 with cloudshell
JWU42
Legendary
*
Offline Offline

Activity: 1666
Merit: 1000


View Profile
September 02, 2015, 10:17:27 AM
 #13

Just to advise...  running the jelectrum server  ...
1.  The leveldb database is roughly 130GB
2.  The amount of RAM needed on the server (and this could be tweaked more going forward I assume) is ideally 12+ GB

Darn -- for ultimate privacy I was hoping to run it on either a 1GB RAM Odroid C1 or a 2GB RAM Odroid XU4 with cloudshell

Fireduck might be able to tune a version for much lower memory usage - not sure...

JWU42
Legendary
*
Offline Offline

Activity: 1666
Merit: 1000


View Profile
September 03, 2015, 11:56:50 PM
Last edit: September 06, 2015, 01:17:41 PM by JWU42
 #14

Finally have a working LevelDB database that I can host if anyone prefers to download it versus building from scratch.

It is currently 130GB though it can be compressed to less than 100GB with LRzip I assume.

PM me if interested...



EDIT - Just about 100GB in a 7-zip file...

fydel
Hero Member
*****
Offline Offline

Activity: 522
Merit: 500


Hasta la Bitcoin siempre!


View Profile
January 21, 2016, 06:00:59 PM
 #15

Great project. Keep up the good work, fireduck!

hamster
fireduck (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
January 21, 2016, 06:18:09 PM
 #16

Great project. Keep up the good work, fireduck!

Thanks!  I'm seeing a few more jelectrum servers running, which is great.

Bitrated user: fireduck.
MusX
Full Member
***
Offline Offline

Activity: 175
Merit: 100


View Profile
August 28, 2016, 09:52:29 PM
 #17

any chance to have dockerfile included in the project for easier deployment?

fireduck (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
August 28, 2016, 10:27:58 PM
 #18

any chance to have dockerfile included in the project for easier deployment?

Maybe.  Can you school me?  Lets assume I'm familiar with cloud hosting servers (EC2, GCE) but have never messed with docker.  Is it possible to get persistent SSD with that?  (Or some persistent storage.  An electrum server can't just run, it needs a pretty big database that takes a while to build or download.

Bitrated user: fireduck.
MusX
Full Member
***
Offline Offline

Activity: 175
Merit: 100


View Profile
August 29, 2016, 04:00:30 PM
 #19

any chance to have dockerfile included in the project for easier deployment?

Maybe.  Can you school me?  Lets assume I'm familiar with cloud hosting servers (EC2, GCE) but have never messed with docker.  Is it possible to get persistent SSD with that?  (Or some persistent storage.  An electrum server can't just run, it needs a pretty big database that takes a while to build or download.
Any persistent storage like database or wallet information would be stored in a volume (dir on host machine) that user defines while calling `docker run jelectrum --volume /home/user/electrumdb:/var/... --volume /home/user/electrumwallet:/var/...`, this isolates data from the application. Aside from that you need to write plaintext dockerfile which is basically a set of shell commands that produces environment ready to operate. Important that then need to be non-prompt commands. You don't need to start from scratch, using `FROM java...` will use build your docker image on top of another one. Good examples here: https://github.com/dockerfile/java At the end you need expose expected ports and start your app, ensure it won't be closed because when that process closes, the docker image will stop.

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!