AbstractSDK / cw-orchestrator

All-in-one Rust-based CosmWasm testing, scripting, and deployment tool.
https://orchestrator.abstract.money
GNU General Public License v3.0
76 stars 18 forks source link

Daemon Sender separation #387

Closed Kayanski closed 2 months ago

Kayanski commented 4 months ago

This PR aims at separating the daemon and the sender to be able to compose with senders and queriers.

I removed the Arc wrapper around the Sender because the SenderTrait trait needs the set_options method to take a mutable reference, which arc can't do because it can't mutate the underlying object.

When using a Mutex to allow for mutability, the async methods of the trait error because of a Send bound that is not available.

We will need to think about that, if we want the Sender to be copiable

cloudflare-pages[bot] commented 4 months ago

Deploying cw-orchestrator with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4bc002d
Status: ✅  Deploy successful!
Preview URL: https://af908b1a.cw-orchestrator.pages.dev
Branch Preview URL: https://nicolas-orc-126-daemon-shoul.cw-orchestrator.pages.dev

View logs

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 63.43826% with 151 lines in your changes missing coverage. Please review.

Project coverage is 54.9%. Comparing base (99b6deb) to head (4bc002d).

Additional details and impacted files | [Files](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK) | Coverage Δ | | |---|---|---| | [cw-orch-daemon/src/queriers/bank.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fqueriers%2Fbank.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3F1ZXJpZXJzL2JhbmsucnM=) | `90.7% <100.0%> (ø)` | | | [cw-orch-daemon/src/queriers/node.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fqueriers%2Fnode.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3F1ZXJpZXJzL25vZGUucnM=) | `44.4% <100.0%> (ø)` | | | [cw-orch-daemon/src/senders/sender\_trait.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fsenders%2Fsender_trait.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3NlbmRlcnMvc2VuZGVyX3RyYWl0LnJz) | `100.0% <100.0%> (ø)` | | | [cw-orch-daemon/src/sync/core.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fsync%2Fcore.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3N5bmMvY29yZS5ycw==) | `78.3% <100.0%> (+0.1%)` | :arrow_up: | | [cw-orch-daemon/src/tx\_broadcaster.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Ftx_broadcaster.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3R4X2Jyb2FkY2FzdGVyLnJz) | `75.7% <100.0%> (ø)` | | | [cw-orch-daemon/src/live\_mock.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Flive_mock.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL2xpdmVfbW9jay5ycw==) | `52.2% <0.0%> (+1.0%)` | :arrow_up: | | [cw-orch-daemon/src/tx\_builder.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Ftx_builder.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3R4X2J1aWxkZXIucnM=) | `70.3% <83.3%> (-1.0%)` | :arrow_down: | | [cw-orch-daemon/src/queriers/env.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fqueriers%2Fenv.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3F1ZXJpZXJzL2Vudi5ycw==) | `0.0% <0.0%> (ø)` | | | [cw-orch-daemon/src/senders/base\_sender.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fsenders%2Fbase_sender.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3NlbmRlcnMvYmFzZV9zZW5kZXIucnM=) | `67.3% <98.0%> (ø)` | | | [cw-orch-daemon/src/queriers/cosmwasm.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fqueriers%2Fcosmwasm.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3F1ZXJpZXJzL2Nvc213YXNtLnJz) | `50.4% <64.2%> (-1.1%)` | :arrow_down: | | ... and [5 more](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/387?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK) | |
CyberHoward commented 2 months ago

Closed in favor of #438