Skip to content

Instantly share code, notes, and snippets.

@blacktemplar
blacktemplar / extract-gossip-penalty-statistics.py
Last active December 7, 2020 23:09
Lighthouse script for extracting gossipsub penalty statistics
#!/bin/env python3
# This script analyses lighthouse beacon node's log files.
# To work the beacon node has to run with DEBUG level libp2p and lighthouse logs, i.e.
# `RUST_LOG="libp2p_gossipsub=debug" lighthouse -l bn --debug-level debug ...`.
#
# The script accepts four optional positional arguments:
# First argument: The path to the log file to analyze (default "lighthouse.log")
# Second argument: The path where the grepped files will get stored. (default ".")
# Third argument: The command to use for grepping. (default "grep")