Moving in London

I’ve been living in the St John’s Wood district, London for almost 2 years. It’s a lovely place. I am glad to move in this area as my first place in London. But, now it’s time to move to other place. My wife and I really want to stay, but there is a few reasons I cannot be affordable.

My daughter needs to go to school from next year. And, in this area, there are a lot of good and outstanding private schools. In the UK, “private school”, “independent school”, and “public school” are same terms. It is meaning about that a child taker needs to pay an extra fee for schooling. “State school” or “primary school” are schools meaning about free. The private schools are extremely expensive which cost is going to be £14,000 to £30,000 per year. Of course, there are state schools also in St John’s Wood. But, after figuring out these schools’ score, I couldn’t say to stay St. John’s Wood for my baby.

So we considered area near schools in 3 different places in the Ofsted report, which shows all schools inspection report excluding a few independent schools including the secondary schools and special schools. It doesn’t means all schools not in this report are bad, but the most independent schools in this report are usually outstanding. So I just decided following this report. And also, I selected outstanding scored schools within 2016 to 2019, and then sorted out a few schools continuously outstanding. Yeah, I’m the helicopter father.

The 3 area are Fulham, Notting Hill, and Gospel Oak. Wimbledon is also one of the options, but it is too far from my office, so I decided one of them. I hope my wife and my baby satisfy the place and school. It’s all difficult to me because, it’s all new to me.

Lastly, I viewed a lot of properties. My and my wife’s satisfaction is not only problem, but also my two mischievous cats are normally not allowed in London, especially furnitured property. I finally found an understanding landlord, but it is always pain in my toes.

196B73C7-0BBC-4F3D-9F8A-A4CE416DAE9C

#moving #in #london #my #cats #family #loveu

AERGO: Sidechain vs. Private Blockchain

AERGO(아르고) 프로젝트는 아르고 체인(public blockchain)을 기준으로 실제 엔터프라이즈 환경에 맞는 블록체인 비니지스를 만들 수 있는 환경을 제공하는 것도 목적으로 한다.

 

그럼 엔터프라이즈 환경에 맞는 블록체인 비지니스란 어떤 의미일까? 이 블록체인 비지니스를 정의내리는 것은 쉬운 일이 아니다. 하지만 현재 실제 블록체인이 어떻게 사용되고 있는지 살펴보면 크게 dApp이라 불리는 B2C 비지니스와 기업들이 자신의 요구사항에 맞는 솔루션을 개발할 때 프라이빗 블록체인을 사용하는 B2B 비지니스로 나눠 생각해볼 수 있다.

B2C

우선 요즘 dApp들은 사이드체인 기법을 이용해 기존의 대형 퍼블릭 블록체인과 관계를 단단히 고정하여 해당 퍼블릭 블록체인에서 제공하는 토큰 및 다양한 기능들을 자신의 dApp에서 사용한다. 이를 통해 얻을 수 있는 장점은 다음과 같다.

  • 자체 발생 토큰에 대한 신뢰성 확보
  • 기존 퍼블릭 블록체인의 사용자 확보

 

이런 환경을 제공해주는 퍼블릭 블록체인으로 Ethereum(이더리움)과 EOS(이오에스)가 가장 대표적이라 할 수 있으며, 이런 dApp 개발을 다양하게 지원하기 위한 목적에는 이오에스가 좀 더 가깝다고 할 수 있다.

B2B

많은 기업들은 블록체인을 업무에 도입하는 시도를 계속하고 있으며, 블로코의 코인스택과 같은 프라이빗 블록체인들이 이러한 사업에 활용되고 있다. 하지만, 위의 사이드체인과 달리 프라이빗 블록체인 도입을 먼저 시도하고 있으며 이는 태생적인 원인도 있겠지만 사이드체인과 달리 좀 더 유연함을 제공할 수 있기 때문이기도 하다. 이런 프라이빗 블록체인에 요구되는 것들은 다음과 같다.

  • 토큰을 사용하지 않는다.
  • 좀 더 빠른 업무 처리량 (TPS)를 원한다.
  • 다양한 기능을 선택적으로 도입할 수 있어야 한다.
  • Tx에 대한 투명성은 좋지만, 데이터에 대해서는 privacy가 필요하다.

