LoginSignup
0
0

More than 1 year has passed since last update.

Windows 10 のコマンドプロンプトでGeth(Go-ethereum)を起動する

Posted at

自分用のメモ。

Gethについて

正式名はGo-ethreum。
イーサリアムプラットフォーム上にブロックチェーンを構築したり、アカウントを作成して送金などの各種トランザクションをコマンドライン上で実行できる。
簡単にインストールでき、ビットコインのテストネットを使うことができるので、実際の取引は存在しない状態でいろいろいじることができる。

Gethを起動する(コマンドプロンプト)

geth --networkid "10" --nodiscover --datadir E:\Users\user\Geth\private_net --http.api --http.addr --http.port "8545" --http.corsdomain "*" --http.api "eth, net,web3, personal" --miner.gaslimit "20000000" console 2››  E:\kousuke\Geth\private_net\error.log

geth コマンドについて

オプションの意味

--networkid ネットワークIDを明示的に設定する

--datadir データベースとキーストアのデータディレクトリ。Gethによって自動で作られるフォルダを指定。

--http.api HTTP-RPCインターフェースを介してAPIに提供される値。
web3.jsとかをコマンドラインから呼び出してブロックチェーンに対して処理を行うので、それでweb3とかを指定しているかと。

--http.addr HTTP-RPCサーバーを listen するインターフェース。デフォルトはlocalhost。

--http.port "8545" HTTP-RPCサーバーを listen するポート番号。デフォルトは 8545。

--http.corsdomain CORSの設定
--miner.gaslimit マイニングに必要なコストの上限。

実行環境

geth 1.20.23

参考サイト

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0