<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                Bitcore是由Bitpay創建的一個模塊,用于構建基于比特幣和區塊鏈的應用程序Insight也是一個使用Bitcore生成比特幣瀏覽器的模塊。本博客將指導您將Bitcore與當前運行的比特幣連接起來,并使用Insight創建一個比特幣瀏覽器。按照以下步驟在系統中實現此功能。 ## 配置 **步驟1:安裝Bitcore** 運行此命令進行安裝 *bitcore* ```js npm install -g bitcore ``` 如果您在執行上述命令時遇到任何權限問題(即使使用 須藤),然后按照此鏈接中編寫的步驟解決此問題: [fixing-npm-permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) **步驟2:安裝和配置** **比特幣化** 逐一運行這些命令以進行安裝 *比特幣* ```java sudo add-apt-repository ppa:bitcoin/bitcoin sudo apt-get update sudo apt-get install bitcoind ``` 現在配置 *比特幣* 這樣它可以與 *位核*。 ```java cd ~/ mkdir .bitcoin cd .bitcoin vim bitcoin.conf ``` 在此*bitcoin.conf*文件中,復制粘貼到以下行 ``` server=1 testnet=1 whitelist=127.0.0.1 txindex=1 addressindex=1 timestampindex=1 spentindex=1 zmqpubrawtx=tcp://127.0.0.1:28332 zmqpubhashblock=tcp://127.0.0.1:28332 rpcallowip=127.0.0.1 uacomment=bitcore rpcuser=bitcoin rpcpassword=local321 ``` **步驟3:配置Bitcore和** **比特幣化** 現在在*.bitcoin文件夾中*創建*位核-節點。json* 文件,并在此文件中添加以下行: ```java { "network": "testnet", "port": 3001, "services": [ "bitcoind", "insight-api", "insight-ui", "web" ], "servicesConfig": { "bitcoind": { "spawn": { "datadir": "/home/ajit/.bitcoin", "exec": "bitcoind" } } } } ``` **注意**:由于我們要在*testnet*中運行*bitcoind*,*因此*我將網絡作為*testnet*提供,*并且*還會根據您的系統更改*datadir*路徑。 創建*包。**json** 內部文件*.bitcoin文件夾,并添加這些行: ```java { "description": "A full Bitcoin node build with Bitcore", "repository": "https://github.com/user/project", "license": "MIT", "readme": "README.md", "dependencies": { "bitcore-lib": "^v0.13.19", "bitcore-node": "^3.1.3", "insight-api": "^0.4.3", "insight-ui": "^0.4.0" } } ``` 現在,下面的命令在*.bitcoin文件夾中。* ```java npm install ``` 運行以下命令開始 *比特幣* 和*洞察界面* ``` bitcored ``` 現在,在瀏覽器中打開 *localhost:3001 / insight /*,您將能夠看到Insight UI Explorer,如下所示屏幕 射擊 下面: ![流程圖](http://blog.geeknr.com/index.php/archives/images/btc1.png) ## 文件 ethereum.toml **網絡版本** ``` [parity] mode="active" # 這個是parity的同步模式。active表示持續同步區塊;passive表示間歇性同步區塊;dark表示只有在parity的rpc端口得到命令時才同步區塊;last表示使用上次啟動時的值 chain = "foundation" # 該參數可以讓parity節點運行在不同的鏈上;foundation和mainnet都表示eth主網絡;classic表示以太經典;ropsten等是以太坊各種開發社區搞的公有測試練,一般都有對應的水龍頭網站可以獲取免費的幣以供測試。 base_path = "./data" # 數據存放位置,區塊信息、交易信息等數據文件都會保存在指定的目錄下,默認`~/.parity`中,所以為了方便管理,我們讓數據生成在指定的文件夾下面 light = false # light模式只同步區塊頭信息,因此能快速同步到最新塊,但是正常項目中都需要比較完整的區塊信息,所以這里設置成false no_persistent_txqueue = true # 這個參數和交易有關。節點關閉的時候可能內存中會有部分交易沒來得及發出去,如果這里設置成false,下次啟動節點的時候還能繼續發送這里面的交易;如果設置成true,就丟失了這些交易,需要重新發送。 [rpc] # rpc相當于http接口,可通過http請求的形式與parity交互 disable = false # 是否關閉rpc接口 port = 39842 # rpc接口的端口號 interface = "local" # rpc接口的ip,local即為localhost/127.0.0.1;也可以設置成0.0.0.0或者節點服務器所ip cors = ["*"] # 設置可訪問rpc端口ip列表,設置成*即所有人都能訪問 apis = ["all"] # 設置開放的api類型,api類型較多,可以以數組的形式傳入多個,需要開放所有api時即設置成all hosts = ["all"] # 設置host,host其實是瀏覽器Host header,一般設置成all server_threads = 10 # 可同時訪問的線程數量,這個設置非常有用,在geth中沒有這個設置所以容易導致內存不安全 [websockets] # websockets是另一種與parity的交互形式,他能提供rpc不能提供的信息,比如能訂閱新的交易并收到推送。 # 以下內容和rpc一致 disable = false port = 39843 interface = "local" origins = ["all"] # 瀏覽器的origin header apis = ["all"] hosts = ["all"] [ui] # parity提供一種web交互的方法,就是這個ui,生成一個網頁版的交互界面 force = false disable = false port = 39844 interface = "all" path = "./data/signer" # 網頁需要token來訪問,這個是服務器端token的存放地址 [network] #parity與其他節點交互的網絡設置,比如區塊信息的同步就是靠這個網絡 port = 30303 #與其他節點同步用的端口 min_peers = 10 #最少節點數量,達到這個數量的連接數以后才開始同步并認為同步的信息是正確的;同步的節點越多,就能保證信息越準確; max_peers = 100 #最大節點數量,防止連接過多節點導致消耗過多資源 ``` **使用版本** ``` [parity] mode="active" chain = "mainnet" base_path = "/data/eth_data" light = false no_persistent_txqueue = true [rpc] disable = false port = 8545 interface = "local" cors = ["*"] apis = ["all"] hosts = ["all"] server_threads = 10 [websockets] disable = false port = 8546 interface = "local" origins = ["all"] apis = ["all"] hosts = ["all"] [ui] force = false disable = false port = 8547 interface = "all" path = "/data/eth_data/signer" [network] port = 30303 min_peers = 10 max_peers = 100 ``` **原始版本** ``` [program:eth_node] command=/home/ubuntu/bin/parity --mode active --pruning fast --db-compaction ssd --cache-size 2048 --jsonrpc --jsonrpc-apis web3,eth,personal,parity,parity_accounts,traces --no-persistent-txqueue --db-path=/data/eth_data autostart=true autorestart=true startsecs=5 priority=1 stopasgroup=true killasgroup=true stderr_logfile=/data/eth_data/logs/eth_stderr.log stdout_logfile=/data/eth_data/logs/eth_stdout.log ``` **修改版本** ``` [program:eth_node] command=/home/ubuntu/bin/parity --mode active --pruning fast --db-compaction ssd --cache-size 2048 --jsonrpc --jsonrpc-apis web3,eth,personal,parity,parity_accounts,traces --ws-origins all --ws-hosts all --ws-interface all --jsonrpc-interface all --jsonrpc-cors all --no-persistent-txqueue --db-path=/data/eth_data autostart=true autorestart=true startsecs=5 priority=1 stopasgroup=true killasgroup=true stderr_logfile=/data/eth_data/logs/eth_stderr.log stdout_logfile=/data/eth_data/logs/eth_stdout.log ``` ## 附錄 - [使用Bitcoind和Bitcore Insight創建Bitcoin Explorer](https://www.oodlestechnologies.com/blogs/Create-Bitcoin-Explorer-Using-Bitcoind-And-Bitcore-Insight/) ## 引言 為程序員提供優質博文、實戰筆記、開發資源、學習資料內容包括:區塊鏈、架構、Golang、Vuejs、Python、Nodejs、C/C++函數庫等等。并不定期奉送各種福利。 ![我是圖片](https://img.vim-cn.com/5f/63ba18d1e1e7a78c8c7f8ffc83636fd8a3798d.jpg) > 歡迎訂閱:極客筆記Geeknr > > 我的名言:夢想還是要有的,萬一實現了呢? > > 原文鏈接:http://blog.geeknr.com/index.php/archives/22/
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看