uranther

uranther

The Blockchain (distributed ledger technology)

What do you all think about writing a blockchain in Elixir? Being a functional language and having OTP in our arsenal, it seems it would be easier to get a block chain up-and-running quickly. We even have some good starting points for the consensus algorithm and hash trees:

:024: :lol:

Blockchain resources

Elixir community effort

Background

Videos

Topical

General

Bitcoin

Ethereum

Books

White Papers

Benchmarks

These projects are in active (rapid!) development and in a variety of languages.

Academic Papers

Specific implementations

Meta-analysis

Distributed consensus

Proofs of “X”

Various methods of using blockchain technologies to prove something in a way that is cryptographically verifiable.

FOR CRYPTOCURRENCY
OTHER PROOFS

Blockchain components

Distributed consensus algorithms

A fundamental problem in distributed computing and multi-agent systems is to achieve overall system reliability in the presence of a number of faulty processes. This often requires processes to agree on some data value that is needed during computation. Examples of applications of consensus include whether to commit a transaction to a database, agreeing on the identity of a leader, state machine replication, and atomic broadcasts. (Wikipedia)

  • raftex - Raft consensus
  • expaxos - Paxos consensus
  • rafute - Another implementation of Raft
  • dike - Paxos implementation in Erlang

Merkle (hash) trees

A hash tree or Merkle tree is a tree in which every non-leaf node is labelled with the hash of the labels or values (in case of leaves) of its child nodes. Hash trees are useful because they allow efficient and secure verification of the contents of large data structures. Hash trees are a generalization of hash lists and hash chains. (Wikipedia)

Elixir

Erlang

Cryptography

Elixir

  • elixir-rsa - Erlang public_key cryptography wrapper
  • elixir-ecc - elliptic curve cryptography
  • elixir-mcrypt - NIF wrapper around libmcrypt
  • cryptex - library for encrypting/decrypting, signing/verifying data

Erlang

Keywords: state machine replication, distributed cryptographic ledger, transaction log

Most Liked

aesedepece

aesedepece

Hi everyone,

Good news for you: there’s already at least one successfully funded open source Elixir project in the blockchain space.

We are Stampery, a startup leveraging the power of the bitcoin and ethereum blockchains to create immutable proof of existence, integrity and ownership of any kind of data set.

In fact, we have been part of the last batch of the aforementioned Boost accelerator. I am pretty sure @IamCharlesHan knows my colleges Luis, Daniele and of course Tomasso and his celebrated cooking skills.

Stampery was funded with $600K from Draper & Associates, Blockchain Capital and Di-Ann Eisnor in 2015 Q3, shortly after presenting at TechCrunch Disrupt SF.

We used Elixir to build our distributed blockchain data anchoring architecture, best known as BTA. It allows us to embed as many data as we want in a single bitcoin or ethereum TX.

We are open sourcing our whole stack these days. We started by publishing our binary merkle tree Elixir implementation, which as @uranther mentioned is crucial for any blockchain project you may want to start out:

We will continue releasing the source code for more components of our stack in the next weeks, including the bitcoin and ethereum raw transaction composer modules.

Of course I will be more than happy to contribute to this exchain initiative. I’m aesedepece at Github.

Let’s see what we can come up with!

uranther

uranther

Looking at the architectural diagram of Hyperledger, I tried to figure which modules would be suited to Elixir (highlighted yellow in the image) and which to Rust or the like (highlighted red). It seems Elixir could handle a large portion of these services, while leaving computation- and memory-intensive chaincode services to a faster computing language. That fast language could be Haskell or even Futhark. I wonder how juno compares to Ethcore Parity in chaincode/smart contract speed.

Maybe the ledger storage could be handled with Riak or a NewSQL database like VoltDB or CockroachDB? The event stream could be exposed through a WebSocket. Any other thoughts?

So a possible way forward is to build out Elixir services which replace those in Hyperledger. The idea being that we can write correct distributed systems code with fewer SLOC and which is easier to understand and reason about.


@aesedepece That’s awesome you are using Elixir for this exact purpose! I look forward to seeing more open source libraries released from Stampery. I am especially interested in these five types of proofs you provide:

  • Proof of Ownership
  • Proof of Existence
  • Proof of Integrity
  • Proof of Agreement
  • Proof of Receipt

I have some other feedback about the website and copy, but it doesn’t really fit in this thread :wink:

robinmonjo

robinmonjo

Hello all,

I made a “naive” blockchain in Elixir, inspired by existing implementations in JS and Haskell (links in the readme). I made this for educational purpose to improve my Elixir skills but this might (hopefully) be a good starting point.

https://github.com/robinmonjo/blockchain

Any feedbacks/contributions are welcome and you can let me know what you think here.

Regards,
Robin

Where Next?

Popular in Wikis Top

ibgib
Popular Elixir Packages List of popular Atom.io Elixir Packages. These can be installed via atom’s package center or a command line with ...
New
nicbet
Introduction Now that the language is picking up support and maturing nicely, I’d like to start a collection of common and recurring Elix...
New
swelham
Introduction After some discussion with a few other members we thought it might be an idea to start a thread where we can post about libr...
New
shavit
To transcode the video there is FFMPEG. On Demand When a user uploads a video, the app renames and copy the file to a path, then call F...
New
OvermindDL1
It was stated at elixir-lang.org blocked in Russia · Issue #6172 · elixir-lang/elixir · GitHub that Mirrors of the primary Elixir website...
New
AstonJ
I’ve noticed we’ve got a few now - wonder if we can compile a list? This is a wiki - anyone at Trust Level 1 can edit :023: Link: http...
New
anildigital
Here is list of plugins for different editors Sublime Text 3 — Elixir.tmbundle - GitHub - elixir-editors/elixir-tmbundle: A TextMate a...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
gmile
:httpc HTTP client is part of Erlang standard library, and as such can be easily used in Elixir code too. One particular advantage of usi...
New
Rich_Morin
I’d like to start a discussion of data serialization formats, in the context of Elixir. The rest of this note is a combination of persona...
New

Other popular topics Top

grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52774 488
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement