打开主菜单
早鸟科技-区块链百科|数字货币大全
β
搜索
查看“42个币”的源代码
←
42个币
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
== 挖矿和区块链 == 挖矿是一个术语,指的是为42个币的区块链生成新的区块。 这个过程能够提供交易确认并保护运行历史。 '''''区块头'''''<br> 区块头是一种元数据结构,用于连接区块链中的区块。区块头的大小为80个字节,包含下列6中字段: {| class="wikitable" |- ! 字段 !! 类型 !! 大小 !! 描述 !! 更新时间 |- | 版本 || 无符号整型 || 4 || 区块头版本 || 更新软件后,就会指定一个新的版本号 |- | 前一区块的哈希值 || 无符号字符型 || 32 || 前一[[区块头]]的哈希值,用来连接区块头和列表 || 接收新区块时 |- | 根节点的哈希值 || 无符号字符型 || 32 || 默克树的哈希值,用来连接区块头和区块内容 || 交易池更新时 |- | 时间戳 || 无符号整型 || 4 || Unix时间戳 || POW模式下每几秒更新一次,或每次成功尝试POS模式 |- | 当前目标的哈希值 || 无符号整型|| 4 || 压缩格式的证明难度 || 调整挖矿难度时 |- | 随机数 || 无符号整型 || 4 || 响应POW模式的尝试 || 尝试POW模式新的哈希值,从不使用POS模式 |} 每个区块头都需满足所要求的证明。 '''''工作机制'''''<br> 所有矿工在自己的交易池中都有一个副本,记录了全部未经确认的有效交易。通常挖矿分四个阶段进行: ·从交易池中获取交易集; ·为这组交易计算默克树哈希值; ·创建区块头模板并使用默克树哈希值将其与这组交易相关联; <br> ·尝试为之前创建的区块头寻找合适的证明哈希。 '''''什么能作为证明?'''''<br> 证明唯一必需的特性就是它很难获得,但验证却很容易。现存的有许多证明概念,如工作量证明、权益证明和燃烧证明。 42个币支持使用权益和工作量来为区块头提供合适的证据。 '''''确认文件的例子'''''<br> 请注意,以下示例不适用于生产,它在这里只是辅助描述一些设置的目的。 # 42.conf configuration file. Lines beginning with # are comments. # Network-related settings: # Run on the test network instead of the real 42-coin network. #testnet=0 # Connect via a socks4 proxy - default none #proxy=127.0.0.1:9050 # Accepting incoming connections #listen=1 # Use as many addnode= settings as you like to connect to specific peers #addnode=193.23.181.148 #addnode=91.235.143.61:4242 # ... or use as many connect= settings as you like to connect ONLY # to specific peers: #connect=193.23.181.148 #connect=91.235.143.61:4242 #Maximum number of inbound+outbound connections. #maxconnections= # JSON-RPC options (for controlling a running 42d process) # You must set rpcuser and rpcpassword to secure the JSON-RPC api #rpcuser=Ulysseys #rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED # How many seconds 42-coin will wait for a complete RPC HTTP request after the HTTP connection is established. #rpctimeout=30 # By default, only RPC connections from localhost are allowed. Specify as many rpcallowip= settings as you like to allow connections from other hosts (and you may use * as a wildcard character): #rpcallowip=10.1.1.34 #rpcallowip=192.168.1.* # Listen for RPC connections on this TCP port: #rpcport=2121 # You can use 42d to send commands to 42d running on another host using this option: #rpcconnect=127.0.0.1 # Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate with 42d #rpcssl=1 # OpenSSL settings used when rpcssl=1 #rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH #rpcsslcertificatechainfile=server.cert #rpcsslprivatekeyfile=server.pem # Miscellaneous options # Pre-generate this many public/private key pairs, so wallet backups will be valid for both prior transactions and several dozen future transactions. #keypool=100 # Data directory path, your keys store, copy of blockchain and unspent outputs index are stored here. #datadir=D:\42 # Wallet file name #wallet=wallet.dat # Checkpoints policy (possible values are strict and advisory) #cppolicy=strict # Require confirmations for change (disabled by default) #confchange=0 # Enforce transaction scripts to use canonical PUSH operators enforcecanonical=1
返回至
42个币
。