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

Proposition of changes into Casper Types to support a Rust SDK for 1.6 #110

Merged
merged 28 commits into from
Dec 18, 2023

Conversation

gRoussac
Copy link
Contributor

@gRoussac gRoussac commented Oct 17, 2023

This PR intends to pull changes made for the Rust SDK. It is adding a std-fs-io default feature and affects several methods or expose them accordingly to be able to compile the client with

cargo build --lib --no-default-features --target wasm32-unknown-unknown

This PR has a strong dependency on PR against node 1.6 casper-network/casper-node#4348

Mainly adds some #[cfg(feature = "std-fs-io")] where it is possible or not to use io/fs, or prevent sending to std with json_pretty_print and returning deploys
Changes the way secret key is loaded in with_payment_and_session()
Publicizes some methods outside the crate
Adds session_bytes to session_executable_deploy_item() and adds check_no_conflicting_arg_types() (might require additional unit tests)
Adds with_bytes() to SessionStrParams
Adds some Clone attributes to some structs
Removes rt-multi-thread, The default runtime flavor is 'multi_thread', but the 'rt-multi-thread' feature is disabled. switching (flavor = "current_thread") to tokio main. Please check this change is legit.

For simplicity for now keeping new get_maybe_secret_key() as one function and not two as per previous PR for 2.0

casper-ecosystem/rustSDK#4
casper-ecosystem/rustSDK#5
casper-ecosystem/rustSDK#13

@gRoussac gRoussac marked this pull request as draft October 17, 2023 22:51
@gRoussac gRoussac marked this pull request as ready for review October 18, 2023 19:44
Copy link
Contributor

@zacshowa zacshowa left a comment

Choose a reason for hiding this comment

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

I think, for the sake of expediency in getting this out for 1.6, these changes are fine. However, I want to push for scheduling work for 2.0 to make this an additive feature.

@gRoussac gRoussac marked this pull request as draft November 16, 2023 23:19
@gRoussac gRoussac marked this pull request as ready for review November 17, 2023 00:43
Copy link
Contributor

@Fraser999 Fraser999 left a comment

Choose a reason for hiding this comment

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

We need to resolve the issue mentioned in my comment.

lib/types/deploy.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@Fraser999 Fraser999 left a comment

Choose a reason for hiding this comment

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

LGTM now.

@gRoussac gRoussac merged commit 8f94939 into dev Dec 18, 2023
1 check passed
@gRoussac gRoussac deleted the rustSDK-feat-1.6 branch December 18, 2023 22:52
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.

3 participants