An open API service indexing awesome lists of open source software.

https://github.com/superthinking/basic-blockchain-in-elixir

Learning & Implementing Blockchain and its concepts
https://github.com/superthinking/basic-blockchain-in-elixir

Last synced: about 1 month ago
JSON representation

Learning & Implementing Blockchain and its concepts

Awesome Lists containing this project

README

          

Each block has the following properties:

- Height
- Timestamp
- Previous Hash
- Hash
- Data

---

Run Tests

```bash
cd ex_chain
mix test
```

---

Try Out!

```bash
cd ex_chain
iex -S mix
```

```elixir
alias ExChain.Blockchain.{Block, Blockchain}
# Initialize Blockchain
blockchain = Blockchain.new()
# Add a block to this blockchain
blockchain = Blockchain.add_block(blockchain, "Some Data")
```
___

Glossary (full list can be found [here](https://consensys.net/knowledge-base/a-blockchain-glossary-for-beginners/)):

- Genesis Block - It's the first block in any blockchain.
- Mining - The process by which blocks (or transactions) are verified and added to the blockchain.

---

Sources:

- [How to build a blockchain in elixir](https://medium.com/coinmonks/building-a-blockchain-in-elixir-part-1-4d4ed889525b)