Top of local chain is empty


Hello all, I downloaded Epoch v0.23.0 and followed the instructions in the docs directory to install, configure and run it (though I didn’t use different ports for in/external, i.e. everything uses 301x, specifically 3013 for http). But even after letting Epoch run overnight, curl always returns an empty response.

The epoch_mining.log seems to indicate the miner is running ok:

2018-10-08 14:48:33.806 [info] <0.1235.0>@aec_conductor:start_mining:643 Starting mining
2018-10-08 14:48:43.137 [info] <0.1235.0>@aec_conductor:start_mining:643 Starting mining
2018-10-08 14:48:52.308 [info] <0.1235.0>@aec_conductor:start_mining:643 Starting mining

And the mean30s-generic process also runs and uses lots of CPU.

But maybe these entries from epoch.log indicate some problem?

2018-10-08 14:35:01.888 [debug] <0.1234.0>@aec_block_generator:handle_info:99 ignored event top_changed
2018-10-08 14:35:01.889 [debug] <0.1234.0>@aec_block_generator:handle_cast:70 stop_generation
2018-10-08 14:39:46.797 [debug] <0.1234.0>@aec_block_generator:handle_info:99 ignored event top_changed
2018-10-08 14:39:46.798 [debug] <0.1234.0>@aec_block_generator:handle_cast:70 stop_generation
2018-10-08 14:46:37.460 [debug] <0.1234.0>@aec_block_generator:handle_info:99 ignored event top_changed
2018-10-08 14:46:37.460 [debug] <0.1234.0>@aec_block_generator:handle_cast:70 stop_generation

This keeps going on like this…


What’s the output of curl -v
What’s the output of netstat -nltp | grep beam ?
Can you also post your epoch.yaml ?

goldmund:aenode babarr$ curl -v
*   Trying
* Connected to ( port 3013 (#0)
> GET /v2/blocks/top HTTP/1.1
> Host:
> User-Agent: curl/7.61.0
> Accept: */*
< HTTP/1.1 404 Not Found
< content-length: 0
< date: Mon, 08 Oct 2018 15:17:30 GMT
< server: Cowboy
* Connection #0 to host left intact
goldmund:aenode babarr$ 

netstat -nltp | grep beam doesn’t work because I’m on MacOs which doesn’t support -p. However maybe this helps:

goldmund:aenode babarr$ sudo lsof -n -i4TCP -P | grep LISTEN|grep beam
beam.smp  15357 babarr   35u  IPv4 0x3531eb27a9e004eb      0t0  TCP *:54370 (LISTEN)
beam.smp  15357 babarr  218u  IPv4 0x3531eb27d1887b8b      0t0  TCP *:3015 (LISTEN)
beam.smp  15357 babarr  226u  IPv4 0x3531eb27ad2a4b8b      0t0  TCP *:3013 (LISTEN)
beam.smp  15357 babarr  227u  IPv4 0x3531eb27d0b157ab      0t0  TCP (LISTEN)
beam.smp  15357 babarr  228u  IPv4 0x3531eb27ad1b4b8b      0t0  TCP (LISTEN)
beam.smp  15357 babarr  229u  IPv4 0x3531eb27c5e4d4eb      0t0  TCP *:3014 (LISTEN)
goldmund:aenode babarr$ 


    port: 3015
    external_port: 3015 

    dir: generated_keys
    password: "(hidden)"

        port: 3013 
        port: 3013

        port: 3014
        port: 3014 

    beneficiary: "ak_2CPLTqxLVXLkjuEzLJEkDYD5Cxdn3DQ5EiqpAktJg3rH7EcdCB"
    autostart: true

    persist: true
    db_path: ./my_db

(Edit show output of curl -v... instead of just curl....)


@databu I think the issue is that you’re trying to use the same ports for http internal/external and websocker internal/channel. The sync configuration is OK tho.

Please try using separate ports:

        port: 3013 
        port: 3113

        port: 3114
        port: 3014 

The default value of http.external.listen_address is
The default value of http.internal.listen_address is

So your current configuration is effectively parsed as:

        port: 3013
        port: 3113

As seen on your lsof output it creates two separate listeners. The curl request you’re sending is to which is the internal API listener, where there is no blocks/top endpoint.

If you try sending curl request to some other IP address of the same machine it should success .

The same applies for websocket configuration.


Oh, I wasn’t aware that it would listen on both external and internal ports. From this paragraph in the doc:

Please notice that, if your node is behind a firewall, you need to open a TCP port in your firewall ( sync > port parameter) and map that port to the one the node actually listens on ( sync > port parameter - the same). If the publicly available port needs to be different from the internal one, you need to set ( sync > external_port ) accordingly.

I would have thought this means that one should forward the external port on the router/firewall to the internal port on the local machine? And because it says

If the publicly available port needs to be different from the internal one

I would have thought that means that they can be the same…

Anyway, I changed my epoch.yaml as you suggested and forwarded my router’s ports 3013-3015 to my local machine’s ports 3013-3015, i.e. to epoch’s external ports, contrary to what is stated in

This worked now:

goldmund:aenode babarr$ curl

Also note that I tried setting

    port: 3115
    external_port: 3015

to be consistent with the other ports, but this made it listen only on 3115 on localhost as well as external interfaces. So the sync: external_port parameter seems to be ignored completely?


The paragraph you’re referring to is about sync ports only and it’s correct (it could be improved tho).

sync.port is the actual port used to bind the listener. However, if the node is behind a firewall/SNAT, and for some reason you cannot DNAT/open (forward) that same port - only then you need different sync.external_port option. Otherwise keep it the same.

The sync.external_port does not bind any listener, it’s only used in the sync protocol when the node own address is announced. So instead of announcing the listener port sync.port the node announces that sync.external_port, this is effectively the port where the node is reachable by other nodes in the network.

I personally find this option not so useful and as we can see a bit confusing :slight_smile:

I hope the clears the question for you.


Yes, thanks, it is clear now. I’ll see if I can get around to try and make the descriptions in clearer.