feat(eth-swap): eth tpu v2 methods, eth docker test enhancements#2169
feat(eth-swap): eth tpu v2 methods, eth docker test enhancements#2169
Conversation
… for MM_CTX1, remove unnecessary Geth args, simplify request_body creation, change sleep duration in tests
…e-nft-maker-swap-contract-sepolia-test
…e-nft-maker-swap-contract-sepolia-test
…fter several attempts
…e-nft-maker-swap-contract-sepolia-test # Conflicts: # mm2src/coins/eth.rs # mm2src/coins/eth/nft_swap_v2/mod.rs # mm2src/coins/eth/v2_activation.rs # mm2src/mm2_main/Cargo.toml # mm2src/mm2_main/tests/docker_tests/eth_docker_tests.rs
…hcore_transaction::Action in eth_docker_tests.rs separately
…e-nft-maker-swap-contract-sepolia-test
…er_payment_timelock
There was a problem hiding this comment.
Thanks you for the fixes! Last review from my side!
Please fix docker tests, you can disable slp tests if you have to. Also resolve any old review comment or ones that I asked for more changes for. After that will do a final check of the fixes, approve and merge if there are no problems left.
mm2src/coins/eth/v2_activation.rs
Outdated
|
|
||
| /// Eth from coin conf v2 activation for `eth_docker_tests.rs` | ||
| /// It uses special `build_web3_instances_for_test` function | ||
| #[cfg(all(feature = "for-tests", not(target_arch = "wasm32")))] |
There was a problem hiding this comment.
Why not use this conditional compilation attribute in the original eth_coin_from_conf_and_request_v2 function and add build_web3_instances_for_test under it? We don't have to maintain 2 functions this way in case we changed the original one.
There was a problem hiding this comment.
Why not use this conditional compilation attribute in the original eth_coin_from_conf_and_request_v2 function and add build_web3_instances_for_test under it?
it will lead to clippy errors
error: field `komodo_proxy` is never read
--> mm2src/coins/eth/web3_transport/http_transport.rs:49:16
|
47 | pub struct HttpTransportNode {
| ----------------- field in this struct
48 | pub(crate) uri: http::Uri,
49 | pub(crate) komodo_proxy: bool,
| ^^^^^^^^^^^^
|
= note: `HttpTransportNode` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
= note: `-D dead-code` implied by `-D warnings`
error: function `build_web3_instances` is never used
--> mm2src/coins/eth/v2_activation.rs:791:10
|
791 | async fn build_web3_instances(
| ^^^^^^^^^^^^^^^^^^^^
error: could not compile `coins` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `coins` (lib test) due to 2 previous errors
we use --all-features flag in ci cd and in production we dont use "for-tests" feature
There was a problem hiding this comment.
We can add in eth_coin_from_conf_and_request_v2 doc comment "not to forget to change eth_coin_from_conf_and_request_v2_for_test function" if you did changes. same for build_web3_instances_for_test.
Are you ok with the suggestion above? we shouldn't add #[allow(dead_code)] annotation to build_web3_instances function, as clippy should check it.
There was a problem hiding this comment.
Simplified build_web3_instances here f9f8d50 p2p ctx is only used if komodo_proxy is true. Please check the code to make sure I didn't make any mistakes.
There was a problem hiding this comment.
p2p ctx is only used if komodo_proxy is true
oh, exactly! right now build_web3_instances looks beautiful. everything is fine.
…2_activation_with_random_privkey
…h-use-v2-activation
|
@laruh there is an unstable docker test, we shouldn't have this in dev to avoid regressions as docker tests are green there. |
They are all unstable due to race conditions. I mean different tests can fail with Btw I moved taker swapv2 tests to Geth node using higher gas limits, but confirmations still fail
I suggest to leave Sepolia tests and ignore them when we merge it to dev. And run them again when you work on the swap v2 feature. |
da6ce95 to
1faea01
Compare
This commit implements EVM TPU taker methods and adds some enhancements for eth docker tests.
This commit implements EVM TPU taker methods and adds some enhancements for eth docker tests.
This commit implements EVM TPU taker methods and adds some enhancements for eth docker tests.
* dev: chore(RPCs): rename `get_peers_info` RPC to `get_directly_connected_peers` (GLEECBTC#2195) chore(WASM-builds): remove `wasm-opt` overriding (GLEECBTC#2200) fix(coins): add p2p feature to mm2_net dependency (GLEECBTC#2210) chore(test): turn on debug assertion (GLEECBTC#2204) feat(sia): extract sia lib to external repo (GLEECBTC#2167) feat(eth-swap): eth tpu v2 methods, eth docker test enhancements (GLEECBTC#2169) fix(cors): allow OPTIONS request to KDF server (GLEECBTC#2191) docs(README): update commit badges to use dev branch (GLEECBTC#2193) use default value for `komodo_proxy` (GLEECBTC#2192) feat(cosmos): komodo-defi-proxy support (GLEECBTC#2173)
* 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)

Note: eth tpu v2 tests use Sepolia testnet
eth tpu v2 changes
TakerCoinSwapOpsV2trait implemented methods forEthCoinTakerApproved)nft tpu v2 changes
global_nft_with_random_privkeyin eth_docker_tests.rs started to useeth_coin_from_conf_and_request_v2for nft actiavtionhttps://github.com/KomodoPlatform/komodo-defi-framework/blob/747e51ef63c24079bd261458caf3151ff7420089/mm2src/mm2_main/tests/docker_tests/eth_docker_tests.rs#L405
The below is for @KomodoPlatform/qa
DOCs repo
PR: GLEECBTC/komodo-docs-mdx#270
Coins repo
issue: https://github.com/KomodoPlatform/coins/issues/1115
PR: https://github.com/KomodoPlatform/coins/pull/1061
Komodo Proxy configuration
#2169 (comment)