Skip to content

chore(release): v2.0.0-beta#1968

Merged
shamardy merged 40 commits intomainfrom
dev
Dec 18, 2023
Merged

chore(release): v2.0.0-beta#1968
shamardy merged 40 commits intomainfrom
dev

Conversation

@shamardy
Copy link
Copy Markdown
Collaborator

@shamardy shamardy commented Sep 18, 2023

Features:

  • KMD Burn #2010
    • Burn 25% of taker fee when paid in KMD #2006.
  • Trading Protocol Upgrade #1895
    • Implement successful swaps v2 of UTXO to UTXO coins in #1958.
    • Add Swaps V2 message exchange using Protobuf in #1958.
    • Storing upgraded swaps data to SQLite DB was partially implemented in #1980.
    • Protocol enhancement for UTXO coins by adding one more funding tx for taker, which can be reclaimed immediately if maker back-outs was implemented in #1980.
  • Event Streaming #1901
    • Streaming channels using mpsc and SSE to send data to clients continuously was implemented in #1945.
    • NETWORK event was implemented to show this new functionality in #1945.
    • Wasm event streaming using workers was added in #1978.
    • COIN_BALANCE events for Tendermint Protocol were added in #1978.

Enhancements/Fixes:

  • Network Enhancements:
    • P2P layer now uses the latest stable libp2p version in #1878.
    • 7777 network was deprecated in #2020.
    • Seednodes for netid 8762 were updated in #2024.
    • libp2p-yamux now uses yamux v0.13 (new version) by default and fall back to yamux v0.12 (old version) when setting any configuration options in #2030.
    • The backpressure buffer cap was increased from 25 to 256 in #2030.
    • New protocol version (Version2) was used for peer exchange and request-response behaviours in #2030.
    • Network information is now written to stdout to find mm2 ports easily after #2034.
  • NFT integration #900
    • exclude_spam and exclude_phishing params were added for get_nft_list and get_nft_transfers RPCs in #1959.
    • nft_cache_db was added in NftCtx for non wasm targets in #1989.
    • AsyncConnection structure that can be used as async wrapper for sqlite connection was added in #1989.
    • async_sqlite_connection field was added to MmCtx in #1989.
    • Spam transfers with empty meta no longer update after #1989.
  • ARRR/Pirate:
    • ARRR infrastructure for lightwallet servers uses a fork of lightwalletd, the grpc service was renamed from cash.z.wallet.sdk.rpc to pirate.wallet.sdk.rpc to use the lightwalletd fork in #1963.
    • Previous blocks/wallet sync will be resumed if sync_params are not provided after restart in #1967.
  • Adex-CLI #1682
    • Exact dependency versions of hyper-rustls, rustls and other deps was set in #1956.
    • A warning was added on insecure cli configuration file mode in #1956.
  • Storable State Machine abstraction was added while having few changes to existing state machines in #1958.
  • EVM web3 requests timeout was reduced to 20s in #1973.
  • Fixed 0.0001 min threshold for TakerFee was removed in #1971.
  • The minimum trading volume for evm and tendermint was changed to be the smallest possible amount of the coin in #1971.
  • Minimum trading price is reduced to be any value above 0 in #1971.
  • Cryptocondition script type was added to utxo transactions in #1991.
  • On response error the next web3 node is tried in #1998.
  • Watchtower taker-side restart bug was fixed in #1908.
  • 'version' method was added to PUBLIC_METHODS that require no login in #2001.
  • rpcport value can now accept a string after #2026.
  • An additional PRICE_ENDPOINTS url which is a cached copy of https://prices.komodian.info/api/v2/tickers and is updated every minute was added in #2032.

NB - Backwards compatibility breaking changes:

  • 7777 Network deprecation and the upgrade to a new p2p layer breaks compatibility with previous versions of Komodo DeFi Framework. Connections between nodes/clients running an older version of Komodo DeFi Framework and nodes/clients running this latest version will not be possible. To avoid this, all nodes/clients must be upgraded to the latest version of Komodo DeFi Framework.
  • Because of KMD burn of a part of the taker fee, the taker fee outputs for any coin/KMD swap are changed and makers running older versions will not be able to validate the taker fee, this will cause the swap to fail. This case will never happen anyway because older versions will not be able to connect to this latest version due to the network upgrade.
  • Because of the removal of the fixed 0.0001 min threshold for TakerFee, taker fee validation will also fail for these cases. Again, this case will never happen as the previous case.

dimxy and others added 5 commits September 8, 2023 20:55
Fix regex to parse passphrase from .env file if newline char or space is added
* Running WASM tests with Cargo
#1963)

Infrastructure for ARRR lightwallet servers uses a fork of lightwalletd, this commit renames the grpc service from cash.z.wallet.sdk.rpc; to pirate.wallet.sdk.rpc; to use the lightwalletd fork.
shamardy and others added 2 commits September 18, 2023 18:11
This PR fixes failing wasm tests and test_utxo_lock by making these tests use the DOC/MARTY electrums
…ne (#1958)

This commit:
- Adds Storable State Machine abstraction with a goal to have as fewer changes to existing state machines as possible.
- Implements successful swap v2 of UTXO to UTXO coin. Adds tests for such swap using dockerized komodod daemons.
- Adds Swap V2 message exchange using Protobuf.
@cipig
Copy link
Copy Markdown

cipig commented Sep 21, 2023

https://1209k.com/bitcoin-eye/ele.php?chain=tbch has some working tBCH electrums
for the failing utxo::utxo_tests::test_address_from_str_with_cashaddress_activated and utxo::utxo_tests::test_address_from_str_with_legacy_address_activated tests

shamardy and others added 3 commits September 28, 2023 18:55
…#1945)

This implements streaming channels using mpsc(underlying part of SSE) and SSE for sending data to clients continuously, NETWORK event is implemented to show the new functionality. All platforms other than WASM are supported.
---------

Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit brings new p2p layer that uses the latest stable libp2p version and deprecates the old p2p layer.

---------

Signed-off-by: onur-ozkan <work@onurozkan.dev>
onur-ozkan
onur-ozkan previously approved these changes Oct 2, 2023
This commit also changes the minimum trading volume for evm and tendermint to be the smallest possible amount of the coin and reduce minimum trading price to be any value above 0
@shamardy shamardy marked this pull request as ready for review October 3, 2023 10:14
For some reason, mocktopus dependency can not mock the p2p context after the p2p stack upgrade. This commit fixes this by avoiding mocking p2p context for tests.

---------

Signed-off-by: onur-ozkan <work@onurozkan.dev>
HashSet is used instead of Vec in some places to remove use of dedup
…1990)

* fix test_trade_preimage_additional_validation test since price threshold is changed in #1971
* add more electrums to unstable tbch address tests
* This commit does the following:
   * Adds `p2p` and `event-stream` features to `mm2_net` crate to avoid adex-cli depending on `mm2-libp2p` and rust-libp2p in turn.
   * Moves all RICK/MORTY electrums in tests to DOC/MARTY except 4 tests
   * Fixes WASM `test_send` test by using `ALICE_PASSPHRASE` for the keypair (makes WASM tests green again).

*Todo in another commit
   * Move these tests to DOC/MARTY electrums
      * `test_hd_utxo_tx_history`
      * `test_search_for_swap_tx_spend_electrum_was_refunded `
      * `test_search_for_swap_tx_spend_electrum_was_spent `
      * `test_send_maker_spends_taker_payment_recoverable_tx `
   * Rename all instances of RICK/MORTY to DOC/MARTY
For KMD, taker fee payment algorithm is updated by burning up to 25% of the dex fee amount. This is achieved by adding a new output to the DEX fee transaction that is an OP_RETURN with up to 25% of the fee burned in KMD.
We also Validate the new output by the maker as part of the taker fee validation step.

---------

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@shamardy shamardy changed the title chore(release): v1.1.0-beta chore(release): v2.0.0-beta Dec 4, 2023
Signed-off-by: onur-ozkan <work@onurozkan.dev>
`168.119.236.249` will be used to cut the communication on the old main network by giving information about the new main network, it will be run using this branch https://github.com/KomodoPlatform/komodo-defi-framework/tree/patch-for-deprecation

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@shamardy shamardy removed the blocked label Dec 7, 2023
Note added about adding peer scorer

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@Alrighttt Alrighttt self-requested a review December 11, 2023 12:08
smk762 and others added 2 commits December 11, 2023 20:04
* `nft_cache_db` was added in `NftCtx` for non wasm targets.
* `AsyncConnection` structure was created in `mm2src/db_common/src/async_sql_conn.rs`. It can be used as async wrapper for sqlite connection.
* `async_sqlite_connection` field was added in `MmCtx`.
* Spam transfers with empty meta no longer update.
ca333
ca333 previously approved these changes Dec 13, 2023
Copy link
Copy Markdown

@ca333 ca333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

secure code reviewed

jfyi - RustSEC advisory DB threw: 6 vulnerabilities found!

however nothing critical found, mostly (general/known & local) DoS attack surface.

onur-ozkan and others added 4 commits December 14, 2023 13:21
* libp2p-yamux now uses yamux v0.13 (new version) by default and fall back to yamux v0.12 (old version) when setting any configuration options.
* Additionally, this commit increases the backpressure buffer cap from 25 to 256.
* Use new protocol version (Version2) for peer exchange and request-response behaviours.
An additional PRICE_ENDPOINTS url which is a cached copy of https://prices.komodian.info/api/v2/tickers and is updated every minute was added by this commit. This should serve as a reliable fallback when rate limiting becomes an issue.
This allows finding mm2 ports in stdout
Copy link
Copy Markdown

@Alrighttt Alrighttt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Secure code reviewed. Good work, everyone!

@shamardy shamardy merged commit b0fd99e into main Dec 18, 2023
@DeckerSU
Copy link
Copy Markdown

Reviewed. Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.