shamirlabs / diva-alpha-net

Diva alpha testnet
https://docs.shamirlabs.org/diva/testnet/intro
19 stars 17 forks source link

goerli network connectivity: define p2p-host #82

Open ThomasBlock opened 7 months ago

ThomasBlock commented 7 months ago

Hi. Since several weeks i try to join diva network. The problem is goerli CL connectivity. I am in a datacenter, but behind a NAT. Most other networks including mainnet work fine for me. Here is what i see:

level=info msg="Node started p2p server" multiAddr="/ip4/172.19.0.12/tcp/13000/p2p/16Uiu2HAm1joKyLn6ouVahELoJAMsBaXRQw1cooCTqWFsc2iewJ1a" prefix=p2p
level=info msg="gRPC client connected to beacon node" addr="172.20.0.10:45810" prefix=rpc
level=info msg="Waiting for enough suitable peers before syncing" prefix=initial-sync required=3 suitable=2
level=info msg="Connected to new endpoint: http://geth:8551" prefix=execution
level=info msg="Peer summary" activePeers=5 inbound=0 outbound=5 prefix=p2p
level=info msg="Waiting for enough suitable peers before syncing" prefix=initial-sync required=3 suitable=0
level=info msg="Waiting for enough suitable peers before syncing" prefix=initial-sync required=3 suitable=2
...

I have forewarded port 13000. But for me the problem seems to be that only the internal docker ip ( 172.19.0.12 ) is promoted.

I know that there are the flags --p2p-host-ip in prysm and --nat extip in geth. i have tried and enter them in docker-compose.yml . But this file seems to get overitten when i update and restart diva.

So where is the right place to enter these commands? Do you have any other connection hints for me?

franjoespejo commented 7 months ago

hi @ThomasBlock , thank you for your message. It helps us to understand other environment the scripts has been designed for. To solve your issue in the short-term I would change the name of the docker compose to avoid the overwriting.

However, we will make the needed modifications in the next release to cover the issue you are describing and support kind of advanced configurations as yours. Will keep the issue open until next release where this will be addressed.

Thank you again for your message, please keep opening any issue you may find

ThomasBlock commented 7 months ago

Thank you @franjoespejo . so here is what i did:

cp docker-compose.yml docker-compose2.yml
nano .env
COMPOSE_FILE=docker-compose2.yml

nano docker-compose2.yml 
       "--nat=extip:1.2.3.4",
        "--p2p-host-ip=1.2.3.4",
        "--min-sync-peers=1",

./run.sh
update diva

but still no useful peers..

time="2024-02-07 15:11:50" level=info msg="Node started p2p server" multiAddr="/ip4/172.27.0.12/tcp/13000/p2p/16Uiu2HAmKPEbMVrC4UjhsJ1hP5UhhsxzPpnfxJGphC2prjaHfjR3" prefix=p2p
time="2024-02-07 15:11:50" level=info msg="Node started external p2p server" multiAddr="/ip4/1.2.3.4/tcp/13000/p2p/16Uiu2HAmKPEbMVrC4UjhsJ1hP5UhhsxzPpnfxJGphC2prjaHfjR3" prefix=p2p
time="2024-02-07 15:11:52" level=info msg="gRPC client connected to beacon node" addr="172.27.0.11:37586" prefix=rpc
time="2024-02-07 15:11:55" level=info msg="Waiting for enough suitable peers before syncing" prefix=initial-sync required=1 suitable=0
time="2024-02-07 15:12:04" level=info msg="Connected to new endpoint: http://geth:8551" prefix=execution
time="2024-02-07 15:12:50" level=info msg="Peer summary" activePeers=5 inbound=0 outbound=5 prefix=p2p
time="2024-02-07 15:13:50" level=info msg="Peer summary" activePeers=11 inbound=0 outbound=11 prefix=p2p
time="2024-02-07 15:14:50" level=info msg="Peer summary" activePeers=14 inbound=0 outbound=14 prefix=p2p
time="2024-02-07 15:15:50" level=info msg="Peer summary" activePeers=9 inbound=0 outbound=8 prefix=p2p

also inbound, but no data..

time="2024-02-07 15:18:46" level=info msg="Peer summary" activePeers=6 inbound=1 outbound=5 prefix=p2p
time="2024-02-07 15:19:46" level=info msg="Peer summary" activePeers=9 inbound=3 outbound=6 prefix=p2p
time="2024-02-07 15:20:46" level=info msg="Peer summary" activePeers=10 inbound=5 outbound=5 prefix=p2p
ThomasBlock commented 7 months ago

@franjoespejo - update. I guess the peers are not the problem. I realized that everytime i find the first useful peer, prysm just crashes and restarts with zero peers. Here is the problem

time="2024-02-07 15:23:08" level=info msg="Peer summary" activePeers=9 inbound=0 outbound=9 prefix=p2p
time="2024-02-07 15:23:44" level=info msg="Processing block batch of size 22 starting from  0x493bc0d1... 7558562/7567618 - estimated time remaining 2h17m12s" blocksPerSeco>
time="2024-02-07 15:23:48" level=info msg="Called new payload with optimistic block" payloadBlockHash=0x1a2d7ff9a8a6 prefix=blockchain slot=7558562
SIGILL: illegal instruction
PC=0x215949c m=5 sigcode=2
instruction bytes: 0xc5 0x7a 0x6f 0x2d 0xbc 0xe9 0xbb 0xfe 0xc5 0x7a 0x6f 0x15 0x24 0x9e 0xb9 0xfe

goroutine 320 [running]:
github.com/prysmaticlabs/gohashtree._hash(0xc0464b7080, {0xc0464b7080, 0x2, 0x2}, 0x1)
        external/com_github_prysmaticlabs_gohashtree/hash_amd64.s:1061 +0x79dc fp=0xc0153f7568 sp=0xc0153f71b8 pc=0x215949c
created by github.com/prysmaticlabs/prysm/v4/runtime.(*ServiceRegistry).StartAll in goroutine 1
        runtime/service_registry.go:46 +0xe7

goroutine 1 [chan receive, 1 minutes]:
runtime.gopark(...)
        GOROOT/src/runtime/proc.go:398
runtime.chanrecv(0xc00036c060, 0x0, 0x1)
        GOROOT/src/runtime/chan.go:583 +0x5ae fp=0xc035fc1840 sp=0xc035fc1778 pc=0x1c978ce
runtime.chanrecv1(0xc000103208?, 0xc000000004?)
        GOROOT/src/runtime/chan.go:442 +0x12 fp=0xc035fc1868 sp=0xc035fc1840 pc=0x1c972f2
github.com/prysmaticlabs/prysm/v4/beacon-chain/node.(*BeaconNode).Start(0xc0001031e0)
        beacon-chain/node/node.go:375 +0x1a8 fp=0xc035fc1a08 sp=0xc035fc1868 pc=0x3258908
.....
ThomasBlock commented 7 months ago

So i was hit by this bug which existed until 4.2.1 . 4.2.2 now solved my problem https://github.com/prysmaticlabs/prysm/issues/13485#issue-2088503706

nano docker-compose2.yml 
gcr.io/prysmaticlabs/prysm/beacon-chain:v4.2.2-rc.0