Bitcoin Forum
April 25, 2024, 02:14:07 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Project Development / [ANN] create youself realtime bitcoin online chart block|tx|message|price|socia on: December 05, 2014, 01:20:56 PM
http://blkdb.com/chart

A realtime bitcoin online chart, powerfull visualization features, you can compare, sum bitcoin data,

how to create http://grafana.org/docs/features/intro/

support data list
bitcoin.misbehavior.amount

bitcoin.misbehavior.banned

bitcoin.misbehavior.unknowcmdnotfound

bitcoin.transactions.doublespend

bitcoin.utxoset.dbSizeBytes

bitcoin.utxoset.txOutputs

bitcoin.utxoset.totalBTCAmount

bitcoin.utxoset.blockHeight

bitcoin.utxoset.tx

bitcoin.hashrate

bitcoin.destroyed

bitcoin.blocks.nTx

bitcoin.blocks.value

bitcoin.blocks.interval

bitcoin.blocks.currentHeight

bitcoin.blocks.orphanblock

bitcoin.blocks.size
bitcoin.blocks.nChainTx

bitcoin.blocks.difficulty

bitcoin.transactions.BetCoinDice

bitcoin.transactions.BlockSign

bitcoin.transactions.Chancecoin

bitcoin.transactions.CHBS

bitcoin.transactions.CoinSpark

bitcoin.transactions.confirmtime

bitcoin.transactions.Counterparty

bitcoin.transactions.doublespend

bitcoin.transactions.dust

bitcoin.transactions.LuckyBit

bitcoin.transactions.Mastercoin

bitcoin.transactions.multisig_1of2

bitcoin.transactions.multisig_1of3

bitcoin.transactions.multisig_2of2

bitcoin.transactions.multisig_2of3

bitcoin.transactions.multisig

bitcoin.transactions.nulldata

bitcoin.transactions.OpenAssets

bitcoin.transactions.ProofOfExistence

bitcoin.transactions.pubkeyhash

bitcoin.transactions.pubkey

bitcoin.transactions.SatoshiBones

bitcoin.transactions.SatoshiDice

bitcoin.transactions.scripthash

bitcoin.transactions.size

bitcoin.transactions.txCacheSize

bitcoin.transactions.txInMemoryPool

bitcoin.transactions.txOrphanNum

bitcoin.transactions.valueFee

bitcoin.transactions.valueIn

bitcoin.transactions.valueOut

bitcoin.transactions.vin.size

bitcoin.transactions.vout.size

节点连接数据
bitcoin.peers.totalConnections

bitcoin.peers.inboundConnections

bitcoin.peers.disconnect

bitcoin.peers.spvNodeConnections

bitcoin.peers.fullNodeConnections

bitcoin.peers.outboundConnections

bitcoin.peers.knownAddresses

bitcoin.peers.connect

bitcoin.message.sent.block

bitcoin.message.sent.reject_tx_insufficientfee

bitcoin.message.sent.merkleblock

bitcoin.message.sent.inv

bitcoin.message.sent.reject_tx_duplicate

bitcoin.message.sent.ping

bitcoin.message.sent.getblocks

bitcoin.message.sent.pong

bitcoin.message.sent.headers

bitcoin.message.sent.getdata

bitcoin.message.sent.reject_tx_invalid

bitcoin.message.sent.addr

bitcoin.message.sent.notfound

bitcoin.message.sent.getaddr

bitcoin.message.sent.reject_tx_nonstandard

bitcoin.message.sent.reject

bitcoin.message.sent.tx

bitcoin.message.sent.version

bitcoin.message.sent.verack

bitcoin.message.received.getheaders

bitcoin.message.received.block

bitcoin.message.received.inv

bitcoin.message.received.filterload

bitcoin.message.received.ping

bitcoin.message.received.getblocks

bitcoin.message.received.pong

bitcoin.message.received.inv_tx

bitcoin.message.received.inv_block

bitcoin.message.received.getdata

bitcoin.message.received.addr

bitcoin.message.received.notfound

bitcoin.message.received.getaddr

bitcoin.message.received.mempool

bitcoin.message.received.reject

bitcoin.message.received.tx

bitcoin.message.received.version

bitcoin.message.received.verack


wikipedia
socials.wikipedia.pageviews

twitter
socials.twitter.tweets

reddit
socials.reddit.uniques

socials.reddit.Subscriptions

socials.reddit.pageviews

bitcointalk
socials.bitcointalk.new_topics

socials.bitcointalk.members_online

socials.bitcointalk.pageviews

socials.bitcointalk.new_members

socials.bitcointalk.new_posts

google
socials.googletrend.bitcoin

socials.googletrend.bitcoin_price

socials.googletrend.bitcoin_mining

nclude price data

bitcoin.exchange.USD.bitkonan.percent

bitcoin.exchange.USD.bitkonan.vol

bitcoin.exchange.USD.campbx.percent

bitcoin.exchange.USD.campbx.vol

bitcoin.exchange.USD.vaultofsatoshi.percent

bitcoin.exchange.USD.vaultofsatoshi.vol

bitcoin.exchange.USD.cryptotrade.percent

bitcoin.exchange.USD.cryptotrade.vol

bitcoin.exchange.USD.fbtc.percent

bitcoin.exchange.USD.fbtc.vol

bitcoin.exchange.USD.mtgox.percent

bitcoin.exchange.USD.mtgox.vol

bitcoin.exchange.USD.bitex.percent

bitcoin.exchange.USD.bitex.vol

bitcoin.exchange.USD.localbitcoins.percent

bitcoin.exchange.USD.localbitcoins.vol

bitcoin.exchange.USD.bitbox.percent

bitcoin.exchange.USD.bitbox.vol

bitcoin.exchange.USD.cointrader.percent

bitcoin.exchange.USD.cointrader.vol

bitcoin.exchange.USD.itbit.percent

bitcoin.exchange.USD.itbit.vol

bitcoin.exchange.USD.btce.percent

bitcoin.exchange.USD.btce.vol

bitcoin.exchange.USD.cryptonit.percent

bitcoin.exchange.USD.cryptonit.vol

bitcoin.exchange.USD.anx_hk.percent

bitcoin.exchange.USD.anx_hk.vol

bitcoin.exchange.USD.hitbtc.percent

bitcoin.exchange.USD.hitbtc.vol

bitcoin.exchange.USD.rocktrading.percent

bitcoin.exchange.USD.rocktrading.vol

bitcoin.exchange.USD.justcoin.percent

bitcoin.exchange.USD.justcoin.vol

bitcoin.exchange.USD.bitfinex.percent

bitcoin.exchange.USD.bitfinex.vol

bitcoin.exchange.USD.bitstamp.percent

bitcoin.exchange.USD.bitstamp.vol

bitcoin.exchange.USD.kraken.percent

bitcoin.exchange.USD.kraken.vol

bitcoin.exchange.USD.vircurex.percent

bitcoin.exchange.USD.vircurex.vol

bitcoin.exchange.USD.icbit.percent

bitcoin.exchange.USD.icbit.vol

bitcoin.exchange.CNY.mtgox.vol

bitcoin.exchange.CNY.btctrade.percent

bitcoin.exchange.CNY.btctrade.vol

bitcoin.exchange.CNY.goxbtc.vol

bitcoin.exchange.CAD.mtgox.vol

bitcoin.exchange.CAD.cavirtex.percent

bitcoi[Suspicious link removed]ice.USD.avg

bitcoi[Suspicious link removed]ice.USD.vol

bitcoi[Suspicious link removed]ice.USD.high

bitcoi[Suspicious link removed]ice.USD.low

bitcoi[Suspicious link removed]ice.CNY.avg

bitcoi[Suspicious link removed]ice.CNY.vol

bitcoi[Suspicious link removed]ice.CNY.high

bitcoi[Suspicious link removed]ice.CNY.low

bitcoi[Suspicious link removed]ice.GBP.avg

bitcoi[Suspicious link removed]ice.GBP.vol

bitcoi[Suspicious link removed]ice.GBP.high

bitcoi[Suspicious link removed]ice.GBP.low

bitcoi[Suspicious link removed]ice.EUR.avg

bitcoi[Suspicious link removed]ice.EUR.vol

bitcoi[Suspicious link removed]ice.EUR.high

bitcoi[Suspicious link removed]ice.EUR.low

bitcoi[Suspicious link removed]ice.CAD.avg

bitcoi[Suspicious link removed]ice.CAD.vol

bitcoi[Suspicious link removed]ice.CAD.high

bitcoi[Suspicious link removed]ice.CAD.low

2  Bitcoin / Project Development / [ANN] blkdb.com-Another blockchain explorer, only need 35G disk on: October 15, 2014, 11:47:08 AM
The http://blkdb.com use a changed bitcoind as backend server like blockexplorer.com, but its open source.
its only need 35G disk until 2014/10/15






The source code is on GitHub:
https://github.com/blkdb
3  Bitcoin / Bitcoin Discussion / Is that possible use created blocks to evaluate the real 51% attack probability? on: June 19, 2014, 07:45:29 AM
Real 51% probability  http://blockindex.info/blog/51en.html

The miner have create more than 300000 blocks, is that possible use these blocks to evaluate the real 51% attack probability?

The follow will try to calculate the probability with the z=6 attack

Select the time of the blocks that heighs from 280000~300000 to calculate.

The usually blockchain, we named "C" blockchain.

[]----->[]----->[]----->[]----->[]----->[]----->[] C blockchain
The chain of honesty miner created named "A" blockchain

The chain of the attack miner created named "b" blockchain

[]----->[]----->[]----->[]----->[]----->[]----->[] A blockchain
        \
         []----->[]----->[]----->[]----->[]----->[]----->[] B  blockchain
calculate the time delta in continuous 6 blocks in chain:

t1 = blk5.time - blk0.time t2 = blk6.time - blk1.time ..... tx = blkn.time - blk(n-5).time

Then we got a time set named TC1: {t1,t2,t3....tx}

and we calculate the TC2 that continuous 7 blocks to get another time set named TC2: {t1,t2,t3....tx}

Follow graph is created by TC1



sort TC1 then got follow graph



count the element in T1 number every 10 seconds then got a new set {len(T1...Tx),len(Tx+1....Tx+n)....}



If we do same calculator with the height from [200000- 220000], [220000- 240000], [240000- 260000], [200000- 280000], wo got these graph:



so the time's density distribution of create block is similar. so tthe time's density distribution of create block in the A chain and the B chain should similar with C blockchain. but the speed of create block of A and B is lower than C, so we need scale the TC.

TA = TC1 * 100/(1-49) This is the time set of create block when use 49% computing

TB = TC2 * 100/(1-51) This is the time set of create block when use 51% computing



The left cruved line is created by A, the right cruved line is created by set B

Now the question is select random a in A and b in B, what's the probability of a>b?

The follow is python code:

def realAttackerSuccessProbability (A,B):
    N = []
    qz = 0.0
    for i,a in enumerate(A):
       n = 0
       for b in B:
          if a<=b: break
          else: n+=1
       N.append(n)
    return  float(sum(N))/(len(B) *len(A))
results:

If C blockchain is from block height 280000~300000, about 20000 blocks to calculate:

z=0 P=1.000000
z=1 P=0.25991752883
z=2 P=0.327356211643
z=3 P=0.362791063488
z=4 P=0.38572021231
z=5 P=0.402129295953
z=6 P=0.41492854999

If C blockchain from block height 200000~300000, about 100000 blocks to calculate:

