Angel \”Java\” Lopez on Blog

October 17, 2017

Blockchain: Links And Resources (95)

Filed under: Bitcoin, Blockchain, Ethereum, Links, RSK — ajlopez @ 12:06 pm

Previous Post
Next Post

Blockchain Project Ecosysteml

Bitcoin, Ethereum, Segwit 2X, Atomic Swaps, Lightning Network, and Blockchain Technology w/ Charlie Lee and Tuur Demeester

How blockchain might change payments for small businesses

India’s interest in Bitcoin and other cryptos could shake the market

Simple scheme for VISA-scale micro transactions with zk-snarks

Ethereum Developers Find Geth Bug as Hard Fork Nears

Ethereum Price Is on Target to Hit $400 in the Near Future

Ethereum Foundation Expects No Shady Business in Upcoming Fork

Stay tuned!

Angel “Java” Lopez

October 3, 2017

New Storage In Ethereum/RSK (2)

Filed under: Blockchain, Ethereum, RSK, Smart Contracts, Solidity — ajlopez @ 8:52 am

Previous Post

Having the feature of storing arbitrary data into an storage cell, we could save dynamic length values in a different way. Actually, saving an string into contract storage in the Etherem Virtual Machine is very convoluted: the string is saved in may cells, with addresses calculated via a hash (see… ).

Now, in RSK contract storage, the string could be saved in a single cell:

A single string should be saved in a single cell of variable length. This feature is not implemented, yet. This post is a proposal. I think it is possible to implement this new feature without changing the normal storage. Two things are needed: some new opcodes and a solidity (or other contract programming language) compiler that uses those new opcodes.

Even the arrays could be saved in a SINGLE cell. The cell address points to a value that describes the array (the length in the below image) and additional storage trie keys had the array values:

The internal storage trie is not limited to 32-bytes keys. It could have keys of arbitrary length.  In the above figure, the index of the array elements are appended to the array address.

Even a map of addresses to balances could be storage in that way:

To discuss in next posts: the new opcodes to implement, storage costs, new compiler output.

Stay tuned!

Angel “Java” Lopez


September 24, 2017

Building A Blockchain (16)

Previous Post

In recent months I have been busy working on the RSK project. It’s time to write about my personal blockchain projects:

Currently, the most active one is the C# project. I added one project:

in Java. The experience I gained written all this code (using test-driven design, as usual) gaves me a clear idea of what is involved when building a blockchain. Writing my own implementations gave me better understanding of the parts related to the creation of a blockchain. And now the RSK project (Java core implementation) is public, I’m free to relate this work with an existing full implementation.

The key points to be written are:

  • Entities
  • States
  • Virtual machine to run smart contracts
  • Encoders
  • Consensus
  • Validation logic
  • Inter-node communication
  • Expose node state to external applications

The base entities are:

  • Block
  • Transaction
  • Account

The states to be kept are:

  • Blockchain
  • Account state
  • Contract state

My projects are oriented to have smart contracts, a la Ethereum. One reason to have a virtual machine is be agnostic of host programming language. I think that having a way of run smart contract that is independent of the programming language used in each project, is an interesting feature. So, I should define:

  • Virtual machine opcodes
  • Transient (memory) storage
  • Persistent storage

I need encoders for blocks, transactions and account states. The encoded entities are used in the network communication, local storage, and in the hash calculation. For example, when I have to transmit a block I encoded it. And if I want to send the block to another node, I should encoded the block before transmission. And the encoded data is the basis for hash calculation.

The inter-node communication includes:

  • Message definitions
  • Message and handshake protocol
  • Peer-discovery protocol

Validation logic refers to:

  • Validation of blocks
  • Sign of transaction and its validation

Consensus logic has:

  • Selection of the next block
  • Run of the transactions, updating the accounts/contracts states

The exposure of a node state is implemented in Bitcoin and Ethereum using JSON RPC (Remote procudure call), usually exposed via http. In this way, the node can be accessed by external technologies implemented in different technologies (JavaScript blockchain ecosystems are the more popular).

Followin Ethereum ideas, one entity I implemented many times is a trie. I think my implementations are very simple and effective. I hope to be able to write in the next posts about those implementations.

Stay tuned!

Angel “Java” Lopez




September 20, 2017

Blockchain: Links And Resources (82)

Filed under: Bitcoin, Blockchain, Ethereum, Links, RSK — ajlopez @ 11:53 am

Previous Post
Next Post

Key Findings From Cambridge Cryptocurrency Study

Global Cryptocurrency Benchmarking Study

At A Major Crypto Conference, Blockchain Projects Tighten Security With Math

Blockchain: Qué es y y por qué te cambiará la vida (con ejemplos)