현재 가장 많이 알려진 것은 Hyperledger Fabric와 R3 Corda가 있고, 블로코의 coinstack도 또한 프라이빗 블록체인이다.

사업성

현재 블록체인은 B2C 시장에 해당하는 가상화폐 시장이 가장 활성화되어 있으며, ICO를 기반으로 많은 사업들이 진행되거나 기획되고 있다. B2B에 해당하는 사업들은 블록체인 도입 시도 및 PoC와 같은 소극적인 사업들만 시도되고 있고, 프라이빗 블록체인이 가지는 한계로 인해 사업이 크게 확장될 기미가 보이지 않는다. 이런 이유로 많은 블록체인 전문가(?)들은 프라이빗 블록체인은 실패했다고 얘기하며, 사실 이에 대한 결과물이 없기 때문에 아무도 제대로 반박하지 못하고 있다.

다시 말해서 현재 블록체인을 통한 사업성은 사이드체인을 이용한 B2C 사업이 훨씬 높다고 하겠다.

AERGO 프로젝트

그렇다면 왜 아르고 프로젝트는 사이드체인 뿐만 아니라 프라이빗 블록체인을 하나의 핵심으로 삼으려 하는 것일까?

이는 현재 블록체인에 대한 사업성이 아니라 프라이빗 블록체인이 가지는 단점을 보완하고 장점을 취했을 때 기대되는 미래가치가 크기 때문이다. 어떤 미래가치가 있는지를 설명하기 앞서서 사이드체인과 프라이빗 블록체인 간에 어떤 차이가 있는지 다시 얘기를 해보고자 한다.

사이드체인

아르고 프로젝트에서는 사이드체인 기술로 여러가지를 고려 중인데, 그 중 대표적으로 플라즈마 기술을 사용할 예정이다. 플라즈마는 아르고 퍼블릭 블록체인 위에 새로운 블록체인(사이드 체인, 자식 체인)을 생성하고 해당 블록체인에서 생성되는 블록들의 검증 정보(블록 헤더)를 아르고 퍼블릭 블록체인에 저장하는 방식이다. 이 방식을 이용하면 위에서 만든 블록체인 위에 또 새로운 자식 체인을 올림으로써 사이드 체인 간에 부모-자식 관계를 형성하는 N-tier 방식을 취할 수 있게 된다. 또한, 같은 부모를 둔 형제 체인 사이에는 부모 체인을 통한 정보 교환이 가능하기 때문에 서로 다른 블록체인은 서로 통신을 하거나 거래를 할 수 있게 된다. 다시 말해 Tree 구조의 블록체인 확장이 가능한 구조이다.

 

A는 아르고 체인. B와 C는 A의 자식 체인(플라즈마 체인)이며 B와 C의 각 블록 헤더는 A(아르고 체인)에 저장된다. G의 블록 헤더는 B에 D, E, F의 블록 헤더는 C에 저장된다.

프라이빗 블록체인

아르고 프로젝트에서는 꼭 아르고 체인 뿐만 아니라 Hyperledger Fabric, R3 Corda, Coinstack과 같은 프라이빗 블록체인을 아르고 체인 상에서 구성할 수 있다. 이렇게 구성된 프라이빗 블록체인들은 위의 사이드체인 방식과는 달리 아르고 체인과 매우 느슨한 관계를 가진다. 프라이빗 블록체인에서는 블록들의 검증 정보(블록 헤더)를 굳이 아르고 체인에 저장할 이유가 없다. (신뢰성 확보를 위해서는 위의 사이드 체인과 같이 블록 정보를 아르고 체인에 저장하는 앵커링 기능을 사용하는 것이 좋다.) 아르고 체인은 이 독립적인 블록체인들의 위치, 구성, 사용자 정보 등의 속성정보(metadata)를 저장하고 있으며, 이를 통해 각 블록체인들은 검색되고, 관리된다. 모든 프라이빗 블록체인들은 서로 독립적인 존재이지만 아르고를 통해 서로를 확인할 수 있으며, 또한 서로 간에 관계를 형성할 수 있는 방법이 된다. 이 방법을 통해 위의 사이드체인, 플라즈마와 같은 구조를 만들 수 있을 뿐 아니라, 아래 그림과 같은 형태의 복잡한 구성도 가능하게 된다.

 

A는 아르고 체인. B, C, D, E, F는 아르고 체인에 등록된 프라이빗 블록체인. B는 C의 존재를 A를 통해 언제든 확인하고 C의 개발자가 만든 외부 인터페이스로 정보를 보낼 수 있다.

플라즈마 사이드체인과 달리 정해진 약속(프로토콜)이 없기 때문에 프라이빗 블록체인 간 통신은 제공되는 프로토콜을 따르면 된다. 무책임해보일 수 있지만 이는 달리 말해 유연함을 제공하는 것이며, 플라즈마와 같은 다양한 프로토콜 적용을 고려해볼 수 있다. (이는 향후 아르고 프로젝트를 통해 블록체인 기술 발전에 이바지할 수 있는 계기가 될 수 있다.)

 

프라이빗 블록체인을 도입하려는 많은 사업들은 대부분 거래는 투명하지만 데이터는 안전하게(?) 자신이 보관하기를 원한다. 또한 이러한 사업이 여러 업체들과의 관계(aliance)를 필요로 할 경우 다양한 이유를 들어 소극적인 태도를 취하는 것이 일반적이다. (관리의 어려움과 비용 발생 및 피해 등의 책임 문제) 아르고 체인은 이러한 문제를 해결하기 위한 하나의 보완책이 될 수 있는데, 아르고 체인을 통해 서로 다른 블록체인 간의 신뢰를 확보할 수 있고 서로 다른 블록체인 데이터의 흐름도 추적할 수 있기 때문이다. 또한, 언제든 다른 체인과의 관계를 단절시키거나 복구시킬 수 있는 구조이기 때문에 관리적인 측면에서도 별도의 프라이빗 블록체인을 구성하는 것보다 아르고 체인을 이용하는 것이 매우 높은 가치를 가진다.

플라즈마 사이드체인 vs. 프라이빗 블록체인

Plasma Sidechain Private Blockchain
체인 확장성 N-Tier (Tree) 구조 N-Dimension 구조
Relation Parent – Child Independent
Difficulty Easy Difficult
Protocol Strict Partial
Token YES Not recommended
Trust Model Child → Parent Chain → AERGO Chain

 

체인 확장성

체인 확장성은 새로운 블록체인들을 계속 만들어 구조를 확장하는 것을 말한다.

 

참고로 하나의 블록체인에서 노드의 수를 늘려 신뢰도를 높이는 “신뢰 확장성 (scale out)”은 두 방법 모두 쉽지 않기 때문에 아르고 프로젝트는 아르고 허브(AERGO Hub) 서비스에서 이 기능을 제공한다. 또한 한 블록체인에서 노드의 장비 성능을 향상 시키는 “리소스 확장성”도 또한 아르고 허브에서 기능을 제공한다.

 

플라즈마의 경우 형제 또는 자식의 형태로 계속해서 체인을 확장할 수 있는 구조이며, 프라이빗 블록체인은 위치와 관계없이 어디든 새로운 블록체인을 추가할 수 있는 구조이다. 하지만, 프라이빗 블록체인의 유연함으로 인해 새로운 구조를 만들고 관리함에 플라즈마 방식보다 개발 및 관리에 어려움이 있기 때문에 블로코와 같은 전문가의 도움을 필요로 할 수 있다.

프로토콜

플라즈마 사이드체인은 아르고 체인에서 정의한 프로토콜을 반드시 따라야 하며 이는 보안 및 성능 등의 검증된 약속 체계이다.

 

