-
Notifications
You must be signed in to change notification settings - Fork 649
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
Implemented "plugins" config variable #288
Conversation
this looks good, ill test it and comment/review. |
libraries/app/application.cpp
Outdated
wanted.push_back("account_history"); | ||
wanted.push_back("market_history"); | ||
} | ||
for (auto it = wanted.cbegin(); it != wanted.cend(); it++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use ++it
everywhere, although not a big deal here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now using range-based loop as a compromise. :-)
@@ -1,104 +0,0 @@ | |||
|
|||
Introduction | |||
------------ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to keep this document somewhere. Is it in the docs directory/sub-repository already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed to bitshares-core.wiki: https://github.com/bitshares/bitshares-core/wiki/README-debug_node
when running the node with this pull request for the first time i am getting error:
Same error without the --plugins option:
|
This looks like a problem with the default config file in combination with issue #209. (Possibly caused by your multiple "-w" options?) |
Multiple |
Pretty strange as the current master goes fine following the same steps.
Ill look into it further.
El may. 29, 2017 2:35 PM, "Abit" <notifications@github.com> escribió:
… Multiple -w should be allowed. Something is wrong with your setup.
@oxarbitrage <https://github.com/oxarbitrage>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#288 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AUrjaUl8jhqZTxKhViylD5GEBacPEFKHks5r-wHdgaJpZM4NlbEz>
.
|
@pmconrad i checked my config file at line 50 where the error is happening and the private-key param is duplicated:
please note that there was no config file generated from before, this is first time run. i think somehow this pull request is causing this duplicate in the config. any idea why ? please note current master node without pull request is working fine. |
It may be inserted by witness plugin once, then debug_node plugin or delayed_node plugin once. |
make sense @abitmore thanks, however i am calling the node to load only the "witness" plugin or without plugin options at all. this should be i think: default(to keep it as it was): with --plugins argument in node start: |
The patch collects all available options from all known plugins, independently from the selection of active plugins. The intent is that invoking --help gives you all options from all plugins. I didn't think of collisions there. The problem only appears when witness_node is run in a clean data dir - in that case it will create a new config file containing all options it knows about. Afterwards it tries to parse the new config file, and fails due to duplicate keys. Good find, I'll filter out duplicates. |
works perfect now @pmconrad i few tests i made, running node with:
after sync the memory usage of the witness node in pmap was:
this is around 2.2 gigs , expected as history is not loaded. Now starting the node normally with no plugin parameter as:
after the sync the memory usage for the process is at:
around 18 gigs, meaning it haves everything loaded up. didn't made any test with delayed, debug node plugins as i never used them before but with the iterator change, the addition of removed document to wiki and the fix in the duplicated config this pull is looking good to me for a merge. |
@oxarbitrage we need to test at least |
got it, on it. |
made some tests with the delayed node, working ok. first, a trusted node is started and synced listening in port 8090. next a delayed node is started by command:
it takes a while for the delayed node to get in sync to the trusted node, if everything is ok the delayed node will show this kind of messages while the sync is happening:
by opening cli wallets to the trusted and to the delayed we can see the trusted is a bit faster as expected: in trusted:
in delayed almost at the same time:
from the documentation in here:
difference is in the server-rpc-endpoint going to port 8091(delayed) instead of 8090(trusted). also here:
|
@oxarbitrage cli need to connect to trusted node to be able to broadcast transactions, for exchanges, withdrawals. |
Got it. The delayed node is only for deposit notifications in the proposed
documentation setup for exchanges.
Whatever is the case the delayed node seems to be working fine starting it
with the main witness executable and the new --plugins argument.
I am now giving a try to the debug witness.
El jun. 5, 2017 6:39 PM, "Abit" <notifications@github.com> escribió:
… @oxarbitrage <https://github.com/oxarbitrage> cli need to connect to
trusted node to be able to broadcast transactions, for exchanges,
withdrawals.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#288 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AUrjaerolkkhZgK-LDaVxqgGAkPahyEkks5sBHWYgaJpZM4NlbEz>
.
|
i know it had been a while but with the next hard fork coming i tested the debug node today with the plugin parameter from this pull. the debug node was the only setup left to test for the complete approval of this pull request. debug node with new plugins param is started as:
followed the debug node guide at: https://github.com/bitshares/bitshares-core/wiki/README-debug_node . all worked. the only concern may be that the executables for debug_node and delayed_node will not be present anymore, this can be confusing for some new users but if we update the docs should be fine. i personally think the new parameter is better than having separated stuff. |
I'd rather keep this unmerged for now. Although it may work, it may affect most of 3rd parties who rely on delayed nodes. We need a way to disturb them the least, for example, leave the //Edit: most of the 3rd parties I mentioned above are exchanges, it's important that they play an important role in the ecosystem. |
Would you approve the changes in witness_node if we keep the separate delayed_node? |
Yes, I think it's better. |
all good here, the delayed node is back as a separated program and can now be launched by the 2 ways:
@abitmore let us know if you this is ok to merge. thanks. well done peter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good except one minor issue.
programs/witness_node/CMakeLists.txt
Outdated
@@ -11,7 +11,7 @@ endif() | |||
|
|||
# We have to link against graphene_debug_witness because deficiency in our API infrastructure doesn't allow plugins to be fully abstracted #246 | |||
target_link_libraries( witness_node | |||
PRIVATE graphene_app graphene_account_history graphene_market_history graphene_witness graphene_chain graphene_debug_witness graphene_egenesis_full fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ) | |||
PRIVATE graphene_app graphene_delayed_node graphene_account_history graphene_market_history graphene_witness graphene_debug_witness graphene_chain graphene_debug_witness graphene_egenesis_full fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate graphene_debug_witness
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks!
Combined the various *_node programs into one, where all plugins are available and can be enabled/disabled by setting a config variable. The default is witness, account_history and market_history, like in the normal witness_node.
Note that some combinations of plugins don't make much sense, like delayed_node + witness.
Note also that changing the plugins variable usually means you have to replay the blockchain.