-
Notifications
You must be signed in to change notification settings - Fork 648
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
Change hard-coded limitations in API's to configurable #782
Comments
If rewriting config.ini while the node is running is scary, you may consider writing such settings to a new file, and doing a merge on the next startup. |
I’m going to claim this @ryanRfox |
Glad to have you take this on @manikey123. May I request you begin by offering an estimation for an implementation? It looks like this Issue may have at least one child Issue. You may consider investigating and claiming #626 and #1407 as well. I just need an estimation for each issue you claim. Thanks in advance for your assistance. |
By going through the code, the config.init file is used by the running node. So do not think it can be modified as it would be in read only mode. |
When bitshares local node starts, plan is to push the config file into memory location say temp table part of database ( for example sql lite ) |
An additional database is overkill for this issue. Please find a simpler solution. |
-Part1 -Part2 -Part3 -Part4A - New Config values pass -Part4B - New Config values fail Feel free to enhance or suggest on above |
any feedback on above approach ? |
1: Please optimize for the typical case, i. e. the config hasn't changed. Not sure if a mutex is the best choice. 2: I'd think that having the active config in heap and accessing through shared_ptr is simpler - that way you don't need to keep track of who is still using the old config after an update. The shared_ptr takes care of that. But feel free to implement as you see fit. 3: No additional 3rd-party-libraries please. This task is too simple to justify the additional burden. 4A: no, when new config takes effect the old config can be discarded 4B: Both - log the failure and continue to use old config |
1: Please optimize for the typical case, i. e. the config hasn't changed. Not sure if a mutex is the best choice.
2: I'd think that having the active config in heap and accessing through shared_ptr is simpler - that way you don't need to keep track of who is still using the old config after an update. The shared_ptr takes care of that. But feel free to implement as you see fit.
3: No additional 3rd-party-libraries please. This task is too simple to justify the additional burden.
4A: no, when new config takes effect the old config can be discarded
4B: Both - log the failure and continue to use old config
|
@manikey123 Please comment with your effort hours estimates for each Task in your list. You included them to me directly elsewhere, but we need them herein for transparency and for @pmconrad to review and provide additional feedback to me. I'm going to increase the research estimate to 3.5 hours (from 2) based on suggestions @pmconrad provided you and the adaptations you have considered. Thank you. |
High level implementation estimate (not started) -Part2 - shared_ptr approach - 4 hours -Part3 - tracking timestamp wrapper -2 hours -Part4B - New Config values fail - log the failure and continue to use old config -1 hour |
No additional libraries please. You can use |
ok. thanks. |
bitshares account id = betas-11 |
getting familiar and going through code that interacts with config ini |
1.Program Flow for First load -> configuration options are stored in memory. 1B> 1C> 1D> 2> 3>Clarifications / Inputs Needed:
Need to debug share ptr values part of issue 782 In main.cpp, line 65 app_options.add_options() I tried approach gdb and I get the below error Can anyone help me debug the above approach or suggest a better approach |
My idea would be to encapsulate all the config handling and reloading in a class of its own. One instance of that is created on startup and handed over to plugins and application. Existing code should simply continue to use the configuration values from application start, i. e. making all these reloadable is out of scope. You only need to add the testing that you require for the API limits.
You can create an async task that executes the check and re-adds itself as its last step. See https://github.com/bitshares/bitshares-core/blob/2.0.181127/libraries/net/node.cpp#L4118-L4127 for examples. It looks like your trying to debug Boost internal data structures. I've never tried that. You may be looking in the wrong place. What are you trying to find? |
Uploaded code for review : #1478 Focusing on these two areas for now in the code:
Code development covers below scenario: Clarifications: I am using ilog function for debugging the shared_pointers as I face BOOST error for the RTTI symbols not found. In my company the team uses CLION IDE with GDB and found it to be more time-saving than ilog. I am open for any better way to debug and open to connect with any technical member for the same. |
Added this to our (next) Feature Release to get some eyes on this. |
What about |
@bitfag I added |
Estimated 3 hrs to fix the code breakage caused due to code merge/ integration Made unsigned int changes on the test cases below: Below are the breakages due to plugin updates: Below api input parameters are changed
|
Please enable in database_fixture for the specific test case, similar to https://github.com/bitshares/bitshares-core/blob/test-2.0.190212/tests/common/database_fixture.cpp#L146 |
Fix #782: Change hard-coded limitations in API's to configurable
Implemented via #1513 - @cedar-book please check if the config file documentation needs to be updated with the new parameters. https://github.com/manikey123/bitshares-core/blob/78cb2c7c7d4c417602ba51c0d429e3e4af408e97/libraries/app/application.cpp#L1006-L1019 |
@pmconrad, Okay. Yes, I will check into that. |
@pmconrad, updated: config example information |
Thanks! |
Change those
FC_ASSERT( limit <= 100 )
limitations to configurable. Inspired by #781 (comment).config.ini
and startup parameters right now.CORE TEAM TASK LIST
The text was updated successfully, but these errors were encountered: