-
Notifications
You must be signed in to change notification settings - Fork 111
chore(release): v2.5.0-beta #2491
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
Conversation
Replaces chain-registry parsing with embedded IBC channels in coins file
This commit fundamentally restructures the UTXO transaction building algorithm to fix issues with fee calculation and to address minimum relay fee requirements. The core change replaces the previous single-pass transaction assembly with an iterative approach that properly accounts for fee-output dependencies.
This commit establishes the foundation for native TRON (TRX) support alongside EVM chains using EthCoin implementation. It adds `EthCoin` `ChainSpec` and tron address handling.
Implements expirable public key banning. For swaps public keys will be banned for one hour, which should be a sufficient penalty (and can be easily increased if needed). Manual bans will default to permanent but this can be changed by including the duration_min parameter in the request.
* remove duplicated mm2 artifacts Signed-off-by: onur-ozkan <[email protected]> * create `$SAFE_DIR_NAME` before moving artifacts Signed-off-by: onur-ozkan <[email protected]> --------- Signed-off-by: onur-ozkan <[email protected]>
address_dir() will now default to dbdir() if the new-db-arch feature is disabled. That won't affect dev environment while this feature is in progress.
This commit organize multiple packages under a single workspace, share dependencies, etc. It also led to some compile time improvements.
This renames the function `get_enabled_erc20_by_contract` to `get_enabled_erc20_by_platform_and_contract` and adds a new parameter, namely the platform ticker. The platform ticker is used to distinguish which erc20 token we are interested in, as erc20 tokens share the same contract address over different platforms, which means contract address alone isn't enough to identify the erc20 token.
- 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
For p2pk inputs, the pubkey isn't included in the scriptSig. The scriptSig only includes the signature and that's it. This commit verifies the signature in the scriptSig using the expected pubkey.
…2432) This commit allows users with HD wallets to sign messages from any derived address using `sign_message` RPC.
fixes two tests that were introduced in #2432. 1- fixes `test_sign_verify_message_eth_with_derivation_path` by including a json parameter that was missing. 2- fixes `test_hd_address_conflict_across_derivation_paths` as it was not functioning correctly because it never re-used the same DB path, which is a critical step to show that the bug exists. this makes it so we reuse the same DB path for the second mm2 instance. the test was also simplified to omit message signing as it was not critical part of the test.
…2459) * add new feature `ibc-routing-for-swaps` to coins crate * re-implement `fn wallet_only` behind ibc-routing-for-swaps feature * add pre-check function `create_maker_order_pre_checks` to `MmCoins` * add default logic to `tendermint_coin::pre_check_for_order_creation` * enable conditional compilation * use single generic IBC error in `WithdrawError`
…2223) - Adds WalletConnect v2 integration for Ethereum (ETH, ERC20) and Cosmos-based coins, supporting both mobile and web wallets. - Activation requests for these coins now use `"priv_key_policy": { "type": "WalletConnect", "session_topic": ... }` to delegate signing and transaction broadcasting to the connected wallet. No local private key is stored. - New public APIs for session management: `wc_new_connection`, `wc_get_sessions`, `wc_get_session`, `wc_ping_session`, `wc_delete_session`. - BREAKING: Coin activation for EVM and Cosmos coins now requires `"priv_key_policy"` to be an object with a `"type"` field (e.g. `{ "type": "ContextPrivKey" }`). Using a plain string is no longer accepted. - BREAKING: Activation requests/responses for these coins are not backward compatible with previous formats. - NFT coins are **not** yet supported via WalletConnect. - UTXO coins remain unchanged; WalletConnect is not supported for them. - All swap and transaction signing for WalletConnect-activated coins requires user approval in the external wallet. This update enables secure, external signing with WalletConnect-compatible wallets and introduces new APIs for session lifecycle management.
* remove tendermint logics from `my_tx_history_v2` and create common function Signed-off-by: onur-ozkan <[email protected]> * use tx hash instead of hex Signed-off-by: onur-ozkan <[email protected]> --------- Signed-off-by: onur-ozkan <[email protected]>
…aces (#2450) * re-write legacy `process_single_request` Signed-off-by: onur-ozkan <[email protected]> * provide unified RPC interface for clients Signed-off-by: onur-ozkan <[email protected]> * remove `mmrpc` from various tests to have a coverage on recent change Signed-off-by: onur-ozkan <[email protected]> * use `ERR` macro instead of `ERRL` Signed-off-by: onur-ozkan <[email protected]> * remove unknown method test for legacy dispatcher Signed-off-by: onur-ozkan <[email protected]> * add info log Signed-off-by: onur-ozkan <[email protected]> * nit Signed-off-by: onur-ozkan <[email protected]> --------- Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
* refactor(event-streaming): having a strong type for streamer id #2207 used enumeration to represent the IDs of the different types of streamers that are currently supported. * refactor(event-streaming): wrap StreamerId into an Arc #2207 * Revert "refactor(event-streaming): wrap StreamerId into an Arc #2207" This reverts commit 702befe. * fix(event-streaming): having derive_streamer_id returns only StreamerId `derive_streamer_id` was returning `StreamerId` in some places and `&'static StreamerId` in others, so it's now fixed to return `StreamerId` in every place. * fix(event-streaming): reorder derived traits for StreamerId #2207 * refactor(event-streaming): move StreamerId from streamer.rs to streamer_ids.rs - move StreamerId from streamer.rs to streamer_ids.rs - use the default Debug implementation for StreamerId - use custom serialization and deserialization for StreamerId e.g. StreamerId::Balance(String::from("ETH")) will look like BALANCE:ETH instead of {"Balance":"ETH"} * refactor(event-streaming): centralize StreamerId string constants and fix OrderbookUpdate format - Moved all StreamerId string constants to module-level scope for reuse across Display and Deserialize implementations. - Fixed inconsistency in OrderbookUpdate variant string format (was using "/" instead of ":"). - Improved test variant handling using FOR_TESTING_PREFIX under #[cfg(test)]. * refactor(event-streaming): use struct-like enums for StreamerId variants for better clarity * chore(event-streaming): change XXX to TODO for clarity * fix(event-streaming): enable StreamerId::ForTesting for wasm32 builds Replaces `#[cfg(test)]` with `#[cfg(any(test, target_arch = "wasm32"))]` so that the ForTesting variant is compiled when targeting WebAssembly.
* resolve hostnames better Signed-off-by: onur-ozkan <[email protected]> * re-org errors Signed-off-by: onur-ozkan <[email protected]> --------- Signed-off-by: onur-ozkan <[email protected]>
WalletConnectCtx is now initialized lazily in the `new_connection` RPC handler instead of during startup, preventing WalletConnect-related errors from affecting node initialization and avoiding unnecessary setup for users not using WalletConnect; this may slightly delay the first WalletConnect RPC call but has no functional impact.
…2476) ### Adds pre-swap checks and order metadata This change is the second part of implementing IBC-routed swaps for the Cosmos ecosystem. It introduces pre-swap validation mechanisms to prevent users from entering swaps that are likely to fail due to misconfigured or unhealthy IBC channels. The key additions include: * **Pre-Swap Validation:** A new `pre_check_for_order_creation` method has been integrated into the `buy` and `sell` workflows. For non-HTLC Tendermint coins, this check verifies: * The existence of a healthy IBC channel to an HTLC-enabled chain (e.g., IRIS, NUCLEUS). * A sufficient balance on the HTLC chain to cover potential routing fees, configured via `min_balance_for_ibc_routing`. * **Order Metadata:** A new `order_metadata` field has been added to `MakerOrder` and `TakerRequest`. For non-HTLC swaps, this field carries the `channel_id`, allowing the counterparty to validate the proposed swap route before proceeding. * **Tendermint Refactoring:** To support these features, the Tendermint coin implementation has been significantly refactored: * Protocol-specific fields (`denom`, `chain_id`, `account_prefix`, etc.) have been consolidated into a `TendermintProtocolInfo` struct for better organization. * Type safety has been improved by using `cosmrs::Denom` and `cosmrs::ChainId` instead of generic `String` types. * Hardcoded prefixes like "iaa" and "nuc" have been replaced with shared constants (`IRIS_PREFIX`, `NUCLEUS_PREFIX`). All changes are gated behind the `ibc-routing-for-swaps` feature flag and do not affect existing functionality in default builds.
…logic (#2483) The removed logic is quite unnecessary today. With this patch, the minimum trading volume becomes 0.0001, which is around the equivalent of 10 USD and is roughly 10 times the average transaction fee on the BTC network.
Previously, when a Z-coin transaction with a change output was created, the change note was not properly accounted for before the transaction was confirmed. This resulted in an inaccurate spendable balance, often leading to subsequent transactions failing due to a perceived lack of funds. This commit introduces `LockedNotesStorage`, a new persistence layer to track notes involved in pending (unconfirmed) transactions. - When a transaction is created, its change output is now recorded as a `Change` note in this storage. - The `my_balance` function has been updated to subtract the value of these locked notes, ensuring the spendable balance is accurate. - Notes used as inputs are also locked as `Spent` to prevent double-spending. - Once the transaction is confirmed, `scan_cached_block` removes the corresponding entries from `LockedNotesStorage`, making the change notes available for use. This ensures that the wallet's state is consistent even with pending transactions, preventing incorrect balance calculations and transaction failures.
This commit introduces a framework for creating zcoin unit tests and makes the following key changes: - A new unit test has been added to validate the address-checking logic within the `validate_dex_fee_output` function. - The multicore feature has been removed from the zcash_proofs dependency for the wasm32 target to resolve test errors.
This commit does the following: - Introduces a `delete_wallet` RPC to securely remove any wallet after password confirmation; it also prevents deletion of the active wallet. - It add a requirement for `CryptoCtx` to be initialized with a passphrase if a seednodes is being initialized, preventing startup without persistant p2p keypair. - It also improves WASM test documentation and removes/deactivates outdated QRC20 tests.
…oin init (#2504) This commit makes it so we don't call get_enabled_address before initializing the coin, but rather after we made sure we initialized the account and address that the enabled address belongs to.
This commit fixes a critical race condition in the WalletConnect module that causes Client(WebsocketClient(NotConnected)) errors during initialization, particularly for the wc_new_connection RPC call. It's done by refactoring the connection management logic into a robust, centralized state machine. The scattered, per-function retry loops have been removed in favor of a more reliable architecture.
|
A quick report from this morning's trezor testing: tl;dr
The breaking change in #2223 implies an object (not string) should be used for The failing ETH activation in Trezor, unless expected and WIP, I'd consider a blocker. ETH Trezor activation atttempt gave me: This is likely due to ETH not having a MATIC/BNB return Not much in console logs, just |
smk762
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though some issues remain unresolved with Trezor and WalletConnect, none are blocking for next Wallet release - and changes required for next wallet release in this PR appear to be functional (in CLI at least).
On that basis, I'll approve for the sake of not delaying the next Wallet release, and await retesting the remnants in 2.6.0
DeckerSU
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. All third-party dependencies in this project were scanned manually, and no malicious code was found. However, this review covered only intentional inclusions; logic errors, non-functional code, or similar issues in third-party libraries were not assessed during this review.
v2.5.0-beta - 2025-07-04
Features:
WalletConnect Integration:
Work in Progress (WIP) Features:
Cosmos Network and IBC Swaps:
ibc-routing-for-swapsfeature. #2459order_metadatafield 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. #2476TRON Integration:
Enhancements/Fixes:
Event Streaming:
Peer-to-Peer Network:
Orders and Trading Protocol:
Tendermint / Cosmos:
Wallet:
delete_walletRPC was introduced to securely remove wallets after password confirmation, while preventing the deletion of the currently active wallet. #2497UTXO:
EVM / ERC20:
AddrToStringtrait for consistency. #2440Pubkey Banning:
RPC Interface:
DNS Resolution:
Database and File System:
dbdirwithaddress_dirwere made as part of an ongoing improvement to database architecture. #2398Build and Dependency Management:
timed-mapdependency was bumped to version1.4.1for improved performance and stability. #2413 #2481base58crate was removed and replaced withbs58throughout the codebase for consistency and security. #2427workspace.dependenciesfeature for centralized management. #2449Other Changes:
Documentation:
Core Maintenance:
NB - Backwards compatibility breaking changes:
WalletConnect/EVM Coin Activation Policy:
priv_key_policyfield for EVM coin activation now requires the new enum variant format:"priv_key_policy": { "type": "ContextPrivKey" }. #2223TRON/EVM Chain Specification:
chain_idinside theprotocol_datafield. Legacychain_idfields are deprecated. #2425mm2 Build Artifacts:
mm2binaries have been removed from build outputs. Users must reference new artifact locations. #2448Seednode Configuration:
seednodesconfiguration. #2439IBC/Cosmos Changes:
ibc_chainsandibc_transfer_channelsRPC endpoints have been removed. #2459ibc_source_channelfield now requires numeric values only (e.g.,12instead ofchannel-12). #2459