-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
start a new blockchain #8
Comments
我估計要修改 zmq 這塊的 code
|
Sorry for eng message. My IME is broken on this machine |
I guess here is a good start point: |
NVM |
@iblis17 你的意思是說看完這份嗎?還是說要找什麼東西 |
@HuaYang-Chang
Do NOT read the implementation, now, we only need to understand the architecture. @HuaYang-Chang I guess 5 hr is enough for drawing this big picture. Doxygen may help you. Can you make it? |
@iblis17 我們找到了 |
OK, I figured out it already: The hard-coded DNS seed is here: https://github.com/bitcoin/bitcoin/blob/d612837814020ae832499d18e6ee5eb919a87907/src/chainparams.cpp#L117-L122. Also found some doc about dns seed operators: https://github.com/bitcoin/bitcoin/blob/a6a860796a44a2805a58391a009ba22752f64e32/doc/dnsseed-policy.md In order to build our own network, we can simply bypass the bootstrapping via DNS. We do not need DNS, we only need to provide a hard-coded @mchliu So now please fetch a normal |
@iblis17 It's kind of hard for us to understand what u're saying although u said it cleary. We don't really understand the whole structure of this whole network, so we can't understand what all these information that u mentioned is about, including what DNS seed is and what it's for. Do u mind telling us its brief ideas? Or we can also try ask google some question. |
@mchliu The description on developer wiki (the link is previous mentioned) is quite clear already. Please try to understand it first. After reading it, we tell me how to make bitcoin core connect to our own peer based on the machinery the wiki revealed to you. |
@iblis17 就 RPC getpeerinfo 不是會看到是連那些節點 就在code裡換成你想連的,都不連就變自己一條blockchain |
@iblis17 |
@iblis17 下面那則不重要啦哈 |
@mchliu 是啊
|
@iblis17 今晚也要是嘛 |
@mchliu 對啊 |
@iblis17 2130? |
@mchliu ok |
@iblis17 |
@mchliu 這我當然不會知道。 試試把 之前在 background 跑的 bitcoind kill 掉 |
找到 pid 之後 |
@mchliu unix 的基礎知識 想辦法會啊.... |
@mchliu 除非你現在跟我說「我不碰任何 open source software」,那麼不會就沒差 |
@iblis17 你怎麼都TAG我哈哈哈哈 |
Ha, 看錯 |
@iblis17 |
@mchliu 上次說的鳥哥還記得嘛? |
@iblis17 還是鳥哥是吧 |
@mchliu 要砍掉 block 就是三臺機器的 .bitcoin 資料夾 都 rm 掉 |
除了劉銘騏那台 其他都還沒更新到no checkpoint那份 |
@HuaYang-Chang 當然請重編! |
@iblis17 |
剛剛跟熊貓討論我們昨天的問題,總結來說,就是當所有有驗證能力的節點都互相絕對信任(白名單)時,就不須用到區塊鏈設計。 熊貓提出的想法是,聯盟鏈中的所有成員(銀行或其他單位)不要互相信任,這同時也避免了其中一家銀行被駭入後會瞬間造成及時結算機制崩潰的問題。所以聯盟練的創始會員(節點),都要透過區塊鏈設計去驗證、挖礦,而驗證報酬與挖礦獎勵可以換算成某種積分,當一年或是一段時間後,積分低於標準的銀行就要補繳會費。 大概就這樣,如果有任何問題再討論吧 |
@mchliu |
@HuaYang-Chang 還沒搞定阿 |
@yuanintw 例如某筆資料被銀行A放在區塊1 那不就又回到原點了 |
@mchliu 都加了 但是還看不到你 你好了的話測試看看 |
@HuaYang-Chang |
@iblis17 |
hmm... 我底下有找到用 powlimit 計算出 target 的 code |
我之後找找 |
@iblis17 |
powlimit是控制target與難度的換算 target才是真正影響挖礦速度的值 至於要改那個我晚點會再trace一下 |
@iblis17 @mchliu |
哦哦 |
所以現在最難搞的應該就是找出他把target存在哪裡哀哀 |
我trace了一下: 比對nouce跟target的function在src/pow.cpp#L77 依照WIKI中的範例 假如nBits = 0x1b0404cb 預設最大(最簡單)的nBits為0x1d00ffff target為0x00000000FFFF0000000000000000000000000000000000000000000000000000 difficulty = 0x00000000FFFF0000000000000000000000000000000000000000000000000000/target 用WIKI的範例taeget的難度就是0x00000000FFFF0000000000000000000000000000000000000000000000000000 / 理論上只要調整nBits的數字 就可以改變target進而改變運算速度 |
@yuanintw BTW 我看的wiki裡面好像有說它是存成一個浮點數 |
nBits is the encoded form of the target threshold as it appears in the block header |
@HuaYang-Chang 嗯? |
src/pow.cpp#L13 是判斷即將要挖的區塊 是否需要做難度調整 實際測試可能要麻煩@HuaYang-Chang或@mchliu幫忙試試看 |
昨天試過的情況是 GOOGLE了一下可能是因為程式裡有一些檢查機制 |
@iblis17 help |
@HuaYang-Chang 晚上你們在嗎? |
@iblis17 學校還是sk? |
人在學校 晚餐後過去 |
okok 大約幾點呢 |
7點半 或 8點後了 |
請問 @iblis17 大大
目標是要建一個新的區塊鏈
聽你說目前是會連到原本的區塊鏈
所以我們要建一個新的是要把網路斷掉嗎?
阿實際該如何執行哩
The text was updated successfully, but these errors were encountered: