生成基本的路径

1
mkdir -p ~/home/ethereum

如果 git 版本是 1.x,卸载旧的 git,安装最新版的 2.x 以上的 git:

1
git version && yum erase -y git && yum install -y git

执行以下命令,编译以太坊客户端:

1
2
3
4
5
6
7
8
9
yum install -y golang
yum install -y gmp-devel
git clone https://github.com/ethereum/go-ethereum
cd go-ethereum
make all
# 生成基本路径
mkdir -p ~/home/ethereum
# 进入基本路径
cd ~/home/ethereum

如果有“fatal: unable to access ‘https://github.com/ethereum/go-ethereum/‘: Failed connect to github.com:443; Operation now in progress”考虑是容器的外网访问权限问题。

把 export PATH=$PATH:/root/go-ethereum/build/bin 加入环境变量:

1
vi ~/.bashrc

生成一个叫 datadir 的文件夹来存储账户的私钥和链数据。

生成一个内容为123456的 password.txt。

用这个命令生成一个初始账户:

1
geth --datadir=./datadir --password ./password.txt account new > account1.txt

查看一下生成文件的内容,我们可以看到如下内容:

1
Address: {xxxx}

使用 ll 也可以查看到相似内容:

1
2
3
4
5
6
7
8
9
10
ll datadir/keystore/
total 4
-rw------- 1 root root 491 Nov 4 16:09 UTC--2017-11-04T08-09-39.695537331Z--aaa

# 在矿工文件夹下复制生成统一的钱包:
mkdir -p datadir/keystore/
vi datadir/keystore/UTC--2017-11-06T04-59-02.bbbb

# 把以下内容写进去
{"address":"bbb","crypto":{"cipher":"aes-128-ctr","ciphertext":"c661055998679e53e47417b22a62964e132dc668cb7ddad6314fec1481f4db39","cipherparams":{"iv":"c984ab42be45266d4e6518c0fb147715"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"dd43eff76c9fb94a592341f01fb50a1b27e2b6c96eb1cc6df8441f6fbf475992"},"mac":"44f3803a705db1e5c04d5fc9138d0a4d500234eca86ec6a2c9340f4993b4d6b9"},"id":"166b1af2-848f-49c1-8e7a-2901792b32fb","version":3}

生成一个私链创世区块配置文件,gas limit 不能超过53bit,也就是13个 f,不然会出现 admin 连不上,合约出问题等种种麻烦事:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"config" : {
"chainID": 102400000,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"alloc": {
},
"coinbase" : "0x0000000000000000000000000000000000000000",
"difficulty" : "0x400",
"extraData" : "0x6666",
"gasLimit" : "0xfffffffffffff",
"nonce" : "0xdeadbeefdeadbeef",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000001",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000001",
"timestamp" : "0x00"
}

其中,

chainID 是接下来要用到的网络 id。

alloc 是为了链初始化的时候就先充值的账户 。

coinbase 是 这个节点附带的矿工的私人账户,可以写不正确的账户,反正节点启动的时候,会试图使用当前 keystore 里面的第一个账户 。

difficulty 是这个网络的难度,数字越小,出块的时间越快。据 gitter 上的人说,实际上区块链网络会自动调整网络难度。

extraData 一个个性签名,目前还是用16进制的数好,不要用中文。

gasLimit 当前网络中一个区块可以容纳的 gas 的总数。

初始化链(这是必须的,否则console 可以运行,账户余额为0,挖矿也会出问题):

1
2
3
4
5
6
7
8
9
10
geth --datadir datadir init genesis.json

# 出现这六行就对了

INFO [11-24|10:37:39] Allocated cache and file handles database=/root/home/ethereum/datadir/geth/chaindata cache=16 handles=16
INFO [11-24|10:37:39] Writing custom genesis block
INFO [11-24|10:37:39] Successfully wrote genesis state database=chaindata hash=2394b8…d2a0b8
INFO [11-24|10:37:39] Allocated cache and file handles database=/root/home/ethereum/datadir/geth/lightchaindata cache=16 handles=16
INFO [11-24|10:37:39] Writing custom genesis block
INFO [11-24|10:37:39] Successfully wrote genesis state database=lightchaindata

启动节点并进入控制台,这个命令可以重复执行,而且可以加上 —verbosity 6 来获取细节的输出:

1
2
geth --identity "Ehtereum1" --rpc --rpcport "8545" --datadir datadir --port "30303" --nodiscover --rpccorsdomain "*" --networkid 102400000 --gasprice 1  console
geth --identity "Ehtereum2" --rpc --rpcport "8545" --datadir datadir --port "30303" --nodiscover --rpccorsdomain "*" --networkid 102400000 --gasprice 1 console

注意,这里的 —networkid 必须和 genesis.json 里的 chainid 相同 ,否则,可能覆盖前者。
查看当前节点信息:admin.nodeInfo

查看当前到底有多少个账户,可以看到预先生成的账户以及导入了:

1
2
eth.accounts
["bbb"]

在 console 查看第一个账户的余额:

1
eth.getBalance(eth.accounts[0])

查看所有账户余额的函数:

1
2
3
4
5
6
7
8
9
10
function checkAllBalances() {
var totalBal = 0;
for (var acctNum in eth.accounts) {
var acct = eth.accounts[acctNum];
var acctBal = web3.fromWei(eth.getBalance(acct), "ether");
totalBal += parseFloat(acctBal);
console.log(" eth.accounts[" + acctNum + "]: \t" + acct + " \tbalance: " + acctBal + " ether");
}
console.log(" Total balance: " + totalBal + " ether");
};

在 console 上查看区块数量:

1
eth.blockNumber

大部分是空区块的话,一个空区块大概需要 1-2kb 的磁盘空间。按 2kb 一个空区块来看,一年500万个空区块大概需要消耗 10g 的硬盘空间。

在 console 上开始挖矿:

1
2
3
4
5
6
# 开始挖矿
miner.start(1)
# 停止挖矿
miner.stop()
# 查看当前矿工算力
miner.hashrate

每挖出一个区块来,有5个以太币的奖励。公网有差不多9000万个以太币。

在 node2 上把之前的动作(除了与账户相关的动作)都重做一遍。然后试图重建同一个账户节点的内容:

1
touch datadir/keystore/UTC--2017-11-06T04-59-02.250684750Z--9c08de3381cdc76b1672220acfea33e2e502f65e

如果没有相关的目录结构就 mkdir,如果有的话,就直接 touch,然后把 node1 的相同文件下的信息写进去。正如 geth 的官方文档所说:“It is safe to transfer the entire directory or the individual keys therein between ethereum nodes. ”

在 node2 上启动区块节点控制台,在控制台上使用如下得到 node2 的节点信息:

1
2
3
admin.nodeInfo.enode

"enode://966bd49783a2578e59e4d16c8e165721483cbe05864990061a2470fff35f1309272347006442d4f0cc4dc60dc24e39210ca0069409bee60a79237f3cc5923306@0.0.0.0:30303"

注意,把@和:30303之间的地址换成公网可以访问的 IP 地址。

在 node1 的控制台执行以下命令:

1
admin.addPeer("enode://966bd49783a2578e59e4d16c8e165721483cbe05864990061a2470fff35f1309272347006442d4f0cc4dc60dc24e39210ca0069409bee60a79237f3cc5923306@10.95.136.68:30303")

其实可以考虑使用 bootnode,如果 bootnode 不挂的话,倒是有点像超级账本里的 anchor peer。

如果两边都开始挖矿了,可以通过以下两个命令查看网络内的节点:

1
2
admin.peers
net.peerCount

两边都开始挖矿,block 会逐渐同步到 canonical chain。
gas 的计算公式: cost = gas * gasPrice , ( 账户1减少的资产 - 账户2增加的资产)/ gasPrice = 消耗的gas
要注意,如果节点重启, peers 有可能会丢失,大家又会在各自的区块链上挖矿,直到重新 addpeer 然后同步,也有自动同步的例子。
而且,节点之间的 account 是不能同步的。必须要拷贝 account 的 keystore 文件才行。

尝试着转账:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 创建新账户,注意,千万不要忘记这个步骤的密码。 geth 的官方文档也明确写了:
# If you lose the password you use to encrypt your account, you will not be able to access that account. Repeat: It is NOT possible to access your account without a password and there is no forgot my password option here. Do not forget it.
personal.newAccount()

# 解锁被转账账户

#在 geth 实例运行期间永久解锁某个账户
personal.unlockAccount(eth.accounts[0], "123456", 0)
# 或者考虑:
geth --unlock 9c08de3381cdc76b1672220acfea33e2e502f65e --password password.txt --datadir datadir/

