github.com/bigzoro/my_simplechain@v0.0.0-20240315012955-8ad0a2a29bb9/cmd/stress/README.md (about) 1 ##### 5s POA genesis.json 2 3 - gaslimt=1198915584, init count= 0xffd79941b7085805f48ded97298694c6bb950e2c 4 ```json 5 { 6 "config": { 7 "chainId": 110, 8 "homesteadBlock": 1, 9 "eip150Block": 2, 10 "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", 11 "eip155Block": 3, 12 "eip158Block": 3, 13 "byzantiumBlock": 4, 14 "constantinopleBlock": 5, 15 "clique": { 16 "period":5, 17 "epoch": 30000 18 } 19 }, 20 "nonce": "0x0", 21 "timestamp": "0x5d8993f8", 22 "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000ffd79941b7085805f48ded97298694c6bb950e2c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 23 "gasLimit": "0x47b760000", 24 "difficulty": "0x1", 25 "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", 26 "coinbase": "0x0000000000000000000000000000000000000000", 27 "alloc": { 28 "ffd79941b7085805f48ded97298694c6bb950e2c": { 29 "balance": "0x200000000000000000000000000000000000000000000000000000000000000" 30 } 31 }, 32 "number": "0x0", 33 "gasUsed": "0x0", 34 "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" 35 } 36 37 ``` 38 39 ##### 导入0xffd79941b7085805f48ded97298694c6bb950e2c私钥 40 41 ```bash 42 mkdir data 43 echo 04c070620a899a470a669fdbe0c6e1b663fd5bc953d9411eb36faa382005b3ad > privkey 44 echo 111111 > password 45 ./bin/sipe account import ./privkey --password ./password --datadir ./data 46 47 ``` 48 ##### sipe 49 50 - 初始化genesis block 51 ```bash 52 sipe init ./poa.json --datadir data/ 53 ``` 54 55 - 启动sipe 56 ```bash 57 sipe --datadir ./data --rpc --rpcvhosts "*" --rpcaddr 0.0.0.0 --rpcport 8545 \ 58 --rpccorsdomain "*" --rpcapi "db,eth,net,web3,personal,debug" --ws --wsaddr 0.0.0.0 \ 59 --wsport 8546 --wsapi "db,eth,net,web3,personal,debug" \ 60 --unlock 0xffd79941b7085805f48ded97298694c6bb950e2c --password <(echo 111111) \ 61 --mine --txpool.globalslots=102400 --verbosity 2 --gasprice 0 --miner.recommit 50000000s 62 ``` 63 64 ##### dummytx 65 带有20字节address+32字节hash值的转账交易 66 - `dummytx`: 默认是4个账户同时转账给0xffd79941b7085805f48ded97298694c6bb950e2c 67 - `dummytx x`:x=1/2/8 是选1或2或8个账户同时转账给0xffd79941b7085805f48ded97298694c6bb950e2c 68 69 如果账户没足够的sipc, 会从0xffd79941b7085805f48ded97298694c6bb950e2c转出10000sipc给该账户