• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Electrum Dark

It's almost ready. The "Coins in Database" is still reporting wrong. We'll definitely need some heavy duty servers if using the maximum pruning size of 1k but I believe we should be able to run this on a MN if it's set to the default of 100.
 
It's almost ready. The "Coins in Database" is still reporting wrong. We'll definitely need some heavy duty servers if using the maximum pruning size of 1k but I believe we should be able to run this on a MN if it's set to the default of 100.

Quoting myself ;)

The server shouldn't even need the subsidy function since it should be pulling it from the daemon directly. I'm still not sure why it's reporting wrong. All of it can be accomplished by polling the daemon.

Bash:
pooloperator@drkServ:~$ darkcoind getblockhash 2
00000bafcc571ece7c5c436f887547ef41b574e10ef7cc6937873a74ef1efeae
pooloperator@drkServ:~$ darkcoind getblock 00000bafcc571ece7c5c436f887547ef41b574e10ef7cc6937873a74ef1efeae
{
    "hash" : "00000bafcc571ece7c5c436f887547ef41b574e10ef7cc6937873a74ef1efeae",
    "confirmations" : 220105,
    "size" : 186,
    "height" : 2,
    "version" : 2,
    "merkleroot" : "3b3a97ceb0032ca5067164f946cb9ad66933dd5663d4d46ae1401c2337d3dc4b",
    "tx" : [
        "3b3a97ceb0032ca5067164f946cb9ad66933dd5663d4d46ae1401c2337d3dc4b"
    ],
    "time" : 1390103686,
    "nonce" : 119543,
    "bits" : "1e0ffff0",
    "difficulty" : 0.00024414,
    "chainwork" : "0000000000000000000000000000000000000000000000000000000000300030",
    "previousblockhash" : "000007d91d1254d60e2dd1ae580383070a4ddffa4c64c2eeb4a2f9ecc0414343",
    "nextblockhash" : "00000269705556d97bc6d2e1a02c9b9031b2415192ed1ef820f384ce0d8de0ff"
}
pooloperator@drkServ:~$ darkcoind getrawtransaction 3b3a97ceb0032ca5067164f946cb9ad66933dd5663d4d46ae1401c2337d3dc4b 1
{
    "hex" : "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0a520101062f503253482fffffffff0100743ba40b00000023210378ea8190b2310c1e655c16cefd82fe3b9aa7e31b61d334e664034c51d20ac65cac00000000",
    "txid" : "3b3a97ceb0032ca5067164f946cb9ad66933dd5663d4d46ae1401c2337d3dc4b",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "coinbase" : "520101062f503253482f",
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 500.00000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "0378ea8190b2310c1e655c16cefd82fe3b9aa7e31b61d334e664034c51d20ac65c OP_CHECKSIG",
                "hex" : "210378ea8190b2310c1e655c16cefd82fe3b9aa7e31b61d334e664034c51d20ac65cac",
                "reqSigs" : 1,
                "type" : "pubkey",
                "addresses" : [
                    "XbmPwcZCdaRMa4m4JedspBPkUqY1FKRhsX"
                ]
            }
        }
    ],
    "blockhash" : "00000bafcc571ece7c5c436f887547ef41b574e10ef7cc6937873a74ef1efeae",
    "confirmations" : 220105,
    "time" : 1390103686,
    "blocktime" : 1390103686
}

As can be seen one transaction in block two which was the coinbase transaction with a value of 500. "Coins in Database" should be reporting 1000 at height 3.
 
ELM4ever i get :
Code:
error: file '/home/vertoe/git/electrum-drk-server/run_electrum_drk_server' does not exist.

after running setup.py install. renaming the file runs me into even more issues:
Code:
vertoe ~/git/electrum-drk-server $ sudo python2 setup.py install
running install
running bdist_egg
running egg_info
writing requirements to electrum_drk_server.egg-info/requires.txt
writing electrum_drk_server.egg-info/PKG-INFO
writing top-level names to electrum_drk_server.egg-info/top_level.txt
writing dependency_links to electrum_drk_server.egg-info/dependency_links.txt
reading manifest file 'electrum_drk_server.egg-info/SOURCES.txt'
writing manifest file 'electrum_drk_server.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/electrum-drk-server to 755
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/run_electrum_drk_server to 755
copying electrum_drk_server.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying electrum_drk_server.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying electrum_drk_server.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying electrum_drk_server.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying electrum_drk_server.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
Traceback (most recent call last):
  File "setup.py", line 30, in <module>
  long_description="""Server for the Electrum Lightweight Darkcoin Wallet"""
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
  dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
  self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
  cmd_obj.run()
  File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 67, in run
  self.do_egg_install()
  File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install
  self.run_command('bdist_egg')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
  self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
  cmd_obj.run()
  File "/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 209, in run
  os.path.join(archive_root, 'EGG-INFO'), self.zip_safe()
  File "/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 245, in zip_safe
  return analyze_egg(self.bdist_dir, self.stubs)
  File "/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 355, in analyze_egg
  safe = scan_module(egg_dir, base, name, stubs) and safe
  File "/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 392, in scan_module
  code = marshal.load(f)
ValueError: bad marshal data (unknown type code)
 
Nevermind, just had to remove my ./build directory and start again.

But now I get:

Code:
vertoe ~/git/electrum-drk-server $ electrum-drk-server start
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
Traceback (most recent call last):
  File "/usr/bin/run_electrum_drk_server", line 4, in <module>
  __import__('pkg_resources').run_script('electrum-drk-server==0.9', 'run_electrum_drk_server')
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 698, in run_script
  self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1623, in run_script
  exec(script_code, namespace, namespace)
  File "/usr/lib/python2.7/site-packages/electrum_drk_server-0.9-py2.7.egg/EGG-INFO/scripts/run_electrum_drk_server", line 34, in <module>
   
ImportError: No module named electrumserver
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
Starting server as daemon
nohup: ignoring input and appending output to ‘nohup.out’

It feels like I'm the first one trying to run this, so many errors. Is the module name electrumdrkserver?
 
Ok renaming to electrumdrkserver worked. Now next issue:

Code:
vertoe ~/git/electrum-drk-server $ run_electrum_drk_server
Traceback (most recent call last):
  File "/usr/bin/run_electrum_drk_server", line 4, in <module>
  __import__('pkg_resources').run_script('electrum-drk-server==0.9', 'run_electrum_drk_server')
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 698, in run_script
  self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1623, in run_script
  exec(script_code, namespace, namespace)
  File "/usr/lib/python2.7/site-packages/electrum_drk_server-0.9-py2.7.egg/EGG-INFO/scripts/run_electrum_drk_server", line 216, in <module>
   
  File "/usr/lib/python2.7/site-packages/electrum_drk_server-0.9-py2.7.egg/EGG-INFO/scripts/run_electrum_drk_server", line 69, in setup_network_params
   
AttributeError: 'NoneType' object has no attribute 'get'

going to stop here. Cant get this working for now.
 
Sorry guys,
1. It was late last night, and I forgot to include run_electrum_drk_server.py in the pull request.
2. Make sure that you put capital letter "D" on "Darkcoin_main" in your config file for the network - last line of the file (Vertoe - your latest problem) - Propulsions had is network.py file different then mine. I have updated the pull request.
3. I started a new UTXO database again this morning, and the coinbase still reads correct. Do you still have a problem Propulsion?

EDITED
 
Last edited by a moderator:
It's almost ready. The "Coins in Database" is still reporting wrong. We'll definitely need some heavy duty servers if using the maximum pruning size of 1k but I believe we should be able to run this on a MN if it's set to the default of 100.
Why? There are only a few MB difference in size between the 100 and 10000 pruning. I am always running 10000 on my Electrum servers (BTC, LTC, ...) - 8 GB RAM AMD Quad core 4300 with Linux - not a high end computer... Regardless of pruning size, it still takes 8 hours to generate the UTXO - might as well use 10k
 
Last edited by a moderator:
Cool, will try again tomorrow. Got an dedicated i7 with 8 cores and 16gb ram available. should be okay for 10k pruning.
 
Darkcoin_test is what we need. Testnet has a different genesis block, is that an issue?

And where are private key versions defined?
 
all right, testnet server running

Code:
[15/02/2015-00:04:28] initializing database
[15/02/2015-00:04:28] UTXO tree root hash: 5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456
[15/02/2015-00:04:28] Coins in database: 0
[15/02/2015-00:04:28] catching up missing headers: -1 0
[15/02/2015-00:04:28] headers file: 0
[15/02/2015-00:04:28] SSL server started on 127.0.0.1:50002
[15/02/2015-00:04:28] TCP server started on 127.0.0.1:50001
[15/02/2015-00:04:28] HTTP server started.
[15/02/2015-00:04:28] HTTPS server started.
[15/02/2015-00:04:41] catch_up: block 1000 (6.819s 5.612s) 3dce7139a493597769528e95cb724d66deab8be8669f3f44be0b75b87da58b92
[15/02/2015-00:05:00] catch_up: block 2000 (6.700s 12.664s) 8fe3af4cf57355087d7cfd86898979fcfe9e66b1b052fde6a487bf3b3a8c70c0
[15/02/2015-00:07:06] catch_up: block 3000 (7.484s 117.871s) d816669cbb6ff3847cb746fe8fd1d9dce057d451487d44456c264547cd6c5b89
[15/02/2015-00:07:27] catch_up: block 4000 (6.756s 14.804s) 406b179f12ceb11e3aae4019d575adeb5785beaa305be140e11a9ebb3b64705c
[15/02/2015-00:07:48] catch_up: block 5000 (6.798s 13.782s) 2d87eee3c561218cbace1057950f7d5c86c08a378b9341c8efb0964e589e76c9
[15/02/2015-00:07:51] Blockchain is up to date.
[15/02/2015-00:07:51] Memory pool initialized.
[15/02/2015-00:07:51] blockchain: 5112 (0.005s)
[15/02/2015-00:07:51] darkcoind is responding

descartes.darkco.in
 
To be fixed on main client:

error: file '/home/vertoe/opt/electrum-drk/electrum_drk' does not exist
error: can't copy 'electrum_drk.desktop': doesn't exist or not a regular file

and
from electrum.util import print_msg, print_error, print_stderr, print_json, set_verbosity, InvalidPassword
ImportError: cannot import name print_stderr

let me guess, electrum_drk?
 
vertoe ~/opt/electrum-drk $ electrum_drk
Error: Could not import icons_rc.py, please generate it with: 'pyrcc4 icons.qrc -o gui/qt/icons_rc.py'
vertoe ~/opt/electrum-drk $ pyrcc4 icons.qrc -o gui/qt/icons_rc.py
vertoe ~/opt/electrum-drk $ electrum_drk
Error: Could not import icons_rc.py, please generate it with: 'pyrcc4 icons.qrc -o gui/qt/icons_rc.py'

meh, did you even test this? it's a mess in the current state.
 
Back
Top