# 输入转账金额
eth.sendTransaction({from:eth.accounts[0],to:eth.accounts[1],value:amount})
# 或者使用以下形式
eth.sendTransaction({from: '0x036a03fc47084741f83938296a1c8ef67f6e34fa', to: '0xa8ade7feab1ece71446bed25fa0cf6745c19c3d5', value: web3.toWei(1, "ether")})
# 查看还未被打包的交易
txpool.status
# 查看某笔交易的细节
eth.getTransaction("0x0c59f431068937cbe9e230483bc79f59bd7146edc8ff5ec37fea6710adcab825")
# 查看某个区块的特定内容
eth.getBlock(33)

在这个函数里,可以确认最近 N 个区块里有多少区块是由这个矿工挖出来的:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function minedBlocks(lastn, addr) {
addrs = [];
if (!addr) {
addr = eth.coinbase
}
limit = eth.blockNumber - lastn
for (i = eth.blockNumber; i >= limit; i--) {
if (eth.getBlock(i).miner == addr) {
addrs.push(i)
}
}
return addrs
}
// scans the last 1000 blocks and returns the blocknumbers of blocks mined by your coinbase
// (more precisely blocks the mining reward for which is sent to your coinbase).
minedBlocks(1000, eth.coinbase);
//[352708, 352655, 352559]

获取当前的 gas limit:

1
eth.getBlock("pending").gasLimit

结果总是 4712388,不管 genesis.json 里面设置得多高。

删除链数据而保留账户数据:

1
geth removedb

在退出 console 后,用挖矿模式 nohup 静默挖矿:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 不要用 --nodiscover,否则 bootnodes 选项会失灵
nohup geth --mine --minerthreads=1 --identity "Ehtereum1" --rpc --rpcapi admin,eth,miner,debug,personal,txpool,web3,net --rpcport "8545" --datadir datadir --port "30303" --rpccorsdomain "*" --networkid 102400000 --gasprice 1 --ws --wsport 8546 --wsaddr 0.0.0.0 --wsorigins "*" --wsapi admin,eth,miner,debug,personal,txpool,web3,net --targetgaslimit '0xfffffffffffff' > miner.log&
nohup geth --mine --minerthreads=1 --identity "Ehtereum2" --rpc --rpcapi admin,eth,miner,debug,personal,txpool,web3,net --rpcport "8545" --datadir datadir --port "30303" --rpccorsdomain "*" --networkid 102400000 --gasprice 1 --ws --wsport 8546 --wsaddr 0.0.0.0 --wsorigins "*" --wsapi admin,eth,miner,debug,personal,txpool,web3,net --targetgaslimit '0xfffffffffffff' > miner.log&

# 无 identity 自动连接的矿工 这要两个矿工的区块链天然同步才可以,否则就要用下面的 bootnodes 格式
nohup geth --mine --minerthreads=1 --rpc --rpcapi admin,eth,miner,debug,personal,txpool,web3,net --rpcport "8545" --datadir datadir --port "30303" --rpccorsdomain "*" --networkid 102400000 --gasprice 1 --ws --wsport 8546 --wsaddr 0.0.0.0 --wsorigins "*" --wsapi admin,eth,miner,debug,personal,txpool,web3,net --targetgaslimit '0xfffffffffffff' > miner.log&


# 连接非 bootnode 的普通矿工节点
# 锚节点是 lan-consul-dev2
nohup geth --mine --minerthreads=1 --rpc --rpcapi admin,eth,miner,debug,personal,txpool,web3,net --rpcport "8545" --datadir datadir --port "30303" --rpccorsdomain "*" --networkid 102400000 --gasprice 1 --ws --wsport 8546 --wsaddr 0.0.0.0 --wsorigins "*" --wsapi admin,eth,miner,debug,personal,txpool,web3,net --bootnodes enode://68273662bac1b5df8163fb39334879b8d80206ea982b29e2f213786254617d07c7cb60e14aca5946fe74f93f7561f0f563fe8d89878755fa96fc393e1dc560de@10.95.136.46:30303 --targetgaslimit '0xfffffffffffff' > miner.log&


