Skip to content

Commit

Permalink
merge with origin/dev
Browse files Browse the repository at this point in the history
clean, fmt & clip
  • Loading branch information
mariocynicys committed Aug 30, 2024
2 parents 1d0a75b + 932669a commit 4f259a1
Show file tree
Hide file tree
Showing 156 changed files with 4,068 additions and 1,526 deletions.
4 changes: 2 additions & 2 deletions .cargo/config → .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ rustflags = [ "-Zshare-generics=y" ]
# [target.x86_64-unknown-linux-gnu]
# linker = "clang"
# rustflags = [ "-Clink-arg=-fuse-ld=lld" ]
#
#
# # `brew install llvm`
# [target.x86_64-apple-darwin]
# rustflags = [
# "-C",
# "link-arg=-fuse-ld=/usr/local/opt/llvm/bin/ld64.lld",
# ]
#
#
# [target.aarch64-apple-darwin]
# rustflags = [
# "-C",
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,67 @@ jobs:
if: ${{ env.FILE_SERVER_KEY != '' }}
run: python3 ./scripts/ci/upload_artifact.py "${{ env.BRANCH_NAME }}" "/uploads/${{ env.BRANCH_NAME }}"

mac-arm64:
timeout-minutes: 60
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install toolchain
run: |
rustup toolchain install nightly-2023-06-01 --no-self-update --profile=minimal
rustup default nightly-2023-06-01
rustup target add aarch64-apple-darwin
- name: Install build deps
uses: ./.github/actions/deps-install
with:
deps: ('protoc', 'python3', 'paramiko')

- name: Calculate commit hash for PR commit
if: github.event_name == 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV

- name: Calculate commit hash for merge commit
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --release --target aarch64-apple-darwin
- name: Compress mm2 build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
NAME="mm2_$COMMIT_HASH-mac-arm64.zip"
zip $NAME target/aarch64-apple-darwin/release/mm2 -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
- name: Compress kdf build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
NAME="kdf_$COMMIT_HASH-mac-arm64.zip"
zip $NAME target/aarch64-apple-darwin/release/kdf -j
mv $NAME ./$BRANCH_NAME/
- name: Upload build artifact
env:
FILE_SERVER_HOST: ${{ secrets.FILE_SERVER_HOST }}
FILE_SERVER_USERNAME: ${{ secrets.FILE_SERVER_USERNAME }}
FILE_SERVER_PORT: ${{ secrets.FILE_SERVER_PORT }}
FILE_SERVER_KEY: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.FILE_SERVER_KEY != '' }}
run: python3 ./scripts/ci/upload_artifact.py "${{ env.BRANCH_NAME }}" "/uploads/${{ env.BRANCH_NAME }}"

win-x86-64:
timeout-minutes: 60
runs-on: windows-latest
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,61 @@ jobs:
if: ${{ env.FILE_SERVER_KEY != '' }}
run: python3 ./scripts/ci/upload_artifact.py "${{ env.BRANCH_NAME }}" "/uploads/${{ env.BRANCH_NAME }}"

mac-arm64:
timeout-minutes: 60
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install toolchain
run: |
rustup toolchain install nightly-2023-06-01 --no-self-update --profile=minimal
rustup default nightly-2023-06-01
rustup target add aarch64-apple-darwin
- name: Install build deps
uses: ./.github/actions/deps-install
with:
deps: ('protoc', 'python3', 'paramiko')

- name: Calculate commit hash for PR commit
if: github.event_name == 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV

- name: Calculate commit hash for merge commit
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --release --target aarch64-apple-darwin
- name: Compress mm2 build output
run: |
NAME="mm2_$COMMIT_HASH-mac-arm64.zip"
zip $NAME target/aarch64-apple-darwin/release/mm2 -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
- name: Compress kdf build output
run: |
NAME="kdf_$COMMIT_HASH-mac-arm64.zip"
zip $NAME target/aarch64-apple-darwin/release/kdf -j
mv $NAME ./$BRANCH_NAME/
- name: Upload build artifact
env:
FILE_SERVER_HOST: ${{ secrets.FILE_SERVER_HOST }}
FILE_SERVER_USERNAME: ${{ secrets.FILE_SERVER_USERNAME }}
FILE_SERVER_PORT: ${{ secrets.FILE_SERVER_PORT }}
FILE_SERVER_KEY: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.FILE_SERVER_KEY != '' }}
run: python3 ./scripts/ci/upload_artifact.py "${{ env.BRANCH_NAME }}" "/uploads/${{ env.BRANCH_NAME }}"

win-x86-64:
timeout-minutes: 60
runs-on: windows-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ jobs:

- name: Test
run: |
wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.sh | bash
wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/v0.8.1/zcutil/fetch-params-alt.sh | bash
cargo test --test 'docker_tests_main' --features run-docker-tests --no-fail-fast
wasm:
Expand Down
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,13 @@ MM2.json

# mergetool
*.orig
hidden
<<<<<<< HEAD
hidden
=======

# Ignore containers runtime directories for dockerized tests
# This directory contains temporary data used by Docker containers during tests execution.
# It is recreated from container-state data each time test containers are started,
# and should not be tracked in version control.
.docker/container-runtime/
>>>>>>> origin/dev
94 changes: 94 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,97 @@
## v2.1.0-beta - 2024-07-31

**Features:**
- Seed Management [#1939](https://github.com/KomodoPlatform/komodo-defi-framework/issues/1939)
- Seed generation, encryption, and storage features were introduced, including a new `get_mnemonic` API. [#2014](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2014)
- A new `sign_raw_transaction` rpc was added for UTXO and EVM coins, this will facilitate air-gapped wallet implementation in the future. [#1930](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1930)

**Enhancements/Fixes:**
- Event Streaming [#1901](https://github.com/KomodoPlatform/komodo-defi-framework/issues/1901)
- Balance event streaming for Electrum clients was implemented. [#2013](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2013)
- Balance events for UTXOs were introduced.
- Electrum notification receiving bug was fixed.
- Balance event streaming for EVM was added. [#2041](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2041)
- Error events were introduced. [#2041](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2041)
- Heartbeats were introduced to notify about streaming channel health. [#2058](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2058)
- Balance event streaming for ARRR/Pirate was added. [#2076](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2076)
- Trading Protocol Upgrade [#1895](https://github.com/KomodoPlatform/atomicDEX-API/issues/1895)
- *Important note:* Seednodes update is needed to support and rebroadcast new swap protocol messages. [#2015](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2015)
- WASM storage for upgraded swaps introduced. [#2015](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2015)
- Migration of old swaps data was added. [#2015](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2015)
- Swaps now automatically kickstart on MM2 reload. [#2015](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2015)
- File lock for swaps added, preventing the same swap from starting in different processes. [#2015](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2015)
- `my_swap_status`, `my_recent_swaps` V2 RPCs introduced. [#2015](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2015)
- Upgraded swaps data now accessible through V1 RPCs. [#2015](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2015)
- Locked amount handling for UTXO swaps implemented. [#2046](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2046)
- Conditional wait for maker payment confirmation was added before signing funding tx spend preimage on taker's side. [#2046](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2046)
- `active_swaps` V2 RPC introduced. [#2046](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2046)
- Handling `accept_only_from` for swap messages (validation of the sender) was implemented. [#2046](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2046)
- `swap_uuid` for swap v2 messages was added to avoid reuse of the messages generated for other swaps. [#2046](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2046)
- Maker payment immediate refund path handling was implemented. [#2046](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2046)
- KMD Burn [#2010](https://github.com/KomodoPlatform/komodo-defi-framework/issues/2010)
- KMD dex fee burn for upgraded swaps was added. [#2046](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2046)
- Hardware Wallet [#964](https://github.com/KomodoPlatform/atomicDEX-API/issues/964)
- Trezor now supports SegWit for withdrawals. [#1984](https://github.com/KomodoPlatform/atomicDEX-API/pull/1984)
- Trezor support was added for EVM coins/tokens using task manager activation methods. [#1962](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1962)
- Support for unsigned Tendermint transactions using Ledger's Keplr extension was added, excluding HTLC transactions and swap operations. [#2148](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2148)
- NFT integration [#900](https://github.com/KomodoPlatform/atomicDEX-API/issues/900)
- A new `clear_nft_db` RPC for NFT data management was added. This enables selective (based on a chain) or complete NFT DB data clearance. [#2039](https://github.com/KomodoPlatform/atomicDEX-API/pull/2039)
- NFT can now be enabled using `enable_eth_with_tokens` or `enable_nft`, similar to `enable_erc20`. [#2049](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2049)
- NFT swaps V2 POC was shown, which includes a NFT maker payment test using the dockerized Geth dev node. [#2084](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2084)
- `komodo-defi-proxy` support for NFT feature was added. [#2100](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2100)
- Additional checks were added for malicious `token_uri` links. [#2100](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2100)
- `clear_all` parameter in `clear_nft_db` RPC is now optional (default: `false`). [#2100](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2100)
- WASM Worker
- Improved environment detection to ensure the correct method is used for accessing the IndexedDB factory, accommodating both window and worker contexts. [#1953](https://github.com/KomodoPlatform/atomicDEX-API/pull/1953), [#2131](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2131)
- SharedWorker support was added, allowing any worker path in `event_stream_configuration` with a default to `event_streaming_worker.js`. [#2080](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2080)
- Simple Maker Bot [#1065](https://github.com/KomodoPlatform/komodo-defi-framework/issues/1065)
- Maker bot was updated to support multiple price URLs. [#2027](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2027)
- `testcoin` was added to provider options to allow testing the maker bot using test chains assets. [#2161](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2161)
- IndexedDB
- Cursor implementation was fixed, ensuring stable iteration over items. [#2028](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2028)
- Advanced cursor filtering features were added, including limit, offset, and a fix for `where_` condition/option. [#2066](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2066)
- Swap Stats DB
- `stats_swaps` table now includes GUI and MM2 version data used for a swap. [#2061](https://github.com/KomodoPlatform/atomicDEX-API/pull/2061)
- P2P Layer
- Added `max_concurrent_connections` to MM2 config to control the maximum number of concurrent connections for Gossipsub. [#2063](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2063)
- ARRR/Pirate [#927](https://github.com/KomodoPlatform/komodo-defi-framework/issues/927)
- ARRR/Pirate wallet and Dex operations now work in browser environments / WASM. [#1957](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1957), [#2077](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2077)
- Syncing and activation improvements were made, including stopping sync status after main sync and refining `first_sync_block` handling. [#2089](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2089)
- EVM Transport
- ETH websocket transport was introduced. `komodo-defi-proxy` signed messages were also supported for websocket transport. [#2058](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2058)
- Tendermint integration [#1432](https://github.com/KomodoPlatform/atomicDEX-API/issues/1432)
- Nucleus chain support was introduced as an alternative HTLC backend to Iris. [#2079](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2079)
- Tendermint fee calculation was fixed to use `get_receiver_trade_fee` in platform coin. [#2106](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2106)
- Pubkey-only mode for Tendermint protocol was introduced, allowing use of any external wallet for wallet and swap operations. [#2088](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2088)
- `ibc_withdraw` RPC was removed, and `withdraw` was refactored to support IBC transfers by automatically finding IBC channels. [#2088](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2088)
- Transaction history handling was enhanced to support base64 encoded transaction values for Cosmos-based networks, preventing missing transactions in the history table. [#2133](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2133)
- The precision of max amount handling was improved for Tendermint withdraw operations by simulating the transaction and removing the estimated fee. [#2155](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2155)
- Account sequence numbers are now resolved locally, incorrect sequence numbers from cached responses are also avoided. [#2164](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2164)
- HD Wallet [#1838](https://github.com/KomodoPlatform/komodo-defi-framework/issues/1838)
- Full UTXO and EVM HD wallet functionalities were implemented. [#1962](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1962)
- Swap watchers [#1431](https://github.com/KomodoPlatform/atomicDEX-API/issues/1431)
- UTXO swaps were fixed to apply events that occurred while the taker was offline, such as maker spending or watcher refunding the taker payment. [#2114](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2114)
- Fees Improvements [#1848](https://github.com/KomodoPlatform/komodo-defi-framework/issues/1848)
- EIP-1559 gas fee estimator and RPCs were added for ETH, including priority fee support for withdrawals and swaps, and improved gas limit for swap transactions. [#2051](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2051)
- `gas_limit` parameter can be used in coins config to override default gas limit values. [#2137](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2137)
- Default `gas_limit` values now ensure that Proxied ERC20 tokens have sufficient gas. [#2137](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2137)
- Rust Toolchain [#1972](https://github.com/KomodoPlatform/komodo-defi-framework/issues/1972)
- Toolchain was upgraded to Rust toolchain version 1.72 nightly (nightly-2023-06-01). [#2149](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2149)
- rust-analyzer was added into the workspace toolchain. [#2179](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2179)
- CI Builds
- MacOS builds for Apple Silicon are now provided through the CI pipeline. [#2163](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2163)
- Miscellaneous
- BCH block header deserialization was fixed to match BTC's handling of `KAWPOW` version headers. [#2099](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2099)
- Implemented root application directory `.kdf` under `$HOME` to consolidate all runtime files, enhancing user experience by following standard UNIX practices. [#2102](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2102)
- Memory usage was improved a bit through preallocation optimizations. [#2098](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2098)
- Swaps and orders file handling was enhanced to use `.tmp` files to avoid concurrent reading/writing issues. [#2118](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2118)
- UTXO P2PK balance is now shown as part of the P2PKH/Legacy address balance and can be spent in withdrawals and swaps. [#2053](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2053)
- `wallet-only` restriction was removed from `max_maker_vol` RPC, enabling its use for wallet-only mode assets. [#2153](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2153)

**NB - Backwards compatibility breaking changes:**
- Renamed `mm2` binaries to `kdf`, while providing backward-compatible copies with `mm2` naming; WASM binaries use `kdf` naming only, which is a breaking change. [#2126](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2126)


## v2.0.0-beta - 2023-12-15
**Features:**
- KMD Burn [#2010](https://github.com/KomodoPlatform/komodo-defi-framework/issues/2010)
Expand Down
15 changes: 14 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ members = [
"mm2src/mm2_p2p",
"mm2src/mm2_rpc",
"mm2src/mm2_state_machine",
"mm2src/proxy_signature",
"mm2src/rpc_task",
"mm2src/trezor",
]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<img src="https://img.shields.io/github/downloads/komodoplatform/komodo-defi-framework/total" alt="downloads">
</a>
<a href="https://github.com/komodoplatform/komodo-defi-framework/">
<img src="https://img.shields.io/github/last-commit/komodoplatform/komodo-defi-framework" alt="last commit">
<img src="https://img.shields.io/github/last-commit/komodoplatform/komodo-defi-framework/dev" alt="last commit">
</a>
<a href="https://github.com/komodoplatform/komodo-defi-framework/pulse" alt="Activity">
<img src="https://img.shields.io/github/commit-activity/m/komodoplatform/komodo-defi-framework" />
<img src="https://img.shields.io/github/commit-activity/m/komodoplatform/komodo-defi-framework/dev" />
</a>
<br/>
<a href="https://github.com/komodoplatform/komodo-defi-framework/issues">
Expand Down
Loading

0 comments on commit 4f259a1

Please sign in to comment.