Skip to content

Commit

Permalink
Merge branch 'dev' into feature-add-script-type-to-address-bak
Browse files Browse the repository at this point in the history
* dev: (24 commits)
  chore(release): bump mm2 version to 2.1.0-beta (KomodoPlatform#2044)
  feat(trezor): add segwit support for withdraw with trezor (KomodoPlatform#1984)
  chore(config): remove vscode launchjson (KomodoPlatform#2040)
  feat(trading-proto-upgrade): wasm DB, kickstart, refund states, v2 RPCs (KomodoPlatform#2015)
  feat(UTXO): balance event streaming for Electrum clients (KomodoPlatform#2013)
  feat(tx): add new sign_raw_transaction rpc for UTXO and EVM coins (KomodoPlatform#1930)
  fix(p2p): handle encode_and_sign errors (KomodoPlatform#2038)
  chore(release): add changelog entries for v2.0.0-beta (KomodoPlatform#2037)
  chore(network): write network information to stdout (KomodoPlatform#2034)
  fix(price_endpoints): add cached url (KomodoPlatform#2032)
  deps(network): sync with upstream yamux (KomodoPlatform#2030)
  fix(config): accept a string as rpcport value (KomodoPlatform#2026)
  feat(nft): move db lock, add tx fee and confirmations (KomodoPlatform#1989)
  chore(network): update seednodes for netid 8762 (KomodoPlatform#2024)
  chore(network): add todo on peer storage behaviour (KomodoPlatform#2025)
  chore(network): exclude `168.119.236.249` from the seednode list (KomodoPlatform#2021)
  feat(network): deprecate 7777 network (KomodoPlatform#2020)
  chore(release): bump mm2 version to 2.0.0-beta (KomodoPlatform#2018)
  feat(UTXO swaps): kmd burn plan impl (KomodoPlatform#2006)
  chore(docs): fix the link to simple market maker in README.md (KomodoPlatform#2011)
  ...
  • Loading branch information
dimxy committed Jan 23, 2024
2 parents e5283c3 + fc95ef3 commit 123e3f8
Show file tree
Hide file tree
Showing 175 changed files with 11,383 additions and 3,494 deletions.
112 changes: 52 additions & 60 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,60 +1,52 @@
# Happening in a well-defined setting the Docker builds should be somewhat
# more reproducible than builds relying on the local workstation environment.
# Hence we're going to use the Docker build as the reference one.
# CI and local builds might be considered a second tier build optimizations.
#
# docker build --tag mm2 .

# NB: The version here was picked to match the one tested in our CI. The latest Travis has (as of 2018-11) is Xenial.
FROM docker.io/ubuntu:xenial

RUN \
apt-get update &&\
apt-get install -y git build-essential libssl-dev wget &&\
apt-get install -y cmake &&\
# https://github.com/rust-lang/rust-bindgen/blob/master/book/src/requirements.md#debian-based-linuxes
apt-get install -y llvm-3.9-dev libclang-3.9-dev clang-3.9 lld &&\
# openssl-sys requirements, cf. https://crates.io/crates/openssl-sys
apt-get install -y pkg-config libssl-dev &&\
apt-get clean

RUN \
wget -O- https://sh.rustup.rs > /tmp/rustup-init.sh &&\
sh /tmp/rustup-init.sh -y --default-toolchain none &&\
. /root/.cargo/env &&\
rustup set profile minimal &&\
rustup install nightly-2020-02-01 &&\
rustup default nightly-2020-02-01 &&\
# It seems that bindgen won't prettify without it:
rustup component add rustfmt-preview &&\
rm -f /tmp/rustup-init.sh

ENV PATH="/root/.cargo/bin:${PATH}"

# First 7 characters of the commit ID.
ENV MM_VERSION="f236ad1"

RUN cd /tmp &&\
wget https://api.github.com/repos/KomodoPlatform/atomicDEX-API/tarball/$MM_VERSION &&\
tar -xzf $MM_VERSION &&\
ls &&\
mv KomodoPlatform-atomicDEX-API-$MM_VERSION /mm2 &&\
rm $MM_VERSION &&\
echo $MM_VERSION > /mm2/MM_VERSION

RUN cd /mm2 && cargo fetch

# This will overwrite the Git version with the local one.
# Only needed when we're developing or changing something locally.
#COPY . /mm2

# Build MM1 and MM2.
# Increased verbosity here allows us to see the MM1 CMake logs.
RUN cd /mm2 &&\
cargo build -vv &&\
mv target/debug/mm2 /usr/local/bin/marketmaker-mainnet &&\
# We currently need BOB_PASSPHRASE, BOB_USERPASS, ALICE_PASSPHRASE and ALICE_USERPASS for the tests…
#cargo test &&\
cargo clean

CMD marketmaker-testnet
FROM docker.io/debian:buster-slim

MAINTAINER Onur Özkan <onur@komodoplatform.com>

RUN apt-get update -y

RUN apt-get install -y \
build-essential \
cmake \
ca-certificates \
curl \
wget \
gnupg

RUN ln -s /usr/bin/python3 /bin/python

RUN apt install -y \
software-properties-common \
lsb-release

RUN curl --output llvm.sh https://apt.llvm.org/llvm.sh

RUN chmod +x llvm.sh

RUN ./llvm.sh 16

RUN rm ./llvm.sh

RUN ln -s /usr/bin/clang-16 /usr/bin/clang

ENV AR=/usr/bin/llvm-ar-16
ENV CC=/usr/bin/clang-16

RUN mkdir -m 0755 -p /etc/apt/keyrings

RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg

RUN echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null

RUN apt-get update -y

RUN apt-get install -y \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

ENV PATH="/root/.cargo/bin:$PATH"
6 changes: 4 additions & 2 deletions .docker/Dockerfile.ci-container
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN apt install -y \
lsb-release \
gnupg

RUN wget https://apt.llvm.org/llvm.sh
RUN curl --output llvm.sh https://apt.llvm.org/llvm.sh

RUN chmod +x llvm.sh

Expand Down Expand Up @@ -52,4 +52,6 @@ RUN apt-get install -y \
containerd.io \
docker-buildx-plugin

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

ENV PATH="/root/.cargo/bin:$PATH"
5 changes: 0 additions & 5 deletions .docker/Dockerfile.ubuntu.ci
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ RUN \
wget -O- https://sh.rustup.rs > /tmp/rustup-init.sh &&\
sh /tmp/rustup-init.sh -y --default-toolchain none &&\
. /root/.cargo/env &&\
rustup set profile minimal &&\
rustup install nightly-2021-07-18 &&\
rustup default nightly-2021-07-18 &&\
# It seems that bindgen won't prettify without it:
rustup component add rustfmt-preview &&\
rm -f /tmp/rustup-init.sh &&\
chmod -R 777 /root

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ scripts/mm2/seed/unparsed.txt
/MM_VERSION
/MM_VERSION.tmp
/target
/targettest
/clippytarget

# Subcrate artefacts
/mm2src/*/target
Expand All @@ -49,6 +51,7 @@ scripts/mm2/seed/unparsed.txt
/.vscode/settings.json
/.vscode/tasks.json
/.vscode/c_cpp_properties.json
/.vscode/launch.json

# IDE artefacts
/.vscode/ipch
Expand Down
45 changes: 0 additions & 45 deletions .vscode/launch.json

This file was deleted.

54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
## v2.0.0-beta - 2023-12-15
**Features:**
- KMD Burn [#2010](https://github.com/KomodoPlatform/komodo-defi-framework/issues/2010)
- Burn 25% of taker fee when paid in KMD [#2006](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2006).
- Trading Protocol Upgrade [#1895](https://github.com/KomodoPlatform/atomicDEX-API/issues/1895)
- Implement successful swaps v2 of UTXO to UTXO coins in [#1958](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1958).
- Add Swaps V2 message exchange using Protobuf in [#1958](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1958).
- Storing upgraded swaps data to SQLite DB was partially implemented in [#1980](https://github.com/KomodoPlatform/komodo-defi-framework/pull/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](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1980).
- Event Streaming [#1901](https://github.com/KomodoPlatform/komodo-defi-framework/issues/1901)
- Streaming channels using mpsc and SSE to send data to clients continuously was implemented in [#1945](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1945).
- NETWORK event was implemented to show this new functionality in [#1945](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1945).
- Wasm event streaming using workers was added in [#1978](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1978).
- `COIN_BALANCE` events for Tendermint Protocol were added in [#1978](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1978).

**Enhancements/Fixes:**
- Network Enhancements:
- P2P layer now uses the latest stable libp2p version in [#1878](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1878).
- `7777` network was deprecated in [#2020](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2020).
- Seednodes for `netid` `8762` were updated in [#2024](https://github.com/KomodoPlatform/komodo-defi-framework/pull/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](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2030).
- The backpressure buffer cap was increased from `25` to `256` in [#2030](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2030).
- New protocol version (Version2) was used for peer exchange and request-response behaviours in [#2030](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2030).
- Network information is now written to stdout to find mm2 ports easily after [#2034](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2034).
- NFT integration [#900](https://github.com/KomodoPlatform/atomicDEX-API/issues/900)
- `exclude_spam` and `exclude_phishing` params were added for `get_nft_list` and `get_nft_transfers` RPCs in [#1959](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1959).
- `nft_cache_db` was added in `NftCtx` for non wasm targets in [#1989](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1989).
- `AsyncConnection` structure that can be used as async wrapper for sqlite connection was added in [#1989](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1989).
- `async_sqlite_connection` field was added to `MmCtx` in [#1989](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1989).
- Spam transfers with empty meta no longer update after [#1989](https://github.com/KomodoPlatform/komodo-defi-framework/pull/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](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1963).
- Previous blocks/wallet sync will be resumed if `sync_params` are not provided after restart in [#1967](https://github.com/KomodoPlatform/atomicDEX-API/issues/1967).
- Adex-CLI [#1682](https://github.com/KomodoPlatform/atomicDEX-API/issues/1682)
- Exact dependency versions of `hyper-rustls`, `rustls` and other deps was set in [#1956](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1956).
- A warning was added on insecure cli configuration file mode in [#1956](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1956).
- Storable State Machine abstraction was added while having few changes to existing state machines in [#1958](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1958).
- EVM web3 requests timeout was reduced to 20s in [#1973](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1973).
- Fixed 0.0001 min threshold for TakerFee was removed in [#1971](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1971).
- The minimum trading volume for evm and tendermint was changed to be the smallest possible amount of the coin in [#1971](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1971).
- Minimum trading price is reduced to be any value above 0 in [#1971](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1971).
- Cryptocondition script type was added to utxo transactions in [#1991](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1991).
- On response error the next web3 node is tried in [#1998](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1998).
- Watchtower taker-side restart bug was fixed in [#1908](https://github.com/KomodoPlatform/komodo-defi-framework/pull/1908).
- 'version' method was added to `PUBLIC_METHODS` that require no login in [#2001](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2001).
- `rpcport` value can now accept a string after [#2026](https://github.com/KomodoPlatform/komodo-defi-framework/pull/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](https://github.com/KomodoPlatform/komodo-defi-framework/pull/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.


## v1.0.7-beta - 2023-09-08
**Features:**
- Trading Protocol Upgrade [#1895](https://github.com/KomodoPlatform/atomicDEX-API/issues/1895)
Expand Down
Loading

0 comments on commit 123e3f8

Please sign in to comment.