From 8d4ce714e56aefb70227fdc9f71d2cfb2fdf4425 Mon Sep 17 00:00:00 2001 From: Spir Date: Wed, 21 Aug 2024 16:28:00 +0700 Subject: [PATCH 1/2] Add OriginStake init-validator tx --- transactions/mrspir-validator.toml | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 transactions/mrspir-validator.toml diff --git a/transactions/mrspir-validator.toml b/transactions/mrspir-validator.toml new file mode 100644 index 00000000..a3971a56 --- /dev/null +++ b/transactions/mrspir-validator.toml @@ -0,0 +1,42 @@ +[[established_account]] +vp = "vp_user" +threshold = 1 +public_keys = ["tpknam1qqyjgjhdek36tv0urrtxhz7pemvr96tz0ys86qqwrjfhw5ckana87ygmzry"] + +[[validator_account]] +address = "tnam1q8hck7594xqw9dz35m8wwtgtvdxf4xn0mg908r8x" +vp = "vp_user" +commission_rate = "0.05" +max_commission_rate_change = "0.01" +net_address = "65.108.101.62:12656" + +[validator_account.consensus_key] +pk = "tpknam1qz8ukqu0tj80g3v27azup3aeqdn77e27mvgkn83kj67qlker2gwlqku4576" +authorization = "signam1qqu5f6vrqzdlxmzrxmfef0g5g4z6w4ugskdj5mglyf0n5myadnurqapndgsgaepkjenyzrx9fwe2grleqmexuzrput9glauqcg5uy4gwwhewqc" + +[validator_account.protocol_key] +pk = "tpknam1qr8qaza9v4dtx8sl5s28wtlfvgx4qtuynqzkysg5j9zftl968694jjp9w98" +authorization = "signam1qr46sxuq9zq5sgzwe7eee7a44r3rzlj069ctm9svjyeyuutg38xvmyw5hef7nj602wdjqts7s2773v8jctlex6mvafkdmw7qlzy5n0cvsgysr9" + +[validator_account.tendermint_node_key] +pk = "tpknam1qzwrtc64vjuuxgcvmkaljyqcqnzmpfen0k83h77vr3k79xuv5332kwr378q" +authorization = "signam1qqqenz7y9jgvechegvvf588xa70l06nz0knsqp5555x07eu6c7nc0eydtraj9p0guucm5m0y4rg7nlsn4fwn5s3wr5rsrhe9e9a4v6c05g7478" + +[validator_account.eth_hot_key] +pk = "tpknam1qypufdcrpum6lff58d4urhyzr7l43f42qcu3u7w5kkq72dhs9e6gp7s47ax7m" +authorization = "signam1q94pat63z2zkdlw0fjqt7s8p2lekm44yquupve24qp9lnhvtaua72ngz4gt7wu6snza8qu60lsjyklrlf7q3rzvdrergdgfeu95v0k7mqq6a7az4" + +[validator_account.eth_cold_key] +pk = "tpknam1qypezw6qd5zkr0w7w0qm9grnht4rdpnl7qvhq5ymvxnk9hlpnhly25qg3p9h4" +authorization = "signam1q992wpe2df4hn34uvzuue00cj3jgqsp7la2ys25tm0qnl2eluflkcwlsdzt8x97hnm9u9czw75muj99wp8qy8386wzq2rqxad3p35269qq33395v" + +[validator_account.metadata] +email = "hi@originstake.com" +description = "OriginStake is a trusted Proof-of-Stake infrastructure provider and validator to comfortably stake your coins and earn rewards with Namada." +website = "https://originstake.com" +discord_handle = "mrspir" +avatar = "https://raw.githubusercontent.com/OriginStake/ogs-media/main/Logo/PNG/OriginStake_Logo_1.png" +name = "OriginStake" + +[validator_account.signatures] +tpknam1qqyjgjhdek36tv0urrtxhz7pemvr96tz0ys86qqwrjfhw5ckana87ygmzry = "signam1qpuln6xfw2wm5p5d7ujt2mgrucxnsplxzqkkmu0n7equyftnerlxxh028m74rw3mvu3vw495nzw5gt73alfhcz2lpjfsyv0285fdwsgqmv3wv9" \ No newline at end of file From 0d10287ef9e67f1fb4aecaf27fe725bf4ac78f17 Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Wed, 21 Aug 2024 11:47:43 +0200 Subject: [PATCH 2/2] update ci --- scripts/validate-pr.py | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/scripts/validate-pr.py b/scripts/validate-pr.py index 51d39bbd..770f3799 100644 --- a/scripts/validate-pr.py +++ b/scripts/validate-pr.py @@ -10,9 +10,9 @@ def read_env(): - can_apply_for_validators = os.environ.get('CAN_ADD_VALIDATORS', True).lower() in ('true', '1', 't') - can_apply_for_bonds = os.environ.get('CAN_ADD_BONDS', True).lower() in ('true', '1', 't') - can_apply_for_accounts = os.environ.get('CAN_ADD_ACCOUNTS', True).lower() in ('true', '1', 't') + can_apply_for_validators = os.environ.get('CAN_ADD_VALIDATORS', 'true').lower() in ('true', '1', 't') + can_apply_for_bonds = os.environ.get('CAN_ADD_BONDS', 'true').lower() in ('true', '1', 't') + can_apply_for_accounts = os.environ.get('CAN_ADD_ACCOUNTS', 'true').lower() in ('true', '1', 't') print("Can add validators: {}".format(can_apply_for_validators)) print("Can add bonds: {}".format(can_apply_for_bonds)) @@ -188,7 +188,7 @@ def check_if_bond_is_valid(bonds_toml: List[Dict], balances: Dict[str, Dict]): return True -def validate_toml(file, can_apply_for_validators, can_apply_for_bonds, can_apply_for_accounts): +def validate_toml(file, can_apply_for_validators, can_apply_for_bonds, can_apply_for_accounts) -> bool: balances = toml.load(open("genesis/balances.toml", "r")) nam_balances = balances['token']['NAM'] @@ -196,27 +196,33 @@ def validate_toml(file, can_apply_for_validators, can_apply_for_bonds, can_apply accounts_toml = read_unsafe_toml(file) if accounts_toml is None: print("{} is NOT valid.".format(file)) + return False is_valid = check_if_account_is_valid(accounts_toml) if not is_valid: print("{} is NOT valid.".format(file)) + return False elif '-validator.toml' in file and can_apply_for_validators: validators_toml = read_unsafe_toml(file) if validators_toml is None: print("{} is NOT valid.".format(file)) + return False is_valid = check_if_validator_is_valid(validators_toml) if not is_valid: print("{} is NOT valid.".format(file)) + return False elif '-bond.toml' in file and can_apply_for_bonds: bonds_toml = read_unsafe_toml(file) if not bonds_toml: print("{} is NOT valid.".format(file)) + return False is_valid = check_if_bond_is_valid(bonds_toml, nam_balances) if not is_valid: print("{} is NOT valid.".format(file)) + return False else: return False - - print("{} is valid.".format(file)) + + return True def main(): alias = get_alias_from_env() @@ -236,11 +242,17 @@ def main(): file_alias = get_alias_from_file(file) if not alias.lower() in file_alias.lower(): + print("alias {} doesn't correspond".format(alias.lower())) exit(1) print("{} is allowed, checking if its valid...".format(file)) - validate_toml(file, can_apply_for_validators, can_apply_for_bonds, can_apply_for_accounts) + res = validate_toml(file, can_apply_for_validators, can_apply_for_bonds, can_apply_for_accounts) + if res: + print("{} is valid.".format(file)) + else: + print("{} is NOT valid".format(file)) + exit(1) if __name__ == "__main__":