主頁 > 區塊鏈 > 實作“存盤去中心化的”新公鏈,每年僅增長1G區塊資料,垃圾電腦也可運行全節點

實作“存盤去中心化的”新公鏈,每年僅增長1G區塊資料,垃圾電腦也可運行全節點

2020-09-13 14:29:20 區塊鏈

程式依然叫bitcoind,暴改版,Mac和Ubuntu上運行,沒有中心的服務器
區塊大小是2M,tps為bitcoin2倍,文末有下載鏈接
用法 $ /下載目錄/bitcoind -addnode=?.?.?.?(Ubuntu相同),bitcoin.conf組態檔也是一樣
Bitsupercoin: Peers‘ Counting and Clearing Ispruned Transactions On The Disk In Batches Can Agree

Satoshi Nakamoto

For an ‘Ispruned’ transaction(not point to a coinbase), it should be pruned on the disk instead of being removed in ‘Coinsviewcache’. Hence the blocks are needed to be stored in the form of single file, to achieve ‘Storage Decentralization’. Meanwhile, to solve the problem of ‘mining pool centralization’ and ‘online exchange centralization’, we have to launch a new spare decentralized currency. The original goal ‘Reclaiming Disk Space’ cannot be reached because of no big block all-txs-pruned existing. The transactions’ hashes only exist in the memory while a lot of many-to-many transactions with dusts constantly being packaged.

Based on bitcoin-0.10.2, the insecure SegWit is not an adoption. The version of top 1000 blocks of the active chain always keeps 4, which means the transaction data is intact. The version of blocks below 1000 depth mostly keeps 3, which means the ‘IsPruned txs’ had been being pruned to “IsNull” each time the block reaches having 250 IsPruned transactions. The total number of non empty transactions in the version3 will be continuously pruned until it belows 250. Pruning changes the nversion of ‘IsPruned tx’ to 0 so that the ‘tx’ does not serialize ‘vin’ and ‘vout’, and will be in ‘IsNull’ state after being unserialized from disk. The original number of non empty transactions is put into the block header to mine, and the version3 blocks from other peers join via a loose check, but pruning will not affect the block header.

In a presistent vector, we count the number of ‘IsPruned’ transactions in each old block when some block’s ‘vtx’ causing some old transactions being ‘IsPruned’. We always track a block whose depth is 1000 below the current accepted height: if its ‘vtx’ cause the parent transaction (term called source-tx) to become IsPruned, then the source-tx’s height which corresponds the position of the vector, will increase its byte until the byte reaches 250 and zeros, and then the height will be recorded, waiting to be trimmed, to the state that its ‘vtx’ being mixed with empty txs. The pruning exclude coinbase, but it won’t happen double-spending because the mining peers always have 1000 version4 blocks strictly verified at the top section.

Each new block received can make about 5000 old transactions become ‘IsPruned’, so about 20 old blocks below 1300 depth will be reconstructed every time. The maturity of all outputs is 300. So the Merkle tree will change due to the pruning reconstruction but won’t be checked in version3; The pruning results of peers with different heights are also naturally corrupt: For example, an entrant first download the blocks from a backward peer and then download the blocks from a higher, will find that the child transaction has been pruned to be empty before its parent transaction(source-tx), or conversely receive a block containing a child transaction with missing or wrong inputs. The correct source-txs may also be intentionally cleared and instead by the other fictional txs to keep the ‘IsNull’ txs number in block version3 is a multiple of 250). But this will not lead to double-spending and no-source-spending, because the mining peers have 1000 version4, which will be strictly verified when accepted, that ensures the security. Accepting to the top has to go via many conflicts, such as corrupt backward peers spreading blockchain virus, but the peers can repaire themselves by an ingenious mode.

Since the number of ‘IsNull’ transactions in block version3 must be a multiple of 250, and the number of original transactions has been put into the block header, also every transaction‘s fee is fixed to 500 satoshi; then the non top counterfeiters can spread the virus by inv messages. They added transactions, and cleared equally, or cleared and added 250 or multiples of 250 transactions at a time. These transactions may be fictitious. The transaction of version3 block is either ‘haveInputs’ or ‘IsNull’, and with source-txs existing either or not, rather than from a wrong source-tx. Because this will cause download interruption. So the loose verification of the ‘vtx’ part of version3 block, allowing coins without source-tx to be updated into viewcache, but for the wrong source-tx (!IsAvailable || prevout IsNull) and wrong source-tx’s value will find error, it will still not recognize. If the source-tx coin is missing, it is equivalent to that height had been pruned in advance. After reaching some height, the infected peer will recover and repair itself. If the fictitious source-tx is still mixed in old blocks, it is very difficult for the source-tx to be spent and recognized by other peers, and someday it will be buried. Because the counterfeiter doesn’t know how many correct ledgers the other peers have and used to verify. The blockchain virus situation is always that: some correct source-tx is missing and a equal amount of fictitious source-tx is added, or reserve ‘IsPruned txs’ and delete non-IsPruned txs equally, to keep the number of empty transactions is a multiple of 250.

