-------------------------------------------------------------------------------------------------------------------------------------$ mkdir -p $HOME/CQ/MyDataServer/Ethereum$ cd $HOME/CQ/MyDataServer/Ethereum$ mkdir FILE
$ tar zxf FILE/geth-alltools-darwin-amd64-1.10.21-67109427.tar.gz$ export PATH=`pwd`/geth-alltools-darwin-amd64-1.10.21-67109427:$PATH-------------------------------------------------------------------------------------------------------------------------------------リスト1{"config": {"chainId": 504,
"homesteadBlock": 0,"eip150Block": 0,"eip155Block": 0,"eip158Block": 0,"byzantiumBlock": 0,"constantinopleBlock": 0,"petersburgBlock": 0,"istanbulBlock": 0,"berlinBlock": 0,"londonBlock": 0},"alloc": {},"coinbase": "0x0000000000000000000000000000000000000000","difficulty": "0x20000","extraData": "","gasLimit": "0x2fefd8","nonce": "0x0000000000000042","mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000","parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000","timestamp": "0x00"}
リスト2-----------------------------------------------------------------------------------------------------------$ cd $HOME/CQ/MyDataServer/Ethereum$ mkdir DATA
$ geth --datadir `pwd`/DATA init `pwd`/genblock.json

INFO [08-26|00:16:37.230] Maximum peer countETH=50 LES=0 total=50
INFO [08-26|00:16:37.237] Set global gas cap
cap=50,000,000
INFO [08-26|00:16:37.239] Allocated cache and file handles
database=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/geth/chaindata cache=16.00MiB handles=16
INFO [08-26|00:16:37.483] Opened ancient databasedatabase=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/geth/chaindata/ancient readonly=false
INFO [08-26|00:16:37.483] Writing custom genesis block
INFO [08-26|00:16:37.489] Persisted trie from memory databasenodes=0 size=0.00B time="18.871µs" gcnodes=0 gcsize=0.00B
gctime=0s livenodes=1 livesize=0.00B
INFO [08-26|00:16:37.492] Successfully wrote genesis state
database=chaindata hash=d118bd..7a409f
INFO [08-26|00:16:37.494] Allocated cache and file handles
database=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/geth/lightchaindata cache=16.00MiB handles=16
INFO [08-26|00:16:37.700] Opened ancient databasedatabase=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/geth/lightchaindata/ancient readonly=false
INFO [08-26|00:16:37.701] Writing custom genesis block
INFO [08-26|00:16:37.701] Persisted trie from memory databasenodes=0 size=0.00B time="5.915µs" gcnodes=0 gcsize=0.00B
gctime=0s livenodes=1 livesize=0.00B
INFO [08-26|00:16:37.703] Successfully wrote genesis state
database=lightchaindata hash=d118bd..7a409f$-----------------------------------------------------------------------------------------------------------リスト3$ geth --networkid "504" --nodiscover --datadir `pwd`/DATA/ --http --http.addr "192.168.3.3" --http.port "8545" --http.corsdomain"*" --http.api "eth,net,web3,personal,admin,rpc,txpool,miner" --maxpeers 0 console
リスト4-----------------------------------------------------------------------------------------------------------$ geth --networkid "504" --nodiscover --datadir `pwd`/DATA/ --http --http.addr "192.168.3.3" --http.port "8545" --http.corsdomain"*" --http.api "eth,net,web3,personal,admin,rpc,txpool,miner" --maxpeers 0 console
INFO [08-26|00:17:22.587] Maximum peer countETH=0 LES=0 total=0
INFO [08-26|00:17:22.592] Set global gas cap
cap=50,000,000
INFO [08-26|00:17:22.596] Allocated trie memory caches
clean=154.00MiB dirty=256.00MiB
INFO [08-26|00:17:22.596] Allocated cache and file handles
database=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/geth/chaindata cache=512.00MiB handles=5120
INFO [08-26|00:17:22.715] Opened ancient databasedatabase=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/geth/chaindata/ancient readonly=false
INFO [08-26|00:17:22.718]
INFO [08-26|00:17:22.718]

-------------------------------------------------------------------------------------------------------------------------------------------------------INFO [08-26|00:17:22.718] Chain ID: 504 (unknown)
INFO [08-26|00:17:22.718] Consensus: unknown
INFO [08-26|00:17:22.718]
INFO [08-26|00:17:22.718] Pre-Merge hard forks:
INFO [08-26|00:17:22.718] - Homestead:0(https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/homestead.md)
INFO [08-26|00:17:22.718] - Tangerine Whistle (EIP 150): 0(https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/tangerine-whistle.md)
INFO [08-26|00:17:22.718] - Spurious Dragon/1 (EIP 155): 0(https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/spurious-dragon.md)
INFO [08-26|00:17:22.718] - Spurious Dragon/2 (EIP 158): 0(https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/spurious-dragon.md)
INFO [08-26|00:17:22.718] - Byzantium:
0(https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/byzantium.md)
INFO [08-26|00:17:22.719] - Constantinople:
0(https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/constantinople.md)
INFO [08-26|00:17:22.719] - Petersburg:0(https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/petersburg.md)
INFO [08-26|00:17:22.719] - Istanbul:
0(https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/istanbul.md)
INFO [08-26|00:17:22.719] - Berlin:0(https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/berlin.md)
INFO [08-26|00:17:22.719] - London:0(https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/london.md)
INFO [08-26|00:17:22.719]
INFO [08-26|00:17:22.719] The Merge is not yet available for this network!
INFO [08-26|00:17:22.719] - Hard-fork specification:
https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md)
INFO [08-26|00:17:22.719]-------------------------------------------------------------------------------------------------------------------------------------------------------INFO [08-26|00:17:22.719]
INFO [08-26|00:17:22.721] Disk storage enabled for ethash caches dir=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/geth/ethash
count=3
INFO [08-26|00:17:22.721] Disk storage enabled for ethash DAGs
dir=/Users/tsuchiya/Library/Ethash count=2
INFO [08-26|00:17:22.722] Initialising Ethereum protocol
network=504 dbversion=<nil>
INFO [08-26|00:17:22.723] Loaded most recent local header
number=0 hash=d118bd..7a409f td=131,072 age=53y4mo4w
INFO [08-26|00:17:22.723] Loaded most recent local full blocknumber=0 hash=d118bd..7a409f td=131,072 age=53y4mo4w
INFO [08-26|00:17:22.723] Loaded most recent local fast blocknumber=0 hash=d118bd..7a409f td=131,072 age=53y4mo4w
WARN [08-26|00:17:22.723] Failed to load snapshot, regenerating
err="missing or corrupted snapshot"
INFO [08-26|00:17:22.723] Rebuilding state snapshot
INFO [08-26|00:17:22.725] Resuming state snapshot generation
root=56e81f..63b421 accounts=0 slots=0 storage=0.00B dangling=0

elapsed=1.732ms
INFO [08-26|00:17:22.725] Regenerated local transaction journaltransactions=0 accounts=0
INFO [08-26|00:17:22.726] Generated state snapshot
accounts=0 slots=0 storage=0.00B dangling=0 elapsed=2.737ms
INFO [08-26|00:17:22.727] Gasprice oracle is ignoring threshold set threshold=2
WARN [08-26|00:17:22.727] Error reading unclean shutdown markers error="leveldb: not found"
WARN [08-26|00:17:22.728] Engine API enabled
protocol=eth
WARN [08-26|00:17:22.729] Engine API started but chain not configured for merge yet
INFO [08-26|00:17:22.729] Starting peer-to-peer node
instance=Geth/v1.10.21-stable-67109427/darwin-amd64/go1.18.4
INFO [08-26|00:17:22.833] New local node record
seq=1,661,440,642,831 id=876d30f9d19a3090 ip=127.0.0.1 udp=0
tcp=30303
INFO [08-26|00:17:22.833] Started P2P networking
self="enode://1fea05927172a7ddf911a0c84708742e83b464f582506e423170d2d010921f5fc78241ef5aca3a23435cb26933338d688cab39cbd1166fbf52a6
b587dfa52aba@127.0.0.1:30303?discport=0"
INFO [08-26|00:17:22.835] IPC endpoint opened
url=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/geth.ipc
INFO [08-26|00:17:22.836] Generated JWT secret
path=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/geth/jwtsecret
INFO [08-26|00:17:22.837] HTTP server started
endpoint=192.168.3.3:8545 auth=false prefix= cors=*
vhosts=localhost
INFO [08-26|00:17:22.840] WebSocket enabled
url=ws://127.0.0.1:8551
INFO [08-26|00:17:22.840] HTTP server started
endpoint=127.0.0.1:8551 auth=true prefix= cors=localhost
vhosts=localhost
WARN [08-26|00:17:22.900] Served eth_coinbase
reqid=3 duration="45.001µs" err="etherbase must be explicitly
specified"
Welcome to the Geth JavaScript console!
instance: Geth/v1.10.21-stable-67109427/darwin-amd64/go1.18.4
at block: 0 (Thu Jan 01 1970 09:00:00 GMT+0900 (JST))
datadir: /Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA
modules: admin:1.0 debug:1.0 engine:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
To exit, press ctrl-d or type exit
> INFO [08-26|00:17:25.777] Mapped network port
IGDv1-IP1">