프라이빗 블록체인의 경우 아르고 체인과의 관계 및 통신은 아르고 프로젝트에서 정의한 프로토콜을 반드시 따라야 하지만, 서로 다른 블록체인 간의 통신의 경우 서로 간의 약속을 통해서 정의내려진다.

Token

플라즈마 사이드체인의 경우 아르고 체인의 토큰을 사이드 체인 내부에서 그대로 활용할 수 있으며, 이를 통한 신뢰할 수 있는 새로운 토큰을 발행하는 것 또한 가능하다. 하지만 반드시 토큰이 있어야 하는 것은 아니다.

 

프라이빗 블록체인의 경우 독립적인 블록체인이기 때문에 자체적인 토큰을 발행하는 것은 가능하나 아르고 체인을 통한 검증이 불가능하기 때문에 신뢰할 수 없는 토큰을 발행하는 것을 추천하지 않는다.

 

하지만, 플라즈마 사이트체인과 프라이빗 블록체인 사이에도 아르고를 통한 관계를 형성할 수 있기 때문에 어떻게 구성하느냐에 따라 프라이빗 블록체인 상에서도 충분한 신뢰도를 가진 토큰을 사용할 수 있다.

신뢰 모델

플라즈마 사이드체인은 자식 체인의 블록 정보(헤더)가 부모 체인에 저장되는 것으로 신뢰를 확보한다.

 

프라이빗 블록체인은 아르고 체인을 통해 체인 존재 유무, 신뢰 노드 유무 등 블록체인 자체에 대한 신뢰는 기본적으로 확보할 수 있지만, 그외의 경우 아르고 체인 사용에 따른 추가적인 비용이 발생하거나 자주적인 방법을 개발하거나 다른 대안을 고려해야 한다.

결론

아르고 프로젝트는 EOS와 같이 소규모 사업(small business)를 위한 블록체인 환경을 제공하는 것과 기업체들의 시스템 구축(System Integration) 사업을 위한 기업 솔루션(business solution) 블록체인 환경을 제공하는 것 두 가지 모두를 목표로 하고 있다. 각 사업을 위해 플라즈마 사이드체인이 알맞을지 프라이빗 블록체인 방식이 맞을지는 어떤 목표를 어떤 형태로 달성할지에 따라 다양한 접근 방식이 가능하기 때문에 여기서 정답을 보여주기란 현실적으로 어렵다. 하지만, 위의 두가지 방식을 이용해 블로코와 같은 전문가들의 도움을 받아 아르고 체인을 이용해 구성한다면 높은 성능과 높은 보안성을 가지는 투명한 거래 장부인 자신 만의 블록체인을 만들 수 있을 것이다.

 

마지막으로

각각의 프라이빗 블록체인들이 하나의 서비스로 제공되고 각각의 서비스들을 모아 하나의 큰 서비스 또는 솔루션을 제공하는 것을 상상해보자. 이때 각각의 블록체인들은 그 하나만으로 높은 신뢰를 가지는 마이크로 서비스(micro-service)가 되며, 이 마이크로 서비스들로 만들어진 서비스 또는 솔루션은 진정한 서버리스(serverless) 환경을 갖추게 된다.

 

이를 이상이라 얘기할 수도 있지만 아르고 프로젝트는 아르고 마켓 플레이스를 통해 이러한 이상적인 서버리스 소프트웨어를 만들 수 있는 토대를 제공하고자 한다.

 

Elliptic Curve Cryptography

Public-key cryptography uses an encryption algorithm that is made by a mathematical formula. Elliptic Curve is one of the formulas. Why is the math problem used for this cryptography system?

Mathematical Formulas

Those math problems in an encryption area have a feature like this.

Finding a result with inputs is easy, but finding the input(s) is not easy, almost impossible.

For example, let’s assume that you are trying to solve a problem:

  • Problem: y = x^2 - 66x + 1073

If x = 29 , what is y value?

