steemit / tinman

Testnet management scripts
8 stars 20 forks source link

TN: The txgen module needs additional settings in txgen.conf #100

Closed inertia186 closed 6 years ago

inertia186 commented 6 years ago

As a community developer trying out a testnet, I might want tinman to deal with certain changes to config.hpp without having to also update txgen constants, so that I can run my testnet with different constants like STEEM_HARDFORK_REQUIRED_WITNESSES (as documented in devportal).

Right now, txgen uses its own constants that may or may not match with config.hpp, if our suggestions are followed on the devportal docs.

Specifically:

Verbiage on devportal reads:

In the file named steem/libraries/protocol/include/steem/protocol/config.hpp, we can see the first few lines dedicated to the Testnet section. The line starts with #ifdef IS_TEST_NET.

Our documentation recommends changing STEEM_HARDFORK_REQUIRED_WITNESSES which would affect txgen behavior around NUM_BLOCKS_TO_CLEAR_WITNESS_ROUND. Also, in theory, STEEM_BLOCK_INTERVAL doesn't have to be 3.

However, the solution is not for txgen to check the mainnet blockchain get_config method (as originally scoped) because these defaults are part of the testnet config.hpp, not the mainnet. So they must be set in txgen.conf.

As an example, warden.py already does lookups for get_config (on the testnet), but this is because it is allowed to make API method calls and the testnet has already been bootstrapped and partially seeded.

AC

inertia186 commented 6 years ago

The original scope was to capture get_config from the mainnet, but I thought about it more and that wasn't going to be very helpful. Instead, I've updated the AC to require these fields in txgen.conf with a default set by constant.