Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap DB call to get HostInfo to local peerstore calls #73

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

cortze
Copy link
Collaborator

@cortze cortze commented Mar 22, 2024

Motivation

Making a DB query to fetch the peer info on each attestation message looks like a waste of time if that info is already accessible at the local host peerstore level.

Related links:

Description

This PR swaps fetching the whole set of HostIngo from a DB Call to a local-peerstore one

Proof of Success

Working smoothly

eth_crawler-1  | time="2024-03-22T14:39:05Z" level=info msg="summary for discovery" attnets_distribution="map[-1:23 0:1252 2:17240 3:7 4:2 64:632]" node_per_fork_distribution="map[0x6a95a1a9:19156]"
eth_crawler-1  | time="2024-03-22T14:39:05Z" level=info msg="summary for host" connected_peers=267 suported protocols="map[/eth2/beacon_chain/req/metadata/2/ssz_snappy:1 /eth2/beacon_chain/req/ping/1/ssz_snappy:1 /eth2/beacon_chain/req/status/1/ssz_snappy:1 /floodsub/1.0.0:1 /ipfs/id/1.0.0:1 /ipfs/id/push/1.0.0:1 /ipfs/ping/1.0.0:1 /libp2p/circuit/relay/0.2.0/stop:1 /meshsub/1.0.0:1 /meshsub/1.1.0:1]"
eth_crawler-1  | time="2024-03-22T14:39:05Z" level=info msg="summary for gossipsub" peers_per_topic="map[/eth2/6a95a1a9/beacon_attestation_1/ssz_snappy:13 /eth2/6a95a1a9/beacon_attestation_10/ssz_snappy:13 /eth2/6a95a1a9/beacon_attestation_11/ssz_snappy:19 /eth2/6a95a1a9/beacon_attestation_12/ssz_snappy:13 /eth2/6a95a1a9/beacon_attestation_13/ssz_snappy:12 /eth2/6a95a1a9/beacon_attestation_14/ssz_snappy:10 /eth2/6a95a1a9/beacon_attestation_15/ssz_snappy:13 /eth2/6a95a1a9/beacon_attestation_16/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_17/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_18/ssz_snappy:10 /eth2/6a95a1a9/beacon_attestation_19/ssz_snappy:11 /eth2/6a95a1a9/beacon_attestation_2/ssz_snappy:14 /eth2/6a95a1a9/beacon_attestation_20/ssz_snappy:17 /eth2/6a95a1a9/beacon_attestation_21/ssz_snappy:17 /eth2/6a95a1a9/beacon_attestation_22/ssz_snappy:17 /eth2/6a95a1a9/beacon_attestation_23/ssz_snappy:18 /eth2/6a95a1a9/beacon_attestation_24/ssz_snappy:12 /eth2/6a95a1a9/beacon_attestation_25/ssz_snappy:13 /eth2/6a95a1a9/beacon_attestation_26/ssz_snappy:13 /eth2/6a95a1a9/beacon_attestation_27/ssz_snappy:9 /eth2/6a95a1a9/beacon_attestation_28/ssz_snappy:11 /eth2/6a95a1a9/beacon_attestation_29/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_3/ssz_snappy:17 /eth2/6a95a1a9/beacon_attestation_30/ssz_snappy:15 /eth2/6a95a1a9/beacon_attestation_31/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_32/ssz_snappy:18 /eth2/6a95a1a9/beacon_attestation_33/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_34/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_35/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_36/ssz_snappy:13 /eth2/6a95a1a9/beacon_attestation_37/ssz_snappy:14 /eth2/6a95a1a9/beacon_attestation_38/ssz_snappy:15 /eth2/6a95a1a9/beacon_attestation_39/ssz_snappy:18 /eth2/6a95a1a9/beacon_attestation_4/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_40/ssz_snappy:14 /eth2/6a95a1a9/beacon_attestation_41/ssz_snappy:13 /eth2/6a95a1a9/beacon_attestation_42/ssz_snappy:19 /eth2/6a95a1a9/beacon_attestation_43/ssz_snappy:17 /eth2/6a95a1a9/beacon_attestation_44/ssz_snappy:9 /eth2/6a95a1a9/beacon_attestation_45/ssz_snappy:14 /eth2/6a95a1a9/beacon_attestation_46/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_47/ssz_snappy:17 /eth2/6a95a1a9/beacon_attestation_48/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_49/ssz_snappy:17 /eth2/6a95a1a9/beacon_attestation_5/ssz_snappy:17 /eth2/6a95a1a9/beacon_attestation_50/ssz_snappy:15 /eth2/6a95a1a9/beacon_attestation_51/ssz_snappy:13 /eth2/6a95a1a9/beacon_attestation_52/ssz_snappy:12 /eth2/6a95a1a9/beacon_attestation_53/ssz_snappy:10 /eth2/6a95a1a9/beacon_attestation_54/ssz_snappy:13 /eth2/6a95a1a9/beacon_attestation_55/ssz_snappy:13 /eth2/6a95a1a9/beacon_attestation_56/ssz_snappy:12 /eth2/6a95a1a9/beacon_attestation_57/ssz_snappy:10 /eth2/6a95a1a9/beacon_attestation_58/ssz_snappy:14 /eth2/6a95a1a9/beacon_attestation_59/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_6/ssz_snappy:14 /eth2/6a95a1a9/beacon_attestation_60/ssz_snappy:14 /eth2/6a95a1a9/beacon_attestation_61/ssz_snappy:18 /eth2/6a95a1a9/beacon_attestation_62/ssz_snappy:17 /eth2/6a95a1a9/beacon_attestation_63/ssz_snappy:16 /eth2/6a95a1a9/beacon_attestation_7/ssz_snappy:15 /eth2/6a95a1a9/beacon_attestation_8/ssz_snappy:17 /eth2/6a95a1a9/beacon_attestation_9/ssz_snappy:14 /eth2/6a95a1a9/beacon_block/ssz_snappy:207]"
eth_crawler-1  | time="2024-03-22T14:39:05Z" level=info msg="summary for local_node" local_head_slot="map[local_head_slot:8691193]"

@cortze cortze merged commit e74c3aa into master Mar 22, 2024
2 checks passed
@santi1234567 santi1234567 deleted the feat/speedup-attestation-streamings branch October 29, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant