-
Notifications
You must be signed in to change notification settings - Fork 249
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
Compilation errors on 5.0.0-alpha.1
#1125
Comments
MacOS Clang: I cannot reproduce it on my MacOS ARM (M1). I would guess that you had some other llvm previously installed with brew. To test I run the following commands:
near-primitives on 32-bit targets: You should not compile near-primitives to wasm32, they won't work. Review your dependencies and ensure that you don't pull it into non-dev-dependencies. |
Thanks @frol! Looks like all these problems were related to the compilation of |
This PR adds the `created_at_block_height` and `updated_at_block_height` fields to `IndexerConfig` within the registry contract. The motive behind this is to provide Coordinator V2 with a way for comparing the actual and desired states of the system, i.e. if there is a mismatch between the registry and the system, action should be taken. Without versions, there is no way of making this comparison. ## Compilation Errors ~~I ran in to several issues trying to compile the `wasm32` binary, and have outlined all these issues in near/near-sdk-rs#1125, as well as in the `README.md` so that the fixes are documented. These fixes are a bit janky, but I've tested the deployed contract and all seems to be ok.~~ These have been resolved, see: #458 (comment) ## Account Roles Migration I've also included `account_roles` in this migration as we have some incorrect accounts as `Owner`s (`pavelnear.near`). All owners will be wiped and re-written from the contract default state. All `User`s will remain. ## Coordinator V1 Coordinator V1 has been tested to ensure that it can still parse the registry after these new fields have been applied.
Due to compilation on
4.1.1
also being broken (#1119) I opted to upgrade and try5.0.0-alpha.1
. I was able to successfully compile but ran in to several issues, happy to help out with fixing these but not sure where those fixes are best placed.getrandom
This crate must be installed with the
js
feature. It looks like it currently is but is only listed as a dev dependency. I guess it should be moved to an actual dependency?As a workaround this can be fixed by adding the crate locally:
MacOS Clang
The version of
clang
which ships with MacOS doesn't support thewasm32-unknown-unknown
build target, this didn't seem to be an issue in previous versions.To resolve this,
brew install llvm
and use theclang
binary included to build:CC="/opt/homebrew/Cellar/llvm/17.0.6/bin/clang" cargo near build --no-abi
near-primitives
on 32-bit targetsAs described in near/nearcore#7406, compilation of
near-primitives
errors out when targeting 32-bit machines:To fix, the function (
sample()
) can be updated to just return0
, bypassing the erroneous use ofusize
, but I'm not sure this is safe to do in this context. It doesn't look likenear-sdk
usesWeightedIndex
so probably?The text was updated successfully, but these errors were encountered: