diff --git a/coins-check.py b/coins-check.py index 66cd57728..892026e84 100755 --- a/coins-check.py +++ b/coins-check.py @@ -30,6 +30,7 @@ for coin in json.load(open('coins.json')): assert isinstance(coin['decred'], bool) assert coin['forkid'] is None or isinstance(coin['forkid'], int) assert isinstance(coin['force_bip143'], bool) + assert coin['version_group_id'] is None or is_hex(coin['version_group_id']) assert isinstance(coin['default_fee_b'], dict) assert isinstance(coin['dust_limit'], int) assert isinstance(coin['blocktime_minutes'], int) or isinstance(coin['blocktime_minutes'], float) diff --git a/coins.json b/coins.json index dd5425625..a2349ec93 100644 --- a/coins.json +++ b/coins.json @@ -20,6 +20,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Low": 10, "Economy": 70, @@ -58,6 +59,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, @@ -93,6 +95,7 @@ "decred": false, "forkid": 0, "force_bip143": true, + "version_group_id": null, "default_fee_b": { "Low": 10, "Economy": 70, @@ -130,6 +133,7 @@ "decred": false, "forkid": 0, "force_bip143": true, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, @@ -162,6 +166,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, @@ -194,6 +199,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 1000 }, @@ -228,6 +234,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, @@ -260,6 +267,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, @@ -295,6 +303,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, @@ -329,6 +338,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": "03c48270", "default_fee_b": { "Normal": 10 }, @@ -361,6 +371,7 @@ "decred": false, "forkid": 79, "force_bip143": true, + "version_group_id": null, "default_fee_b": { "Low": 10, "Economy": 70, @@ -398,6 +409,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Low": 10, "Economy": 70, @@ -435,6 +447,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 100000 }, @@ -469,6 +482,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Low": 100000, "Economy": 200000, @@ -506,6 +520,7 @@ "decred": false, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 1000 }, @@ -538,6 +553,7 @@ "decred": true, "forkid": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/bcash.json b/defs/coins/bcash.json index dbbf52375..eabb996ec 100644 --- a/defs/coins/bcash.json +++ b/defs/coins/bcash.json @@ -21,8 +21,9 @@ "slip44": 145, "segwit": false, "decred": false, - "forkid": 0, + "fork_id": 0, "force_bip143": true, + "version_group_id": null, "default_fee_b": { "Low": 10, "Economy": 70, diff --git a/defs/coins/bcash_testnet.json b/defs/coins/bcash_testnet.json index 940ed1b1e..6107f5ea4 100644 --- a/defs/coins/bcash_testnet.json +++ b/defs/coins/bcash_testnet.json @@ -21,8 +21,9 @@ "slip44": 1, "segwit": false, "decred": false, - "forkid": 0, + "fork_id": 0, "force_bip143": true, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/bgold.json b/defs/coins/bgold.json index 02ead2303..fff12d910 100644 --- a/defs/coins/bgold.json +++ b/defs/coins/bgold.json @@ -21,8 +21,9 @@ "slip44": 156, "segwit": true, "decred": false, - "forkid": 79, + "fork_id": 79, "force_bip143": true, + "version_group_id": null, "default_fee_b": { "Low": 10, "Economy": 70, diff --git a/defs/coins/bitcoin.json b/defs/coins/bitcoin.json index a2df42850..c81dd7195 100644 --- a/defs/coins/bitcoin.json +++ b/defs/coins/bitcoin.json @@ -21,8 +21,9 @@ "slip44": 0, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Low": 10, "Economy": 70, diff --git a/defs/coins/bitcoin_testnet.json b/defs/coins/bitcoin_testnet.json index 9097b0d66..f911521c6 100644 --- a/defs/coins/bitcoin_testnet.json +++ b/defs/coins/bitcoin_testnet.json @@ -21,8 +21,9 @@ "slip44": 1, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/bitcore.json b/defs/coins/bitcore.json index 9525fe497..8bf54fcf6 100644 --- a/defs/coins/bitcore.json +++ b/defs/coins/bitcore.json @@ -21,8 +21,9 @@ "slip44": 0, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Low": 10 }, diff --git a/defs/coins/bprivate.json b/defs/coins/bprivate.json index 5d9cf4c60..09a065c6d 100644 --- a/defs/coins/bprivate.json +++ b/defs/coins/bprivate.json @@ -21,8 +21,9 @@ "slip44": 183, "segwit": false, "decred": false, - "forkid": 42, + "fork_id": 42, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/crown.json b/defs/coins/crown.json index 532ee5104..9e353cb03 100644 --- a/defs/coins/crown.json +++ b/defs/coins/crown.json @@ -21,8 +21,9 @@ "slip44": 72, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/dash.json b/defs/coins/dash.json index b5d7e5731..fb16f3d85 100644 --- a/defs/coins/dash.json +++ b/defs/coins/dash.json @@ -21,8 +21,9 @@ "slip44": 5, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/dash_testnet.json b/defs/coins/dash_testnet.json index 5e834f15a..ddf425bc5 100644 --- a/defs/coins/dash_testnet.json +++ b/defs/coins/dash_testnet.json @@ -21,8 +21,9 @@ "slip44": 1, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/decred.json b/defs/coins/decred.json index c796cbe38..5b3741efa 100644 --- a/defs/coins/decred.json +++ b/defs/coins/decred.json @@ -21,8 +21,9 @@ "slip44": 42, "segwit": false, "decred": true, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/decred_testnet.json b/defs/coins/decred_testnet.json index a54a6b30d..0d7ffb9d2 100644 --- a/defs/coins/decred_testnet.json +++ b/defs/coins/decred_testnet.json @@ -21,8 +21,9 @@ "slip44": 1, "segwit": false, "decred": true, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/denarius.json b/defs/coins/denarius.json index 972148618..8a0627fcf 100644 --- a/defs/coins/denarius.json +++ b/defs/coins/denarius.json @@ -21,8 +21,9 @@ "slip44": 116, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/digibyte.json b/defs/coins/digibyte.json index 8d108b6b1..65f52a106 100644 --- a/defs/coins/digibyte.json +++ b/defs/coins/digibyte.json @@ -21,8 +21,9 @@ "slip44": 20, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Low": 10, "Economy": 70, diff --git a/defs/coins/dogecoin.json b/defs/coins/dogecoin.json index 3ff4245a5..8e03ed9b5 100644 --- a/defs/coins/dogecoin.json +++ b/defs/coins/dogecoin.json @@ -21,8 +21,9 @@ "slip44": 3, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/feathercoin.json b/defs/coins/feathercoin.json index 4f66bd4ee..58a66a110 100644 --- a/defs/coins/feathercoin.json +++ b/defs/coins/feathercoin.json @@ -21,8 +21,9 @@ "slip44": 8, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 1000 }, diff --git a/defs/coins/flashcoin.json b/defs/coins/flashcoin.json index 0bff965a6..3b37be349 100644 --- a/defs/coins/flashcoin.json +++ b/defs/coins/flashcoin.json @@ -21,8 +21,9 @@ "slip44": 120, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 0 }, diff --git a/defs/coins/fujicoin.json b/defs/coins/fujicoin.json index 128fcf23a..e654d990a 100644 --- a/defs/coins/fujicoin.json +++ b/defs/coins/fujicoin.json @@ -21,8 +21,9 @@ "slip44": 75, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Low": 100000, "Economy": 200000, diff --git a/defs/coins/groestlcoin.json b/defs/coins/groestlcoin.json index 0016046e0..8fa053130 100644 --- a/defs/coins/groestlcoin.json +++ b/defs/coins/groestlcoin.json @@ -21,8 +21,9 @@ "slip44": 17, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/koto.json b/defs/coins/koto.json index 5ce91d837..eb96ee98e 100644 --- a/defs/coins/koto.json +++ b/defs/coins/koto.json @@ -21,8 +21,9 @@ "slip44": 510, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/litecoin.json b/defs/coins/litecoin.json index 9f93e72f3..453fe1776 100644 --- a/defs/coins/litecoin.json +++ b/defs/coins/litecoin.json @@ -21,8 +21,9 @@ "slip44": 2, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 1000 }, diff --git a/defs/coins/litecoin_testnet.json b/defs/coins/litecoin_testnet.json index 6010158a5..a6e626345 100644 --- a/defs/coins/litecoin_testnet.json +++ b/defs/coins/litecoin_testnet.json @@ -21,8 +21,9 @@ "slip44": 1, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/monacoin.json b/defs/coins/monacoin.json index feca4e757..b261793cd 100644 --- a/defs/coins/monacoin.json +++ b/defs/coins/monacoin.json @@ -21,8 +21,9 @@ "slip44": 22, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 100000 }, diff --git a/defs/coins/monetaryunit.json b/defs/coins/monetaryunit.json index 4fcd35d81..875681226 100644 --- a/defs/coins/monetaryunit.json +++ b/defs/coins/monetaryunit.json @@ -21,8 +21,9 @@ "slip44": 5, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/myriad.json b/defs/coins/myriad.json index f731f8a9b..e8c36c303 100644 --- a/defs/coins/myriad.json +++ b/defs/coins/myriad.json @@ -21,8 +21,9 @@ "slip44": 90, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Low": 10, "Economy": 70, diff --git a/defs/coins/namecoin.json b/defs/coins/namecoin.json index 37d7ed72e..ff839e65e 100644 --- a/defs/coins/namecoin.json +++ b/defs/coins/namecoin.json @@ -21,8 +21,9 @@ "slip44": 7, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/terracoin.json b/defs/coins/terracoin.json index 58b82a395..d9844d886 100644 --- a/defs/coins/terracoin.json +++ b/defs/coins/terracoin.json @@ -21,8 +21,9 @@ "slip44": 0, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/tools/build_coins.py b/defs/coins/tools/build_coins.py index f354e0ad9..ec27a1a4f 100755 --- a/defs/coins/tools/build_coins.py +++ b/defs/coins/tools/build_coins.py @@ -69,8 +69,9 @@ def validate_coin(coin): assert check_type(coin['slip44'], int) assert check_type(coin['segwit'], bool) assert check_type(coin['decred'], bool) - assert check_type(coin['forkid'], int, nullable=True) + assert check_type(coin['fork_id'], int, nullable=True) assert check_type(coin['force_bip143'], bool) + assert check_type(coin['version_group_id'], int, nullable=True) assert check_type(coin['default_fee_b'], dict) assert check_type(coin['dust_limit'], int) assert check_type(coin['blocktime_seconds'], int) diff --git a/defs/coins/tools/coindef.proto b/defs/coins/tools/coindef.proto index 9bf27cce6..66c8a5b27 100644 --- a/defs/coins/tools/coindef.proto +++ b/defs/coins/tools/coindef.proto @@ -27,4 +27,9 @@ message CoinDef { optional uint32 min_address_length = 24; optional uint32 max_address_length = 25; optional bytes icon = 26; + optional uint32 version_group_id = 27; + optional string website = 28; + optional string github = 29; + optional string maintainer = 30; + optional uint32 blocktime_seconds = 31; } diff --git a/defs/coins/tools/coindef.py b/defs/coins/tools/coindef.py index 1c1beaba1..598dc68b3 100644 --- a/defs/coins/tools/coindef.py +++ b/defs/coins/tools/coindef.py @@ -30,6 +30,11 @@ class CoinDef(p.MessageType): 24: ('min_address_length', p.UVarintType, 0), 25: ('max_address_length', p.UVarintType, 0), 26: ('icon', p.BytesType, 0), + 27: ('version_group_id', p.UVarintType, 0), + 28: ('website', p.UnicodeType, 0), + 29: ('github', p.UnicodeType, 0), + 30: ('maintainer', p.UnicodeType, 0), + 31: ('blocktime_seconds', p.UVarintType, 0), } def __init__( @@ -60,7 +65,14 @@ class CoinDef(p.MessageType): min_address_length: int = None, max_address_length: int = None, icon: bytes = None, - **kwargs + version_group_id: int = None, + website: str = None, + github: str = None, + maintainer: str = None, + blocktime_seconds: int = None, + default_fee_b: dict = None, + bitcore: dict = None, + blockbook: dict = None ): self.coin_name = coin_name self.coin_shortcut = coin_shortcut @@ -88,4 +100,12 @@ class CoinDef(p.MessageType): self.min_address_length = min_address_length self.max_address_length = max_address_length self.icon = icon - p.MessageType.__init__(self, **kwargs) + self.version_group_id = version_group_id + self.website = website + self.github = github + self.maintainer = maintainer + self.blocktime_seconds = blocktime_seconds + self.default_fee_b = default_fee_b + self.bitcore = bitcore + self.blockbook = blockbook + p.MessageType.__init__(self) diff --git a/defs/coins/vertcoin.json b/defs/coins/vertcoin.json index fd75e878e..b6cb72eb1 100644 --- a/defs/coins/vertcoin.json +++ b/defs/coins/vertcoin.json @@ -21,8 +21,9 @@ "slip44": 28, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 1000 }, diff --git a/defs/coins/viacoin.json b/defs/coins/viacoin.json index 312811cc1..ced4d467b 100644 --- a/defs/coins/viacoin.json +++ b/defs/coins/viacoin.json @@ -21,8 +21,9 @@ "slip44": 14, "segwit": true, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Low": 1000, "Economy": 7000, diff --git a/defs/coins/zcash.json b/defs/coins/zcash.json index 1af17df39..336c110c4 100644 --- a/defs/coins/zcash.json +++ b/defs/coins/zcash.json @@ -21,8 +21,9 @@ "slip44": 133, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/zcash_testnet.json b/defs/coins/zcash_testnet.json index 7f1c0c992..8a0ff7188 100644 --- a/defs/coins/zcash_testnet.json +++ b/defs/coins/zcash_testnet.json @@ -21,8 +21,9 @@ "slip44": 1, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": 63210096, "default_fee_b": { "Normal": 10 }, diff --git a/defs/coins/zcoin.json b/defs/coins/zcoin.json index 911f6e4ff..57dd3f68d 100644 --- a/defs/coins/zcoin.json +++ b/defs/coins/zcoin.json @@ -21,8 +21,9 @@ "slip44": 136, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Low": 1, "Economy": 10, diff --git a/defs/coins/zcoin_testnet.json b/defs/coins/zcoin_testnet.json index 317ecbb41..954522884 100644 --- a/defs/coins/zcoin_testnet.json +++ b/defs/coins/zcoin_testnet.json @@ -21,8 +21,9 @@ "slip44": 1, "segwit": false, "decred": false, - "forkid": null, + "fork_id": null, "force_bip143": false, + "version_group_id": null, "default_fee_b": { "Low": 1, "Economy": 10,