---
# System prepended metadata

title: "\n    EPF's Summary Update\n"

---

<h1>
    EPF's Summary Update
</h1>


The key aim of the project was to set up a platform to monitor and analyze the network performance of the current Ethereum network in real-time. This was achieved by setting up multiple nodes that are geographically distributed that report back to a centralized server to provide a means to visualise and interact with the data for further research purposes.

The chosen stack used to conduct the analysis was the ELK stack. This is due to being optimised for processing real-time data and coming with multiple server monitoring modules, such as metricbeat, packetbeat and filebeat.

The initial architecture design can be seen below:

<img height='75%' width='75%' src='https://daoagents.s3.amazonaws.com/Quick_ct/arc.png'>

<img height='80%' width='80%' src='https://daoagents.s3.amazonaws.com/Quick_ct/pipeline.png'>


<h2>
    What has been achieved 
</h2>

<h3>
    Elastic stack status update
</h3>

I have managed to implement the majority of the data pipelines, with the exception of <b>logstash having been replaced with Kafka</b> in later development processes. Currently, the application is effectively streaming real-time data from the three different beacon nodes as all data pipelines have been established.

Some of core components of the architecture diagram integrated include:


<!-- - Integrating Elaticsearch to the Kibana platform -->
- Configuring and setting up metricbeat, packetbeat and filebeat in each node to monitor the server log data as well as to capture metadata about the node's operations.
- Configuring and setting up Elasticsearch, Kibana, Kafka and several beacon nodes on EC2 instances.
- Building data pipelines from beacon nodes to the required destinations.
- Streaming and indexing the real-time data on  Elasticsearch to make it available for HTTP requests through the rest API.
- Integrating Elasticsearch to the Kibana platform to provide a means to interact and visualise the streamed data.
- Creating custom dashboards for users that can capture the state of the beacon node as well as the Ethereum network traffic in real-time 
- Backing up the streamed data to the S3 bucket iteratively.

<br>

The following are some of the <b>key data points</b>  being actively monitored in real-time through the dashboards (please be patient as chart may take a while to load):

<!-- The link to the dashboards: https://eth-monitor.xyz/app/dashboards -->

<b>OS metrics </b> (https://hackmd.io/@BemBaraki/H1BchYpno#System-and-service-metrics)

- RAM usage per client
- CPU usage per client
- Diskspace usage per client

Monitoring the real-time performance for each client over time:

- <i>iowait</i>: percentage of time that the CPU is idle waiting for input/output operations to complete
- <i>softirq</i>: software interuptions that get handled by the kernel
- <i>nice</i>: tasks that CPU is executing having below-normal priority
- <i>system</i>: percentage of CPU time used by the operating system kernel
- <i>user</i>: percentage of CPU time used by user-level processes





<b>Network traffic</b> (https://hackmd.io/@BemBaraki/H1BchYpno#Network-traffic-overview)
- Network traffic distribution broken down by each country
- Identifying the most popular cloud service providers being utilised by node operators in a given region
- Total packets sent and received by each client and error transaction encountered over time by each client
- Capturing the top hosts driving traffic in the Ethereum network and the number of unique connections made by each client over time
- Transport protocol used by each client and it's corresponding traffic flow over time (e.g TCP, UDP, ICMP...)



<b>Beacon node data </b> (https://hackmd.io/@BemBaraki/rys5jvzJh)


EL

- Calculating the proposer's block release time using the scheduled slot time and block arrival time in the p2p network
- Monitoring the time gap between consecutive blocks  in the p2p network broken down by each client
- The total number of pending transactions found per slot in the network (calculated iteratively)
- Monitoring block space utilisation per slot and the number of transactions being processed per slot 
- Tracking the base fee per slot


CL


- Tracking the attestation disagreement rate in real-time per slot
- Tracking the distribution of attestation inclusion delay overtime 
- Monitoring chain liveness
- Tracking the sum of the attestation vote count per slot
- Tracking the total number of depositors
- Tracking the attesting gwei in each epoch





<!-- include the chart in small -->

<h3>
    A brief report looking into local network latency and reorgs
</h3> 


As part of my developmental work on the Eth monitor project, I  conducted data analysis for over 11,600 slots to investigate network latency and reorgs. During the investigation two reorg attempts were observed and a thorough inspection was undertaken to identify the underlying causes that led to these events. During the investigation, several factors such as MEV block rewards, base fee spikes and attestation disagreement rate were tracked to check their influence on network partitions and reorgs. 

The report provides a detailed overview of the findings and includes visualizations to help better illustrate the analysis. The link for the report is provided below:

https://hackmd.io/@BemBaraki/r1D3sTZjj
<h2>
    Future Project
</h2>

Although there has been some progress made to get the Ethereum monitor project off the ground, the project is not yet finished as there is still some work to be done in relation to:
1) Building systems to <b>detect anomalies  through the use of machine learning</b>
2) Implementing logic to <b>provide real-time alerts</b> when anomalies or other suspicious activities are detected

At this stage, research is being undertaken to find the most appropriate Machine learning algorithms and architectures to be used to detect anomalies in the Ethereum network and build systems around it. One key architecture being explored is a <b> Deep Learning Auto Encoder Model</b>, which is an <b>unsupervised model</b> which does not require any human data labelling to train the model. 

Once the model is operational, it will be integrated with the <b>watcher module</b> to provide real-time alerts, for example when large network partitions or increased latency are experienced.
 
<!-- to users that wish to subscribe to the alerts. -->

<h2>
    Self Evaluation
</h2>


I found the EPF's open-ended approach to making contributions to the core protocol to be incredibly appealing due to the diverse array of project ideas available to work on. The early stages of the program enabled me to follow my interests and supplement my knowledge by completing various courses and materials such as the <a href='https://hackmd.io/@BemBaraki/ry8VYewBj'> systems engineering cadCad Ethereum validator economics </a>and  <a href='https://eth2book.info/bellatrix/'>eth2book</a>.  This proved to be very useful later on as it enabled me to quickly build context around challenges faced upon embarking on the eth-monitor project.
 

The eth-monitor project required me to solve a wide variety of technical challenges to get the project off the ground, spanning from system architecture design, devops, data engineering and data analysis. Hence, the EPF's independent self-directed approach was beneficial as it allowed me to take control of my learning experiences and tailor them to the needs of my project. This gave me the flexibility to solve challenges more creatively and also pick up complementary scripting languages along the way such as ELK's <a href='https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-painless.html'>painless language </a> and <a href='https://www.elastic.co/guide/en/kibana/current/vega.html'>vega</a>. 


I would also like to add that the standup calls also acted as a catalyst to my developmental process as they were a great opportunity to communicate the technical intricacies of my work and the progress made.  This was also an excellent time to continue to learn and expand my knowledge on the vast complexities of the Ethereum network from other fellows. Hence, I would like to thank all participants for their engaging contribuitions shared to the cohort.


Finally, I want to express my gratitude to Mario Havel and Josh Davis for their superb efforts in running the EPF amazingly and making themselves available at all times. Additionally, I would like to extend my appreciation to Fredrik Svantes, as well as the other mentors who shared their time and expertise during the AMAs and throughout the programme. Their invaluable insights and guidance have not only been informative but also inspiring, helping me to shape my character going forward.


It's been a real pleasure being part of the cohort and looking forward to the upcoming steps, thank you so much everyone!  :hugging_face: 