-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Komodo Testnet #520
Conversation
I think if a testnet is started with no ac_name param it should have KMD name (bcz if we use it for testing like notarization apps, they rely on the main chain as 'KMD', I believe), or it should have the ac_name, if it is set. |
I would like to discuss the pros and cons of a Testnet. My views are: Pros:
Cons:
As for the token name, I would strongly prefer something other than KMD, as that introduces the chance of someone losing value if accidentally hooking to the wrong wallet and such. Would TKMD work? I look forward to comments, and will update the list above based on responses. I will also make an unofficial testnet and post the seed here if I get it working. This will be a side project, so turn-around times will be slow. |
I would like sometimes to have a KMD testnet, for example to develop and test the gateways cc (where KMDs are deposited on a gateways address to issue the equivalent amount of tokens in an assets chain). But for this use case it should be an exact replica of the original main KMD chain, including the name (and there are several on-chain services, including notarisation, that work differently depending on if this is the KMD or an assets chain - and "KMD" string is often used for that) I also remember an advice in the docs that if one needs a testnet he may create an assets chain for this. |
This is a suggestion: The string "KMD" means "the coin" as well as "the chain that notarizes". Can we break that link? "KMD" can be the coin, and "the chain that notarizes" can be computed via a method call. Instead of
(the above assumes we migrate ASSETCHAINS_NAME to a std::string, and it is still a global. It also assumes that strParentCoin is set to the coin used to verify Komodo's transactions (i.e. "BTC" or "LTC" in the case of Mainnet ) I am asking for verification/standardization in terminology.
That allows for:
I am not asking that we standardize on MY terminology. Tweak it if necessary. I am asking that we clarify the code by
With such changes implemented throughout core, things like the gateway code work on Komodo Mainnet and any other chain without modification. It is then fairly easy to write often write self-documenting code:
NOTE: CChainParams may not be the appropriate place for the pseudo-code above. A higher layer may be more appropriate to separate dynamic state (ASSETCHAINS_NAME, even strParentCoin) from static/const (strCurrencyUnits). |
I heartily support this idea - to make methods and global vars into ChainParams, it's a good place. |
^ That may just be my concept of how things work. By you saying that shows a gap in my knowledge. We'll sort it out.
So ChainParams is the base class with the basics. We derive from that and supply our own values. In the case of Komodo Mainnet or Testnet, they are derived classes (children of ChainParams). In the case of asset chains, they can make their own class (a child of ChainParams) or use a class that gets built based on config file / command line parameters. Am I following your idea correctly? |
yes there are 2 options I think:
|
I have made some changes to the codebase to get I did not modify the collection of notaries. I want to work on that next, so we can test any notarization changes by merging them into the testnet branch and deploying it. Here are the details if you want to give it a shot: What I changed:
Startup parameters: |
b7f48f8
to
ba97fc7
Compare
The testnet now has 1 notary (one of my nodes). Hardforks are still there, with their dates and heights unadjusted. The next step will be how to handle hardfork dates/heights between the two chains. The idea was that when we get an official So the debate is: which is easer?
Chosing option 2 means we need to maintain those items for mainnet, testnet, and regtest in 1 codebase. My current opinion is that should not be too difficult. Mainnet and regtest could probably share the same set, and testnet have its own. I look forward to the opinions of others. |
these changes implemented in combined PR: #559 |
Possible solution for #519
This fix
ToDo:
chainparams.cpp
for each derivative chain. The MYCHAIN repository could customize theirchainparams.cpp
to their liking and simplify command line parameters and config file settings.