proto=tcp extport=30303 intport=30303 interface="UPNP-----------------------------------------------------------------------------------------------------------リスト5-----------------------------------------------------------------------------------------------------------> eth.getBlock(0){baseFeePerGas: 1000000000,
difficulty: 131072,
extraData: "0x",gasLimit: 3141592,
gasUsed: 0,
hash: "0xd118bd9c6cdf4be6844c7af2b5d86e0d23e91cbe46955c0c23a61dfa577a409f",
logsBloom:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
miner: "0x0000000000000000000000000000000000000000",
mixHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
nonce: "0x0000000000000042",
number: 0,
parentHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
receiptsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
size: 512,
stateRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
timestamp: 0,
totalDifficulty: 131072,
transactions: [],transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
uncles: []}>-----------------------------------------------------------------------------------------------------------リスト6-----------------------------------------------------------------------------------------------------------> personal.newAccount("dataprovider")INFO [08-26|08:51:52.628] Your new key was generated
address=0x70F9E0445A572D62EaBF6d6669f69283558D7E2f
WARN [08-26|08:51:52.639] Please backup your key file!
path=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/keystore/UTC--2022-08-25T23-51-49.997635000Z--70f9e0445a572d62eabf6d6669f692835
58d7e2f
WARN [08-26|08:51:52.639] Please remember your password!
"0x70f9e0445a572d62eabf6d6669f69283558d7e2f">> personal.newAccount("user1")
INFO [08-26|08:52:29.728] Your new key was generated
address=0x3590a22D97c4AAdfa57F8403FAc370118f47dbc0
WARN [08-26|08:52:29.728] Please backup your key file!

path=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/keystore/UTC--2022-08-25T23-52-26.534459000Z--3590a22d97c4aadfa57f8403fac370118
f47dbc0
WARN [08-26|08:52:29.728] Please remember your password!
"0x3590a22d97c4aadfa57f8403fac370118f47dbc0">>> eth.accounts["0x70f9e0445a572d62eabf6d6669f69283558d7e2f", "0x3590a22d97c4aadfa57f8403fac370118f47dbc0"]>-----------------------------------------------------------------------------------------------------------リスト7-----------------------------------------------------------------------------------------------------------> eth.blockNumber0> eth.getBalance("0x70f9e0445a572d62eabf6d6669f69283558d7e2f")0> eth.getBalance("0x3590a22d97c4aadfa57f8403fac370118f47dbc0")0>-----------------------------------------------------------------------------------------------------------リスト8-----------------------------------------------------------------------------------------------------------> miner.start()
INFO [08-26|09:13:25.152] Updated mining threads
threads=4
INFO [08-26|09:13:25.154] Transaction pool price threshold updated price=1,000,000,000
null> INFO [08-26|09:13:25.179] Commit new sealing work
number=1 sealhash=c8eed5..ca2873 uncles=0 txs=0 gas=0 fees=0
elapsed=22.033ms
INFO [08-26|09:13:25.193] Commit new sealing work
number=1 sealhash=c8eed5..ca2873 uncles=0 txs=0 gas=0 fees=0
elapsed=35.256ms
INFO [08-26|09:13:28.279] Generating DAG in progress
epoch=0 percentage=0 elapsed=2.184s
INFO [08-26|09:13:30.079] Generating DAG in progress
epoch=0 percentage=1 elapsed=3.985s
INFO [08-26|09:13:32.161] Generating DAG in progress
epoch=0 percentage=2 elapsed=6.067s
INFO [08-26|09:13:34.254] Generating DAG in progress
epoch=0 percentage=3 elapsed=8.161s
〜〜

中略

〜〜

INFO [08-26|09:16:30.598] Generating DAG in progress
INFO [08-26|09:16:30.603] Generated ethash verification cache
INFO [08-26|09:16:31.568] Successfully sealed new block
elapsed=3m6.401s
INFO [08-26|09:16:31.569] 🔨 mined potential block
INFO [08-26|09:16:31.571] Commit new sealing work
elapsed=1.295ms
INFO [08-26|09:16:31.573] Commit new sealing work
elapsed=3.131ms
INFO [08-26|09:16:31.711] Successfully sealed new block
elapsed=140.090ms〜〜

中略

epoch=0 percentage=99 elapsed=3m4.515s
epoch=0 elapsed=3m4.518s
number=1 sealhash=c8eed5..ca2873 hash=3c1d80..b07bd2
number=1 hash=3c1d80..b07bd2
number=2 sealhash=54f11e..f6f016 uncles=0 txs=0 gas=0 fees=0
number=2 sealhash=54f11e..f6f016 uncles=0 txs=0 gas=0 fees=0
number=2 sealhash=54f11e..f6f016 hash=45e7dd..a6db80〜〜

INFO [08-26|09:29:57.525] Commit new sealing work
elapsed="273.882µs"
INFO [08-26|09:29:57.525] Commit new sealing work
elapsed="427.611µs"
INFO [08-26|09:29:58.953] Successfully sealed new block
elapsed=1.428s
INFO [08-26|09:29:58.954] 🔗 block reached canonical chain
INFO [08-26|09:29:58.954] 🔨 mined potential block
INFO [08-26|09:29:58.955] Commit new sealing work
elapsed="201.795µs"
INFO [08-26|09:29:58.955] Commit new sealing work
elapsed="375.16µs"

number=590 sealhash=673379..bb0f36 uncles=0 txs=0 gas=0 fees=0
number=590 sealhash=673379..bb0f36 uncles=0 txs=0 gas=0 fees=0
number=590 sealhash=673379..bb0f36 hash=48cd83..70a3f4
number=583 hash=eb1d00..766a44
number=590 hash=48cd83..70a3f4
number=591 sealhash=0a2ca2..1d59f9 uncles=0 txs=0 gas=0 fees=0
number=591 sealhash=0a2ca2..1d59f9 uncles=0 txs=0 gas=0 fees=0-----------------------------------------------------------------------------------------------------------リスト9-----------------------------------------------------------------------------------------------------------> eth.blockNumber
590> eth.getBalance("0x70f9e0445a572d62eabf6d6669f69283558d7e2f")
1.18e+21> eth.getBalance("0x3590a22d97c4aadfa57f8403fac370118f47dbc0")0>（a）ブロックと残高を確認

