Skip to content

Commit

Permalink
Merge branch 'dev' into burn-dex-fee-for-non-kmd
Browse files Browse the repository at this point in the history
* dev:
  chore(RPCs): rename `get_peers_info` RPC to `get_directly_connected_peers` (#2195)
  chore(WASM-builds): remove `wasm-opt` overriding (#2200)
  fix(coins): add p2p feature to mm2_net dependency (#2210)
  chore(test): turn on debug assertion (#2204)
  feat(sia): extract sia lib to external repo (#2167)
  feat(eth-swap): eth tpu v2 methods, eth docker test enhancements (#2169)
  fix(cors): allow OPTIONS request to KDF server (#2191)
  docs(README): update commit badges to use dev branch (#2193)
  use default value for `komodo_proxy` (#2192)
  feat(cosmos): komodo-defi-proxy support (#2173)
  • Loading branch information
dimxy committed Sep 13, 2024
2 parents 74d8ea3 + d1a8ea7 commit bc560b8
Show file tree
Hide file tree
Showing 76 changed files with 3,300 additions and 2,395 deletions.
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
41 changes: 41 additions & 0 deletions Cargo.lock

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

7 changes: 2 additions & 5 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 All @@ -60,10 +61,6 @@ 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
debug-assertions = false

[profile.dev]
opt-level = 0
debug = 1
Expand All @@ -73,4 +70,4 @@ incremental = true
codegen-units = 256

[profile.release.package.mocktopus]
opt-level = 1 # TODO: MIR fails on optimizing this dependency, remove that..
opt-level = 1 # TODO: MIR fails on optimizing this dependency, remove that..
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
12 changes: 9 additions & 3 deletions mm2src/coins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ enable-solana = [
]
enable-sia = [
"dep:reqwest",
"blake2b_simd"
"dep:blake2b_simd",
"dep:sia-rust"
]
default = []
run-docker-tests = []
Expand All @@ -41,13 +42,14 @@ byteorder = "1.3"
bytes = "0.4"
cfg-if = "1.0"
chain = { path = "../mm2_bitcoin/chain" }
chrono = { version = "0.4.23", "features" = ["serde"] }
common = { path = "../common" }
cosmrs = { version = "0.14.0", default-features = false }
crossbeam = "0.8"
crypto = { path = "../crypto" }
db_common = { path = "../db_common" }
derive_more = "0.99"
ed25519-dalek = "1.0.1"
ed25519-dalek = { version = "1.0.1", features = ["serde"] }
enum_derives = { path = "../derives/enum_derives" }
ethabi = { version = "17.0.0" }
ethcore-transaction = { git = "https://github.com/KomodoPlatform/mm2-parity-ethereum.git", rev = "mm2-v2.1.1" }
Expand All @@ -69,13 +71,14 @@ jsonrpc-core = "18.0.0"
keys = { path = "../mm2_bitcoin/keys" }
lazy_static = "1.4"
libc = "0.2"
nom = "6.1.2"
mm2_core = { path = "../mm2_core" }
mm2_err_handle = { path = "../mm2_err_handle" }
mm2_event_stream = { path = "../mm2_event_stream" }
mm2_git = { path = "../mm2_git" }
mm2_io = { path = "../mm2_io" }
mm2_metrics = { path = "../mm2_metrics" }
mm2_net = { path = "../mm2_net" }
mm2_net = { path = "../mm2_net", features = ["p2p"] }
mm2_number = { path = "../mm2_number"}
mm2_rpc = { path = "../mm2_rpc" }
mm2_state_machine = { path = "../mm2_state_machine" }
Expand All @@ -85,6 +88,7 @@ parking_lot = { version = "0.12.0", features = ["nightly"] }
primitives = { path = "../mm2_bitcoin/primitives" }
prost = "0.11"
protobuf = "2.20"
proxy_signature = { path = "../proxy_signature" }
rand = { version = "0.7", features = ["std", "small_rng"] }
regex = "1"
reqwest = { version = "0.11.9", default-features = false, features = ["json"], optional = true }
Expand All @@ -100,8 +104,10 @@ ser_error_derive = { path = "../derives/ser_error_derive" }
serde = "1.0"
serde_derive = "1.0"
serde_json = { version = "1", features = ["preserve_order", "raw_value"] }
serde_with = "1.14.0"
serialization = { path = "../mm2_bitcoin/serialization" }
serialization_derive = { path = "../mm2_bitcoin/serialization_derive" }
sia-rust = { git = "https://github.com/KomodoPlatform/sia-rust", rev = "9f188b80b3213bcb604e7619275251ce08fae808", optional = true }
spv_validation = { path = "../mm2_bitcoin/spv_validation" }
sha2 = "0.10"
sha3 = "0.9"
Expand Down
20 changes: 15 additions & 5 deletions mm2src/coins/coin_errors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::eth::nft_swap_v2::errors::{Erc721FunctionError, HtlcParamsError, PaymentStatusErr, PrepareTxDataError};
use crate::eth::eth_swap_v2::{PaymentStatusErr, ValidatePaymentV2Err};
use crate::eth::nft_swap_v2::errors::{Erc721FunctionError, HtlcParamsError, PrepareTxDataError};
use crate::eth::{EthAssocTypesError, EthNftAssocTypesError, Web3RpcError};
use crate::{utxo::rpc_clients::UtxoRpcError, NumConversError, UnexpectedDerivationMethod};
use enum_derives::EnumFromStringify;
Expand Down Expand Up @@ -50,6 +51,7 @@ pub enum ValidatePaymentError {
TimelockOverflow(TryFromIntError),
#[display(fmt = "Nft Protocol is not supported yet!")]
NftProtocolNotSupported,
InvalidData(String),
}

impl From<SPVError> for ValidatePaymentError {
Expand Down Expand Up @@ -84,9 +86,8 @@ impl From<PaymentStatusErr> for ValidatePaymentError {
fn from(err: PaymentStatusErr) -> Self {
match err {
PaymentStatusErr::Transport(e) => Self::Transport(e),
PaymentStatusErr::AbiError(e)
| PaymentStatusErr::Internal(e)
| PaymentStatusErr::TxDeserializationError(e) => Self::InternalError(e),
PaymentStatusErr::ABIError(e) | PaymentStatusErr::Internal(e) => Self::InternalError(e),
PaymentStatusErr::InvalidData(e) => Self::InvalidData(e),
}
}
}
Expand All @@ -95,7 +96,16 @@ impl From<HtlcParamsError> for ValidatePaymentError {
fn from(err: HtlcParamsError) -> Self {
match err {
HtlcParamsError::WrongPaymentTx(e) => ValidatePaymentError::WrongPaymentTx(e),
HtlcParamsError::TxDeserializationError(e) => ValidatePaymentError::TxDeserializationError(e),
HtlcParamsError::ABIError(e) | HtlcParamsError::InvalidData(e) => ValidatePaymentError::InvalidData(e),
}
}
}

impl From<ValidatePaymentV2Err> for ValidatePaymentError {
fn from(err: ValidatePaymentV2Err) -> Self {
match err {
ValidatePaymentV2Err::UnexpectedPaymentState(e) => ValidatePaymentError::UnexpectedPaymentState(e),
ValidatePaymentV2Err::WrongPaymentTx(e) => ValidatePaymentError::WrongPaymentTx(e),
}
}
}
Expand Down
Loading

0 comments on commit bc560b8

Please sign in to comment.