-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
In this commit f7668ce I provided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added doc comms with notes for now f1e6b20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
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` (KomodoPlatform#2195) chore(WASM-builds): remove `wasm-opt` overriding (KomodoPlatform#2200) fix(coins): add p2p feature to mm2_net dependency (KomodoPlatform#2210) chore(test): turn on debug assertion (KomodoPlatform#2204) feat(sia): extract sia lib to external repo (KomodoPlatform#2167) feat(eth-swap): eth tpu v2 methods, eth docker test enhancements (KomodoPlatform#2169) fix(cors): allow OPTIONS request to KDF server (KomodoPlatform#2191) docs(README): update commit badges to use dev branch (KomodoPlatform#2193) use default value for `komodo_proxy` (KomodoPlatform#2192) feat(cosmos): komodo-defi-proxy support (KomodoPlatform#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
TakerCoinSwapOpsV2
trait implemented methods forEthCoin
TakerApproved
)nft tpu v2 changes
global_nft_with_random_privkey
in eth_docker_tests.rs started to useeth_coin_from_conf_and_request_v2
for nft actiavtionkomodo-defi-framework/mm2src/mm2_main/tests/docker_tests/eth_docker_tests.rs
Line 405 in 747e51e
The below is for @KomodoPlatform/qa
DOCs repo
PR: KomodoPlatform/komodo-docs-mdx#270
Coins repo
issue: KomodoPlatform/coins#1115
PR: KomodoPlatform/coins#1061
Komodo Proxy configuration
#2169 (comment)