diff --git a/bchain/coins/blockchain.go b/bchain/coins/blockchain.go index 3541fbfd..38cae788 100644 --- a/bchain/coins/blockchain.go +++ b/bchain/coins/blockchain.go @@ -68,6 +68,7 @@ func init() { BlockChainFactories["Ethereum"] = eth.NewEthereumRPC BlockChainFactories["Ethereum Classic"] = eth.NewEthereumRPC BlockChainFactories["Ethereum Testnet Ropsten"] = eth.NewEthereumRPC + BlockChainFactories["Ethereum Testnet Goerli"] = eth.NewEthereumRPC BlockChainFactories["Bcash"] = bch.NewBCashRPC BlockChainFactories["Bcash Testnet"] = bch.NewBCashRPC BlockChainFactories["Bgold"] = btg.NewBGoldRPC diff --git a/bchain/coins/eth/ethrpc.go b/bchain/coins/eth/ethrpc.go index 7d5c3e6a..91101b33 100644 --- a/bchain/coins/eth/ethrpc.go +++ b/bchain/coins/eth/ethrpc.go @@ -29,6 +29,8 @@ const ( MainNet EthereumNet = 1 // TestNet is Ropsten test network TestNet EthereumNet = 3 + // TestNetGoerli is Goerli test network + TestNetGoerli EthereumNet = 5 ) // Configuration represents json config file @@ -160,6 +162,9 @@ func (b *EthereumRPC) Initialize() error { b.Testnet = true b.Network = "testnet" break + case TestNetGoerli: + b.Testnet = true + b.Network = "goerli" default: return errors.Errorf("Unknown network id %v", id) } diff --git a/configs/coins/ethereum_testnet_goerli.json b/configs/coins/ethereum_testnet_goerli.json new file mode 100644 index 00000000..d508dccb --- /dev/null +++ b/configs/coins/ethereum_testnet_goerli.json @@ -0,0 +1,61 @@ +{ + "coin": { + "name": "Ethereum Testnet Goerli", + "shortcut": "gGOE", + "label": "Ethereum Goerli", + "alias": "ethereum_testnet_goerli" + }, + "ports": { + "backend_rpc": 18026, + "backend_message_queue": 0, + "backend_p2p": 48326, + "blockbook_internal": 19026, + "blockbook_public": 19126 + }, + "ipc": { + "rpc_url_template": "ws://127.0.0.1:{{.Ports.BackendRPC}}", + "rpc_timeout": 25 + }, + "backend": { + "package_name": "backend-ethereum-testnet-goerli", + "package_revision": "satoshilabs-1", + "system_user": "ethereum", + "version": "1.9.24-cc05b050", + "binary_url": "https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.9.24-cc05b050.tar.gz", + "verification_type": "gpg", + "verification_source": "https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.9.24-cc05b050.tar.gz.asc", + "extract_command": "tar -C backend --strip 1 -xf", + "exclude_files": [], + "exec_command_template": "/bin/sh -c '{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/geth --goerli --syncmode full --ipcdisable --cache 1024 --nat none --datadir {{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend --port 48326 --ws --wsaddr 127.0.0.1 --wsport {{.Ports.BackendRPC}} --wsorigins \"*\" 2>>{{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log'", + "logrotate_files_template": "{{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/{{.Coin.Alias}}.log", + "postinst_script_template": "", + "service_type": "simple", + "service_additional_params_template": "", + "protect_memory": true, + "mainnet": false, + "server_config_file": "", + "client_config_file": "" + }, + "blockbook": { + "package_name": "blockbook-ethereum-testnet-goerli", + "system_user": "blockbook-ethereum", + "internal_binding_template": ":{{.Ports.BlockbookInternal}}", + "public_binding_template": ":{{.Ports.BlockbookPublic}}", + "explorer_url": "", + "additional_params": "", + "block_chain": { + "parse": true, + "mempool_workers": 8, + "mempool_sub_workers": 2, + "block_addresses_to_keep": 300, + "additional_params": { + "mempoolTxTimeoutHours": 12, + "queryBackendOnMempoolResync": false + } + } + }, + "meta": { + "package_maintainer": "IT", + "package_maintainer_email": "it@satoshilabs.com" + } +}