# 使用 bootnode 的矿工网络连接
# 锚节点是 lan-consul-dev3
nohup geth --mine --minerthreads=1 --rpc --rpcapi admin,eth,miner,debug,personal,txpool,web3,net --rpcport "8545" --datadir datadir --port "30303" --rpccorsdomain "*" --networkid 102400000 --gasprice 1 --ws --wsport 8546 --wsaddr 0.0.0.0 --wsorigins "*" --wsapi admin,eth,miner,debug,personal,txpool,web3,net --bootnodes enode://"enode://aca18eec598114bca57c04dc44def7a7551d1622d32cd0e7be58c8a142902cf7a678787782380797175238f2eb132e6338e8232de43f6697d2d52579418354d6@10.95.136.46:30303 > miner.log&

可以用如下命令查看当前到底有多少可用的 module:

1
2
echo '{"jsonrpc":"2.0","method":"rpc_modules","params":[],"id":1}' | nc -U datadir/geth.ipc
{"jsonrpc":"2.0","id":1,"result":{"admin":"1.0","debug":"1.0","eth":"1.0","miner":"1.0","net":"1.0","personal":"1.0","rpc":"1.0","txpool":"1.0","web3":"1.0"}}

可以用 modules 查看到到底打开了多少个 rpc api:

1
2
echo '{"jsonrpc":"2.0","method":"rpc_modules","params":[],"id":1}' | nc -U datadir/geth.ipc
{"jsonrpc":"2.0","id":1,"result":{"admin":"1.0","debug":"1.0","eth":"1.0","miner":"1.0","net":"1.0","personal":"1.0","rpc":"1.0","txpool":"1.0","web3":"1.0"}}

可以用 modules 查看到到底打开了多少个 rpc api:

1
modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

通过本地端口 attach 上去:

1
geth attach http://localhost:8545

在本地安装高版本的 nodejs:

1
curl --location https://rpm.nodesource.com/setup_8.x | sudo bash - && yum install -y gcc-c++ make && yum install -y nodejs

目前已知的账户是:bbb

启动 bootnode 节点,让大家都去连 boot node:

1
2
3
4
5
6
bootnode -genkey nodekeyfile
cat nodekeyfile
nohup bootnode -nodekey nodekeyfile > bootnode.log&

# 查看远程的 bootnode 是不是正在监听 udp 端口
nc -vuz 10.95.136.68 30301

从零开始重启动整个矿工节点的脚本:

1
2
3
4
5
6
7
kill -9 $(ps -ef | grep 'geth --mine'  | grep -v grep | awk '{print $2}')
rm -rf datadir/geth
rm -rf miner.log
geth --datadir datadir init genesis.json
nohup geth --mine --minerthreads=1 --rpc --rpcapi admin,eth,miner,debug,personal,txpool,web3,net --rpcport "8545" --datadir datadir --port "30303" --rpccorsdomain "*" --networkid 102400000 --gasprice 1 --ws --wsport 8546 --wsaddr 0.0.0.0 --wsorigins "*" --wsapi admin,eth,miner,debug,personal,txpool,web3,net --bootnodes enode://68273662bac1b5df8163fb39334879b8d80206ea982b29e2f213786254617d07c7cb60e14aca5946fe74f93f7561f0f563fe8d89878755fa96fc393e1dc560de@10.95.136.46:30303 --targetgaslimit '0xfffffffffffff' > miner.log&
sleep 5
geth attach http://localhost:8545

