improvement(p2p): remove hardcoded seeds#2439
Conversation
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
8de43c6 to
6439234
Compare
Signed-off-by: onur-ozkan <work@onurozkan.dev>
6439234 to
e9a3160
Compare
… into remove-hardcoded-seeds
8f43fc0 to
3ff6b65
Compare
Signed-off-by: onur-ozkan <work@onurozkan.dev>
3ff6b65 to
8a37ed0
Compare
|
Currently KDF will launch without seednodes param, though console logs will show Should it rather fail to launch in this case? Without seednodes, not all functionality is lost (user can still activate coins and transact, sign messages etc) so there is a use case without them. |
We need a clear log message other than |
|
We can add an
This is also problem for bootstrap seed nodes. |
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
pleased keep in mind that Web and Mobile GUI code does not have the possibility to pass seednodes, while Desktop has: https://github.com/KomodoPlatform/komodo-wallet-desktop/blob/dev/src/core/atomicdex/config/kdf.cfg.hpp#L38-L39 |
I don't know if they are doing or not doing it, but it's very possible to do it. We even have an example/dummy web app that runs KDF(WASM) with a custom configuration. |
GUIs should be able to add the param in backend either hardcoded or via an api endpoint (with fallback) to keep seeds fresh. cc: @CharlVS |
Default value for
For bootstrap, we also have to specify it in config as a different mode. What do you think @onur-ozkan ? |
Please re-check lp_native_dex module. It's used there. |
shamardy
left a comment
There was a problem hiding this comment.
Thanks for the PR! Only nits and 1 question!
|
@onur-ozkan please merge with latest dev for wasm tests CI job. |
… into remove-hardcoded-seeds
|
Can we have QA coverage on this PR? Just the swap functionality part. cc @KomodoPlatform/qa |
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
|
Also |
392dd11 to
fc98e10
Compare
Signed-off-by: onur-ozkan <work@onurozkan.dev>
fc98e10 to
ff95dcb
Compare
|
They both fixed now. |
|
There was a problem hiding this comment.
- Confirm fail to launch if no seednode param in config
P2P initializing error: 'Precheck failed: 'Bootstrap node must also be a seed node.''✅ - Confirm successful launch when param included.
- Confirm swap initiates as expected
Entering the taker_swap_loop DOC/MARTY with uuid: d3bc6160-ce60-4fe0-a600-04dd1d9d587e
...
[swap uuid=d3bc6160-ce60-4fe0-a600-04dd1d9d587e] Finished
Can we have QA coverage on this PR? Just the swap functionality part.
Further testing to be done alongside docs drafting for the is_bootstrap_node and disable_p2p, but happy to approve the launch/swap portion and will offer any feedback on these configs if required.
- Confirm
disable_p2pallows launch without seednode paramWARN P2P is disabled. Features that require a P2P network (like swaps, peer health checks, etc.) will not work. - Confirm fails to launch if
disable_p2p&i_am_seedare both trueP2P initializing error: 'Precheck failed: 'Seed nodes cannot disable P2P.'' - Confirm fails to launch if
i_am_seedis false &is_bootstrap_nodeis trueP2P initializing error: 'Precheck failed: 'Bootstrap node must also be a seed node.'' - Confirm fails to launch if
i_am_seedis true,is_bootstrap_nodeis , andseednodesis not set'Precheck failed: 'Non-bootstrap node must have seed nodes configured to connect.''
* dev: (29 commits) fix(p2pk): validate expected pubkey correctly for p2pk inputs (#2408) chore(docs): update old urls referencing atomicdex or old docs pages (#2428) improvement(p2p): remove hardcoded seeds (#2439) fix(evm-api): find enabled erc20 token using platform ticker (#2445) chore(docs): add DeepWiki badge to README (#2463) chore(core): organize deps using workspace.dependencies (#2449) feat(db-arch): more dbdir to address_dir replacements (#2398) chore(build-artifacts): remove duplicated mm2 build artifacts (#2448) feat(pubkey-banning): expirable bans (#2455) fix(eth-balance-events): serialize eth address using AddrToString (#2440) chore(deps): remove base58 and replace it completely with bs58 (#2427) feat(tron): initial groundwork for full TRON integration (#2425) fix(UTXO): improve tx fee calculation and min relay fee handling (#2316) deps(timed-map): bump to 1.3.1 (#2413) improvement(tendermint): safer IBC channel handler (#2298) chore(release): complete v2.4.0-beta changelogs (#2436) fix(event-streaming): initial addresses registration in utxo balance streaming (#2431) improvement(watchers): re-write use-watchers handling (#2430) fix(evm): make withdraw_nft work in HD mode (#2424) feat(taproot): support parsing taproot output address types ...
* lr-swap-wip: (37 commits) fix custom token error name fix getting chain_id from protocol_data refactor (review): use dedicated large error cfg, add new fn to FromApiValueError, fix TODO, use experimental namespace for lr rpc, more Ticker alias feat(walletconnect): add WalletConnect v2 support for EVM and Cosmos (GLEECBTC#2223) feat(ibc-routing-part-1): supporting entire Cosmos network for swaps (GLEECBTC#2459) fix(test): fix HD Wallet message signing tests (GLEECBTC#2474) improvement(builds): enable static CRT linking for MSVC builds (GLEECBTC#2464) feat(wallet): implement HD multi-address support for message signing (GLEECBTC#2432) fix(p2pk): validate expected pubkey correctly for p2pk inputs (GLEECBTC#2408) chore(docs): update old urls referencing atomicdex or old docs pages (GLEECBTC#2428) improvement(p2p): remove hardcoded seeds (GLEECBTC#2439) fix(evm-api): find enabled erc20 token using platform ticker (GLEECBTC#2445) chore(docs): add DeepWiki badge to README (GLEECBTC#2463) chore(core): organize deps using workspace.dependencies (GLEECBTC#2449) feat(db-arch): more dbdir to address_dir replacements (GLEECBTC#2398) chore(build-artifacts): remove duplicated mm2 build artifacts (GLEECBTC#2448) feat(pubkey-banning): expirable bans (GLEECBTC#2455) fix(eth-balance-events): serialize eth address using AddrToString (GLEECBTC#2440) chore(deps): remove base58 and replace it completely with bs58 (GLEECBTC#2427) feat(tron): initial groundwork for full TRON integration (GLEECBTC#2425) ...
- Removes all hardcoded seed nodes from KDF. Users must now supply their own seed node addresses in the `seednodes` config field; KDF will no longer auto-connect to 8762 mainnet by default. - Adds two explicit boolean config fields: `is_bootstrap_node` and `disable_p2p`. - Implements a P2P precheck flow that validates the combination of `i_am_seed`, `disable_p2p`, `is_bootstrap_node`, `seednodes`, `p2p_in_memory`, etc, and prevents misconfiguration. **BREAKING:** KDF will not connect to any seed nodes by default. If `seednodes` is not properly set, mainnet connections will fail. Fixes #2409
Removes hardcoded seeds from KDF. It's better to provide some seed node addresses in the KDF docs for people running KDF manually without our GUI apps.
Adds 2 new boolean config fields
is_bootstrap_nodeanddisable_p2p.Adds a p2p precheck flow to validate fields like
i_am_seed,disable_p2p,seednodes,is_bootstrap_node,p2p_in_memory, etc.Docs issues: GLEECBTC/komodo-docs-mdx#483 and GLEECBTC/komodo-docs-mdx#488
Breakage: KDF will no longer connect to 8762 mainnet by default if seednodes field is not configured properly.
Fixes #2409