Skip to content
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

Hotfix: fix plugins option in config file #1647

Merged
merged 8 commits into from Mar 16, 2019

Conversation

oxarbitrage
Copy link
Member

@oxarbitrage oxarbitrage commented Mar 12, 2019

This is a replacement for #1640 as we are going top create a hotfix for this issue to merge as soon as possible into master.

This is for issue #1637

@abitmore
Copy link
Member

I'm fine with this. @pmconrad your opinion?

@abitmore abitmore added this to the Hotfix-201903-2 milestone Mar 13, 2019
@pmconrad
Copy link
Contributor

Hm, witness_node --help no longer reports the plugin options, right?

@oxarbitrage
Copy link
Member Author

Nice catch @pmconrad . I fixed at de22e99

Help command need to be moved to after the plugins are enabled and also app_options populated again.

Thanks.

@abitmore
Copy link
Member

My bad. I guess bpo::parse_command_line also need plugins?

@oxarbitrage
Copy link
Member Author

You are right @abitmore , the plugin options were giving error when called from the command line.
The command line parsing should be done only once, but after the plugin options are in, so i moved the try/catch block with the parsing to the second place where we have all the options.

Let me know how do you see it, it is not very clean for sure but seems to be working.

@abitmore
Copy link
Member

Duplicate options in output of --help command:

$ ./witness_node --help 
Graphene Witness Node:
  -h [ --help ]                         Print this help message and exit.
  -d [ --data-dir ] arg (="witness_node_data_dir")
                                        Directory containing databases, 
                                        configuration file, etc.
  -v [ --version ]                      Display version information
  --plugins arg (=witness account_history market_history grouped_orders)
                                        Space-separated list of plugins to 
                                        activate

  --replay-blockchain                   Rebuild object graph by replaying all 
                                        blocks without validation
  --revalidate-blockchain               Rebuild object graph by replaying all 
                                        blocks with full validation
  --resync-blockchain                   Delete all blocks and re-sync with 
                                        network from scratch
  --force-validate                      Force validation of all transactions 
                                        during normal operation
  --genesis-timestamp arg               Replace timestamp from genesis.json 
                                        with current time plus this many 
                                        seconds (experts only!)

  --p2p-endpoint arg                    Endpoint for P2P node to listen on
  -s [ --seed-node ] arg                P2P nodes to connect to on startup (may
                                        specify multiple times)
  --seed-nodes arg                      JSON array of P2P nodes to connect to 
                                        on startup
  -c [ --checkpoint ] arg               Pairs of [BLOCK_NUM,BLOCK_ID] that 
                                        should be enforced as checkpoints.
  --rpc-endpoint [=arg(=127.0.0.1:8090)]
                                        Endpoint for websocket RPC to listen on
  --rpc-tls-endpoint [=arg(=127.0.0.1:8089)]
                                        Endpoint for TLS websocket RPC to 
                                        listen on
  -p [ --server-pem ] [=arg(=server.pem)]
                                        The TLS certificate file for this 
                                        server
  -P [ --server-pem-password ] arg      Password for this certificate
  --genesis-json arg                    File to read Genesis State from
  --dbg-init-key arg                    Block signing key to use for init 
                                        witnesses, overrides genesis file
  --api-access arg                      JSON file specifying API permissions
  --io-threads [=arg(=0)]               Number of IO threads, default to 0 for 
                                        auto-configuration
  --enable-subscribe-to-all [=arg(=1)]  Whether allow API clients to subscribe 
                                        to universal object creation and 
                                        removal events
  --enable-standby-votes-tracking [=arg(=1)]
                                        Whether to enable tracking of votes of 
                                        standby witnesses and committee 
                                        members. Set it to true to provide 
                                        accurate data to API clients, set to 
                                        false for slightly better performance.


  --replay-blockchain                   Rebuild object graph by replaying all 
                                        blocks without validation
  --revalidate-blockchain               Rebuild object graph by replaying all 
                                        blocks with full validation
  --resync-blockchain                   Delete all blocks and re-sync with 
                                        network from scratch
  --force-validate                      Force validation of all transactions 
                                        during normal operation
  --genesis-timestamp arg               Replace timestamp from genesis.json 
                                        with current time plus this many 
                                        seconds (experts only!)

  --p2p-endpoint arg                    Endpoint for P2P node to listen on
  -s [ --seed-node ] arg                P2P nodes to connect to on startup (may
                                        specify multiple times)
  --seed-nodes arg                      JSON array of P2P nodes to connect to 
                                        on startup
...

@oxarbitrage
Copy link
Member Author

my apologies, i should had checked this more before submitting.

@oxarbitrage
Copy link
Member Author

The first app_options.add(cli); was removed to avoid the duplicated output of the help.

@abitmore
Copy link
Member

Looks good. @pmconrad @jmjatlanta your opinions?

Copy link
Contributor

@pmconrad pmconrad left a comment

Choose a reason for hiding this comment

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

Looks good.

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.

None yet

3 participants