Skip to content
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

Add distant wasm upload #489

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Add distant wasm upload #489

wants to merge 11 commits into from

Conversation

Kayanski
Copy link
Contributor

@Kayanski Kayanski commented Sep 17, 2024

This PR aims at providing integrators with more methods to query the wasms to upload on chain.

Checklist

  • Changelog updated.
  • Docs updated.

Copy link

cloudflare-workers-and-pages bot commented Sep 17, 2024

Deploying cw-orchestrator with  Cloudflare Pages  Cloudflare Pages

Latest commit: e1ef1e9
Status: ✅  Deploy successful!
Preview URL: https://4ac93bfa.cw-orchestrator.pages.dev
Branch Preview URL: https://add-distant-wasm-upload.cw-orchestrator.pages.dev

View logs

@@ -0,0 +1,183 @@
const ARM_POSTFIX: &str = "-aarch64";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a copy of the old artifacts_dir module inside wasm_path.rs

Copy link
Contributor

@CyberHoward CyberHoward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised by how much code was changed for this feature, and it's breaking to cw-orch-core.

is there no alternative way that we could structure this PR to make it non-breaking?

@Kayanski
Copy link
Contributor Author

I'm surprised by how much code was changed for this feature, and it's breaking to cw-orch-core.

is there no alternative way that we could structure this PR to make it non-breaking?

Yes. this was done to propose a preliminary implementation.
The issue here is that the current cw-orch-core version exposes WasmPath(PathBuf), which we need to modify to accomodate for this change.
An additional option we could use is to have an additional method inside the Uploadable trait for fetching the contracts remotely. This is not ideal, but could be experimented.
Removing the associated cw-plus changes to make things clearer

@CyberHoward
Copy link
Contributor

CyberHoward commented Sep 17, 2024

And what about separating the fetching from the rest of the logic? I.e. adding a fn or object that you can use to fetch any wasm blob and store it in the local / configured artifacts folder?

I guess that complicates other things like sharing the crate and then needing to resolve where to store + retrieve the file...

@Kayanski Kayanski marked this pull request as draft September 17, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants