feat: add groestlcoin signet mode
This commit is contained in:
parent
8df92e9db4
commit
18b9104381
@ -97,6 +97,7 @@ func init() {
|
||||
BlockChainFactories["Liquid"] = liquid.NewLiquidRPC
|
||||
BlockChainFactories["Groestlcoin"] = grs.NewGroestlcoinRPC
|
||||
BlockChainFactories["Groestlcoin Testnet"] = grs.NewGroestlcoinRPC
|
||||
BlockChainFactories["Groestlcoin Signet"] = grs.NewGroestlcoinRPC
|
||||
BlockChainFactories["Groestlcoin Regtest"] = grs.NewGroestlcoinRPC
|
||||
BlockChainFactories["PIVX"] = pivx.NewPivXRPC
|
||||
BlockChainFactories["PIVX Testnet"] = pivx.NewPivXRPC
|
||||
|
||||
@ -12,12 +12,16 @@ import (
|
||||
const (
|
||||
MainnetMagic wire.BitcoinNet = 0xd4b4bef9
|
||||
TestnetMagic wire.BitcoinNet = 0x0709110b
|
||||
RegtestMagic wire.BitcoinNet = 0xdab5bffa
|
||||
SignetMagic wire.BitcoinNet = 0x7696b422
|
||||
)
|
||||
|
||||
// chain parameters
|
||||
var (
|
||||
MainNetParams chaincfg.Params
|
||||
TestNetParams chaincfg.Params
|
||||
RegTestParams chaincfg.Params
|
||||
SigNetParams chaincfg.Params
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -38,6 +42,24 @@ func init() {
|
||||
TestNetParams.ScriptHashAddrID = []byte{196}
|
||||
TestNetParams.Bech32HRPSegwit = "tgrs"
|
||||
TestNetParams.Base58CksumHasher = base58.Groestl512D
|
||||
|
||||
RegTestParams = chaincfg.RegressionNetParams
|
||||
RegTestParams.Net = RegtestMagic
|
||||
|
||||
// Address encoding magics
|
||||
RegTestParams.PubKeyHashAddrID = []byte{111}
|
||||
RegTestParams.ScriptHashAddrID = []byte{196}
|
||||
RegTestParams.Bech32HRPSegwit = "grsrt"
|
||||
RegTestParams.Base58CksumHasher = base58.Groestl512D
|
||||
|
||||
SigNetParams = chaincfg.SigNetParams
|
||||
SigNetParams.Net = SignetMagic
|
||||
|
||||
// Address encoding magics
|
||||
SigNetParams.PubKeyHashAddrID = []byte{111}
|
||||
SigNetParams.ScriptHashAddrID = []byte{196}
|
||||
SigNetParams.Bech32HRPSegwit = "tgrs"
|
||||
SigNetParams.Base58CksumHasher = base58.Groestl512D
|
||||
}
|
||||
|
||||
// GroestlcoinParser handle
|
||||
@ -70,6 +92,10 @@ func GetChainParams(chain string) *chaincfg.Params {
|
||||
switch chain {
|
||||
case "test":
|
||||
return &TestNetParams
|
||||
case "regtest":
|
||||
return &RegTestParams
|
||||
case "signet":
|
||||
return &SigNetParams
|
||||
default:
|
||||
return &MainNetParams
|
||||
}
|
||||
|
||||
73
configs/coins/groestlcoin_signet.json
Normal file
73
configs/coins/groestlcoin_signet.json
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"coin": {
|
||||
"name": "Groestlcoin Signet",
|
||||
"shortcut": "sGRS",
|
||||
"label": "Groestlcoin Signet",
|
||||
"alias": "groestlcoin_signet"
|
||||
},
|
||||
"ports": {
|
||||
"backend_rpc": 18047,
|
||||
"backend_message_queue": 48347,
|
||||
"blockbook_internal": 19047,
|
||||
"blockbook_public": 19147
|
||||
},
|
||||
"ipc": {
|
||||
"rpc_url_template": "http://127.0.0.1:{{.Ports.BackendRPC}}",
|
||||
"rpc_user": "rpc",
|
||||
"rpc_pass": "rpc",
|
||||
"rpc_timeout": 25,
|
||||
"message_queue_binding_template": "tcp://127.0.0.1:{{.Ports.BackendMessageQueue}}"
|
||||
},
|
||||
"backend": {
|
||||
"package_name": "backend-groestlcoin-signet",
|
||||
"package_revision": "satoshilabs-1",
|
||||
"system_user": "groestlcoin",
|
||||
"version": "22.0",
|
||||
"binary_url": "https://github.com/Groestlcoin/groestlcoin/releases/download/v22.0/groestlcoin-22.0-x86_64-linux-gnu.tar.gz",
|
||||
"verification_type": "sha256",
|
||||
"verification_source": "b30c5353dd3d9cfd7e8b31f29eac125925751165f690bacff57effd76560dddd",
|
||||
"extract_command": "tar -C backend --strip 1 -xf",
|
||||
"exclude_files": [
|
||||
"bin/groestlcoin-qt"
|
||||
],
|
||||
"exec_command_template": "{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/bin/groestlcoind -datadir={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend -conf={{.Env.BackendInstallPath}}/{{.Coin.Alias}}/{{.Coin.Alias}}.conf -pid=/run/{{.Coin.Alias}}/{{.Coin.Alias}}.pid",
|
||||
"logrotate_files_template": "{{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/signet/*.log",
|
||||
"postinst_script_template": "",
|
||||
"service_type": "forking",
|
||||
"service_additional_params_template": "",
|
||||
"protect_memory": true,
|
||||
"mainnet": false,
|
||||
"server_config_file": "bitcoin-signet.conf",
|
||||
"client_config_file": "bitcoin_client.conf",
|
||||
"additional_params": {
|
||||
"deprecatedrpc": "estimatefee",
|
||||
"whitelist": "127.0.0.1"
|
||||
}
|
||||
},
|
||||
"blockbook": {
|
||||
"package_name": "blockbook-groestlcoin-signet",
|
||||
"system_user": "blockbook-groestlcoin",
|
||||
"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,
|
||||
"xpub_magic": 70617039,
|
||||
"xpub_magic_segwit_p2sh": 71979618,
|
||||
"xpub_magic_segwit_native": 73342198,
|
||||
"slip44": 1,
|
||||
"additional_params": {
|
||||
"fiat_rates": "coingecko",
|
||||
"fiat_rates_params": "{\"url\": \"https://api.coingecko.com/api/v3\", \"coin\": \"groestlcoin\", \"periodSeconds\": 60}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"package_maintainer": "Groestlcoin Development Team",
|
||||
"package_maintainer_email": "jackie@groestlcoin.org"
|
||||
}
|
||||
}
|
||||
@ -61,6 +61,7 @@
|
||||
| DigiByte Testnet | 19042 | 19142 | 18042 | 48342 |
|
||||
| Groestlcoin Testnet | 19045 | 19145 | 18045 | 48345 |
|
||||
| Groestlcoin Regtest | 19046 | 19146 | 18046 | 48346 |
|
||||
| Groestlcoin Signet | 19047 | 19147 | 18047 | 48347 |
|
||||
| PIVX Testnet | 19049 | 19149 | 18049 | 48349 |
|
||||
| Koto Testnet | 19051 | 19151 | 18051 | 48351 |
|
||||
| Decred Testnet | 19061 | 19161 | 18061 | 48361 |
|
||||
|
||||
Loading…
Reference in New Issue
Block a user