Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - BTSdac

Pages: 1 2 3 4 5 6 [7] 8 9 10
91
if the delegates turn in next round  is known/determined by public (other delegates except block creator )  in the end of previous round . it mean there are only leave 10 second  for the first turn delegate in next round to prepare produce block ( first block in next round )?

and meantime there are 101 delegates  (each delegate) have to prepare produce block (first block in next round) in period between last but one block and the time he receive the last block of current round

I don`t know if this is the reason of fork

92
博彩类DAC有可能成为一个非常有前途DAC,基础博彩类应用非常关键的(去中心化博彩比较于中心化博彩的优势的地方)就是生产一个不受任何第三方控制的随机数,使用这个随机数衍生出各种应用。
但随机数的产生是非常困难的一件事件,必须要满足以下条件的随机数才是可靠的
1.所有的参与者都提供随机种子,或者所有的参与者各自委托自己信任的人提供随机种子。
2.所有的种子提供者能在确认其他提供者不能更改种子的前提下公布自己的种子。
3.种子本身的随机性。

BM 在DPOS中给出了非常好的随机数产生方式
让101位受讬人担任被信任的种子提供者。
“分布式”意味着一个区块的随机数事由前一轮101位受讬人所提供的密钥产生,只要至少其中一位是诚实的,结果就会是真正的随机。“可证明”表示他们需要在下一个回合发布密钥的哈希值到区块链。根据密钥所得出的哈希值必须和之前发布的哈希值相同。由于两者必须一致,因此受托人不可能通过公开不诚实的密钥来作弊。

因此在DPOS中,我们可以透过以下的伪代码 (包含了固定数量的受讬人)来阐述:

代码:

struct Block
 
{
 
  hash  HASH( S[n] ) // where n is the index of secrets generated by this delegate
 
  hash  S[n-1]
 
};
每个区块中的头部中包含一个HASH(S[n]),其中S[n]是这个受托人下一次生产区块时将揭晓的密钥。同时当前区块也包含上一个区块的秘钥S[n-1]。

如此一来,我们就有了密钥的串流,每隔一个产块间隔 (15-30秒)就会提供一组密钥。从这个串流我们可以用以下方式产生区块的随机数R:

但这方法其实有一些瑕疵,我讲他命名为A|A攻击,
也就是说如果上一轮代表A作为最后一个出块者,那么他就知道在下一轮中他出块的位置,如果他下一轮中出块的位置是首位的话,那么他就可以完全控制下轮首位块的随机数。当然如果多个代表联合起来的话会让问题变的非常严重。
这个瑕疵在BTS系统可以接受,因为随机数在BTS系统(现阶段)唯一的作用就是确定下一轮出块的顺序,也就是101个块才使用一次随机数,而101个块就会完成一次代表顺序洗牌,所以在BTS系统不存在威胁。而在博彩类游戏中有可能需要每块都使用这个随机数。所以对随机数的要求更高了,将变成大漏洞。

这个问题的根源是 全洗牌模式下会产生如下的出块顺序
A|A (竖线表示前后轮)
A在两次公布自己前轮秘密和下轮秘密的HASH 的间隔为0.那么A中间就没有任何其他因子去干扰他的随机数,从而是A有1/101的几率控制下轮第一个块的随机数。(在下轮中A有1/101的几率在首位)。

所以在下面的方法中就是想方设法让A的前后位置间隔尽量拉大,再确定下轮顺序之前,前轮末块的随机种子是有效的,可以多次使用这个随机种子排序不同的代表。

名称解释
代表间隔: 同一代表两次出块的间隔。
前轮:     前一轮出块代表
后轮:     相对于前轮或者当前轮
洗牌:    在前轮结束后,在后轮开始前 将2-101个代表按照前轮的随机数重新确定先后出块顺序。DPOS 每轮都把101个代表出块顺序全洗牌一次

方法一,前后轮首末相同轮换制
1.如果在新一轮的顺序中首位和前轮末位为同一代表
,按照随机种子,置换新轮首末顺序。
此方法可以避免前后轮A|A攻击,
但无法避免一个人控制多个代表的攻击,比如 BA|BA攻击, (AB被一个代表控制)

方法二 新轮位置置换法
1.新轮的顺序出来后,检查前后轮代表位置间隔,
2.按代表位置间隔排序,
3.if (如果代表间隔小于 常数N ,) 讲他的位置与 反向间隔最长的代表置换
4.反复循环,直到所有代表位置都满足 间隔大于N的条件
 
在这种情况下,能发起的攻击只有  A|XXXXXA 攻击  (XXXXX:个数为常数N的代表)
这样只有 N个代表串通后才可能发起攻击,并且攻击成功几率非常低。为小小量(远远低于1/101)的数量级

不足:如果取高N值是不是对 代表顺序“洗牌”随机数有影响? 收敛速度?

方法三  上下区分别洗牌
1.让所有代表按照上轮的顺序,分成上下半区, 上半区 1-50  下半区 51-101
2.新轮中上半区(1-50)的代表洗牌,作为后轮1-50的出块顺序 同理下半区代表洗牌,作为后轮51-101代表出块顺序
这样一来,所有的代表前后轮的间隔都大于50

能发起的攻击是 A|XXXXXA 攻击(XXXXX:50个勾结的代表)并且攻击成功几率非常低。为小小量(远远低于1/101)的数量级

不足: 上下半区代表位置固化。

方法四:2/3洗牌
1.讲上轮代表按上轮出块顺序分为 2个区,  A区 1-67  B区 67-101  (代表总数最好是3的倍数 并且为奇数)
2.随机选取 A区 的33个代表,让其加入B区,
3.A区的代表随机内部洗牌,顺序作为新轮顺序的1-34
4.B区代表随机内部洗牌,按先后作为新轮35-101的顺序。

能发起的攻击是A|XXXXXA攻击 (XXXXX:相互勾结的 33%的代表)并且攻击成功几率非常低。为小小量(远远低于1/101)的数量级


方法五:两轮秘密随机种子
每个代表的随机秘密种子需要下两轮 (102-302块后揭晓)
A-2|XXXXA-1|A0
A在A0时间戳时,揭晓的是A-2时间戳的 秘密种子,在A-2 时间戳时,A预测他出现在下轮末尾的几率为1/101 ,并且出现在下下轮首位的几率是 1/101*101 但就算他有幸运得到A|XXAXX|A A这样的出块顺序,但由于他的随机数之间被其他代表的随机因子扰动了,不可能完成攻击。

1.每个代表在第一次生成块的时候需要公布两个秘密种子的HASH ,一个为下一轮,一个为下下轮,
2.以后每次出块,公布前前轮的秘密种子,和下下轮的秘密种子HASH.
这让每个代表设下秘密和公布秘密的价格都大于101块。而着101个间隔包含全部的代表喂入的种子,所以如果只要一个代表是诚实的那么,每块的随机数都是可信的。避免A|A攻击。

93
General Discussion / A question about random number of DPOS
« on: April 07, 2015, 12:16:44 pm »
With DPOS we have 100 nodes that should have near 99.9% uptime which means we can reliably produce a secure random number assuming just 1 out 100 is honest.

Code: [Select]
struct Block
{
   hash  secret;  // HASH( S[n] ) where n is the index in the array of secrets generated by this delegate
   hash  revealed_secret; // S[n-1]
};

For each block add a header field containing   HASH(S[n]) where S[n] is a secret to be revealed next time this delegate produces a block.   Also include in the header S[n-1].

We now have a stream of secrets being revealed once per block (15 to 30 seconds)... from this stream of secrets we can generate the random number R for the block as:
Code: [Select]
if( first_block_produced_by_delegate ) then Block[HEAD].revealed_secret = 0
ASSERT( HASH( Block[HEAD].revealed_secret) == GetLastBlockProducedByDelegate(Block[HEAD].delegate_id).secret )
R = HASH( Block[HEAD].revealed_secret )
for( uint32_t i = 1; i < 100; ++i )
{
     R = HASH( Block[HEAD-i].revealed_secret + R) // where + is concat
}

R = random number generated this block...

Every R is calculated from secrets introduced by all 100 delegates that were revealed after they committed to them.  If even one of the 100 delegates is honest then the resulting R is truly random.
if a delegate I call delegate A is the in the end of one round , then he know what is he turn in next round, it is right ? and he have 1/101 chance that he is in the first turn in next round ,
I describe it as 
A|A .   "|" mean the the dividing line between rounds.
it mean delegate A can control the random number of first block of next round (1/101 chance). when this produce end block of previous round .
if one person control N delegates
they have big chance to control the random NO.
control the random NO first block in next round , describe it as   
A|N        chance is N/101

the base reason of this type attack is that , the interval between delegate publish the hash of secret random and reveal the secret hash.  if the interval is zero all the interval delegate are controlled by one person , then there is other random to influence the random,

94
中文 (Chinese) / [翻译]Bithshares P2P巡回旅行 -USA 2015春季
« on: April 02, 2015, 06:22:11 am »
在接下来的两周时间里,我们将上路沿这一个环形路线达到弗吉尼亚州,美国最大的比特股胜地之一. 我们将面对面和社区成员交流,分享故事和这次行动背后的感受.同时也会在博客和电影中分享.
带着冒险和hilariously meager funds 理念,这次超过3周和3000英里(5000公里)的旅行中一定会很多欢乐,我们正在制定详情,但是很多亲切的社区成员给我们提供住处,如果你乐意促进这次巡回旅行,让我们知道.
这是现在的计划.

到达日程
星期六 3/21  麦迪逊.WI  @crypto_prometheus
星期天 3/22  芝加哥,IL @solomon & more
星期一 3/23  底特律     @robrigo
星期三 3/25 费城   PA @riverhead & more
星期天 3/29 华盛顿 DC
星期四 4/2 布莱克斯堡(弗吉尼亚州) ,VA @dan, @stan, @adam & devs
星期四 4/9 那什维尔, TN @fuzzy
在这次行程中,我们进行采访和问很多问题,
你们想知道什么? 你们想看到谁?
什么关键点我们不能错过?
取得联系,如果你能和我们见面.
希望能在路上看见你
初次翻译,不准确地方见谅. :)
原文地址 :
BitShares Peer to Peer Tour - USA, Spring 2015

In two weeks, we’ll be hitting the road and taking a very roundabout route to Blacksburg Virginia,
one of the biggest BitShares hotspots in the USA. The plan is to connect with community members
face-to-face, share stories, and document the heart behind the movement. We’ll be live-blogging
and filming along the way.

With our sense of adventure and hilariously meager funds, this trip is sure to include a lot of hijinks
over a period of 3 weeks and 3,000+ miles (5,000 km). We’re still working out the details but many
community members have graciously offered us places to stay. Let us know if you’d be willing to
help along the route!

Here’s the plan so far:


Arrival Dates
Sat 3/21 Madison, WI - @crypto_prometheus
Sun 3/22 Chicago, IL - @solomon & more
Mon 3/23 Detroit, MI - @robrigo
Wed 3/25 Philadelphia, PA - @riverhead & more
Sun 3/29 Washington, DC
Thu 4/2 Blacksburg, VA - @dan, @stan, @adam & devs
Thu 4/9 Nashville, TN - @fuzzy

On this trip we’ll be conducting interviews and asking a lot of questions.
What do you want to know? Who do you want to see?
Any points on the way we absolutely cannot miss?

Get in touch if you can meet up.
Hope to see you on the road! 8)

- roadscape & bitscape

95
General Discussion / how to calculate the exchange fee of asset?
« on: March 28, 2015, 01:18:50 pm »
I don`t know how to calculate it ,who can explain it ?  thanks

