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

chore: upgrade to stable toolchain #293

Merged
merged 4 commits into from Sep 1, 2023
Merged

chore: upgrade to stable toolchain #293

merged 4 commits into from Sep 1, 2023

Conversation

ghost
Copy link

@ghost ghost commented Aug 30, 2023

The issue involving wasm contract builds for Rust toolchain 1.70 and later: near/nearcore#9143 has been resolved
Should be ok to update the toolchain.

Are we updating to toolchain 1.70 or ok to use stable?

@ghost ghost marked this pull request as draft August 30, 2023 19:41
@ghost ghost changed the title upd: using stable toolchain chore: using stable toolchain Aug 31, 2023
@ghost ghost marked this pull request as ready for review August 31, 2023 09:57
@ghost
Copy link
Author

ghost commented Aug 31, 2023

@frol This is for updating the toolchain to stable. The wasm contract should now be buildable with the latest Rust Stable Version

@ghost
Copy link
Author

ghost commented Aug 31, 2023

Quick question, I have updated the build.rs file to use sandbox with a newer commit from the nearcore repo, and I changed install instead I used install_with_version. Is this ok ? or shall I update the sandbox utils crate ?

workspaces/build.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@frol frol left a comment

Choose a reason for hiding this comment

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

Other than the comment above, we are good to go. Given that it will require near_sandbox_utils publishing, I think we can use install_with_version here for the time being, but let's pick the most recent stable release in nearcore instead of some random recent commit.

@mrLSD
Copy link

mrLSD commented Aug 31, 2023

@shariffdev @frol
Currently when we use workspace-rs that issue near/nearcore/issues/9143 is still reproducible.
For example for this aurora-is-near/aurora-engine/pull/832.

Does this PR solve issue also for nightly (current) versions?

@ghost
Copy link
Author

ghost commented Aug 31, 2023

@frol if we use the most recent stable release which is 1.35, it doesn't include the fixes for this #272, It is either I use this recent commit or edit the sandbox and use a more recent hash commit

Or we can forgo this issue #272 entirely, until it is included in the next release.

@frol
Copy link
Collaborator

frol commented Aug 31, 2023

I see, indeed, I hoped there was another release since that time. I think we should be fine using more recent nearcore snapshot for now as workspaces-rs only needs to run it in a local node mode, so there is no risk of incompatibility, insecurity, or instability of it. That said, probably sandbox-utils does not need to be updated to some random hash commit, let's upgrade it to the most recent release of nearcore while workspaces-rs would use some custom commit hash.

@ghost
Copy link
Author

ghost commented Sep 1, 2023

Working on the sandbox utils now.

@ghost ghost changed the title chore: using stable toolchain chore: upgrade to stable toolchain Sep 1, 2023
@ghost
Copy link
Author

ghost commented Sep 1, 2023

@shariffdev @frol Currently when we use workspace-rs that issue near/nearcore/issues/9143 is still reproducible. For example for this aurora-is-near/aurora-engine/pull/832.

Does this PR solve issue also for nightly (current) versions?

Yes, this should solve the issue you mentioned. This crate now uses a a newer sandbox which has the fix for this near/nearcore/issues/9143

@frol frol merged commit 8d93197 into near:main Sep 1, 2023
@mrLSD
Copy link

mrLSD commented Sep 2, 2023

@shariffdev this PR was merged. But when I link the latest main hash 8d93197 as a dependency, near/nearcore/issues/9143 is still reproducible for stable and nightly. Any ideas?

@ghost
Copy link
Author

ghost commented Sep 4, 2023

@shariffdev this PR was merged. But when I link the latest main hash 8d93197 as a dependency, near/nearcore/issues/9143 is still reproducible for stable and nightly. Any ideas?

@mrLSD I've looked into this with an example contract in a fresh project dir using the stable toolchain and things are fine. Could you have missed something?

@mrLSD
Copy link

mrLSD commented Sep 4, 2023

Could you have missed something?

@shariffdev

  1. For the building contract I used near-sdk = "4.1.1"
  2. For tests: workspaces = { git = "https://github.com/near/workspaces-rs.git", rev = "8d93197" }
  3. rustc 1.72.0 (5680fa18f 2023-08-23)

All tests failed with Deserialization error.

@ghost
Copy link
Author

ghost commented Sep 4, 2023

@mrLSD Try doing a cargo clean I recreated your issue and that did it for me

@mrLSD
Copy link

mrLSD commented Sep 4, 2023

@shariffdev
cargo clean && rm -rf target/ - doesn't work.

status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(CompilationError(PrepareError(Deserialization))) })),

@ghost
Copy link
Author

ghost commented Sep 4, 2023

I'm out of ideas but still looking into it. Is there a chance the code is open and I can take a look at it?

@mrLSD
Copy link

mrLSD commented Sep 4, 2023

@shariffdev
It fails here

How it was tested:

  1. Toolchain set to stable (or nightly-2023-08-24)
  2. Set Cargo.toml: workspaces = { git = "https://github.com/near/workspaces-rs.git", rev = "8d93197" }
  3. cargo update
  4. Run build and tests: make test

I tested for our projects:

https://github.com/aurora-is-near/aurora-eth-connector/tree/master/eth-connector-tests

https://github.com/aurora-is-near/aurora-engine/tree/develop/engine-tests

Same issues.

@ghost
Copy link
Author

ghost commented Sep 4, 2023

I have created a new issue for better visibility on this problem you are facing @mrLSD

We can move the discussion over there

@ghost ghost deleted the chore/using-stable-toolchain branch October 3, 2023 16:07
@frol frol mentioned this pull request Oct 4, 2023
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