Interface simplified#40
Merged
Merged
Conversation
- Strip autodht, process, baseport, is_full_node from all init signatures - GeniusSDKInit now takes (base_path, dev_config) - GeniusSDKInitWithKey now takes (base_path, dev_config, eth_private_key) - GeniusSDKInitWithMnemonic now takes (base_path, dev_config, mnemonic) - Remove GeniusSDKInitWithKeyAndDevConfig (D-08, INIT-04) - Remove GeniusSDKInitMinimal (D-08, INIT-05) - Update Doxygen @param tags: no reference to legacy params
- Remove SDKInitHelper template (D-03) — each function inlines its own logic
- Remove ReadDevConfigFromJSONStr and ReadDevConfigFromJSON wrappers
- Remove GeniusSDKInitWithKeyAndDevConfig and GeniusSDKInitMinimal (D-08)
- Add 3 inline init functions calling GeniusNode::New(config, AccountSource{variant})
- GeniusSDKInit → NewAccount{} (INIT-01, IMPL-01, IMPL-02)
- GeniusSDKInitWithKey → FromPrivateKey{key_copy} (INIT-02, IMPL-03, IMPL-06)
- GeniusSDKInitWithMnemonic → FromMnemonic{mnemonic_copy} (INIT-03, IMPL-04, IMPL-06)
- D-05: null/empty dev_config returns nullptr with SPDLOG_ERROR
- D-06: key/mnemonic captured by value (std::string) before AccountSource
- D-09: static std::string ret_val with .assign() reset per function
- Zero references to NewFromPrivateKey, NewFromMnemonic, old multi-param New()
…rg init, ship config files - Rewrite getSDKConfig() to accept only base_path and eth_private_key (strip autodht/process/baseport) - Rewrite initSDK() to load dev_config.json from base_path and call GeniusSDKInitWithKey(base_path, dev_config, eth_private_key) - Create example/network_config.json (port 40001, enable_dht: true) - Create example/sgns_config.json (enable_processing: true, is_full_node: false) - Update example/CMakeLists.txt to copy network_config.json and sgns_config.json to build output
…ice callers, ship service configs - Rewrite SDKIdleExample.cpp: load dev_config.json, call GeniusSDKInitWithKey with 3 args (no legacy params) - Rewrite service.cpp: accept only base_path CLI arg, load dev_config.json, call GeniusSDKInit with 2 args - Strip parse_bool lambda, all autodht/process/baseport/is_full_node references - Create services/network_config.json and services/sgns_config.json with same defaults as examples
- Document all 14 return sites (11 nullptr + 3 success) across 3 init functions - Verify every failure path returns nullptr, every success path returns non-null string - Confirm static ret_val with assign reset prevents cross-call accumulation - Confirm key_copy/mnemonic_copy value capture preserves IMPL-06 - All 4 VER-01 checks (A/B/C/D) documented with line-number evidence
- VER-02: 5 grep scans confirm zero references to NewFromPrivateKey, NewFromMnemonic, GeniusSDKInitWithKeyAndDevConfig, GeniusSDKInitMinimal, autodht, baseport, is_full_node - VER-02: All 3 GeniusNode::New calls use the unified 2-arg AccountSource signature - VER-03: All 8 @param tags across 3 init functions match their signatures exactly - VER-03: No stale parameter references in any Doxygen block - Summary table: 12/12 checks passed
- STATE.md reflects Phase 1 completion (completed_phases=1, completed_plans=3) - Current Position updated: Phase 2 of 2, Status: Verified - Progress bar: 100%, all 3 VER requirements pass (12/12 checks) - Session continuity updated to 2026-07-06 - Verification report: all 3 init functions preserve return contract, zero dead references, accurate Doxygen documentation
EduMenges
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Interface changed to externalize 3 methods
I removed the paramaters such as port, autodht and full node flags from the method and instead it's read from json files. Also removed the dependency of a dev_config.json file on the write directory, as all init files will need to pass the json of the dev_config on the init method, so people can't edit a file and change the payouts and whatnot.