Sifchain / sifnode

SifNode - The future of Defi
Other
109 stars 117 forks source link

Configuration file for devnet/testnet #2869

Open jzvikart opened 2 years ago

jzvikart commented 2 years ago

Whenever we want to use devnet/testnet we need to know certain values for:

Ideally this information would also include everything needed for a single and complete source of truth:

Obtaining this information is a constant and persistent bottleneck and source of confusion, delays and blockers for anybody who wants to use these networks.

Since devnets/testnets are only used for development and testing, this data is not confidential. It would be nice if it was kept somewhere where anybody can get it when needed, and updated whenever this information changes. It would be ideal if it was in json format that can be read with curl so that we can automate it, but if there are any concerns, keeping it in Notion or in git repository is also OK. The exact format/structure of this file should be defined in agreement between testing and chainops teams so that it can be universally supported by all our scripts and tools. If world-readable permissions are not desirable, the file could simply be somewhere within the Sifchain-wide protected access.

Note 1: before disclosing any existing accounts/keys we need to make sure that they are not used for anything important. Best thing is to generate new ones.

Note2: tempnet already has something similar, it prints the summary of all variables at the end of run script, so it could be just updated to print it in the above json format.

jzvikart commented 2 years ago

@khdegraaf please comment on security aspect of the above proposal.

khdegraaf commented 2 years ago

I am perfectly fine with this as long as it is for testnet/devnet/tempnet, and the information is stored on a private location (like a private Notion page for example).

jzvikart commented 2 years ago

Example of what we want:

{
    "type": "tempnet",
    "branch": "peggy2",
    "sifchain": {
        "rpc_url": "tcp://ac05626d199414137992626152a4e1e7-a1db9b49ccc5e444.elb.us-east-2.amazonaws.com:26657",
        "chain_id": "sifchain-tempnet-d5776f3",
        "rowan_source": "...."
    },
    "ethereum": {
        "url": "ws://xxx.amazonaws.com:7545",
        "chain_id": 5777,
        "owner": "0x...",
        "owner_private_key": "...",
        "operator": "0x...",
        "operator_private_key": "...",
        "validator_address": "0x...",
        "validator_private_key": "...",
        "faucet": "0x...",
        "smart_contract_addresses": {
            "BridgeBank": "0x...",
            "CosmosBridge": "0x...",
            "BridgeRegistry": "0x...",
            "Rowan": "0x...",
            "Blocklist": "0x..."
        }
    },
    "mnemonic": "....."
}