y = (29 \times 29) - (66 \times 29) + 1073 \\    y = 841 - 1914 + 1073 \\    y = 0

And next, what is the other x value for y = 0 ?

y = x^2 - 66x + 1073 \\    y = x ^2 - (29 + 37)x + (29 \times 37) \\    y = (x - 29)(x-37)    \therefore x = 29 \; or \; x = 37

Easy? Then, if you didn’t know that when x = 29 , y = 0 at first, could you solve this problem nimbly? How about if y = 7842 ?

In these problems, finding x value(s) with input y is always taking longer than finding y value with input x whether you are a genius or not. And, the computer is also! But, the example is so easy to the computer!

If so, how about a math problem has no inverting solution to find x value? The final solution is assigning all number for x until finding presented y value. For instance, someone wants to find out my secret value x , and I made the secrete value from very large value like 9,223,372,036,854,775,807 = possible maximum value for 2^8 in binary system = 8 bytes in the computer using a mathmatical formula, F(x) . Additionally, the computer spends 0.1 second to solve the F(x) for every single value x . How long does it take to find out my secret value? At the very worst, it takes almost 29,247,120,867 years. So, it’s practically impossible!

In the world, there are a lot of unsolved problems. Elliptic curve is the one of that kind.

 

 

Byzantine Fault Tolerance (BFT)

Abridge WIKI contents for an arbitrary sequence that I studied.

Byzantine Fault Tolerance is able to abbreviate to BFT.

Prelim.

It doesn’t matter if the below is perceived or not.

  • BFT is a fault-tolerant distributed system, which is able to keep tolerable from vaudeville failures in which there are two types; a crash failure or a Byzantine failure associated with Byzantine Generals’ Problem. The level of toleration and the cognizance of the failures are both indecisive, which means they should be determined by use cases.
  • Byzantine Generals’ Problem, which is recognized as the failure in BFT, is a generalized version of  Two Generals’ Problem.
  • Byzantine Generals’ Problem is unsolvable that is no definite, specific solution or algorithm. There is only a tolerant method such as BFT.

Byzantine Generals’ Problem

This article is able to guide to more detailed, precise elucidation. The below is recapitulated version of details.

  • Assumption
    • There is 5 generals to conquer a defensive city; for example, A, B, C, D, and E.
    • There is a possibility a few of them is a traitor.
    • They have to communicate a certain message that is described an offense time to attack simultaneously, they would be defeated when they attack separately.
  • Scenario
    • General A start to send the message “Attack 9:00 am tomorrow.” to B, B would relay to C, C to D, D to E, and E to A. The method of communication is able to be diverse and various.
    • when general C is a traitor, C could fabricate the message to rewrite the time. D and E would relay the wrong message until A. The A could know there is more than one traitor.
  • Problem
    • Who is the traitor(s)?
    • How to send a new message to abort the attack in this situation? The traitor could concoct this message again.
    • How to reach a consensus?

Problems could be various depending a scenario.

Paxos

The below is abridged this article, Paxos Made Simple.

  • It is an algorithm to implement a fault-tolerant distributed system.
  • The core algorithm, synod, is a consensus algorithm.
  • It cannot handle the corrupted message, which is considered in BFT.