Barbarian Investor Show Episode 4 – Coinsilium, RSK and The Internet of Value

Cracking the Ethereum White Paper

How Blockchain Is Kickstarting the Financial Lives of Refugees

China’s ICO ban makes more sense in light of its history with fintech

Stay tuned!

Angel “Java” Lopez

September 19, 2017

Blockchain: Links And Resources (81)

Filed under: Bitcoin, Blockchain, Ethereum, RSK, Smart Contracts — ajlopez @ 11:36 am

Previous Post
Next Post

A New Blockchain App Is Poised to Radically Change How People Vote

$4,000: Bitcoin’s Price Shrugs Off China Exchange News

RSK, Allowing Technology To Reach The Masses.

Major Chinese bitcoin conference flees to Hong Kong as government cracks down on cryptocurrencies

The Economic Case for Conservative Bitcoin Development

Decentralizing Everything with Ethereum’s Vitalik Buterin

The best explainer on how blockchains will upend banking comes from an unexpected source

Ethereum will match Visa in scale in a ‘couple of years’ says founder

Stay tuned!

Angel “Java” Lopez

September 17, 2017

Learning Ethereum/RSK (3)

Filed under: Bitcoin, Blockchain, Ethereum, RSK, Smart Contracts, Solidity — ajlopez @ 4:24 pm

Previous Post

In my previous posts I commented about two Bitcoin books/resources. They are many other ones, but it is time to write about Ethereum, the basis of RSK core.

First, the main reference is the project web site:

The first read should be the white paper:

The main author is Vitalik Buterin, the project creator. See:

In the white paper, Buterin describes Bitcoin protocol and its shortcomings. Ethereum is a blockchain, but it is different in many ways. In Bitcoin, you have UTXO (Unspent Transaction Outpus). In Ethereum, you have accounts with balances. In Bitcoin, you have limited scripts. In Ethereum, there is a Virtual Machine that can run smart contracts written in different specialized programming languages (altought the most popular so far is Solidity). And you have a trie and hash root for the state of world. Each contract has its own storage, again using a trie and hashes. These additions make Ethereum a very interesting project.

A good review of the white paper is at:

Cracking the Ethereum White Paper

A fragment:

So what is Ethereum really? In my previous article, I explained that Bitcoin acts as a trusted store of and means of transmitting value. I like to think of Ethereum as a means of transmitting value but also a trusted store for complex and shared interactive information and software. Understanding it is tough, but the reward might just be worth your time.

The next read is the Yellow Paper:

Written by another Ethereum co-founder, Gavin Wood. It has a detailed descripcion of account states, blocks, uncles, RLP (Run Length Prefix) the encoding of bytes used by Ethereum, hashes, and an appendix describing the Virtual Machine opcodes and operation.

In the next posts, I will describe the differences between Bitcoin and Ethereum transactions, the state storage, for world states, and contract states, and first steps using Solidity.

Stay tuned!

Angel “Java” Lopez


August 26, 2017

Blockchain: Links And Resources (70)

Filed under: Bitcoin, Blockchain, Ethereum, Links, RSK, Smart Contracts — ajlopez @ 3:42 pm

Previous Post
Next Post

BTC vs BCH Hash rate, block tie

Why Bcash Mining Shouldn’t Affect Bitcoin Much (But Bitcoin Mining Could Ruin Bcash)

Photos: Inside one of the world’s largest bitcoin mines

Manufacturing Giant Midea Wants to Put Bitcoin Miners in Household Appliances

Bamboo compiler started producing EVM bytecode

Bamboo: a morphing smart contract language

Rootstock Etherparty Deal Will ‘Accelerate Bitcoin Smart Contract Adoption’

Blockchain Tech Will Power Future Real Estate Market

Stay tuned!

Angel “Java” Lopez

July 16, 2017

Learning Ethereum/RSK (2)

Filed under: Bitcoin, Blockchain, Ethereum, RSK — ajlopez @ 3:30 pm

Previous Post
Next Post

Before understanding in deep Ethereum and RSK projects, we must study Bitcoin, its ideas and ecosystem. Another book about Bitcoin is:

Learning Bitcoin

by Richard Caetano (blog) CEO and co-founder of Stratumn. Bitcoin and Blockchain adopter since 2011.

I read:

In this book, we will introduce Bitcoin with a hands-on approach. We will begin with a simple and easy-to-follow introduction, which includes buying and selling bitcoin. Throughout the middle, we will look into the internal workings of Bitcoin to understand how its various pieces work. Towards the end, we will explore various ways in which Bitcoin can be used as “programmable money”.

So, it’s not a book only dedicated to developers, it includes some interesting topics, like accessing Bitcoin from JavaScript tools, and a detailed description of mining process.

The author discuss:

  • Setting  up a wallet
  • Buying and selling Bitcoins
  • Protecting your Bitcoins
  • Understanding the Blockchain (a topic more related with our objetives, understand Ethereum and RSK) Transactions, blocks, keys, genesis block. He also describes attacks like the 51 percent, race, and Finney attacks.
  • Installing a Bitcoin Node
  • Understanding the Mining Process (another topic to take into account in our exploration) Proof of work, mining rewards, mining pools, setting up a mining client, connecting to a mining pool.
  • Programming Bitcoin (in Ethereum we have a new and more powerful way to add logic to our transactions, the smart contracts) using BitcoinJS, sending transactions, writing an escrow contract
  • Alternative Coins

I like the mining descriptions, the attacks presentation and programming Bitcoin from JavaScript.

More resources in the next posts.

Stay tuned!

Angel “Java” Lopez

July 11, 2017

New Month’s Resolutions: July 2017

We are in the second part of the year, a long year with interesting projects. Time to write the new month’s resolutions and review the past ones:

– Continue RskSharp [pending]
– Continue SimpleBlockchain [pending]
– Continue BlockchainSharp [complete] see repo
– Continue ChineseP [complete] see repo
– Continue TensorSharp [pending]
– Continue RSharp [complete] see repo
– Experiments with RSKJ fork [complete] see repo
– Continue Vyu [pending]
– Continue Domie [complete] see repo
– Continue Wordie [pending]

Also, I was working on:

– Start WikiExpert [complete] see repo
– Start PerProm [complete] see repo
– Start RskApi [complete] see repo
– Improve SharpGo [complete] see repo
– Improve Neurum [complete] see repo
– Improve ClojJS [complete] see repo
– Improve SimpleScraper [complete] see repo
– New Sample in SimpleGA [complete] see repo
– Start GenPrj [complete] see repo
– Start RskUtils [complete] see repo
– Start SimpleJsonRpc [complete] see repo
– Start HuskyJS [complete] see repo
– Improve Husky [complete] see repo

My new month’s resolutions:

– Continue RskSharp
– Continue SimpleBlockchain
– Continue BlockchainSharp
– Continue ChineseP
– Continue TensorSharp
– Continue RSharp
– Continue WikiExpert
– Continue SimpleGA
– Continue Neurum
– Continue HuskyJS

Stay tuned!

Angel “Java” Lopez*





July 8, 2017

Learning Ethereum/RSK (1)

Filed under: Bitcoin, Ethereum, RSK, Uncategorized — ajlopez @ 6:24 pm

Next Post

I joined the @RskSmart development team at the beginning of last year (February 2016). I was an experienced software developer, but without knowledge of Bitcoin, Ethereum, blockchains and related topics. So, I started studied a lot, to grasp the project, the objectives, the initial code, and its challenge.

In this post series, I want share with you what I learned, and comment some books/resources that could help me (I didn’t read everything but now, with my current experience, they look as something that add value).

The first thing to understand is the blockchain concept. It is the “new kid on the block” (pun intended 🙂 and it is a core concept to understand, in order to grasp Ethereum and RSK projects. The most succesful implementation of a blockchain is Bitcoin, so, as a developer, you will gain a lot of insight if you read about that project.

The main source for Bitcoin as software developers, is:

Mastering Bitcoin (second edition repo)

a masterpiece by Andreas Antonopolous (personal site)(twitter)(wikipedia page)(youtube channel)(blog)

I read:

This book is mostly intended for coders. If you can use a programming language, this book will teach you how cryptographic currencies work, how to use them, and how to develop software that works with them. The first few chapters are also suitable as an indepth introduction to bitcoin for noncoders—those trying to understand the inner workings of bitcoin and cryptocurrencies.

And I learned a lot from this book. The Bitcoin implementation of a blockchain is explained clearly, from a software developer point of view, so it is a good introduction to this new brave world. It has chapters about: How Bitcoin Works, Bitcoin CoreAddresses, Wallets, Transactions, Advanced Transactions and Scripting, Blockchain, Bitcoin Network, Mining and Consensus, Alternative Blockchains, Applications, Bitcoin Security, Bitcoin Improvement Proposals.

He is working on an new book Masrtering Ethereum, that it could be the MUST BE READ book if you want to be an Ethereum developer.

If you understand Bitcoin and its related ecosystem, you will be in a better position to manage Ethereum and @RSKSmart projects. And RSK has code that related Bitcoin network with its own.

Next posts: more books, concepts and resources

Stay tuned!

Angel “Java” Lopez


Older Posts »

Create a free website or blog at