Skip to content

Commit

Permalink
Merge pull request #1771 from KomodoPlatform/dev
Browse files Browse the repository at this point in the history
[release] v1.0.3
  • Loading branch information
ca333 authored Apr 28, 2023
2 parents fa74561 + 8a9f0d1 commit 46535e8
Show file tree
Hide file tree
Showing 53 changed files with 805 additions and 877 deletions.
2 changes: 1 addition & 1 deletion .docker/Dockerfile.dev-release
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM docker.io/debian:stable-slim
WORKDIR /mm2
COPY target/ci/mm2 /usr/local/bin/mm2
COPY target/release/mm2 /usr/local/bin/mm2
EXPOSE 7783
CMD ["mm2"]
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake-build-debug
/Dockerfile

!/target/release/mm2
!/target/ci/mm2
!/target/debug/mm2
/mm2src/*/target

/build
Expand Down
54 changes: 27 additions & 27 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:

jobs:
linux-x86-64:
timeout-minutes: 30
timeout-minutes: 60
runs-on: ubuntu-latest
container: komodoofficial/ci-container:latest
steps:
Expand Down Expand Up @@ -45,15 +45,15 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --bin mm2 --profile ci
cargo build --bin mm2 --release
- name: Compress build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
NAME="mm2_$COMMIT_HASH-linux-x86-64.zip"
zip $NAME target/ci/mm2 -j
zip $NAME target/release/mm2 -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
docker push komodoofficial/atomicdexapi:dev-latest
mac-x86-64:
timeout-minutes: 30
timeout-minutes: 60
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -104,15 +104,15 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --bin mm2 --profile ci --target x86_64-apple-darwin
cargo build --bin mm2 --release --target x86_64-apple-darwin
- name: Compress build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
NAME="mm2_$COMMIT_HASH-mac-x86-64.zip"
zip $NAME target/x86_64-apple-darwin/ci/mm2 -j
zip $NAME target/x86_64-apple-darwin/release/mm2 -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
Expand All @@ -130,7 +130,7 @@ jobs:
remote: "/uploads/${{ env.BRANCH_NAME }}"

win-x86-64:
timeout-minutes: 30
timeout-minutes: 60
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -153,15 +153,15 @@ jobs:
remove-item "./MM_VERSION"
}
echo $Env:COMMIT_HASH > ./MM_VERSION
cargo build --bin mm2 --profile ci
cargo build --bin mm2 --release
- name: Compress build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
$NAME="mm2_$Env:COMMIT_HASH-win-x86-64.zip"
7z a $NAME .\target\ci\mm2.exe .\target\ci\*.dll
7z a $NAME .\target\release\mm2.exe .\target\release\*.dll
mkdir $Env:BRANCH_NAME
mv $NAME ./$Env:BRANCH_NAME/
Expand All @@ -179,7 +179,7 @@ jobs:
remote: "/uploads/${{ env.BRANCH_NAME }}"

mac-dylib-x86-64:
timeout-minutes: 30
timeout-minutes: 60
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -200,16 +200,16 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo rustc --target x86_64-apple-darwin --lib --profile ci --package mm2_bin_lib --crate-type=staticlib
cargo rustc --target x86_64-apple-darwin --lib --release --package mm2_bin_lib --crate-type=staticlib
- name: Compress build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
NAME="mm2_$COMMIT_HASH-mac-dylib-x86-64.zip"
mv target/x86_64-apple-darwin/ci/libmm2lib.a target/x86_64-apple-darwin/ci/libmm2.a
zip $NAME target/x86_64-apple-darwin/ci/libmm2.a -j
mv target/x86_64-apple-darwin/release/libmm2lib.a target/x86_64-apple-darwin/release/libmm2.a
zip $NAME target/x86_64-apple-darwin/release/libmm2.a -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
Expand All @@ -227,7 +227,7 @@ jobs:
remote: "/uploads/${{ env.BRANCH_NAME }}"

wasm:
timeout-minutes: 30
timeout-minutes: 60
runs-on: ubuntu-latest
container: komodoofficial/ci-container:latest
steps:
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
wasm-pack build mm2src/mm2_bin_lib --target web --out-dir ../../target/target-wasm-release
wasm-pack build --release mm2src/mm2_bin_lib --target web --out-dir ../../target/target-wasm-release
- name: Compress build output
env:
Expand All @@ -287,7 +287,7 @@ jobs:
remote: "/uploads/${{ env.BRANCH_NAME }}"

ios-aarch64:
timeout-minutes: 30
timeout-minutes: 60
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -309,16 +309,16 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo rustc --target aarch64-apple-ios --lib --profile ci --package mm2_bin_lib --crate-type=staticlib
cargo rustc --target aarch64-apple-ios --lib --release --package mm2_bin_lib --crate-type=staticlib
- name: Compress build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
NAME="mm2_$COMMIT_HASH-ios-aarch64.zip"
mv target/aarch64-apple-ios/ci/libmm2lib.a target/aarch64-apple-ios/ci/libmm2.a
zip $NAME target/aarch64-apple-ios/ci/libmm2.a -j
mv target/aarch64-apple-ios/release/libmm2lib.a target/aarch64-apple-ios/release/libmm2.a
zip $NAME target/aarch64-apple-ios/release/libmm2.a -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
Expand All @@ -336,7 +336,7 @@ jobs:
remote: "/uploads/${{ env.BRANCH_NAME }}"

android-aarch64:
timeout-minutes: 30
timeout-minutes: 60
runs-on: ubuntu-latest
container: komodoofficial/ci-container:latest
steps:
Expand Down Expand Up @@ -372,16 +372,16 @@ jobs:
echo $COMMIT_HASH > ./MM_VERSION
export PATH=$PATH:/android-ndk/bin
CC_aarch64_linux_android=aarch64-linux-android21-clang CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang cargo rustc --target=aarch64-linux-android --lib --profile ci --crate-type=staticlib --package mm2_bin_lib
CC_aarch64_linux_android=aarch64-linux-android21-clang CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang cargo rustc --target=aarch64-linux-android --lib --release --crate-type=staticlib --package mm2_bin_lib
- name: Compress build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
NAME="mm2_$COMMIT_HASH-android-aarch64.zip"
mv target/aarch64-linux-android/ci/libmm2lib.a target/aarch64-linux-android/ci/libmm2.a
zip $NAME target/aarch64-linux-android/ci/libmm2.a -j
mv target/aarch64-linux-android/release/libmm2lib.a target/aarch64-linux-android/release/libmm2.a
zip $NAME target/aarch64-linux-android/release/libmm2.a -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
Expand All @@ -399,7 +399,7 @@ jobs:
remote: "/uploads/${{ env.BRANCH_NAME }}"

android-armv7:
timeout-minutes: 30
timeout-minutes: 60
runs-on: ubuntu-latest
container: komodoofficial/ci-container:latest
steps:
Expand Down Expand Up @@ -435,16 +435,16 @@ jobs:
echo $COMMIT_HASH > ./MM_VERSION
export PATH=$PATH:/android-ndk/bin
CC_armv7_linux_androideabi=armv7a-linux-androideabi21-clang CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi21-clang cargo rustc --target=armv7-linux-androideabi --lib --profile ci --crate-type=staticlib --package mm2_bin_lib
CC_armv7_linux_androideabi=armv7a-linux-androideabi21-clang CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi21-clang cargo rustc --target=armv7-linux-androideabi --lib --release --crate-type=staticlib --package mm2_bin_lib
- name: Compress build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
NAME="mm2_$COMMIT_HASH-android-armv7.zip"
mv target/armv7-linux-androideabi/ci/libmm2lib.a target/armv7-linux-androideabi/ci/libmm2.a
zip $NAME target/armv7-linux-androideabi/ci/libmm2.a -j
mv target/armv7-linux-androideabi/release/libmm2lib.a target/armv7-linux-androideabi/release/libmm2.a
zip $NAME target/armv7-linux-androideabi/release/libmm2.a -j
mkdir $BRANCH_NAME
mv $NAME ./$BRANCH_NAME/
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/fmt-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ jobs:
rustup toolchain install nightly-2022-10-29 --no-self-update --profile=minimal --component rustfmt clippy
rustup default nightly-2022-10-29
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get -y install libudev-dev
if: matrix.os == 'ubuntu-latest'

- name: fmt check
run: cargo fmt -- --check

- name: x86-64 code lint
run: cargo clippy --all-targets --profile ci -- --D warnings
run: cargo clippy --all-targets --all-features -- --D warnings

wasm-lint:
timeout-minutes: 45
Expand All @@ -37,4 +43,4 @@ jobs:
rustup target add wasm32-unknown-unknown
- name: wasm code lint
run: cargo clippy --target wasm32-unknown-unknown --profile ci -- --D warnings
run: cargo clippy --target wasm32-unknown-unknown -- --D warnings
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Test
run: |
# wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.sh | bash
cargo test --bins --lib --profile ci
cargo test --bins --lib
mac-x86-64-unit:
timeout-minutes: 90
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Test
run: |
# wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.sh | bash
cargo test --bins --lib --target x86_64-apple-darwin --profile ci
cargo test --bins --lib --target x86_64-apple-darwin
win-x86-64-unit:
timeout-minutes: 90
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
# Restart-Service docker
# Get-Service docker
cargo test --bins --lib --profile ci
cargo test --bins --lib
linux-x86-64-mm2-integration:
timeout-minutes: 90
Expand All @@ -105,7 +105,7 @@ jobs:
rustup default nightly-2022-10-29
- name: Test
run: cargo test --test 'mm2_tests_main' --profile ci
run: cargo test --test 'mm2_tests_main'

# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits
# https://github.com/KomodoPlatform/atomicDEX-API/actions/runs/4419618128/jobs/7748266141#step:4:1790
Expand All @@ -127,7 +127,7 @@ jobs:
# rustup target add x86_64-apple-darwin

# - name: Test
# run: cargo test --test 'mm2_tests_main' --target x86_64-apple-darwin --profile ci
# run: cargo test --test 'mm2_tests_main' --target x86_64-apple-darwin

win-x86-64-mm2-integration:
timeout-minutes: 90
Expand All @@ -146,7 +146,7 @@ jobs:
rustup default nightly-2022-10-29
- name: Test
run: cargo test --test 'mm2_tests_main' --profile ci
run: cargo test --test 'mm2_tests_main'

docker-tests:
timeout-minutes: 90
Expand All @@ -167,7 +167,7 @@ jobs:
- name: Test
run: |
wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.sh | bash
cargo test --test 'docker_tests_main' --features run-docker-tests --profile ci
cargo test --test 'docker_tests_main' --features run-docker-tests
wasm:
timeout-minutes: 90
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## v1.0.3-beta - 2023-04-28

**Features:**

**Enhancements/Fixes:**
- cosmos/iris ethermint account compatibility implemented [#1765](https://github.com/KomodoPlatform/atomicDEX-API/pull/1765)
- p2p stack is improved [#1755](https://github.com/KomodoPlatform/atomicDEX-API/pull/1755)
- - Validate topics if they are mixed or not.
- - Do early return if the message data is not valid (since no point to iterate over and over on the invalid message)
- - Break the loop right after processing any of `SWAP_PREFIX`, `WATCHER_PREFIX`, `TX_HELPER_PREFIX` topic.
- An issue was fixed where we don't have to wait for all EVM nodes to sync the latest account nonce [#1757](https://github.com/KomodoPlatform/atomicDEX-API/pull/1757)
- optimized dev and release compilation profiles and removed ci [#1759](https://github.com/KomodoPlatform/atomicDEX-API/pull/1759)
- fix receiver trade fee for cosmos swaps [#1767](https://github.com/KomodoPlatform/atomicDEX-API/pull/1767)
- All features were enabled to be checked under x86-64 code lint CI step with `--all-features` option [#1760](https://github.com/KomodoPlatform/atomicDEX-API/pull/1760)
- use OS generated secrets for cryptographically secure randomness in `maker_swap` and `tendermint_coin::get_sender_trade_fee_for_denom` [#1753](https://github.com/KomodoPlatform/atomicDEX-API/pull/1753)


## v1.0.2-beta - 2023-04-11

**Features:**
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

14 changes: 10 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ debug-assertions = false
# For some reason, opt-level 3 started causing infinite Windows builds after Cosmos integration
# TODO troubleshoot it
opt-level = 2
# strip = true
codegen-units = 1
# lto = true
panic = "abort"

[profile.test]
# required to avoid a long running process of librustcash additional chain validation that is enabled with debug assertions
Expand All @@ -63,8 +67,10 @@ debug-assertions = false
# Turns debugging symbols off for the out-of-workspace dependencies.
debug = false

[profile.ci]
inherits = "dev"
# full debug info is not required
[profile.dev]
opt-level = 0
debug = 1
debug-assertions = false
debug-assertions = false
panic = 'unwind'
incremental = true
codegen-units = 256
Loading

0 comments on commit 46535e8

Please sign in to comment.