migalabs / armiarma

Armiarma is a Libp2p open-network crawler with a current focus on Ethereum's CL network
https://monitoreth.io
MIT License
36 stars 13 forks source link

peer connections can't be kept #51

Closed srt180 closed 1 year ago

srt180 commented 1 year ago

I read a paper about armiarma, It showed the total of time connected with each peer, the connected time can reach 1k minutes. And I want to run my crawler as well. But I find the tcp connections between peers discovered can't be kept for minutes or even 10s. Here's my config file for eth2 options:

{
    "IP": "0.0.0.0", 
    "TcpPort": 9020,
    "UdpPort": 9020,
    "TopicArray": [],
    "Network": "mainnet",
    "Eth2Endpoint": "",
    "DBEndpoint": "postgresql://user:password@localhost:5432/armiarmadb",
    "OutputPath": "./peerstore",
    "ForkDigest": "4a26c58b",
    "UserAgent": "BSC-Eth2-Crawler",
    "LogLevel": "info",
    "PrivateKey": "",
    "BootNodesFile": "./bootstrap_nodes/bootnodes_mainnet.json"
}

Any ideas? Thanks.

cortze commented 1 year ago

Hey @srt180 , thanks for reaching out!

I'm afraid that the version in master keeps a no-longer working BeaconState RPC method, which must be sent whenever we establish a connection with any Eth CL network. So it's expected that you can't keep too many stable connections.

I'll go ahead and upgrade the dependencies and the code base (with new features) over the following weeks, so stay tuned to run the new version.

srt180 commented 1 year ago

Great! I fixed my own issue by borrowing some code from prysm and happy to try the new version of armiarma.