Consensus algorithm

  • Processes propose values. –> one single value is chosen. –> processes learn the chosen value.
  • 3 classes of agents; proposersacceptors, and learners
  • non-Byzantine model
    • Agents
      • operate at arbitrary speed
      • fail by stopping/restart
      • How if all agents fail after a value is chosen?
        • save the chosen value
        • redo a process
        • ignore the chosen value
    • Messages
      • be delivered as an arbitrary length, duplicated, and lost
      • be not corrupted
  • Choosing value, C(v)
    • 1 acceptor
      • A proposer proposes to an acceptor –> C(v) –> processes learn
      • How if a acceptor fails during ‘C(v)’ ?
    • i acceptors (i > 1)
      • A proposer proposes to i of acceptors –> C(v) –> processes learn
      • Choose a only single value that is accepted by the majority of acceptors, which is accepted by a generalization of a majority, among proposed values by proposers.
    • A proposal (P) consists of a proposal number (n) and a value (v), P (n, v)
      • When an acceptor A accepted P(a, v), the A can accept P(b, v) with (b > a).
    • Proposer for issuing proposals
      1. A proposer chooses a new proposal number n and asks a prepare request to acceptors: Prepare(n)
      2. If responses from a majority of the acceptors are received, issue a proposal P(n, v) in which v is the value of the highest-numbered proposal among the responses or any value if no proposal.
      3. A proposer requests to accept the proposal P(n, v): Accept(P(n, v))
    • Acceptor to respond to requests of a proposer
      • An acceptor can always respond to a Prepare(n) request.
      • If an acceptor has responded to a Prepare(n) request before, the acceptor can always respond to a Accept(P(n, v)) request.
      • An acceptor can respond to a Accept(P(n, v)), even though the acceptor accepted a proposal P(n’, v) with n < n’, if it has not responded a Prepare(n) request before.
      • An acceptor must remember the highest-numbered accepted proposal and the number of the highest-numbered Prepare(n) request to be prepared for failures.
    • Algorithms
      1. A proposer’s request to a majority of the acceptors: Prepare(n)
      2. An acceptor’s response to Prepare(n):
        • if n > n’ (previous Prepare(n’)),
        • with a promise not to accept any proposals P(n”, v) with n > n”,
        • with the highest-numbered accepted proposal, if any.
      3. The proposer’s request: Accept(P(n, v))
        • v is the value of the highest-numbered proposal among responses,
        • or v is any value if no proposals among responses.
      4. An acceptor’s response to Accept(P(n, v)), and accepts:
        • if not responded to a previous Prepare(n’) with n < n’.
  • Learning a chosen value, L(v)
    • A leaner must know an accepted proposal by a majority of acceptors.
    • Simple way
      • Each learner requests to all acceptors: n-request
      • Each acceptor responds to all learners: n-response
    • non-Byzantine failures
      • An acceptor –> a learner –> another learner –> …
      • How if a learner fails?
      • What if Byzantine failures?
    • General way
      • A group of learners

BFT

Early solution

  • Encryption
    • Prevent to fabricate the message.
    • using public-key cryptography
      • Encrypt by private key.
      • Decrypt by public key. = cannot encrypt again.
    • using Cyclic Redundancy Check (CRC)
      • Supplement a unique check-value in the message.
      • If the message is changed, the check-value would indicate the fault.
  • Atomic broadcast
    • If a hardware transmits the message at once, a different message could not be sent to each participants.
    • Further details in here.

Practical BFT (PBFT)

The below is condensed the article, Practical ByzantineFault Tolerance and Proactive Recovery. Compare with PAXOS algorithm upper.

  • PBFT is a replication algorithm.
  • BFS
    • BFS is BFT distributed file system, which is the real system to be made of the BFT library.

App: “Where Are You?”

상대방의 위치 정보를 알아오는 어플리케이션 기획입니다. 이름은 임시로 Where Are You?, 줄여서 WAY? 입니다.

위치 정보

  • GPS 사용
  • 건물 안에서는?
  • 몇 층인지는 어떻게?

위치 정보 확인 보안

  • 허용된 사용자만 확인 가능. Public Key?

서버 구성

  • 블락체인 기술 사용
  • 근처의 모든 스마트 폰을 일종의 router로 사용.

시나리오

  • 엄마와 딸이 각자의 스마트 폰에 WAY?를 설치했다.
  • 엄마가 박물관에서 딸이 잃어버려 위치를 찾으려 한다.