> eth.coinbase"0x70f9e0445a572d62eabf6d6669f69283558d7e2f">（b）マイニング報酬を受け取るアカウントを確認する> miner.setEtherbase("0x3590a22d97c4aadfa57f8403fac370118f47dbc0")
true> eth.coinbase"0x3590a22d97c4aadfa57f8403fac370118f47dbc0">（c）アカウント 0x359…にも残高を入れる> eth.blockNumber
782> eth.getBalance("0x70f9e0445a572d62eabf6d6669f69283558d7e2f")
1.18e+21> eth.getBalance("0x3590a22d97c4aadfa57f8403fac370118f47dbc0")
384000000000000000000>>（d）再度，ブロックと残高を確認-----------------------------------------------------------------------------------------------------------リスト10-----------------------------------------------------------------------------------------------------------> eth.getBlock(0){baseFeePerGas: 1000000000,
difficulty: 131072,
extraData: "0x",gasLimit: 3141592,

gasUsed: 0,
hash: "0xd118bd9c6cdf4be6844c7af2b5d86e0d23e91cbe46955c0c23a61dfa577a409f",
logsBloom:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
miner: "0x0000000000000000000000000000000000000000",
mixHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
nonce: "0x0000000000000042",
number: 0,
parentHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
receiptsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
size: 512,
stateRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
timestamp: 0,
totalDifficulty: 131072,
transactions: [],transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
uncles: []}> eth.getBlock(1){baseFeePerGas: 875000000,
difficulty: 131072,
extraData: "0xd983010a15846765746888676f312e31382e348664617277696e",
gasLimit: 3144658,
gasUsed: 0,
hash: "0x3c1d80b7d7efde7ec7b7d1f23a38fd2cba7a2f3fc9e25b4f9a88d3f585b07bd2",
logsBloom:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
miner: "0x70f9e0445a572d62eabf6d6669f69283558d7e2f",
mixHash: "0xb5c3da49f716991c246c6fed35e1c90c12985981dcd9a82a80516c83290fff96",
nonce: "0x2f2e9230ab0de188",
number: 1,
parentHash: "0xd118bd9c6cdf4be6844c7af2b5d86e0d23e91cbe46955c0c23a61dfa577a409f",
receiptsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
size: 542,
stateRoot: "0xd4d3fa5f1cee700f395e3169e6bae8a5a324f3e1631e2e44c9bfdcc0868625e8",

timestamp: 1661472805,
totalDifficulty: 262144,
transactions: [],transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
uncles: []}> eth.getBlock(2){baseFeePerGas: 765625000,
difficulty: 131072,
extraData: "0xd983010a15846765746888676f312e31382e348664617277696e",
gasLimit: 3147727,
gasUsed: 0,
hash: "0x45e7dd2cf7e00f654b3887807f7fee8609a724a782fe8a56ff080db305a6db80",
logsBloom:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
miner: "0x70f9e0445a572d62eabf6d6669f69283558d7e2f",
mixHash: "0x305369eef83ff87694c1c5d0a2c2de7450b1765ff0518316774e8164b7cac65b",
nonce: "0x6a3504d5098f3d41",
number: 2,
parentHash: "0x3c1d80b7d7efde7ec7b7d1f23a38fd2cba7a2f3fc9e25b4f9a88d3f585b07bd2",
receiptsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
size: 542,
stateRoot: "0xba8a08780862a5bbff75324c405d49b396404c78d9be190a3f002534f8417a06",
timestamp: 1661472991,
totalDifficulty: 393216,
transactions: [],transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
uncles: []}> eth.getBlock(781){baseFeePerGas: 7,
difficulty: 181750,
extraData: "0xd983010a15846765746888676f312e31382e348664617277696e",
gasLimit: 6731454,
gasUsed: 0,
hash: "0x4554e0ce051ccdd836a2a6b6416018ce058dd053420d7badca482a6c4a55f232",
logsBloom:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
miner: "0x3590a22d97c4aadfa57f8403fac370118f47dbc0",
mixHash: "0x4f9ce0ff7b009b07e68148333d021fa996e7ab807a09975748de6135b9050e2f",
nonce: "0x35d622cd242bd9ff",
number: 781,
parentHash: "0x5256e2d982fe15f1d3956d1850dc5dbfecff27de9b9ea34c4e328d9d30c5cdb0",
receiptsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
size: 540,
stateRoot: "0xe642a3443d7abc16caa1726be85d1095b0930d9b77f1eef6359a6c91762da3fc",
timestamp: 1661475601,
totalDifficulty: 122672298,
transactions: [],transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
uncles: []}> eth.getBlock(782){baseFeePerGas: 7,
difficulty: 181838,
extraData: "0xd983010a15846765746888676f312e31382e348664617277696e",
gasLimit: 6738026,
gasUsed: 0,
hash: "0xc10ba9c1d77a05d125b13198101d1a91a9ecec0f725ed0646eda43b606b847d6",
logsBloom:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
miner: "0x3590a22d97c4aadfa57f8403fac370118f47dbc0",
mixHash: "0xbefd513ec9e7cb0e7492e8db52d7781d18df5dea344f62f3f2e7df9499bffd25",
nonce: "0x6651a8c88e100a38",
number: 782,
parentHash: "0x4554e0ce051ccdd836a2a6b6416018ce058dd053420d7badca482a6c4a55f232",
receiptsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
size: 540,
stateRoot: "0x32cfbbed7c2a865374c1017d838b23071d500fee58e1960fe009c1b01fdc0f5c",
timestamp: 1661475602,
totalDifficulty: 122854136,
transactions: [],transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",

uncles: []}> eth.getBlock(783)null>-----------------------------------------------------------------------------------------------------------リスト11-----------------------------------------------------------------------------------------------------------> personal.newAccount("user2")
INFO [08-26|10:43:52.029] Your new key was generated
address=0xA28D4bfa0c0BCA13D432A89F25215A17cfa32b71
WARN [08-26|10:43:52.029] Please backup your key file!
path=/Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA/keystore/UTC--2022-08-26T01-43-48.816450000Z--a28d4bfa0c0bca13d432a89f25215a17c
fa32b71
WARN [08-26|10:43:52.029] Please remember your password!
"0xa28d4bfa0c0bca13d432a89f25215a17cfa32b71">-----------------------------------------------------------------------------------------------------------リスト12-----------------------------------------------------------------------------------------------------------$ geth attach http://192.168.3.3:8545
Welcome to the Geth JavaScript console!
instance: Geth/v1.10.21-stable-67109427/darwin-amd64/go1.18.4
coinbase: 0x3590a22d97c4aadfa57f8403fac370118f47dbc0
at block: 782 (Fri Aug 26 2022 10:00:02 GMT+0900 (JST))
datadir: /Users/tsuchiya/CQ/MyDataServer/Ethereum/DATA
modules: admin:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
To exit, press ctrl-d or type exit>-----------------------------------------------------------------------------------------------------------リスト13------------------------------------------------------------------------------------------------------------

