https://geth.ethereum.org/downloads 접속해서 v1.11.6 설치 (v1.2.0부터는 PoW 지원X)
설치한 파일 압축풀고 Ethereum/PrivateNetwork/node1으로 이동시킴
$ mv ./Downloads/geth-darwin-amd64-1.11.6-ea9e62ca/geth /yumin/Ethereum/PrivateNetwork/node1
$ brew install go
//node1폴더에 계정생성
$ geth -datadir node1 account new

keystore 파일에 암호화된 형태로 저장됨
{
"config": {
"chainId": 10,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0
},
"coinbase": "0xf078445BEDF74fFe717ea5ff3Cea45c0390f9576",
"difficulty": "0x20000",
"extraData": "0x00",
"gasLimit": "0x2fefd8",
"nonce": "0x0000000000000042",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x00",
"alloc": {
"0xf078445BEDF74fFe717ea5ff3Cea45c0390f9576": {
"balance": "400000000000000000000000"
}
}
}
$ cd
$ cd Ethereum/PrivateNetwork/node1
$ geth --datadir node1 init genesis.json

$ cd PrivateNetwork/node1
$ geth --datadir node1 --networkid 10 --allow-insecure-unlock --http --http.port 8545 --http.addr "0.0.0.0" --http.corsdomain "*" --http.api "admin,eth,debug,miner,net,txpool,personal,web3" --port 30303 --nodiscover console

eth.accounts
eth.getBalance(eth.accounts[0])
web3.fromWei(eth.getBalance(eth.accounts[0]))

eth.getBlock(0)
net
$ geth attach rpc:http://localhost:8545

//노드정보확인
admin.nodeInfo
//채굴
miner.setEtherbase(eth.accounts[0])
true
eth.coinbase
"0xf078445bedf74ffe717ea5ff3cea45c0390f9576"
web3.fromWei(eth.getBalance(eth.accounts[0]))
150
eth.blockNumber
30
miner.start()
null

[채굴 시작]
miner.stop()
null
eth.blockNumber
199
//계정 추가 생성 및 계정 확인
personal.newAccount("2345")
"0x5ed1c561677540cb8c50bb372c238e3e5ff6ed92"
eth.accounts
["0xf078445bedf74ffe717ea5ff3cea45c0390f9576", "0x5ed1c561677540cb8c50bb372c238e3e5ff6ed92"]
//송금 트랜잭션 발행
eth.sendTransaction({from:eth.accounts[0], to:eth.accounts[1], value:web3.toWei(165, "ether")})
잠겨 있어서 잠금을 풀어주어야 함
personal.unlockAccount(eth.accounts[0])
비밀번호 1234 입력
eth.sendTransaction({from:eth.accounts[0], to:eth.accounts[1], value:web3.toWei(165, "ether")})
//송금 트랜잭션의 정보
eth.getTransaction("0x0cfe645ef72aac570fb2ecb7ef479fa8d0bb9e7c8b70bbe0f6a8863772bbe4ab")
//송금 트랜잭션 완료
eth.pendingTransactions
//계정 잔액 확인
web3.fromWei(eth.getBalance(eth.accounts[0])) //계정1잔액
web3.fromWei(eth.getBalance(eth.accounts[1])) //계정2잔액
node2디렉토리 생성

$ geth --datadir node2 init genesis.json

$ geth --datadir node2 --allow-insecure-unlock --networkid 10 --http --http.port 8546 --http.addr "0.0.0.0" --http.corsdomain "*" --http.api "admin,eth,debug,miner,net,txpool,personal,web3" --port 30304 --ipcdisable --authrpc.port 8553 --nodiscover console

node2에서
admin.addPeer("enode://b274382749989cfd2ece1d41ba3c20cf71faaa5c674610c368b34d3b7370744b47ab439e4a49319bf2189b428a22deab6201ef22f68d6e7e412ed183ade5cf28@127.0.0.1:30303?discport=0")

노드를 찾지 못하고 있음
✔︎✔︎✔︎✔︎