AbstractSDK / cw-orchestrator

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

generate new `Sender` if hd_index was provided in set_options #404

Closed Buckram123 closed 2 months ago

Buckram123 commented 2 months ago

hd_index impacts private key meaning if it's provided inside SenderOptions new Sender should be created from scratch Closes ORC-127, Closes ORC-125

cloudflare-pages[bot] commented 2 months ago

Deploying cw-orchestrator with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9215edd
Status: ✅  Deploy successful!
Preview URL: https://ecec2f8a.cw-orchestrator.pages.dev
Branch Preview URL: https://misha-orc-127-daemon-rebuild.cw-orchestrator.pages.dev

View logs

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 93.33333% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 65.1%. Comparing base (41fc930) to head (9215edd).

Additional details and impacted files | [Files](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/404?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/keys/private.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/404?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fkeys%2Fprivate.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL2tleXMvcHJpdmF0ZS5ycw==) | `81.1% <100.0%> (+1.8%)` | :arrow_up: | | [cw-orch-daemon/src/sync/builder.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/404?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fsync%2Fbuilder.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3N5bmMvYnVpbGRlci5ycw==) | `94.1% <100.0%> (+7.2%)` | :arrow_up: | | [cw-orch-daemon/src/sender.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/404?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fsender.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3NlbmRlci5ycw==) | `62.9% <85.7%> (+3.2%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/404/indirect-changes?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

Very nice ! We will need to support updating the daemon state as well when rebuilding, but that's another task.

What do you mean by this?

Kayanski commented 2 months ago

Very nice ! We will need to support updating the daemon state as well when rebuilding, but that's another task.

What do you mean by this?

Here, when the state of the daemon is updated (grpc channel for instance, if a same daemon is used for another chain), the sender channel is not updated which leads to issues if you're changing the chain.

https://github.com/AbstractSDK/cw-orchestrator/blob/main/cw-orch-daemon/src/builder.rs#L110

This is addressed in https://github.com/AbstractSDK/cw-orchestrator/pull/326