---
# System prepended metadata

title: Final Report

---

# **Cohort 5: Final Report : Samba a Portal Node written in JAVA**


## Project abstract:

https://github.com/meldsun0/samba
[Discord channel: #samba](https://discord.com/channels/890617081744220180/1301231225276465152)

Samba is a Portal client written in Java that implements the history network sub-protocol and is focused on modularity, simplicity and extensibility surrounded by documentation and high test coverage. 
It is structured in a monorepo with a modular design, utilizing a multi-module Gradle project that includes both main modules and complementary modules. 
The core module includes the main functionality to connect with bootnodes, manage interactions and connections with other nodes using the Disv5. It also exposes JSON-RPC endpoints, handles SSZ, manages persistence, and provides basic configuration options. 
This module also includes the main data structures essential for the common operations.
We have also complementary modules:
* server-json-rpc: It encapsulate all the corresponding code for having a json-rpc server
* storage-rocks-db: It encapsulates all the corresponding code for having a rocks-db database. 
* docker: It has the necessary dockerFile for running the node in a container. 
* buildSrc and buildScripts: It has all gradle scripts needed for compiling the source code and creating a distribution package. 
* other complementary modules will be added as time goes by.

More information can be found on project's repository.

## Status Report

The current situation of Samba is a follows:
### Structure: 
* Multi-grade projects created and structured in a way to keep on adding Gradle modules as needed. 
* Docker files ready and working to run a node in a Docker container. 
* Gradle scripts ready to be used for developing, package a node distribution and running Samba in a container or locally. 
* Basic documentation. 
### P2P behaviour:
* Logic for sending and receiving Portal-Wire messages. 
    * SSZ serialization and deserialization 
    * Handling incoming messages. 	
* Connect with bootstrapping nodes.
* Discovery interaction
* Portal-Wire messages interaction:
    * Ping-Pong 
    * FindNodes-Nodes
* Portal-Wire messages interaction partially coded: 
    * FindContent-Content
    * Offer-Accept
### Storage:
* RocksDB code working and ready. 
* Implementation of Kademlia DHT
### Server-Side Behaviour:
* JSON-RPC server ready. 
* REST server ready. 
* Endpoints:
 discv5_nodeInfo, discv5_updateNodeInfo, discv5_getEnr

# Future next steps

We plan to continue working on Samba till we have it ready and passing all Hive tests. Here are the tasks we are willing to finish during December 24. Next coming tasks will be shared as time goes by:

### December 24:
* Make Samba run Hive test locally (Ready)
* Allow nodes to receive the parameters Hive is needing for running Hive tests.  (Ready)
* Finish SSZ deserialization of content received from FindContent-Content
* Finish FindContent-Content  and Offer-Accept interaction business logic that is not associated with UTP. 
* Reduce size of Docker Image and remove unnecessary or duplicate libraries. 
* Implements the following Discv5 JSON-RPC endpoints: 
    * discv5_ping
    * discv5_findNode
    * discv5_talkReq
* Implements the following Portal_History JSON-RPC endpoints:
    * portal_historyPing
    * portal_historyFindNodes
    * portal_historyAddEnr
    * portal_historyGetEnr
    * portal_historyDeleteEnr
    * portal_historyGetContent
    * portal_historyStore
* Refactor code, increase test coverage and add documentation accordingly. 
* Resolve any issues or bugs identified for passing corresponding Portal-Hive tests

## Samba running  on a docker container
![docker](https://hackmd.io/_uploads/HJPx2uYEJx.png)

## Samba running against Hive locally
![hive1](https://hackmd.io/_uploads/HkytiuYV1g.png)
![hive2](https://hackmd.io/_uploads/rkktjdYNye.png)

# General Feedback 

The EPF program has been an incredibly valuable experience, deepening my understanding of numerous Ethereum concepts and topics. At the same time, the hands-on experience I gained working on Samba was equally rewarding.

I’m truly grateful for the support from the Portal team, and I’d like to give a special thanks to Kolby, who has consistently addressed any technical challenges we've encountered.

This program also provided the opportunity to collaborate with talented developers like Derek, who is actively contributing to Samba, and connect with other fellows.

I’m extremely thankful for the EPF program and would like to extend my thanks to Mario and Josh for their hard work in making this experience possible!