96
General Discussion / there is no apple version of V0.8.1
« on: March 27, 2015, 04:29:39 pm »
there is no apple version of V0.8.1

97
I think we do the right thing ,though the price drop so much !

98
General Discussion / help registering
« on: March 22, 2015, 01:32:39 pm »
I run a account registering website without facebook or QQ 
people just input the account he want and the public key in his client.  it is OK for pc client
but it isn`t  available for  web_wallet.
in pc client , the status of account would become registered ,after the account was registered with the public key he supply in block chain.
but there always have the warm that "the account was registered in block-chain" and cannot use the account.

99
中文 (Chinese) / 新手开钱包,送1BTS http://www.btaer.com/
« on: March 22, 2015, 07:38:53 am »
BTS国内注册的水龙,菜鸟弄的。
小伙伴们说国外的水龙访问困难,弄了个简陋的国内注册水龙头
http://www.btaer.com/ 国内BTS注册的水龙头, 不用验证 自由注册

100
Price of bts drop so much recently , I think the attraction of 100% pay rate delegate become lower and lower.  but why the price drop so much, I think there are many reason , after discuss with many leaved people. many of them think the 100% pay rate delegate would hurt bts a lot. I cannot totally agree their point of view。but I think there are still some room improvement blockchain hired by 100% paying delegate. the important is that a perfect rule would have many supporter
since we are lost a little so for.
now there are many developer delegate ,we can saw the code comments on github.com ,I think they are working hard.  there also have marketing report from marketing delegate, it seem they also working hard, but account register also increase slowly。 actually, no matter a delegate bring what to btser,if he voted by btser it is deserved; but there is only reword of changing voting, the reality is many people jus vote and less concern it。

so  I suggest that there have a period of validity  when vote a delegate.    for example , purpose of  3% pay delegate is only maintain block chain, so  a period of validity is forever as default.  but for 100% pay rate delegate , it would been three months as default , but can change to any period votor want to

101
Technical Support / what is the command to vote support a delegate.
« on: March 20, 2015, 02:21:57 am »
what is the API to  vote support a delegate.
I remember there is command to vote a delegate ,but now ,I cannot find it in command line

102
how to list balance of a specify address
Code: [Select]
[code]blockchain_list_address_balances BTSAeGeuB22wYgnLg5ek3qeLiuXT3LMHwtom

[[
    "BTSJszjT28TrQYCxXxKhsrBLHZVprjCu5y5L",{
      "condition": {
        "asset_id": 0,
        "slate_id": 9028950458771370249,
        "type": "withdraw_signature_type",
        "data": {
          "owner": "BTSAeGeuB22wYgnLg5ek3qeLiuXT3LMHwtom",
          "memo": {
            "one_time_key": "BTS7PEn8jtaaCGJRetk1iSf6vnBaMUSQKp9c3NB1DAAgdueHYdPFP",
            "encrypted_memo_data": "c7b0b04ba638379db5f2d87a931b39040be9d79d0a9102c8cfb7dd0c1cba405f28eda2d0957d2a510487912a5af8e242aff76ef2bd11ac45176165a3242b5012"
          }
        }
      },
      "balance": 11244920862148,
      "restricted_owner": null,
      "snapshot_info": null,
      "deposit_date": "2015-03-18T08:11:20",
      "last_update": "2015-03-18T08:11:20",
      "meta_data": null
    }
  ],[
    "BTSKdfQKVyFDadEdckZddnQKd1jzENLKfgno",{
      "condition": {
        "asset_id": 0,
        "slate_id": 0,
        "type": "withdraw_signature_type",
        "data": {
          "owner": "BTSAeGeuB22wYgnLg5ek3qeLiuXT3LMHwtom",
          "memo": {
            "one_time_key": "BTS6K49EbGG2sPLL8tsraWyUFTfqVGrwqMgb27Pq8PCBRudjVccWk",
            "encrypted_memo_data": "a723f8e70908fb93c2ccf8a06fc41750a98c58d769b97c482f7b30b9d1b0b63d1fef4a058d981a62dc742fd3b9947da1e972d67a17af8f6bc46fc6841a9576ea"
          }
        }
      },
      "balance": 1000000,
      "restricted_owner": null,
      "snapshot_info": null,
      "deposit_date": "2015-03-18T08:07:30",
      "last_update": "2015-03-18T08:07:30",
      "meta_data": null
    }
  ],[
    "BTSMEt4hPaw59csDTUgSVv5etKU4njb2Qedi",{
      "condition": {
        "asset_id": 0,
        "slate_id": 9028950458771370249,
        "type": "withdraw_signature_type",
        "data": {
          "owner": "BTSAeGeuB22wYgnLg5ek3qeLiuXT3LMHwtom",
          "memo": {
            "one_time_key": "BTS6aTHLi4rJxgRSoheMTrFNvnhiKRt2pLKj5ij179xA8Qy8Yifpi",
            "encrypted_memo_data": "e7a22d029a67c9797046c531f25ee493d36ed410d919964f3e0a23dfc2b074f4b6294a972cf39c855fe1ef5404ce16e459ddb2b208aa981f5ae471111f3a694a"
          }
        }
      },
      "balance": 4500000000000,
      "restricted_owner": null,
      "snapshot_info": null,
      "deposit_date": "2015-03-18T08:46:10",
      "last_update": "2015-03-18T08:46:10",
      "meta_data": null
    }
  ]
]
[/code]
I don`t know below address "BTSAeGeuB22wYgnLg5ek3qeLiuXT3LMHwtom" there are  there others address ,what the relationship between  them?