찾기

  1. 엄마가 WAY? 실행.
  2. WAY? 설치 후 딸을 등록해둔 상태에서 딸을 선택 또는 딸의 전화번호를 WAY?에 입력
  3. 엄마 WAY?에 등록된 다른 WAY?에 “딸을 찾는다”라는 메시지 전송.
    • 메시지는 딸의 WAY?만 확인할 수 있도록 암호화.
    • 딸의 PbKey로 암호화하면 될 듯.
  4. 딸의 WAY?를 찾을 때까지 “딸을 찾는다” 메시지를 계속 다른 WAY?에 전달.
    • 메시지를 기기의 PvKey로 복호화할 때 딸의 WAY?가 아니면 에러.
  5. 딸의 WAY?가 메시지를 받으면 엄마 WAY?와 등록된 다른 WAY?로 “딸 위치” 메시지 전송.
    • 엄마의 PbKey로 메시지 암호화.
  6. 딸의 WAY?의 위치가 변경될 때마다 계속해서 “딸 위치” 메시지 전송.
  7. 엄마 WAY?에서 딸의 WAY? 위치 확인.

 

Am I a fully functioning adult?

When I was a kid or before thinking about a life, I thought an adult means just a grown-up. Frankly, the word, “Adult”, was a keyword for searching a vulgar stuff then. Sorry for disappointing, I was a really healthy and vigorous boy. After I was quest of a well recompense job, which is not able to be the most importance consideration, but still top-graded element, thinking about life and death well has been a crucial part of me, grown-up cannot be equated to meaning an adult next.

I don’t want to tell you a recondite story, I am incapable to proceed an profound, speculative subject. I am definitely a scientific, mathematical person. I’m just willing to introduce an article, Why are Adults so busy?. It is easily readable and well written, and also being formed with fascinating cases each of which is calculating the time spent for a functioning adult life approximately. Not all properties are able to be receptive, but these are plausible and believable. Just read for fun.

However, it is certainly right that the time is always a lack of fulfilling my desire.


 

Technical Perspective of Bitcoin (draft)

Abstract. What is different in the technical perspective in comparison with other systems? Specifically, a relational database management system, like Oracle, is considered as the comparing target system.

Introduction

Since Bitcoin is introduced by the dissertation, S. Nakamoto, as an electronic cash system, it becomes one of the most powerful, invaluable financial digital asset. Bitcoin sets a high value on reliability of data, which is a financial transaction history of each user, and availability of system. The negligent disposition of an anonymous requirement or high throughput is well-acquainted shortcomings, which are studied and developed actively with other titles analogous with Bitcoin.

However, in technical perspective, it is doubtful Bitcoin has any novelty or originality in comparison with database management system like Oracle or distributed systems, such as Bigdata, Hadoop, and Elastic.

What makes Bitcoin colossal for technology? Which algorithms or techniques are used, and for what they need? For answering these question, I present this article to expound on technologies that Bitcoin adopt without the monetary notation and to make a comparison between Bitcoin and typical systems.

Bitcoin Technology

Architecture

  • fully distributed system == decentralized system
    • What is the problem of a centralized system?
    • How to prevent fault?
    • How to fulfil the consensus?
  • network
  • data management
    • TX
      • lifecycle: creating –> broadcasting –> propagation
      • orphan pool
      • TX script: stack-based language
    • Block
      • lifecycle: create –>
      • orphan pool
    • Blockchain
  • scalability

Wallet

  • digital keys for a digital signature & address
    • User possesses digital keys in a user’s wallet.
    • User makes use of an address for a transaction.
    • User attaches a digital signature in a transaction to verify it.
  • Public key cryptography
    • digital keys
    • private key
      • generating
        • Type-0 Non-deterministic(Random), aka. Just a Bunch of Keys, JBOK
        •  Hierarchical Deterministic(Seeded), HD
        • Mnemonic Code
          • english words –> seed –> private keys
          • BIP0039
      • format
        • Hex
        • WIF = Base58Check(Hex)
        • WIF-compressed = WIF + ‘_01_’
      • encrypted private key: BIP0038
    • public key
      • generating: secp256k1, one of Elliptic Curve Cryptography, aka. ECC
        • Key = (x, y)
      • format
        • uncompressed(520) = 04 + x(256) + y(256)
        • compressed = 02(even)/03(odd) + x(256)
      • Wallet represents a private key to WIF or WIF-compressed, not both.
        • WIF private key –> uncompressed public key
        • WIF-compressed private key –> compressed public key
    • encryption by private, then decryption by public and vice versa
  • address for Pay-to-Public-Key-Hash, P2PKH
    • Base58Check(HASH160(public key of a recipient)) == address
      • HASH160(x) =RIPEMD160(SHA256(x))
  • address For Pay-to-Script-Hash, P2SH
    • Base58Check(HASH160(script of a recipient)) == address
    • implementation
      • Multi-signature address
  • vanity address == distinctive address
    • prevent to misguide to a different address (really?)

