Add work_server_use_peers field to config#5017
Add work_server_use_peers field to config#5017pwojcikdev merged 8 commits intonanocurrency:developfrom
Conversation
|
This makes sense. I think using work peers should be the default (if they are available), but this can be done as a next step. |
|
Yeah, sounds right. Done. |
0ef94e8 to
22dc975
Compare
edc5fe4 to
4af4ff5
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a new configuration field work_server_use_peers to allow setting a default value for the use_peers parameter in work server RPC requests, eliminating the need to specify it in every request when using an external work server.
Changes:
- Added
work_server_use_peersboolean configuration field with default valuefalse - Implemented serialization and deserialization in TOML config
- Modified
work_generateRPC handler to use the config value as default whenuse_peersis not specified in the request, with special logic to auto-enable when work peers are configured
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| nano/node/nodeconfig.hpp | Added work_server_use_peers boolean field declaration with default value false |
| nano/node/nodeconfig.cpp | Added serialization and deserialization of work_server_use_peers field in TOML config |
| nano/node/json_handler.cpp | Modified work_generate handler to use config field as default for use_peers parameter with auto-detection logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I would also like to clarify is there an approximate release date for update 29.0? |
Rely on auto-detected distributed work peers setting
|
@h45hc47 We don't have a strict schedule for launching V29. I think we still have a few work in progress items left to merge like database index PR. I'd say roughly 1-2 months for feature cutoff, then one month of testing. |
Currently, if local work generation disabled and used external work server, there is a need to add
"use_peers": trueto all requests, which is not very convenient.So i add field
work_server_use_peers: <bool>to node config to specify it and redefine it in request if needed.