103
I am not know much of detail of bts, I don`t if change the base parameter like block interval ,MIN tx fee,there must a hard fork,  I don`t know if it is available to change the base parameter of bts by all bts stockholder to avoid hard fork as follow process
1. everyone can create a base parameter vote by spending not little bts, like 5000bts, to avoid there are not many change proposal to increase the load of stockholder.
2.if this proposal can get 51% vote of all stockholder in period ,like 60 days. block change acc.to this result ,change the base parameter automatic.
Actually the different change of pow coin can been consider the base parameter change by imformation of blockchain.
so I think it is less risk by developing this function.

104
General Discussion / how to list the random_seed of specified block?
« on: March 14, 2015, 05:18:46 pm »
(wallet closed) >>> blockchain_get_block 2025323
{
  "previous": "daf0a6804b117f816bd0cefabdfc9d8e5438889b",
  "block_num": 2025323,
  "timestamp": "2015-03-14T08:48:40",
  "transaction_digest": "c8cf12fe3180ed901a58a0697a522f1217de72d04529bd255627a4ad6164f0f0",
  "next_secret_hash": "f7e8b19f44f38c50e1e36408da44cadaad3c244c",
  "previous_secret": "90a12a2bbdc0206db1a38d3d902422052a772029",
  "delegate_signature": "20458343954f80064159be054c46f6c8f0f550314cbad1d742a534f5fce3708bcf7a26f0f6096a4ed3fd04148d145efd833feefb95bb57146161fea29bb9619ace",
  "user_transaction_ids": [],
  "id": "e93c217792832f0eb620ad8b9d6da8c2217e93b8",
  "block_size": 166,
  "latency": 0,
  "signee_shares_issued": 0,
  "signee_fees_collected": 0,
  "signee_fees_destroyed": 0,
  "random_seed": "0000000000000000000000000000000000000000",
  "processing_time": 0

105
General Discussion / Finish perfect function or add new function constantly
« on: February 12, 2015, 02:40:28 am »
Marketing would give us answer

Pages: 1 2 3 4 5 6 [7] 8 9 10