personal.unlockAccount("0x3590a22d97c4aadfa57f8403fac370118f47dbc0")
eth.sendTransaction({from: "0x3590a22d97c4aadfa57f8403fac370118f47dbc0", to: "0xa28d4bfa0c0bca13d432a89f25215a17cfa32b71", value:
web3.toWei(10, "ether")})-----------------------------------------------------------------------------------------------------------リスト14-----------------------------------------------------------------------------------------------------------> personal.unlockAccount("0x3590a22d97c4aadfa57f8403fac370118f47dbc0")
Unlock account 0x3590a22d97c4aadfa57f8403fac370118f47dbc0
Passphrase:
GoError: Error: account unlock with HTTP access is forbidden at web3.js:6365:9(45)at github.com/ethereum/go-ethereum/internal/jsre.MakeCallback.func1 (native)at <eval>:1:1(3)>-----------------------------------------------------------------------------------------------------------リスト15-----------------------------------------------------------------------------------------------------------$ geth --networkid "504" --nodiscover --datadir `pwd`/DATA/ --http --http.addr "192.168.3.3" --http.port "8545" --http.corsdomain"*" --http.api "eth,net,web3,personal,admin,rpc,txpool,miner" --maxpeers 0 --allow-insecure-unlock console-----------------------------------------------------------------------------------------------------------リスト16（送金前の残高の状態）-----------------------------------------------------------------------------------------------------------> eth.getBalance("0x3590a22d97c4aadfa57f8403fac370118f47dbc0")627999978999999853000> eth.getBalance("0xa28d4bfa0c0bca13d432a89f25215a17cfa32b71")
0-----------------------------------------------------------------------------------------------------------（送金処理）-----------------------------------------------------------------------------------------------------------> personal.unlockAccount("0x3590a22d97c4aadfa57f8403fac370118f47dbc0")