z=0 P=1.000000
z=1 P=0.258909623337
z=2 P=0.327897207064
z=3 P=0.363898341947
z=4 P=0.387023480539
z=5 P=0.403786580212
z=6 P=0.416886094841

Real 51% probability  http://blockindex.info/blog/51en.html
4  Local / 中文 (Chinese) / 能否用已有的300000block生成时间来计算实际的51%的攻击概率呢? on: June 19, 2014, 07:37:47 AM
如何计算实际的51%的攻击概率呢? 全文见http://blockindex.info/blog/51.html

bitcoin创建到现在总计产生30多万个block, 我们可以用这30多万个block的时间来估算51%攻击实际的概率和需要的时间

以下以6个confirm为例,来计算实际可能的概率

正常的 blockchain, 我们称之为C

[]----->[]----->[]----->[]----->[]----->[]----->[] C blockchain
诚实节点计算的 A blockchain

攻击节点计算的 B blockchain

[]----->[]----->[]----->[]----->[]----->[]----->[] A blockchain
        \
         []----->[]----->[]----->[]----->[]----->[]----->[] B  blockchain
分别计算每连续6个block的生成时间间隔:

t1 = blk5.time - blk0.time t2 = blk6.time - blk1.time ..... tx = blkn.time - blk(n-5).time

这样得到100%算力的C的连续生成6个块的时间集合 {t1,t2,t3....tx} TC1

然后用同样的方法计算连续生成7个block的时间间隔, 得到100%算力的C的连续生成7个块的时间集合 {t1,t2,t3....} TC2

对TC1绘图,得到正常的C blockchain 连续生成6个block时间分布曲线

x为连续的6个block

y为生成连续的6个block的时间

时间分布曲线


对时间排下序得到下图,可以得到连续生成6个block需要的最少时间和最多时间

时间分布曲线


然后对T1计算,每间隔10秒内Tx的数目, 得到{len(T1...Tx),len(Tx+1....Tx+n)....},得到密度分布曲线,如下

时间分布曲线

上图可以看出连续生成6个block需要的时间

每隔20000个block分别计算密度分布,难度应该变化10倍左右,算力变化x倍,发现block生成时间密度曲线基本重合


 
把A和B看成一个独立的blockchain,则 A,B生成block概率的密度分布应该和C一致,但是由于A,B的算力下降,所以把时间轴等比缩放,

A 连续生成6个块需要的时间集合{t1,t2,t3....} TA = TC1 * 100/(1-49)

B 连续生成7个块需要的时间集合{t1,t2,t3....} TB = TC2 * 100/(1-51)

时间分布曲线

得到A,B的曲线(左边为A,右边为B),和A可能的连续生成6个block的时间集合TA,和B连续生成7个block的时间集合TB

现在问题转化为在TA中随机选一个时间,大于TB中任意元素的概率

代码如下:

AB为有序集合,从小到大依次排列

AB中任意取元素a,b, 计算a>b的概率

def AB (A,B):
    N = []
    qz = 0.0
    for i,a in enumerate(A):
       n = 0
       for b in B:
          if a<=b: break
          else: n+=1
       N.append(n)
    return  float(sum(N))/(len(B) *len(A))
实际的计算结果

51% 算力攻击, height高度为280000~300000, 20000个block的生成时间密度计算成功的概率为

z=0 P=1.000000
z=1 P=0.25991752883
z=2 P=0.327356211643
z=3 P=0.362791063488
z=4 P=0.38572021231
z=5 P=0.402129295953
z=6 P=0.41492854999
如果觉得20000个样本不够,那么以height高度为200000~300000的, 100000个的生成时间密度计算成功的概率为

z=0 P=1.000000
z=1 P=0.258909623337
z=2 P=0.327897207064
z=3 P=0.363898341947
z=4 P=0.387023480539
z=5 P=0.403786580212
z=6 P=0.416886094841

全文见http://blockindex.info/blog/51.html
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!