When the source-txs of the received block’s ‘vtx’ cannot be found, the peer will change the block nVersion to 3 (‘nVersion’ won’t serialize to be mined) in preliminary checks. Version3 can pass the loose check and be connected, can update coins, insert the transactions without source-tx into the view(pcionstip) cache. However, if there are no 1000 consecutive 4 version blocks, mining results are not sure to be accepted by honest peers. Once there are 300 version4 accepted, any new block from other peers that has been changed to version3 in preliminary check will be rejected. However, the infected peer can always accept the version3 block which has fictitious tx from the fictitious source-tx , that is to say, the infected peer will never have 300 consecutive version4 up to the tip. It will always change the new version4 received to 3, and then insert the transactions without the source-tx in coinscache. In this way, the virus will be covered automatically after infection. In the future, the infected peer will clear the infection of the missing source-tx, reach having 300 or even 1000 top version4 blocks. But there will still be unspent outputs from the dishonest peers left. The prevouts based on these coins sources will not be recognized by other mining peers unless a small group has been evolved out.

Due to the decentralization on storage, the net scale is very large, and every transaction has at most two inputs and four outputs. In this way, the probability of self-cleaning to cast off ‘the version3 tips’ is greatly increased. Malicious peers will conflict with each other, but they can not prevent the infected peers’ self-recovery. Although mining peers may be corrupt, the fake ‘tx’ will not be received by a large group. Only the original correct version will be admitted and inserted into the coinscache piecewisely to cover and unify all kinds of infection.

The infected peer can relay the transactions it thinks are correct while listening. The counterfeiter can’t affect the correct ledgers that are mining because they have 1000 version4 blocks. The counterfeiters can’t participate in the mining either, they can’t receive and confirm a corruct-source transaction, or he can only mine out the block composed of transactions with source-txs records from common intersection, which doesn’t affect the community with huge amount of peers. Even if the counterfeiter continues to mine for empty blocks, it will only let the infected peers have more version4, so as to ban the other peers in advance, and then find their own missing parts.

Every block will be recognized as version3 or 4 by different peers. Finally, after receiving 300 consecutive version4, their infected state will be changed and no version3 block will be received. Fictitious transactions will not be spent, transactions from a missing source-tx(pruned in advance if honest) will repair themselves, and wrong transactions will not be mined undoubtedly. Even if the counterfeiters form clusters and mine according to fictitious transactions, it is only equivalent to persisting an infection, just as the DNA chain has forked and mutated, and the counterfeiting groups have formed a new small community. The final distribution results of all outputs in disk will only take up 10G space and the growth rate is getting lower and lower.

Undo file is still put in the chunk,the max block size is 2M, the block time is in 64 bits, and original non empty transaction number ‘orignTx’ will be put in block header to mine. The maturity of all outputs is 300, which can reduce the frequency of speculation, allow more peers to maintain their asset value, prevent a centralized online exchange appearing in the world, and limit the settlement delay of the mining pool. Meanwhile, the transaction’s inputs is at most 2, and the outputs is at most 4, which limits the settlement scale of the mining pool, because the transactions from the mining pool to a quantity of people require many transaction fees. In this way, a centralized mining pool will be weakened eventually and it is easier for infected peers to repair themselves. Bitsupercoin’s coinbase value has been being halved from 64, with an interval of 5 years. It still uses sha256, in order to be compatible with ASIC.

Storage centralization, online exchange centralization and mining-pool centralization are solved by a bold way, and the number of peers can increase continuously. And people are more willing to disperse their coins than stay a huge account, which is conducive to consumption and economic mobility. That is very close to the absolute decentralization.

Download(Mac&Ubuntu)
jianguoyun.com/p/DeBrwnIQoOyjCBi0sYcD
Reference
1.Satoshi Nakamoto

轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/25086.html

標籤:區塊鏈技術

上一篇:區塊鏈錢包開發怎么實作一個錢包地址生成多個充幣地址

下一篇:Lotus filecoin搭建lotus net peers | wc -l命令后出錯,求解,謝謝

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • JAVA使用 web3j 進行token轉賬

    最近新學習了下區塊鏈這方面的知識,所學不多,給大家分享下。 # 1. 關于web3j web3j是一個高度模塊化,反應性,型別安全的Java和Android庫,用于與智能合約配合并與以太坊網路上的客戶端(節點)集成。 # 2. 準備作業 jdk版本1.8 引入maven <dependency> < ......

    uj5u.com 2020-09-10 03:03:06 more
  • 以太坊智能合約開發框架Truffle

    前言 部署智能合約有多種方式,命令列的瀏覽器的渠道都有,但往往跟我們程式員的風格不太相符,因為我們習慣了在IDE里寫了代碼然后打包運行看效果。 雖然現在IDE中已經存在了Solidity插件,可以撰寫智能合約,但是部署智能合約卻要另走他路,沒辦法進行一個快捷的部署與測驗。 如果團隊管理的區塊節點多、 ......

    uj5u.com 2020-09-10 03:03:12 more
  • 谷歌二次驗證碼成為區塊鏈專用安全碼,你怎么看?

    前言 谷歌身份驗證器,前些年大家都比較陌生,但隨著國內互聯網安全的加強,它越來越多地出現在大家的視野中。 比較廣泛接觸的人群是國際3A游戲愛好者,游戲盜號現象嚴重+國外賬號安全應用廣泛,這類游戲一般都會要求用戶系結名為“兩步驗證”、“雙重驗證”等,平臺一般都推薦用谷歌身份驗證器。 后來區塊鏈業務風靡 ......

    uj5u.com 2020-09-10 03:03:17 more
  • 密碼學DAY1

    目錄 ##1.1 密碼學基本概念 密碼在我們的生活中有著重要的作用,那么密碼究竟來自何方,為何會產生呢? 密碼學是網路安全、資訊安全、區塊鏈等產品的基礎,常見的非對稱加密、對稱加密、散列函式等,都屬于密碼學范疇。 密碼學有數千年的歷史,從最開始的替換法到如今的非對稱加密演算法,經歷了古典密碼學,近代密 ......

    uj5u.com 2020-09-10 03:03:50 more
  • 密碼學DAY1_02

    目錄 ##1.1 ASCII編碼 ASCII(American Standard Code for Information Interchange,美國資訊交換標準代碼)是基于拉丁字母的一套電腦編碼系統,主要用于顯示現代英語和其他西歐語言。它是現今最通用的單位元組編碼系統,并等同于國際標準ISO/IE ......

    uj5u.com 2020-09-10 03:04:50 more
  • 密碼學DAY2

    ##1.1 加密模式 加密模式:https://docs.oracle.com/javase/8/docs/api/javax/crypto/Cipher.html ECB ECB : Electronic codebook, 電子密碼本. 需要加密的訊息按照塊密碼的塊大小被分為數個塊,并對每個塊進 ......

    uj5u.com 2020-09-10 03:05:42 more
  • NTP時鐘服務器的特點(京準電子)

    NTP時鐘服務器的特點(京準電子) NTP時鐘服務器的特點(京準電子) 京準電子官V——ahjzsz 首先對時間同步進行了背景介紹,然后討論了不同的時間同步網路技術,最后指出了建立全球或區域時間同步網存在的問題。 一、概 述 在通信領域,“同步”概念是指頻率的同步,即網路各個節點的時鐘頻率和相位同步 ......

    uj5u.com 2020-09-10 03:05:47 more
  • 標準化考場時鐘同步系統推進智能化校園建設

    標準化考場時鐘同步系統推進智能化校園建設 標準化考場時鐘同步系統推進智能化校園建設 安徽京準電子科技官微——ahjzsz 一、背景概述隨著教育事業的快速發展,學校建設如雨后春筍,隨之而來的學校教育、管理、安全方面的問題成了學校管理人員面臨的最大的挑戰,這些問題同時也是學生家長所擔心的。為了讓學生有更 ......

    uj5u.com 2020-09-10 03:05:51 more
  • 位元幣入門

    引言 位元幣基本結構 位元幣基礎知識 1)哈希演算法 2)非對稱加密技術 3)數字簽名 4)MerkleTree 5)哪有位元幣,有的是UTXO 6)位元幣挖礦與共識 7)區塊驗證(共識) 總結 引言 上一篇我們已經知道了什么是區塊鏈,此篇說一下區塊鏈的第一個應用——位元幣。其實先有位元幣,后有的區塊 ......

    uj5u.com 2020-09-10 03:06:15 more
  • 北斗對時服務器(北斗對時設備)電力系統應用

    北斗對時服務器(北斗對時設備)電力系統應用 北斗對時服務器(北斗對時設備)電力系統應用 京準電子科技官微(ahjzsz) 中國北斗衛星導航系統(英文名稱:BeiDou Navigation Satellite System,簡稱BDS),因為是目前世界范圍內唯一可以大面積提供免費定位服務的系統,所以 ......

    uj5u.com 2020-09-10 03:06:20 more
最新发布
  • web3 產品介紹:metamask 錢包 使用最多的瀏覽器插件錢包

    Metamask錢包是一種基于區塊鏈技術的數字貨幣錢包,它允許用戶在安全、便捷的環境下管理自己的加密資產。Metamask錢包是以太坊生態系統中最流行的錢包之一,它具有易于使用、安全性高和功能強大等優點。 本文將詳細介紹Metamask錢包的功能和使用方法。 一、 Metamask錢包的功能 數字資 ......

    uj5u.com 2023-04-20 08:46:47 more
  • Hyperledger Fabric 使用 CouchDB 和復雜智能合約開發

    在上個實驗中,我們已經實作了簡單智能合約實作及客戶端開發,但該實驗中智能合約只有基礎的增刪改查功能,且其中的資料管理功能與傳統 MySQL 比相差甚遠。本文將在前面實驗的基礎上,將 Hyperledger Fabric 的默認資料庫支持 LevelDB 改為 CouchDB 模式,以實作更復雜的資料... ......

    uj5u.com 2023-04-16 07:28:31 more
  • .NET Core 波場鏈離線簽名、廣播交易(發送 TRX和USDT)筆記

    Get Started NuGet You can run the following command to install the Tron.Wallet.Net in your project. PM> Install-Package Tron.Wallet.Net 配置 public reco ......

    uj5u.com 2023-04-14 08:08:00 more
  • DKP 黑客分析——不正確的代幣對比率計算

    概述: 2023 年 2 月 8 日,針對 DKP 協議的閃電貸攻擊導致該協議的用戶損失了 8 萬美元,因為 execute() 函式取決于 USDT-DKP 對中兩種代幣的余額比率。 智能合約黑客概述: 攻擊者的交易:0x0c850f,0x2d31 攻擊者地址:0xF38 利用合同:0xf34ad ......

    uj5u.com 2023-04-07 07:46:09 more
  • Defi開發簡介

    Defi開發簡介 介紹 Defi是去中心化金融的縮寫, 是一項旨在利用區塊鏈技術和智能合約創建更加開放,可訪問和透明的金融體系的運動. 這與傳統金融形成鮮明對比,傳統金融通常由少數大型銀行和金融機構控制 在Defi的世界里,用戶可以直接從他們的電腦或移動設備上訪問廣泛的金融服務,而不需要像銀行或者信 ......

    uj5u.com 2023-04-05 08:01:34 more
  • solidity簡單的ERC20代幣實作

    // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; import "hardhat/console.sol"; //ERC20 同質化代幣,每個代幣的本質或性質都是相同 //ETH 是原生代幣,它不是ERC20代幣, ......

    uj5u.com 2023-03-21 07:56:29 more
  • solidity 參考型別修飾符memory、calldata與storage 常量修飾符C

    在solidity語言中 參考型別修飾符(參考型別為存盤空間不固定的數值型別) memory、calldata與storage,它們只能修飾參考型別變數,比如字串、陣列、位元組等... memory 適用于方法傳參、返參或在方法體內使用,使用完就會清除掉,釋放記憶體 calldata 僅適用于方法傳參 ......

    uj5u.com 2023-03-08 07:57:54 more
  • solidity注解標簽

    在solidity語言中 注釋符為// 注解符為/* 內容*/ 或者 是 ///內容 注解中含有這幾個標簽給予我們使用 @title 一個應該描述合約/介面的標題 contract, library, interface @author 作者的名字 contract, library, interf ......

    uj5u.com 2023-03-08 07:57:49 more
  • 評價指標:相似度、GAS消耗

    【代碼注釋自動生成方法綜述】 這些評測指標主要來自機器翻譯和文本總結等研究領域,可以評估候選文本(即基于代碼注釋自動方法而生成)和參考文本(即基于手工方式而生成)的相似度. BLEU指標^[^?88^^?^]^:其全稱是bilingual evaluation understudy.該指標是最早用于 ......

    uj5u.com 2023-02-23 07:27:39 more
  • 基于NOSTR協議的“公有制”版本的Twitter,去中心化社交軟體Damus

    最近,一個幽靈,Web3的幽靈,在網路游蕩,它叫Damus,這玩意詮釋了什么叫做病毒式營銷,滑稽的是,一個Web3產品卻在Web2的產品鏈上瘋狂傳銷,各方大佬紛紛為其背書,到底發生了什么?Damus的葫蘆里,賣的是什么藥? 注冊和簡單實用 很少有什么產品在用戶注冊環節會有什么噱頭,但Damus確實出 ......

    uj5u.com 2023-02-05 06:48:39 more