随笔分类 -  区块链

摘要:私钥、公钥和地址是如何生成的? 大体来说,地址的生成的流程是:私钥 -> 公钥 -> 地址。因此地址的生成需要三步: 1. 生成一个随机的私钥(32字节) 2. 通过私钥生成公钥(64字节) 3. 通过公钥得到地址(20字节) 私钥的生成 私钥是一组64位的16进制字符,通过私钥我们能够访问一个账户 阅读全文
posted @ 2018-08-15 09:32 ahuo 阅读(1233) 评论(0) 推荐(0) 编辑
摘要:const crypto = require('crypto'); var EC = require('elliptic').ec; var ec = new EC('secp256k1'); var BN = require('bn.js'); var bs58 = require('bs58'); class PrivateKey { constructor() { ... 阅读全文
posted @ 2018-08-14 17:50 ahuo 阅读(474) 评论(0) 推荐(0) 编辑
摘要:1.创建目录 mkdir devnet cd devnet mkdir node1 node2 2.创建账户 geth --datadir node1/ account new geth --datadir node2/account new 把两个节点的地址和密码都分别写在文件里,以后后面使用. 阅读全文
posted @ 2018-07-25 11:24 ahuo 阅读(1947) 评论(0) 推荐(0) 编辑
摘要:"C:\Program Files\Java\jdk1.8.0_112\bin\java" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.2.4\lib\idea_rt.jar=17039:C:\Program Files\JetBrains... 阅读全文
posted @ 2018-06-06 15:29 ahuo 阅读(635) 评论(0) 推荐(0) 编辑
摘要:fabric-ca-server start -b admin:adminpw -d --db.type mysql --db.datasource "root:rootpwd@tcp(172.1.15.11:3306)/ca?parseTime=true" 阅读全文
posted @ 2018-05-20 15:52 ahuo 阅读(167) 评论(0) 推荐(0) 编辑
摘要:fabric-ca-client enroll -u http://admin:adminpw@localhost:7054 /root/.fabric-ca-client:总用量 12-rwxr-xr-x 1 root root 6504 5月 7 10:43 fabric-ca-client-c 阅读全文
posted @ 2018-05-04 17:30 ahuo 阅读(625) 评论(2) 推荐(0) 编辑
摘要:./cryptogen generate --output="a" --config=crypto-config.yaml 阅读全文
posted @ 2018-05-02 15:59 ahuo 阅读(234) 评论(0) 推荐(0) 编辑
摘要:https://github.com/hyperledger/fabric.githttps://github.com/hyperledger/blockchain-explorer.githttps://github.com/hyperledger/fabric-sdk-java.githttps 阅读全文
posted @ 2018-05-02 14:14 ahuo 阅读(231) 评论(0) 推荐(0) 编辑
摘要::gotar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz vi ~/.profile export PATH=$PATH:/usr/local/go/bin export GOROOT=/usr/local/go export GOPATH=$HOME 阅读全文
posted @ 2018-04-27 10:01 ahuo 阅读(975) 评论(8) 推荐(0) 编辑
摘要:LAST BLOCK5050578 (14.2s)TRANSACTIONS157.43 M (8.8 TPS)Hash Rate Network Difficulty234,495.00 GH/s 2,835.34 TH 70G的数据,同步了2天 阅读全文
posted @ 2018-02-08 11:06 ahuo 阅读(681) 评论(0) 推荐(0) 编辑
摘要:{ admin: { datadir: "/home/.ethereum/.ethereum", nodeInfo: { enode: "enode://a974839acc148a0a6383606578af12ce0b1f50cadb741047ab88f02f9fcdc2e752070c48557e941251b6ab1f4ff76ae53fa9ad5b10... 阅读全文
posted @ 2018-02-08 10:27 ahuo 阅读(818) 评论(0) 推荐(0) 编辑
摘要:用到的端口 TCP 30303 8545 sudo apt-get updatesudo apt-get installsoftware-properties-commonsudo add-apt-repository -y ppa:ethereum/ethereumsudo add-apt-rep 阅读全文
posted @ 2017-12-28 21:44 ahuo 阅读(912) 评论(3) 推荐(0) 编辑

点击右上角即可分享
微信分享提示