Unlock account 0x3590a22d97c4aadfa57f8403fac370118f47dbc0
Passphrase:true> eth.sendTransaction({from: "0x3590a22d97c4aadfa57f8403fac370118f47dbc0", to: "0xa28d4bfa0c0bca13d432a89f25215a17cfa32b71",
value: web3.toWei(10, "ether")})"0x75a75c31d119ce1e10c33edd12121fdb73e2119febb48d5030095ae720ed9922"（送金後の残高の状態）-----------------------------------------------------------------------------------------------------------> eth.getBalance("0x3590a22d97c4aadfa57f8403fac370118f47dbc0")
617999957999999706000> eth.getBalance("0xa28d4bfa0c0bca13d432a89f25215a17cfa32b71")
10000000000000000000>-----------------------------------------------------------------------------------------------------------リスト17-----------------------------------------------------------------------------------------------------------INFO [08-26|13:47:59.944] Commit new sealing work
number=1599 sealhash=4a6d6c..af0365 uncles=0 txs=0 gas=0
fees=0elapsed="220.094µs"
INFO [08-26|13:47:59.944] Commit new sealing work
number=1599 sealhash=4a6d6c..af0365 uncles=0 txs=0 gas=0
fees=0elapsed="516.364µs"
INFO [08-26|13:48:03.373] Submitted transaction
hash=0x75a75c31d119ce1e10c33edd12121fdb73e2119febb48d5030095ae720ed9922 from=0x3590a22D97c4AAdfa57F8403FAc370118f47dbc0 nonce=1
recipient=0xA28D4bfa0c0BCA13D432A89F25215A17cfa32b71 value=10,000,000,000,000,000,000
INFO [08-26|13:48:04.303] Successfully sealed new blocknumber=1599 sealhash=4a6d6c..af0365 hash=4ffa7e..505c80
elapsed=4.359s
INFO [08-26|13:48:04.303] 🔗 block reached canonical chain
number=1592 hash=91c0e0..403391
INFO [08-26|13:48:04.303] 🔨 mined potential blocknumber=1599 hash=4ffa7e..505c80
INFO [08-26|13:48:04.304] Commit new sealing work
number=1600 sealhash=bb6b67..b27daa uncles=0 txs=0 gas=0
fees=0elapsed="255.339µs"
INFO [08-26|13:48:04.305] Commit new sealing work
number=1600 sealhash=fd616c..22e02f uncles=0 txs=1 gas=21000
fees=2.1e-05 elapsed=1.468ms
INFO [08-26|13:48:04.817] Successfully sealed new blocknumber=1600 sealhash=fd616c..22e02f hash=3805dd..6bb463
elapsed=511.847ms
INFO [08-26|13:48:04.817] 🔗 block reached canonical chain
number=1593 hash=76e363..352f0d

INFO [08-26|13:48:04.817] 🔨 mined potential blocknumber=1600 hash=3805dd..6bb463
INFO [08-26|13:48:04.817] Commit new sealing work
number=1601 sealhash=52044d..18b9c8 uncles=0 txs=0 gas=0
fees=0elapsed="209.98µs"-----------------------------------------------------------------------------------------------------------リスト18-----------------------------------------------------------------------------------------------------------> eth.getTransaction("0x75a75c31d119ce1e10c33edd12121fdb73e2119febb48d5030095ae720ed9922"){
accessList: [],blockHash: "0x3805dd368987faf29f8140e6cc58ae069840e54fc9b575eac424ec9aac6bb463",
blockNumber: 1600,
chainId: "0x1f8",
from: "0x3590a22d97c4aadfa57f8403fac370118f47dbc0",
gas: 21000,
gasPrice: 1000000007,
hash: "0x75a75c31d119ce1e10c33edd12121fdb73e2119febb48d5030095ae720ed9922",
input: "0x",maxFeePerGas: 1000000014,
maxPriorityFeePerGas: 1000000000,
nonce: 1,
r: "0xe77e32ba377e87a7b9d87b5d962b737b83c7f584bd933539a865a3d4174442cd",
s: "0x6fa580f66faf3c3e809a68530568f0ee679b11d28cd8d253524335113790b891",
to: "0xa28d4bfa0c0bca13d432a89f25215a17cfa32b71",transactionIndex: 0,
type: "0x2",
v: "0x1",
value: 10000000000000000000}>-----------------------------------------------------------------------------------------------------------リスト19-----------------------------------------------------------------------------------------------------------> eth.getBlock(1600){
baseFeePerGas: 7,
difficulty: 241396,

extraData: "0xd983010a15846765746888676f312e31382e348664617277696e",
gasLimit: 14970509,
gasUsed: 21000,
hash: "0x3805dd368987faf29f8140e6cc58ae069840e54fc9b575eac424ec9aac6bb463",
logsBloom:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
miner: "0x70f9e0445a572d62eabf6d6669f69283558d7e2f",
mixHash: "0xe5918a09cf29cac283750b6e3ad879494fec19022bb9b02f701e89d84b893942",
nonce: "0x36b6bf9407bf0a1e",
number: 1600,
parentHash: "0x4ffa7e44690fc0928572a775f668ccd3b25554a39ff2215f936bb96fda505c80",
receiptsRoot: "0xf78dfb743fbd92ade140711c8bbc542b5e307f0ab7984eff35d751969fe57efa",
sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
size: 664,
stateRoot: "0x023bd62ddaa167d255285c75ae66e836aefa5a001426dbee4c2b9714b966ed1b",
timestamp: 1661489284,
totalDifficulty: 287728392,
transactions: ["0x75a75c31d119ce1e10c33edd12121fdb73e2119febb48d5030095ae720ed9922"],transactionsRoot: "0x3fb46a0bf1d4e4bb95562239ccb6baccf54705af1362cbf3a9918590ef18b719",
uncles: []}>-----------------------------------------------------------------------------------------------------------リスト20-------------------------------------------------------------------------------------------------------------------------------------$ cd $HOME/CQ/MyDataServer/Ethereum/$ $HOME/CQ/MyDataServer/Ethereum/FILE配下にダウンロードしたファイルを配置します。
$ chmod +x $HOME/CQ/MyDataServer/Ethereum/FILE/solc-macos$ mkdir Solidity$ cd Solidity$ ln -s $HOME/CQ/MyDataServer/Ethereum/FILE/solc-macos solc
$ cd ..
$ export PATH=`pwd`/Solidity:$PATH--------------------------------------------------------------------------------------------------------------------------------------

