I built Monero private testnet (basically used these instructions https://github.com/moneroexamples/private-testnet, but with the latest codebase). Everything seemed to work fine, but I realized that transactions created by the wallet have tx.version=1 in cryptonote_tx_utils.cpp
tx.version = rct ? 2 : 1;
It looks the boolean rct variable is calculated using earliest_height, which is based on m_earliest_height. Basically, this code appears to look at the block height where a fork is activated and apply true or false based on that. There is something strange going on, specifically m_earliest_height is basically composed of extremely large numbers (maximums of unsigned integers). So, it looks like 'rct' would never actually be true (because it would take some enormous block height to activate it). The code that generates m_earliest_height strange huge integers is in node_rpc_proxy.cpp. When I try to overwrite max integers and add something like block 1000 for earliest_height (because testnet node is about 2000 blocks only), I actually get tx.version 2 and everything seems normal. But then it says that 'transaction was rejected by daemon with status (Failed)'.
Can you please help me figure how to actually work with ringct transactions by making sure that tx.version 2 is enabled and node accepts it? Much thanks. Thank you. I tried to modify hard fork heights like so:
testnet_hard_forks[] = {
// version 1 from the start of the blockchain
{ 1, 1, 0, 1341378000 },
// version 2 starts from block 624634, which is on or around the 23rd of November, 2015. Fork time finalised on 2015-11-20. No fork voting occurs for the v2 fork.
{ 2, 100, 0, 1341378000+1000},
// versions 3-5 were passed in rapid succession from September 18th, 2016
{ 3, 200, 0, 1341378000+10000 },
{ 4, 300, 0, 1341378000+11000 },
{ 5, 500, 0, 1341378000+11100 }, // add 5 months on testnet to shut the update warning up since there's a large gap to v6
{ 6, 1000, 0, 1341378000+11199 },
{ 7, 2000, 0, 1341378000+11900 },
{ 8, 1057058, 0, 1515967497 },
};
static const uint64_t testnet_hard_fork_version_1_till = 99;
But the node gets stuck on block 100 this way (I see it by doing 'diff' command). I see that the stagenet part of the code does something like this, so not sure why it is not working. Could you help me to get testnet to current version (but without bulletproofs)?