Skip to content

Commit a70d181

Browse files
committed
Merge branch 'dev' of github.com:KomodoPlatform/komodo-defi-framework into lock-maker-orders
2 parents b7821ec + dc6e2f0 commit a70d181

File tree

11 files changed

+504
-69
lines changed

11 files changed

+504
-69
lines changed

CHANGELOG.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,103 @@
1+
## v2.5.0-beta - 2025-06-23
2+
3+
### Features:
4+
5+
**WalletConnect Integration**:
6+
- WalletConnect v2 support for EVM and Cosmos coins was implemented, enabling wallet connection and transaction signing via the WalletConnect protocol. [#2223](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2223) [#2485](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2485)
7+
8+
---
9+
10+
### Work in Progress (WIP) Features:
11+
12+
**Cosmos Network and IBC Swaps**:
13+
- Pre-swap validation logic was implemented for maker order creation, requiring HTLC assets and healthy IBC channels on the Cosmos network, with all changes gated behind the `ibc-routing-for-swaps` feature. [#2459](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2459)
14+
- The taker and maker order types were extended with an `order_metadata` field to carry protocol/IBC details, and cross-checks for IBC channels were added (also feature-gated), enabling both parties to validate IBC routing before a swap. [#2476](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2476)
15+
16+
**TRON Integration**:
17+
- Initial groundwork for TRON integration was started, including the addition of basic structures and boilerplate code; no end-to-end functionality is yet available. [#2425](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2425)
18+
19+
---
20+
21+
### Enhancements/Fixes:
22+
23+
**Event Streaming**:
24+
- Streamer IDs in the event-streaming system were strongly typed to improve type safety and code clarity. [#2441](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2441)
25+
26+
**Peer-to-Peer Network**:
27+
- Hardcoded seed node IP addresses were removed from the peer-to-peer network configuration to improve maintainability. [#2439](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2439)
28+
29+
**Orders and Trading Protocol**:
30+
- The minimum trading volume logic was revised to remove BTC-specific volume behavior, standardizing the calculation across all coins. [#2483](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2483)
31+
32+
**Tendermint / Cosmos**:
33+
- A helper for generating internal transaction IDs for Tendermint transactions was introduced. [#2438](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2438)
34+
- The IBC channel handler was improved to enhance safety and reliability when interacting with IBC channels. [#2298](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2298)
35+
36+
**Wallet**:
37+
- Unconfirmed z-coin notes are now correctly tracked. [#2331](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2331)
38+
- HD multi-address support for message signing was implemented, allowing message signatures from multiple derived addresses. [#2432](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2432) [#2474](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2474)
39+
40+
**UTXO**:
41+
- Validation of expected public keys for p2pk inputs was corrected, resolving an error in p2pk transaction processing. [#2408](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2408)
42+
- Transaction fee calculation and minimum relay fee handling for UTXO coins were improved for accurate fee estimation. [#2316](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2316)
43+
44+
**EVM / ERC20**:
45+
- ETH address serialization in event streaming was updated to use the `AddrToString` trait for consistency. [#2440](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2440)
46+
47+
**Pubkey Banning**:
48+
- Expirable bans for pubkeys were introduced, allowing temporary exclusion of certain public keys. [#2455](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2455)
49+
50+
**RPC Interface**:
51+
- A unified interface was implemented for legacy and current RPC methods. [#2450](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2450)
52+
53+
**DNS Resolution**:
54+
- IP resolution logic was improved to fail only if no IPv4 address is found. [#2487](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2487)
55+
56+
**Database and File System**:
57+
- More replacements of `dbdir` with `address_dir` were made as part of an ongoing improvement to database architecture. [#2398](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2398)
58+
59+
**Build and Dependency Management**:
60+
- Duplicated mm2 build artifacts were removed from the build process to reduce clutter. [#2448](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2448)
61+
- Static CRT linking was enabled for MSVC builds, improving the portability of Windows binaries. [#2464](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2464)
62+
- The `timed-map` dependency was bumped to version `1.4.1` for improved performance and stability. [#2413](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2413) [#2481](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2481)
63+
- The `base58` crate was removed and replaced with `bs58` throughout the codebase for consistency and security. [#2427](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2427)
64+
- Dependencies were reorganized using the `workspace.dependencies` feature for centralized management. [#2449](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2449)
65+
66+
---
67+
68+
### Other Changes:
69+
70+
**Documentation**:
71+
- Old URLs referencing atomicDEX or previous documentation pages were updated throughout the documentation. [#2428](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2428)
72+
- A DeepWiki badge was added to the README to highlight documentation resources. [#2463](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2463)
73+
74+
**Core Maintenance**:
75+
- Workspace dependencies were organized for consistent dependency management across the project. [#2449](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2449)
76+
- A unit test was added to validate DEX fee handling for ZCoin. [#2460](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2460)
77+
- Improved ERC20 token lookup to use platform ticker alongside contract address for proper token identification across platforms. [#2445](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2445)
78+
79+
---
80+
81+
### NB - Backwards compatibility breaking changes:
82+
83+
**WalletConnect/EVM Coin Activation Policy**:
84+
- The `priv_key_policy` field for EVM coin activation now requires the new enum variant format: `"priv_key_policy": { "type": "ContextPrivKey" }`. [#2223](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2223)
85+
86+
**TRON/EVM Chain Specification**:
87+
- EVM coin configurations must now include `chain_id` inside the `protocol_data` field. Legacy `chain_id` fields are deprecated. [#2425](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2425)
88+
89+
**mm2 Build Artifacts**:
90+
- The `mm2` binaries have been removed from build outputs. Users must reference new artifact locations. [#2448](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2448)
91+
92+
**Seednode Configuration**:
93+
- Hardcoded seed nodes were removed. KDF will no longer connect to 8762 mainnet by default without proper `seednodes` configuration. [#2439](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2439)
94+
95+
**IBC/Cosmos Changes**:
96+
- The `ibc_chains` and `ibc_transfer_channels` RPC endpoints have been removed. [#2459](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2459)
97+
- The `ibc_source_channel` field now requires numeric values only (e.g., `12` instead of `channel-12`). [#2459](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2459)
98+
99+
---
100+
1101
## v2.4.0-beta - 2025-05-02
2102

3103
### Features:

docs/DEV_ENVIRONMENT.md

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,34 @@
6666
CC=/opt/homebrew/opt/llvm/bin/clang AR=/opt/homebrew/opt/llvm/bin/llvm-ar wasm-pack test --firefox --headless mm2src/mm2_main
6767
```
6868
Please note `CC` and `AR` must be specified in the same line as `wasm-pack test mm2src/mm2_main`.
69-
#### Running specific WASM tests with Cargo</br>
70-
- Install `wasm-bindgen-cli`: </br>
71-
Make sure you have wasm-bindgen-cli installed with a version that matches the one specified in your Cargo.toml file.
72-
You can install it using Cargo with the following command:
73-
```
74-
cargo install -f wasm-bindgen-cli --version <wasm-bindgen-version>
75-
```
76-
- Run
77-
```
78-
cargo test --target wasm32-unknown-unknown --package coins --lib utxo::utxo_block_header_storage::wasm::indexeddb_block_header_storage
79-
```
69+
70+
#### Running specific WASM tests
71+
72+
There are two primary methods for running specific tests:
73+
74+
* **Method 1: Using `wasm-pack` (Recommended for browser-based tests)**
75+
76+
To filter tests, append `--` to the `wasm-pack test` command, followed by the name of the test you want to run. This will execute only the tests whose names contain the provided string.
77+
78+
General Example:
79+
```shell
80+
wasm-pack test --firefox --headless mm2src/mm2_main -- <test_name_to_run>
81+
```
82+
83+
> **Note for macOS users:** You must prepend the `CC` and `AR` environment variables to the command if they weren't already exported, just as you would when running all tests. For example: `CC=... AR=... wasm-pack test ...`
84+
85+
* **Method 2: Using `cargo test` (For non-browser tests)**
86+
87+
This method uses the standard Cargo test runner with a wasm target and is useful for tests that do not require a browser environment.
88+
89+
a. **Install `wasm-bindgen-cli`**: Make sure you have `wasm-bindgen-cli` installed with a version that matches the one specified in your `Cargo.toml` file.
90+
```shell
91+
cargo install -f wasm-bindgen-cli --version <wasm-bindgen-version>
92+
```
93+
94+
b. **Run the test**: Append `--` to the `cargo test` command, followed by the test path.
95+
```shell
96+
cargo test --target wasm32-unknown-unknown --package coins --lib -- utxo::utxo_block_header_storage::wasm::indexeddb_block_header_storage
97+
```
8098
8199
PS If you notice that this guide is outdated, please submit a PR.

mm2src/coins/qrc20/qrc20_tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ fn test_validate_fee() {
429429
}
430430

431431
#[test]
432+
#[ignore]
432433
fn test_wait_for_tx_spend_malicious() {
433434
// priv_key of qXxsj5RtciAby9T7m98AgAATL4zTi4UwDG
434435
let priv_key = [

mm2src/mm2_main/src/lp_native_dex.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ impl From<AdexBehaviourError> for P2PInitError {
113113
}
114114
}
115115
}
116-
117116
#[derive(Clone, Debug, Display, EnumFromTrait, Serialize, SerializeErrorType)]
118117
#[serde(tag = "error_type", content = "error_data")]
119118
pub enum MmInitError {
@@ -534,6 +533,10 @@ fn p2p_precheck(ctx: &MmArc) -> P2PResult<()> {
534533
}
535534
}
536535

536+
if is_seed_node && !CryptoCtx::is_init(ctx).unwrap_or(false) {
537+
return precheck_err("Seed node requires a persistent identity to generate its P2P key.");
538+
}
539+
537540
Ok(())
538541
}
539542

0 commit comments

Comments
 (0)