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
https://medium.com/@josh_nussbaum/blockchain-project-ecosystem-8940ababaf27

Bitcoin, Ethereum, Segwit 2X, Atomic Swaps, Lightning Network, and Blockchain Technology w/ Charlie Lee and Tuur Demeester
https://overcast.fm/+I6zHxIJu8

How blockchain might change payments for small businesses
https://www.applancer.co/blog/how-blockchain-might-change-payments-for-small-businesses

India’s interest in Bitcoin and other cryptos could shake the market
https://www.applancer.co/blog/india-interest-in-bitcoin-and-other-cryptos-could-shake-the-market

Simple scheme for VISA-scale micro transactions with zk-snarks
https://www.reddit.com/r/ethereum/comments/767o9p/simple_scheme_for_visascale_micro_transactions/

Ethereum Developers Find Geth Bug as Hard Fork Nears
https://www.coindesk.com/ethereums-geth-client-finds-vulnerability-less-two-days-before-fork/

Ethereum Price Is on Target to Hit $400 in the Near Future
https://themerkle.com/ethereum-price-is-on-target-to-hit-400-in-the-near-future/

Ethereum Foundation Expects No Shady Business in Upcoming Fork
https://hacked.com/ethereum-foundation-expects-no-shady-business-upcoming-fork/

Stay tuned!

Angel “Java” Lopez
https://github.com/ajlopez
http://www.ajlopez.com
http://twitter.com/ajlopez

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
https://github.com/ajlopez
http://www.ajlopez.com
https://twitter.com/ajlopez

 

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:

https://github.com/ajlopez/BlockchainSharp
https://github.com/ajlopez/SimpleBlockchain
https://github.com/ajlopez/RskSharp

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

https://github.com/ajlopez/BlockchainJ

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
https://github.com/ajlopez
http://www.ajlopez.com
http://twitter.com/ajlopez

 

 

 

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
https://cointelegraph.com/news/key-findings-from-cambridge-cryptocurrency-study

Global Cryptocurrency Benchmarking Study
https://cointelegraph.com/storage/uploads/view/2017-global-cryptocurrency-benchmarking-study.pdf

At A Major Crypto Conference, Blockchain Projects Tighten Security With Math
https://www.forbes.com/sites/amycastor/2017/08/23/at-crypto-2017-blockchain-presentations-focus-on-proofs-not-concepts/#665417657b70

Blockchain: Qué es y y por qué te cambiará la vida (con ejemplos)
https://www.internautas.org/html/9767.html

Barbarian Investor Show Episode 4 – Coinsilium, RSK and The Internet of Value
https://www.youtube.com/watch?time_continue=3&v=h6v2w4reg_E

Cracking the Ethereum White Paper
https://medium.com/@FolusoOgunlana/cracking-the-ethereum-white-paper-e0e60c44126

How Blockchain Is Kickstarting the Financial Lives of Refugees
https://www.technologyreview.com/s/608764/how-blockchain-is-kickstarting-the-financial-lives-of-refugees/

China’s ICO ban makes more sense in light of its history with fintech
https://techcrunch.com/2017/09/12/chinas-ico-ban-makes-more-sense-in-light-of-its-history-with-fintech/

Stay tuned!

Angel “Java” Lopez
https://github.com/ajlopez
http://www.ajlopez.com
http://twitter.com/ajlopez

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
https://futurism.com/a-new-blockchain-app-is-poised-to-radically-change-how-people-vote/

$4,000: Bitcoin’s Price Shrugs Off China Exchange News
https://www.coindesk.com/bitcoin-price-recovers-from-china-news-to-hit-4000/

RSK, Allowing Technology To Reach The Masses.
http://media.rsk.co/rsk-allowing-technology-to-reach-the-masses/

Major Chinese bitcoin conference flees to Hong Kong as government cracks down on cryptocurrencies
https://www.cnbc.com/2017/09/18/cryptocurrencies-major-bitcoin-conference-flees-as-china-cracks-down.html

The Economic Case for Conservative Bitcoin Development
https://www.coindesk.com/economic-case-conservative-bitcoin-development/

Decentralizing Everything with Ethereum’s Vitalik Buterin
https://techcrunch.com/video/decentralizing-everything-with-ethereums-vitalik-buterin/59c01b739e451049f87f8c18/

The best explainer on how blockchains will upend banking comes from an unexpected source
https://qz.com/1080044/bis-says-central-bank-cryptocurrencies-could-be-a-good-idea/

Ethereum will match Visa in scale in a ‘couple of years’ says founder
https://techcrunch.com/2017/09/18/ethereum-will-replace-visa-in-a-couple-of-years-says-founder/

Stay tuned!

Angel “Java” Lopez
https://github.com/ajlopez
http://www.ajlopez.com
http://twitter.com/ajlopez

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:

http://ethereum.org/

The first read should be the white paper:

https://github.com/ethereum/wiki/wiki/White-Paper

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

https://en.wikipedia.org/wiki/Vitalik_Buterin
https://twitter.com/VitalikButerin
https://medium.com/@VitalikButerin

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:

https://github.com/ethereum/yellowpaper
http://yellowpaper.io/

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
http://www.ajlopez.com
http://twitter.com/ajlopez

 

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
http://fork.lol/pow/hashrateabs
http://fork.lol/blocks/time

Why Bcash Mining Shouldn’t Affect Bitcoin Much (But Bitcoin Mining Could Ruin Bcash)
https://bitcoinmagazine.com/articles/why-bcash-mining-shouldnt-affect-bitcoin-much-bitcoin-mining-could-ruin-bcash/

Photos: Inside one of the world’s largest bitcoin mines
https://qz.com/1055126/photos-china-has-one-of-worlds-largest-bitcoin-mines/

Manufacturing Giant Midea Wants to Put Bitcoin Miners in Household Appliances
https://www.coindesk.com/manufacturing-giant-midea-wants-to-put-bitcoin-miners-in-household-appliances/

Bamboo compiler started producing EVM bytecode
https://medium.com/@pirapira/bamboo-compiler-started-producing-evm-bytecode-6a55e4633de9

Bamboo: a morphing smart contract language
https://github.com/pirapira/bamboo

Rootstock Etherparty Deal Will ‘Accelerate Bitcoin Smart Contract Adoption’
https://cointelegraph.com/news/rootstock-etherparty-deal-will-accelerate-bitcoin-smart-contract-adoption

Blockchain Tech Will Power Future Real Estate Market
https://cointelegraph.com/news/blockchain-tech-will-power-future-real-estate-market

Stay tuned!

Angel “Java” Lopez
https://github.com/ajlopez
http://www.ajlopez.com
http://twitter.com/ajlopez

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
http://www.ajlopez.com
http://twitter.com/ajlopez

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*
http://www.ajlopez.com
http://twitter.com/ajlopez

 

 

 

 

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
http://www.ajlopez.com
http://twitter.com/ajlopez

 

Older Posts »

Create a free website or blog at WordPress.com.