bitcoin, blockchains and apis: the decentralization spectrum - josh cincinnati, block cypher

19
Bitcoin, Blockchains, and APIs The Decentralization Spectrum Josh Cincinnati, Developer Advocate, @acityinohio, [email protected]

Upload: withthebest

Post on 16-Apr-2017

212 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

Bitcoin, Blockchains, and APIs

The Decentralization SpectrumJosh Cincinnati, Developer Advocate, @acityinohio,

[email protected]

Page 2: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

> whoamiBitcoin-obsessed Developer AdvocateSkeptical in 2010, Incepted in 2012

Page 3: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

Inception

Page 4: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

BlockCypher: The Dream TeamWe build infrastructure, you build ideas (inceptions?)

Page 5: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

BlockCypher: The Biggest Little Bitcoin Company

Page 6: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

curl https://api.blockcypher.com/v1/btc/main{ "name": "BTC.main", "height": 401197, "hash": "00000000000000000585f3575edf5acde608c0ae17f8d6988f10aaa4cfedbcf9", "time": "2016-03-05T00:44:11.720094856Z", "latest_url": "https://api.blockcypher.com/v1/btc/main/blocks/00000000000000000585f3575edf5acde608c0ae17f8d6988f10aaa4cfedbcf9", "previous_hash": "000000000000000004e1027953a537d7b30557b34c4207c7af7b2e63bcadc378", "previous_url": "https://api.blockcypher.com/v1/btc/main/blocks/000000000000000004e1027953a537d7b30557b34c4207c7af7b2e63bcadc378", "unconfirmed_count": 33216, "high_fee_per_kb": 66566, "medium_fee_per_kb": 25874, "low_fee_per_kb": 22589, "last_fork_height": 399886, "last_fork_hash": "000000000000000006a553939f586b491f63d3158b3baee1fbdf06bd3c41becc"}

Page 7: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

curl https://api.blockcypher.com/v1/eth/main{ "name": "ETH.main", "height": 1681232, "hash": "48015b512d94182bd3915f460a63f52ef246d0cbacd6d79156d7c6bdb6efe0e4", "time": "2016-06-10T23:57:24.898560671Z", "latest_url": "https://api.blockcypher.com/v1/eth/main/blocks/48015b512d94182bd3915f460a63f52ef246d0cbacd6d79156d7c6bdb6efe0e4", "previous_hash": "10ce2f9c63b2259289b797d65627ec04164cce2792b0c7e21875c22620d1a5ec", "previous_url": "https://api.blockcypher.com/v1/eth/main/blocks/10ce2f9c63b2259289b797d65627ec04164cce2792b0c7e21875c22620d1a5ec", "peer_count": 71, "unconfirmed_count": 12735, "high_gas_price": 40000000000, "medium_gas_price": 20000000000, "low_gas_price": 5000000000, "last_fork_height": 1678736, "last_fork_hash": "91b80c1dbe1c8aa4a29f2cbfccfb5228a238eb80b2e686f16a25eb0e4f0c117f"}

(wow)

Page 8: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

curl https://api.blockcypher.com/v1/doge/main{ "name": "DOGE.main", "height": 1248677, "hash": "9c598635b2095980d435df4a005954fe7f813f92dcd6fa43f83d9094fa9b622d", "time": "2016-06-11T01:26:06.628346687Z", "latest_url": "https://api.blockcypher.com/v1/doge/main/blocks/9c598635b2095980d435df4a005954fe7f813f92dcd6fa43f83d9094fa9b622d", "previous_hash": "0070e475102eeed30c5267ab497f746481d16db2d5b5ddf3126ce4da83dcb5a6", "previous_url": "https://api.blockcypher.com/v1/doge/main/blocks/0070e475102eeed30c5267ab497f746481d16db2d5b5ddf3126ce4da83dcb5a6", "peer_count": 535, "unconfirmed_count": 42, "high_fee_per_kb": 72275, "medium_fee_per_kb": 27720, "low_fee_per_kb": 25000, "last_fork_height": 1248054, "last_fork_hash": "593acb70259eee108bc19b64fbd69a4c6a57e3db51a2e88c379c549da506fc4f"}

(such wow)

Page 9: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

https://api.blockcypher.com/v1/btc/main/txs/302d18e6576a0cde20e5729a547dc782ca496923d443c334009f8cea0401c85e/confidence{ "age_millis": 12405, "receive_count": 937, "confidence": 0.927205463977282, "preference": "low", "txhash": "302d18e6576a0cde20e5729a547dc782ca496923d443c334009f8cea0401c85e", "txurl": "https://api.blockcypher.com/v1/btc/main/txs/302d18e6576a0cde20e5729a547dc782ca496923d443c334009f8cea0401c85e"}

Page 10: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

Base Protocol (Bitcoin, Ethereum, etc.)

MiningApplications/Services

Users/Usage

Middleware

Blockchain Cake

Infrastructure

Page 11: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

...from our IaaS perch, lots of demand

2016: 2+million

API calls/day

2014: 0 calls

Page 12: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

bitcoinj

C-ethereum

Why?

btcdBitcoinCore

ethereum-JPythonethereumGo-ethereum

● Steps: 15● Time: 3 - 6 months● Resources: SysAdmin, Developer,

Ops, DevOps, machines ● Cost: $44k - $700k yearly

● Step: 1● Time: 1 hour ● Resource: Developer ● Cost: starts ~$1k yearly,

scales with you

Do It Yourself (basic set-up):

Page 13: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

Blockchain-as-a-Service (BaaS)

Locally...

Page 14: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

btcd

The Decentralization Spectrum

BitcoinCore

Go-ethereum

bitcoinj

PermissionedBlockchain

A single bank /lawyer

SPV

Page 15: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

Centralization vs SpecializationMobile environmentsCost/memory-restricted VPSsComplexity simplifiedReliable bitcoin sandboxMany Trust, some Verify

RUNNING BITCOIN NODE

USING APIs

graciously modified from https://xkcd.com/1319/

Page 16: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

How to Trust and Verify

bitcoind btcd

bitcoinj

Many Data CentersGo/Cassandra/RedisCustom Node

Page 17: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

Some Examples from Customers

Page 18: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher
Page 19: Bitcoin, Blockchains and APIs: The Decentralization Spectrum - Josh Cincinnati, Block Cypher

Q&A/Thanks!Check out http://dev.blockcypher.com/ for

moreJosh Cincinnati, [email protected],

@acityinohio