Skip to content

Conversation

@stevenroose
Copy link
Contributor

Attempt to group elements-specific -options together.

@instagibbs instagibbs changed the title Add OptionsCategory::ELEMENTS [0.17] Add OptionsCategory::ELEMENTS Oct 31, 2018
@instagibbs
Copy link
Contributor

instagibbs commented Nov 5, 2018

utACK only test failing is the one that fails to build reliably

@stevenroose
Copy link
Contributor Author

Not sure how this category should be applied to the CHAINPARAMS category in chainparams.cpp. Those are also mostly elements-specific. (fedpegscript, blocksignscript, ...)

@instagibbs
Copy link
Contributor

I say let's add all of them if we're bothering to do any of them, to make it easier to rebase later.

// Elements-specific arguments.
//

std::vector<std::string> elements_hidden_args = {"-con_fpowallowmindifficultyblocks", "-con_fpownoretargeting", "-con_nsubsidyhalvinginterval", "-con_bip16exception", "-con_bip34height", "-con_bip65height", "-con_bip66height", "-con_npowtargettimespan", "-con_npowtargetspacing", "-con_nrulechangeactivationthreshold", "-con_nminerconfirmationwindow", "-con_powlimit", "-con_bip34hash", "-con_nminimumchainwork", "-con_defaultassumevalid", "-npruneafterheight", "-fdefaultconsistencychecks", "-fmineblocksondemand", "-fallback_fee_enabled", "-pchmessagestart"};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to add these as debug args.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the exact difference between hidden and debug? Actually I don't really recall where I got this list. I think they were all part of @jtimon's testchains PR (#432).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latter can be shown with -help-debug

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding them as debug args sounds good to me. Perhaps do the same in bitcoin/bitcoin#8994 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtimon If you convert them to debug args upstream, I'd prefer to inherit the exact same wording here.

src/init.cpp Outdated

std::vector<std::string> elements_hidden_args = {"-con_fpowallowmindifficultyblocks", "-con_fpownoretargeting", "-con_nsubsidyhalvinginterval", "-con_bip16exception", "-con_bip34height", "-con_bip65height", "-con_bip66height", "-con_npowtargettimespan", "-con_npowtargetspacing", "-con_nrulechangeactivationthreshold", "-con_nminerconfirmationwindow", "-con_powlimit", "-con_bip34hash", "-con_nminimumchainwork", "-con_defaultassumevalid", "-npruneafterheight", "-fdefaultconsistencychecks", "-fmineblocksondemand", "-fallback_fee_enabled", "-pchmessagestart"};

gArgs.AddArg("-pubkeyprefix", strprintf("The byte prefix, in decimal, of the chain's base58 pubkey address. (default: %d)", defaultChainParams->Base58Prefix(CChainParams::PUBKEY_ADDRESS)[0]), false, OptionsCategory::ELEMENTS);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look more chainparams specific than elements specific to me.

@jtimon
Copy link
Contributor

jtimon commented Nov 20, 2018

concept ACK (at least for any new parameter not included in bitcoin/bitcoin#8994 ).

@stevenroose
Copy link
Contributor Author

I updated the chainparams ones. For the debug ones from testchains, I'm waiting to know if I can inherit the ones from upstream.

gArgs.AddArg("-server", "Accept command line and JSON-RPC commands", false, OptionsCategory::RPC);

// chain params
gArgs.AddArg("-pubkeyprefix", strprintf("The byte prefix, in decimal, of the chain's base58 pubkey address. (default: %d)", defaultChainParams->Base58Prefix(CChainParams::PUBKEY_ADDRESS)[0]), false, OptionsCategory::CHAINPARAMS);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll just have to make sure to update defaultChainParams to using Custom Chains instead of MAIN at some point.

@instagibbs
Copy link
Contributor

ACK

@instagibbs instagibbs merged commit 2e4cb70 into ElementsProject:elements-0.17 Nov 27, 2018
instagibbs added a commit that referenced this pull request Nov 27, 2018
2e4cb70 Mark chain params as ::CHAINPARAMS (Steven Roose)
91e48e7 Sane defaults for CHAINPARAM cli args (Steven Roose)
fdf494e Also change Elements-specific chainparams (Steven Roose)
2638df8 Set correct OptionsCategory for elements options (Steven Roose)
6ba4764 Add OptionsCategory::ELEMENTS (Steven Roose)

Pull request description:

  Attempt to group elements-specific -options together.

Tree-SHA512: 3cc669c55f657b9d20c4bc2d67d222b73649b916b45f127858f3ca20210f5589a44a0dac508d47007b7f628fc4108f5ee3011a658ff269c47b722270404a4c4f
@stevenroose stevenroose deleted the params-elements branch March 25, 2019 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants