1.10.26 버전 다운, 상위 버전은 ethash 안됨
{
"config": {
// 체인 아이디
"chainId": 12345,
// 하드포크
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"berlinBlock": 0,
// 합의 알고리즘
"ethash": {}
},
"difficulty": "1", // 블록 생성시 난이도, 숫자가 높을수록 블록생성 난이도가 높아져 사용해야하는 리소스
"gasLimit": "8000000", // 블록당 최대 가스 사용량, 이 숫자가 높을수록 블록에 더 많은 트랜잭션을 담을 수 있음
// 미리 설정되는 계정들, 이 계정들은 미리 생성된 이더를 받는다
"alloc": {
"7df9a875a174b3bc565e6424a0050ebc1b2d1d82": { "balance": "300000" },
"f41c74c9ae680c1aa78f42e5647a62f353b7bdde": { "balance": "400000" }
}
}
~/geth-darwin-amd64-1.13.5-916d6a44 ./geth --datadir ./data init ./genesis.json
If you're encountering the "geth cannot be opened because the developer cannot be verified" message on your Mac, this is due to macOS's Gatekeeper security feature, which prevents apps not verified by Apple from running. Here's how to resolve this issue:
1. Open System Preferences: Click on the System Preferences icon (looks like a gear) in your Dock.
2. Navigate to Security & Privacy: In the System Preferences window, select "Security & Privacy".
3. Go to the General Tab: In the "Security & Privacy" window, click on the "General" tab.
4. Unlock for Changes: Click on the lock icon at the bottom of the window to make changes. You may need to enter your administrator password.
5. Allow 'geth': Under the "Allow apps downloaded from:" section, you should see a message about 'geth' being blocked. Click the "Allow" button next to this message to permit 'geth' to run.
6. Run 'geth': Now, you should be able to run 'geth' normally. If the issue persists, you can right-click (or control-click) on the 'geth' file and select "Open" from the context menu. A warning message will appear, but you will have the option to click "Open" and proceed.
./geth --datadir ./data --http --http.api "admin,web3,eth,personal" console
./geth attach http://127.0.0.1:8545
geth 실행시의 로그에서 endpoint 참고