-
Notifications
You must be signed in to change notification settings - Fork 50
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
Resolve M1 tests on latest sandbox from failing #110
Comments
|
Wasmer in master already supports M1 natively with Singlepass (as well as the supporting x86_64 without AVX) |
Thanks for letting me know, but this is a forked wasmer dating back a bit and specifically in https://github.com/near/nearcore. There's efforts right now to upgrade it or might have already been upgraded but still lacks some stuff |
|
@AustinBaggio @itegulov @Ekleog Posting here for visibility me:
Ekleog:
diff --git a/nearcore/src/runtime/mod.rs b/nearcore/src/runtime/mod.rs
index 0991e4bbd..8dbd521bc 100644
--- a/nearcore/src/runtime/mod.rs
+++ b/nearcore/src/runtime/mod.rs
@@ -517,6 +517,12 @@ impl NightshadeRuntime {
epoch_height, &epoch_id, current_protocol_version, is_first_block_of_version,
);
+ use near_vm_runner::internal::VMKind;
+
+ let cache: Option<Arc<dyn CompiledContractCache>> = match VMKind::for_protocol_version(current_protocol_version) {
+ VMKind::Wasmtime => None,
+ _ => Some(Arc::new(StoreCompiledContractCache { store: self.store.clone() })),
+ };
let apply_state = ApplyState {
block_index: block_height,
prev_block_hash: *prev_block_hash,
@@ -529,7 +535,7 @@ impl NightshadeRuntime {
random_seed,
current_protocol_version,
config: self.runtime_config_store.get_config(current_protocol_version).clone(),
- cache: Some(Arc::new(StoreCompiledContractCache { store: self.store.clone() })),
+ cache,
is_new_chunk,
migration_data: Arc::clone(&self.migration_data),
migration_flags: MigrationFlags {had to do some minor adjustments and it worked for the examples, but now I'm getting some timeouts on transactions with tests (just logs though): and those tests are passing still, so mostly likely because I'm using a debug build of sandbox. Looks like its working for M1 builds then after that patch! If anyone wants to test this themselves:
Some action items:
|
We have not implemented build caching for wasmtime yet. As such, we also need to not try using it, or the build will fail. Partial fix for near/near-workspaces-rs#110 @matklad I'm not sure how good I feel about exposing VMKind while it was previously marked as internal. It was already being used by at least near-vm-runner-standalone and runtime-param-estimator, but still. The issue is, if I'm not doing that it means that somewhere else down the call chain we would have to ignore a correctly-configured contract cache, which feels worse to me than exposing VMKind. What do you think about that? Or is internal maybe for "anything in nearcore but semver doesn't apply"? cc @ChaoticTempest
|
Waiting for M1 support 🙏 |
|
@syrusakbary Hey! Any updates ? |
|
Currently being worked on, and should be out soon within the month. We're in the last stages of this and currently building out the pipeline for publishing nearcore binaries for M1 |
|
@ChaoticTempest Could I know the exact date of M1 support? |
|
resolved with |
M1 tests will yield the following error message:
Error: Action #0: CompilationError(WasmerCompileError
{ msg: "The target x86_64 without AVX is not yet supported (see [https://docs.wasmer.io/ecosystem/wasmer/wasmer-features| https://docs.wasmer.io/ecosystem/wasmer/wasmer-features])" }
)
We will need to switch to
wasmtimefor sandbox builds on nearcoreThe text was updated successfully, but these errors were encountered: