0

I ran the following commands to get ethereumj.starter code and run it.

%> git clone https://github.com/ether-camp/ethereumj.starter
%> cd ethereumj.starter
%> ./gradlew run

From the log file and console output, I could see that the node started up, connected to peers and was also syncing. However, in another terminal window, the output of the following command was always 0, as shown below.

%> curl -w "\n" -X GET http://localhost:8080/bestBlock
0

This was despite the log file showing transactions being received, and also having logged messages like the following, with some high block number listed as best block ....

Peer V63: [ 267c54b3,    NODE_RETRIEVING, ping     95 ms, difficulty 270944163663211043882, best block 3723188 ]: (idle 3s of 20s) Geth/v1.6.0-stable-facc47cb/windows-amd64/go1.8.1    Nodes/sec: 3681.86, miss: 0.00

Am I missing something here? Shouldn't the best block number reported by the curl command be increasing with time as the local node gets sync'ed?

1

I was able to get the ethereumj starter to work by editing the ethereumj.conf file. I found that using this file worked (after commenting out the private key):

https://gist.github.com/Glamdring/cc575d0998ecbf6c519a4d95ee5faaa3

Here is the config:

peer {
    # Network id (=1 real network)
    networkId = 3

    # Port on which ethereumj will listen
    # for incoming connections
    listen.port = 30304

    # Private key of the peer
    # The key is generated by default on the first run and stored in the database folder
    # If you have your own peer ID, specify its private key here
    #privateKey = 9feea28......

    # Test peers
    ip.list = [
        "94.242.229.4:40404",
        "94.242.229.203:30303",
        "128.199.55.137:30303",
        "52.169.94.142:30303"
    ]
}

sync.enabled = false

database {
    # place to save physical storage files
    # can be either absolute or relative path
    dir = database1
}

# Blockchain settings (constants and algorithms) which are
# not described in the genesis file (like MINIMUM_DIFFICULTY or Mining algorithm)
# The possible named presets are:
# - main : the main network (Frontier-Homestead-...)
# - ropsten: Ropsten test network
# - testnet: Ethercamp test network
# - olympic: pre-Frontier Olympic network
# For custom network settings please refer to 'blockchain.config.class'
blockchain.config.name = ropsten

# the folder resources/genesis
# contains several versions of
# genesis configuration according
# to the network the peer will run on
genesis = ropsten.json

It would be nice if EthereumJ Starter would update their config file to something that works.

  • yes, I've noticed there isn't much activity on their GitHub recently. I've had a pull request opened for 2 weeks. – Malone Nov 21 '17 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.