リスト21-----------------------------------------------------------------------------------------------------------$ solc
solc, the Solidity commandline compiler.
This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See 'solc --license'
for details.
Usage: solc [options] [input_file...]Compiles the given Solidity input files (or the standard input if none given or"-" is used as a file name) and outputs the components specified in the options
at standard output or in files in the output directory, if specified.
Imports are automatically read from the filesystem, but it is also possible toremap paths using the context:prefix=path syntax.
Example:solc --bin -o /tmp/solcoutput dapp-bin=/usr/local/lib/dapp-bin contract.sol
General Information:--help--version--license--input-file arg

Show help message and exit.
Show version and exit.
Show licensing information and exit.
input file

Input Options:
〜〜

省略

〜〜

-----------------------------------------------------------------------------------------------------------リスト22-----------------------------------------------------------------------------------------------------------contract MyKVS {mapping(string => string) data;
function put_data(string calldata key, string calldata value) public {// 空文字の場合は入れない
if (bytes(value).length != 0) {data[key] = value;}}function get_data(string calldata key) public view returns(string memory) {string memory val = data[key];
return val;}}-----------------------------------------------------------------------------------------------------------リスト23----------------------------------------------------------------------------------------------------------> var bin = "0x60 〜〜〜〜〜〜 100033"
undefined> var abi = [{"inputs":[ 〜〜〜 "type":"function"}]undefined-----------------------------------------------------------------------------------------------------------リスト24----------------------------------------------------------------------------------------------------------> var contract = eth.contract(abi)undefined> personal.unlockAccount("0x70f9e0445a572d62eabf6d6669f69283558d7e2f")
Unlock account 0x70f9e0445a572d62eabf6d6669f69283558d7e2f
Passphrase:true> var myContract = contract.new({ from: "0x70f9e0445a572d62eabf6d6669f69283558d7e2f", data: bin})undefined> var cnt = eth.contract(myContract.abi).at(myContract.address);
undefined----------------------------------------------------------------------------------------------------------リスト25

----------------------------------------------------------------------------------------------------------> cnt.put_data.sendTransaction("tt","val", {from:"0x70f9e0445a572d62eabf6d6669f69283558d7e2f"})"0x58ea8fb7a1c7d8d3c0a613cc01de0923bb1cc798a37492a10cbaac02b53ab94f"> cnt.get_data.call("tt")"val">----------------------------------------------------------------------------------------------------------リスト26