Transaction, TX

  • smallest data structure of Bitcoin
  • TX relies on previous TX.
    • A number of previous unspent transaction output, UTXO, must be designated as an input in TX.
    • Fee = output(new UTXO) – input(prev. UTXO)
  • TX script = a combination of locking and unlocking
    • Pay-to-Public-Key-Hash, P2PKH
      • to simplify Pay-to-Public-Key, P2PK
    • Pay-to-Script-Hash, P2SH
      • to redeem multi-signature

 

Block

  • pile of transactions
  • header
    • 80 bytes
    • previous block hash
    • Merkle root, hash root == TXs fingerprint
    • timestamp
    • difficulty target for PoW
    • nonce for PoW

Blockchain

  • ordered back-linked list of blocks

Emergent consensus

TX verification

  • independently
  • checklist

New block

Block validation

  • propagate new block on the network
  • checklist
    • block header (PoW value, …)
    • TX verification again

Blockchain selection

  • blockchain forks
    • select longest chain
    • greatest cumulative difficulty chain

To do

Reference

  1. Bitcoin: A Peer-to Peer Electronic Cash System, S. Nakamoto
  2. Summarize of Mastering Bitcoin, A. M. Antonopoulos, O’Reilly
  3. Bitcoin Developer Guide
  4. Bitter to Better — How to Make Bitcoin a Better Currency, S. Barber, X. Boyen, E. Shi, and E. Uzun
  5. Minimum Viable Block Chain
  6. Spanner: Google’s Globally-Distributed Database
  7. BigchainDB: A Scalable Blockchain Database

Consensus

 

Efficiency is not your friend!

You can increase your intelligence: 5 ways to maximize your cognitive potential, Andrea Kuszewski, Scientific American (March 7, 2011)

The phrase that I wrote as a title is memorable in the above article.

Long , but not too long in my mind, story is about the intelligence, which is regarded as a connate ability. The author organized five elements below to gain the increased intelligence and/or cognitive ability.

  • Seek Novelty
  • Challenge Yourself
  • Think Creatively
  • Do things The Hard Way
  • Network

More details, please read this article. Long, but not too long 😉

Most of all, it enticed me with “Efficiency is not your friend …”, being used as a title of this post. I always consider the efficiency when working and living. Using the shortest path to drive to a destination, scheduling my day work in hours, and so on. Because, I want to reduce my wasting, which I generally think about, time to do something else, such as studying, reading, or developing something for the future. But, in reality, I became lazy when I used the remnant time to sleep or playing, which doesn’t mean those are bad, after I had adapted my efficient life ironically.

I think the efficiency for my output is important and more valuable. For my life, however, it makes me lazy. I should evade for me and my family.

Blockchain references

[PPT] How Blockchain Works (Korean)

Ethereum Homestead Documentation

Cases for Tendermint

A complete beginners guide to blockchain technology

[wiki] Merkle Tree : protect TXs in the block.

[wiki] Public Key Cryptography : protect TX value between the sender and recipient.

JXTA : Open Source Protocol for P2P

<Questions>

  • How can it ensure the uniqueness of the block Id? If the block metadata of one node is same with another nodes, would the block Id of blocks that made respectively at each node be equal?
  • If an user lost his/her private key, how can he/she find the history or recover his/her value?