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

Projects
None yet
3 participants
@oxarbitrage
Copy link
Member

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

This comment has been minimized.

Copy link
Member

commented Mar 13, 2019

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

@abitmore abitmore added this to the Hotfix-201903-2 milestone Mar 13, 2019

@pmconrad

This comment has been minimized.

Copy link
Contributor

commented Mar 13, 2019

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

@oxarbitrage

This comment has been minimized.

Copy link
Member Author

commented Mar 13, 2019

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

This comment has been minimized.

Copy link
Member

commented Mar 13, 2019

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

@oxarbitrage

This comment has been minimized.

Copy link
Member Author

commented Mar 13, 2019

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

This comment has been minimized.

Copy link
Member

commented Mar 14, 2019

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

This comment has been minimized.

Copy link
Member Author

commented Mar 14, 2019

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

@oxarbitrage

This comment has been minimized.

Copy link
Member Author

commented Mar 14, 2019

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

@abitmore

This comment has been minimized.

Copy link
Member

commented Mar 14, 2019

Looks good. @pmconrad @jmjatlanta your opinions?

@pmconrad
Copy link
Contributor

left a comment

Looks good.

@oxarbitrage oxarbitrage merged commit 8cb390c into bitshares:release Mar 16, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@oxarbitrage oxarbitrage referenced this pull request Mar 16, 2019

Merged

Merge hotfix #1657

@oxarbitrage oxarbitrage referenced this pull request Mar 19, 2019

Closed

"plugins" option in config.ini is ignored #1637

1 of 17 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.