使用 clique 算法(puppeth 生成出来的 genesis.json):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
{
"config": {
"chainId": 102400000,
"homesteadBlock": 1,
"eip150Block": 2,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 3,
"eip158Block": 3,
"byzantiumBlock": 4,
"clique": {
"period": 1,
"epoch": 30000
}
},
"nonce": "0x0",
"timestamp": "0x5a1d2789",
"extraData": "0x30783636363600000000000000000000000000000000000000000000000000009c08de3381cdc76b1672220acfea33e2e502f65e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0xfffffffffffff",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"0000000000000000000000000000000000000000": {
"balance": "0x1"
},
"0000000000000000000000000000000000000001": {
"balance": "0x1"
},
"0000000000000000000000000000000000000002": {
"balance": "0x1"
},
"0000000000000000000000000000000000000003": {
"balance": "0x1"
},
"0000000000000000000000000000000000000004": {
"balance": "0x1"
},
"0000000000000000000000000000000000000005": {
"balance": "0x1"
},
"0000000000000000000000000000000000000006": {
"balance": "0x1"
},
"0000000000000000000000000000000000000007": {
"balance": "0x1"
},
"0000000000000000000000000000000000000008": {
"balance": "0x1"
},
"0000000000000000000000000000000000000009": {
"balance": "0x1"
},
"000000000000000000000000000000000000000a": {
"balance": "0x1"
},
"000000000000000000000000000000000000000b": {
"balance": "0x1"
},
"000000000000000000000000000000000000000c": {
"balance": "0x1"
},
"000000000000000000000000000000000000000d": {
"balance": "0x1"
},
"000000000000000000000000000000000000000e": {
"balance": "0x1"
},
"000000000000000000000000000000000000000f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000010": {
"balance": "0x1"
},
"0000000000000000000000000000000000000011": {
"balance": "0x1"
},
"0000000000000000000000000000000000000012": {
"balance": "0x1"
},
"0000000000000000000000000000000000000013": {
"balance": "0x1"
},
"0000000000000000000000000000000000000014": {
"balance": "0x1"
},
"0000000000000000000000000000000000000015": {
"balance": "0x1"
},
"0000000000000000000000000000000000000016": {
"balance": "0x1"
},
"0000000000000000000000000000000000000017": {
"balance": "0x1"
},
"0000000000000000000000000000000000000018": {
"balance": "0x1"
},
"0000000000000000000000000000000000000019": {
"balance": "0x1"
},
"000000000000000000000000000000000000001a": {
"balance": "0x1"
},
"000000000000000000000000000000000000001b": {
"balance": "0x1"
},
"000000000000000000000000000000000000001c": {
"balance": "0x1"
},
"000000000000000000000000000000000000001d": {
"balance": "0x1"
},
"000000000000000000000000000000000000001e": {
"balance": "0x1"
},
"000000000000000000000000000000000000001f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000020": {
"balance": "0x1"
},
"0000000000000000000000000000000000000021": {
"balance": "0x1"
},
"0000000000000000000000000000000000000022": {
"balance": "0x1"
},
"0000000000000000000000000000000000000023": {
"balance": "0x1"
},
"0000000000000000000000000000000000000024": {
"balance": "0x1"
},
"0000000000000000000000000000000000000025": {
"balance": "0x1"
},
"0000000000000000000000000000000000000026": {
"balance": "0x1"
},
"0000000000000000000000000000000000000027": {
"balance": "0x1"
},
"0000000000000000000000000000000000000028": {
"balance": "0x1"
},
"0000000000000000000000000000000000000029": {
"balance": "0x1"
},
"000000000000000000000000000000000000002a": {
"balance": "0x1"
},
"000000000000000000000000000000000000002b": {
"balance": "0x1"
},
"000000000000000000000000000000000000002c": {
"balance": "0x1"
},
"000000000000000000000000000000000000002d": {
"balance": "0x1"
},
"000000000000000000000000000000000000002e": {
"balance": "0x1"
},
"000000000000000000000000000000000000002f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000030": {
"balance": "0x1"
},
"0000000000000000000000000000000000000031": {
"balance": "0x1"
},
"0000000000000000000000000000000000000032": {
"balance": "0x1"
},
"0000000000000000000000000000000000000033": {
"balance": "0x1"
},
"0000000000000000000000000000000000000034": {
"balance": "0x1"
},
"0000000000000000000000000000000000000035": {
"balance": "0x1"
},
"0000000000000000000000000000000000000036": {
"balance": "0x1"
},
"0000000000000000000000000000000000000037": {
"balance": "0x1"
},
"0000000000000000000000000000000000000038": {
"balance": "0x1"
},
"0000000000000000000000000000000000000039": {
"balance": "0x1"
},
"000000000000000000000000000000000000003a": {
"balance": "0x1"
},
"000000000000000000000000000000000000003b": {
"balance": "0x1"
},
"000000000000000000000000000000000000003c": {
"balance": "0x1"
},
"000000000000000000000000000000000000003d": {
"balance": "0x1"
},
"000000000000000000000000000000000000003e": {
"balance": "0x1"
},
"000000000000000000000000000000000000003f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000040": {
"balance": "0x1"
},
"0000000000000000000000000000000000000041": {
"balance": "0x1"
},
"0000000000000000000000000000000000000042": {
"balance": "0x1"
},
"0000000000000000000000000000000000000043": {
"balance": "0x1"
},
"0000000000000000000000000000000000000044": {
"balance": "0x1"
},
"0000000000000000000000000000000000000045": {
"balance": "0x1"
},
"0000000000000000000000000000000000000046": {
"balance": "0x1"
},
"0000000000000000000000000000000000000047": {
"balance": "0x1"
},
"0000000000000000000000000000000000000048": {
"balance": "0x1"
},
"0000000000000000000000000000000000000049": {
"balance": "0x1"
},
"000000000000000000000000000000000000004a": {
"balance": "0x1"
},
"000000000000000000000000000000000000004b": {
"balance": "0x1"
},
"000000000000000000000000000000000000004c": {
"balance": "0x1"
},
"000000000000000000000000000000000000004d": {
"balance": "0x1"
},
"000000000000000000000000000000000000004e": {
"balance": "0x1"
},
"000000000000000000000000000000000000004f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000050": {
"balance": "0x1"
},
"0000000000000000000000000000000000000051": {
"balance": "0x1"
},
"0000000000000000000000000000000000000052": {
"balance": "0x1"
},
"0000000000000000000000000000000000000053": {
"balance": "0x1"
},
"0000000000000000000000000000000000000054": {
"balance": "0x1"
},
"0000000000000000000000000000000000000055": {
"balance": "0x1"
},
"0000000000000000000000000000000000000056": {
"balance": "0x1"
},
"0000000000000000000000000000000000000057": {
"balance": "0x1"
},
"0000000000000000000000000000000000000058": {
"balance": "0x1"
},
"0000000000000000000000000000000000000059": {
"balance": "0x1"
},
"000000000000000000000000000000000000005a": {
"balance": "0x1"
},
"000000000000000000000000000000000000005b": {
"balance": "0x1"
},
"000000000000000000000000000000000000005c": {
"balance": "0x1"
},
"000000000000000000000000000000000000005d": {
"balance": "0x1"
},
"000000000000000000000000000000000000005e": {
"balance": "0x1"
},
"000000000000000000000000000000000000005f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000060": {
"balance": "0x1"
},
"0000000000000000000000000000000000000061": {
"balance": "0x1"
},
"0000000000000000000000000000000000000062": {
"balance": "0x1"
},
"0000000000000000000000000000000000000063": {
"balance": "0x1"
},
"0000000000000000000000000000000000000064": {
"balance": "0x1"
},
"0000000000000000000000000000000000000065": {
"balance": "0x1"
},
"0000000000000000000000000000000000000066": {
"balance": "0x1"
},
"0000000000000000000000000000000000000067": {
"balance": "0x1"
},
"0000000000000000000000000000000000000068": {
"balance": "0x1"
},
"0000000000000000000000000000000000000069": {
"balance": "0x1"
},
"000000000000000000000000000000000000006a": {
"balance": "0x1"
},
"000000000000000000000000000000000000006b": {
"balance": "0x1"
},
"000000000000000000000000000000000000006c": {
"balance": "0x1"
},
"000000000000000000000000000000000000006d": {
"balance": "0x1"
},
"000000000000000000000000000000000000006e": {
"balance": "0x1"
},
"000000000000000000000000000000000000006f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000070": {
"balance": "0x1"
},
"0000000000000000000000000000000000000071": {
"balance": "0x1"
},
"0000000000000000000000000000000000000072": {
"balance": "0x1"
},
"0000000000000000000000000000000000000073": {
"balance": "0x1"
},
"0000000000000000000000000000000000000074": {
"balance": "0x1"
},
"0000000000000000000000000000000000000075": {
"balance": "0x1"
},
"0000000000000000000000000000000000000076": {
"balance": "0x1"
},
"0000000000000000000000000000000000000077": {
"balance": "0x1"
},
"0000000000000000000000000000000000000078": {
"balance": "0x1"
},
"0000000000000000000000000000000000000079": {
"balance": "0x1"
},
"000000000000000000000000000000000000007a": {
"balance": "0x1"
},
"000000000000000000000000000000000000007b": {
"balance": "0x1"
},
"000000000000000000000000000000000000007c": {
"balance": "0x1"
},
"000000000000000000000000000000000000007d": {
"balance": "0x1"
},
"000000000000000000000000000000000000007e": {
"balance": "0x1"
},
"000000000000000000000000000000000000007f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000080": {
"balance": "0x1"
},
"0000000000000000000000000000000000000081": {
"balance": "0x1"
},
"0000000000000000000000000000000000000082": {
"balance": "0x1"
},
"0000000000000000000000000000000000000083": {
"balance": "0x1"
},
"0000000000000000000000000000000000000084": {
"balance": "0x1"
},
"0000000000000000000000000000000000000085": {
"balance": "0x1"
},
"0000000000000000000000000000000000000086": {
"balance": "0x1"
},
"0000000000000000000000000000000000000087": {
"balance": "0x1"
},
"0000000000000000000000000000000000000088": {
"balance": "0x1"
},
"0000000000000000000000000000000000000089": {
"balance": "0x1"
},
"000000000000000000000000000000000000008a": {
"balance": "0x1"
},
"000000000000000000000000000000000000008b": {
"balance": "0x1"
},
"000000000000000000000000000000000000008c": {
"balance": "0x1"
},
"000000000000000000000000000000000000008d": {
"balance": "0x1"
},
"000000000000000000000000000000000000008e": {
"balance": "0x1"
},
"000000000000000000000000000000000000008f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000090": {
"balance": "0x1"
},
"0000000000000000000000000000000000000091": {
"balance": "0x1"
},
"0000000000000000000000000000000000000092": {
"balance": "0x1"
},
"0000000000000000000000000000000000000093": {
"balance": "0x1"
},
"0000000000000000000000000000000000000094": {
"balance": "0x1"
},
"0000000000000000000000000000000000000095": {
"balance": "0x1"
},
"0000000000000000000000000000000000000096": {
"balance": "0x1"
},
"0000000000000000000000000000000000000097": {
"balance": "0x1"
},
"0000000000000000000000000000000000000098": {
"balance": "0x1"
},
"0000000000000000000000000000000000000099": {
"balance": "0x1"
},
"000000000000000000000000000000000000009a": {
"balance": "0x1"
},
"000000000000000000000000000000000000009b": {
"balance": "0x1"
},
"000000000000000000000000000000000000009c": {
"balance": "0x1"
},
"000000000000000000000000000000000000009d": {
"balance": "0x1"
},
"000000000000000000000000000000000000009e": {
"balance": "0x1"
},
"000000000000000000000000000000000000009f": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000aa": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ab": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ac": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ad": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ae": {
"balance": "0x1"
},
"00000000000000000000000000000000000000af": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ba": {
"balance": "0x1"
},
"00000000000000000000000000000000000000bb": {
"balance": "0x1"
},
"00000000000000000000000000000000000000bc": {
"balance": "0x1"
},
"00000000000000000000000000000000000000bd": {
"balance": "0x1"
},
"00000000000000000000000000000000000000be": {
"balance": "0x1"
},
"00000000000000000000000000000000000000bf": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ca": {
"balance": "0x1"
},
"00000000000000000000000000000000000000cb": {
"balance": "0x1"
},
"00000000000000000000000000000000000000cc": {
"balance": "0x1"
},
"00000000000000000000000000000000000000cd": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ce": {
"balance": "0x1"
},
"00000000000000000000000000000000000000cf": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000da": {
"balance": "0x1"
},
"00000000000000000000000000000000000000db": {
"balance": "0x1"
},
"00000000000000000000000000000000000000dc": {
"balance": "0x1"
},
"00000000000000000000000000000000000000dd": {
"balance": "0x1"
},
"00000000000000000000000000000000000000de": {
"balance": "0x1"
},
"00000000000000000000000000000000000000df": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ea": {
"balance": "0x1"
},
"00000000000000000000000000000000000000eb": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ec": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ed": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ee": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ef": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000fa": {
"balance": "0x1"
},
"00000000000000000000000000000000000000fb": {
"balance": "0x1"
},
"00000000000000000000000000000000000000fc": {
"balance": "0x1"
},
"00000000000000000000000000000000000000fd": {
"balance": "0x1"
},
"00000000000000000000000000000000000000fe": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ff": {
"balance": "0x1"
},
"9c08de3381cdc76b1672220acfea33e2e502f65e": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

从日志里读到事务 hash,找到这个事务的输入数据:

1
console.log(web3.toAscii(eth.getTransaction('0xf89e3cb782916c075e550d8ed41136fae3b38f8cd96a716b2dee1bcc5a675570').input))