Ethereum under the hood- Part 5 ( Fortniting Ethereum).
Tags: fortnite, cryptocurrency, ethereum
Published: 2021-03-10 13:37:09

---
title: Ethereum under the hood- Part 5 ( Fortniting Ethereum).
published: true
date: 2021-03-09 05:15:02 UTC
tags: fortnite,cryptocurrency,ethereum
canonical_url: https://medium.com/coinmonks/ethereum-under-the-hood-part-5-fortniting-ethereum-4f0851f22673
---

 **Update: Grammer fix**

This episode assumes that you have gone through Part-1, Part-2, Part -3, Part-4 of this series, if you have not done so please do. If you are coming in from Part-4 and expecting to read about **Patricia Merkle Trie** in this episode there some concepts to digest and in the later chapters we will be talking about **Patricia Merkle Trie** and **some latest developments in the Ethereum world.**

_Disclaimer: I don’t work for Epic Games or have coded anything on Fortnite, and also I am not an expert gamer, love games._

_Tip: if you have not read Part-1 through 4, I got a sweetener for you; scroll down to_ [**_Appendix-A_**](https://gist.github.com/deepakraous/d35635acc6d645494dba7203f1b525b5)_to get a bite-size recap._

1. **Keys and Values.**
2. **What Next?:**

Before we get deeper into the weeds on what’s going on under the hood though I can express some of the concepts which I think will be useful as we cruise along. Some of these concepts can be abstract; I will try to explain with some real-life examples; we then will glue them all together into a sweet ethereum pie. The idea is not to master each one of these topics but to get a sense of a tiny bit of understanding.

#### Keys and Values :

We start with **Keys(_k)_**_,_ and **Values(_v)_**_._ You will find this throughout the different papers of Ethereum. You can think of them as a [**Tup**](https://en.wikipedia.org/wiki/Tuple) **le,** and they represented as **{k, v}**.

A **key** is like a secret treasure map which you have **earned** to get to the Loot. But wait you don’t have the whole route, you have just had a **specific** direction to which you can follow to get to the loot, ponder on that for a while.

I am going to one use a [**fortnite**](https://fortnite.gamepedia.com/Fortnite_Wiki) map below and in our all of the root to reach to **Moisty Mire** where my loot is going to be, and let’s imagine you are going to be dropped off at the Starting Point of your Treasure Map. One more thing to add, in our **FortNiteUniverse** we make our own rules, like the one below:

[FortNiteUniverse: Rules](https://gist.github.com/deepakraous/586adc5abf253b731b78eece84586abe)

_note: I am going to add these fortnite rules in the_ [_GitHub gist_](https://gist.github.com/deepakraous/586adc5abf253b731b78eece84586abe) _as we move along._

![](https://cdn-images-1.medium.com/max/1024/1*1rDAVKFtQWYfQ3iZ5sEifg.png)<figcaption>Source:<a href="http://fortnite.wikia.com/wiki/Moisty_Mire?file=Moisty_mire.png">http://fortnite.wikia.com/wiki/Moisty_Mire?file=Moisty_mire.png</a></figcaption>

Let’s **list** all of the Places on the map with some **order.** Now pause and think before ordering those places. I am going to list them as something like what you see below:

{Junk Junction, Anarchy Acres,Haunted Hills, Pleasant Park,....}

So I ordered them by the most challenging way of getting to “ **MOISTY MIRE”** and let us add now let’s create a new rule here and use the two digits of the places(k) in the Map, e.g., **Haunted Hills** is going to be “ **HH** ”

{ **{ RR,AA,HH,PP… }** , **“MOISTY MIRE”** }, hence **{Key, Value}**

Now Imagine that there is much such hidden loot(s) like the one I call **“IAMINA CULT”** and you have another Map which you just  **earned**.

{ {DD,RR,FF,… }, “IAMINA CULT” }

So let’s play another game, imagine adding all those Key(s) in one big bucket which we call **FortNiteKeys** and Value(s) and in another called FortNiteValues and the FortNiteUniverse is a collection of Keys and Values which we can represent the **FortNiteUniverse,**  **FortNiteKeys** , **FortNiteTreasures** formally as:

FortNiteUniverse Data Structure

#### What Next?:

I laid In the next episode we will create a lot of **rules** and will add one specific law called for a **short cut** for all those pesky **FortNiteKeys** and **FortNiteTreasures,** and we will call this [**Hashing**](https://medium.com/@derao512/ethereum-under-the-hood-part-6-hashing-31077c7659ca) **.** Till then, keep on learning.

**References:**

[(key,value) pair in account storage and corresponding modified Merkle patricia tree](https://ethereum.stackexchange.com/questions/40069/key-value-pair-in-account-storage-and-corresponding-modified-merkle-patricia-t)

### APPENDIX- A

[Source](https://gist.github.com/deepakraous/d35635acc6d645494dba7203f1b525b5): recap-1.md

* * *