Skip to content

Instantly share code, notes, and snippets.

@deepakraous
deepakraous / 9.md
Last active October 29, 2020 17:38
ElixirBlockchain

Elemental Blockchain in Elixir

Welcome , COVID-19 is still around, please stay safe,informed and gentle with yourself. Take a deep breath, the Mission is for the next 3 stories is to write few lines of code as possible and compose the stories using *recursive state composition technique, specifically creating to create simple State Machine!!. which we refer to as our MVP(Minimal Viable Product).

I plan to use existing code snippets as a baseline for from our storyline. Please feel free to fork your own path for stories [ 9,10,11] -12,13 where we will be gluing to conclude this series in 13. for Tranasctions.

Elixir is the language of choice along with OTP(Open Transport(e) Protocol). We will use a simple { key, value } local db to store key:value. To speed up delivery time I I am planning to use external libraries as I see fit. Please poke around @ the External Libraries in mix.exs

@deepakraous
deepakraous / bloom_filter.md
Last active May 6, 2020 07:01
Bloom FIlters spec in Yellow Paper
**Section ** Description
4.3.27 A Collection of FortNiteKeys and FortNiteTreasures
4.3.28 A Collection of winners and their loots
4.3.29 A Collection of FortNiteKeys and FortNiteTreasures
4.3.30 Modulus of 2048
@deepakraous
deepakraous / yp_notations-3.md
Last active August 2, 2018 21:22
Section 4.1 of yp Global State
Sec Formal Spec Function Explanation
4.1 σ[a]n State:address:nonce Number of transactions initiated by this address, or no of contracts created by this address
σ[a]b Balance Has the balance of the account in Wei
σ[a]s Storage Root Hash of the Storage root
(6) Π(σ, B) ≡ Ω(B, Υ(Υ(σ, T0), T1)...) Mining Block Level StateTransition Function is defined as Block Finalization State Transition Function along with this Block and Ethereum State Changes with Current state and Transaction.
(7) l(x) ≡ x[║x║− 1] Evaluate until n.. Evaluates until the last item from a list of items
@deepakraous
deepakraous / ethereum_internals_intro.md
Last active June 18, 2019 05:13
Copy the gist and add it to medium for the Intro.

This episode assumes that you have gone through Part-1 through four of this series, if you have not done so please do and If you are coming in from Part-4 and expecting to read about Patricia Merkle Trie in this episode I am so sorry to disappoint you a couple of episodes will be some abstract concepts, but I do feel that these concepts are important to understand and digest and in the later episodes we will be talking about Patricia Merkle Trie.

@deepakraous
deepakraous / fortnite_rule-1.md
Last active August 2, 2018 00:21
Place where we dump all of our rules into a single place. Helps to describe Ethereum
Rules Description
FortniteUniverse A Collection of FortNiteKeys and FortNiteTreasures
FortniteState A Collection of winners and their loots
@deepakraous
deepakraous / fortniteuniverse.md
Last active July 31, 2018 04:58
Describe Ethereum using Fortnite

 FortNiteUniverse  = {FortNiteKeys, FortNiteTreasures}
 FortNiteKeys      = {{RR,AA,HH,PP… }, {DD,RR,FF,… } }
 FortNiteTreasures = {"MOISTY MIRE", "IAMINA CULT"}

@deepakraous
deepakraous / yp_notations-2.md
Last active August 1, 2018 22:46
YP section 4,5
Section Formal Spec Function Explanation
4.1 σ[a]n State:address:nonce Number of transactions initiated by this address, or no of contracts created by this address
σ[a]b Balance Has the balance of the account in Wei
σ[a]s Storage Root Hash of the Storage root
(4) Π(σ, B) ≡ Ω(B, Υ(Υ(σ, T0), T1)...) Mining Block Level StateTransition Function is defined as Block Finalization State Transition Function along with this Block and Ethereum State Changes with Current state and Transaction.
5 (5) l(x) ≡ x[║x║− 1] Evaluate until n.. Evaluates until the last item from a list of items
@deepakraous
deepakraous / recap-1.md
Last active January 13, 2022 13:03
Recap Part[1-6] of Medium Post

Introduction

  • Ethereum is a world computer.
  • Ethereum is a combination of A Singular World State+ A Virtual Machine.
  • World State is a collection of all States.
  • A State is a collection of Blocks.
  • The World State is stored as a Patricia Merkle Trie as per Recursive Length Prefix(RLP) spec in a mini Database.
  • Only a Virtual Machine can add a new State.
  • The Virtual Machine needs fuel to execute instructions and the fuel is ‘Ether’ to prevent rogue actions.
@deepakraous
deepakraous / trie.ex
Created July 17, 2018 21:50
Skeleton implementation of basic trie
@trie_map %{96781234 => ["/", [0], [-99999] ] }
@characters ""
def add(trie \\@trie_map, items) do
splitter = split(trie,items)
end
def split(trie,items) do
splitted_items = items |>String.split( "", trim: true)
@deepakraous
deepakraous / scratch.md
Last active July 6, 2020 03:57
scratchpad for testing

!Alt text