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

do not merge: cache for storing vm artifacts #10787

Closed
wants to merge 4 commits into from

Conversation

Longarithm
Copy link
Member

No description provided.

@nagisa nagisa mentioned this pull request Mar 18, 2024
github-merge-queue bot pushed a commit that referenced this pull request Mar 20, 2024
`AnyCache` is a part of the now-expanded concept of the
`ContractRuntimeCache`. It allows runtimes to put anything they would
like into it, so long as this cache is keyed by `CryptoKey`.

Initially I was in a lot of pain as intermediate drafts have required me
to add a `unsafe impl Sync for UniversalArtifact` which I'm not sure I
could possibly prove. However in the end I ended up being able to avoid
it entirely by giving out `AnyCache` by reference only. Lovely! -- EDIT:
crappa, looks like I did something wrong testing this locally T_T Sync
appears to remain a requirement.

Note that only NearVM uses this cache currently. I don't see a good
reason to port this code back to the old runtimes.

Supersedes #10787
Co-authored-by: Longarithm <the.aleksandr.logunov@gmail.com>
nagisa added a commit to nagisa/nearcore that referenced this pull request Mar 20, 2024
`AnyCache` is a part of the now-expanded concept of the
`ContractRuntimeCache`. It allows runtimes to put anything they would
like into it, so long as this cache is keyed by `CryptoKey`.

Initially I was in a lot of pain as intermediate drafts have required me
to add a `unsafe impl Sync for UniversalArtifact` which I'm not sure I
could possibly prove. However in the end I ended up being able to avoid
it entirely by giving out `AnyCache` by reference only. Lovely! -- EDIT:
crappa, looks like I did something wrong testing this locally T_T Sync
appears to remain a requirement.

Note that only NearVM uses this cache currently. I don't see a good
reason to port this code back to the old runtimes.

Supersedes near#10787
Co-authored-by: Longarithm <the.aleksandr.logunov@gmail.com>
@nagisa
Copy link
Collaborator

nagisa commented Mar 21, 2024

We have AnyCache now. Thank you.

@nagisa nagisa closed this Mar 21, 2024
VanBarbascu pushed a commit that referenced this pull request Mar 26, 2024
`AnyCache` is a part of the now-expanded concept of the
`ContractRuntimeCache`. It allows runtimes to put anything they would
like into it, so long as this cache is keyed by `CryptoKey`.

Initially I was in a lot of pain as intermediate drafts have required me
to add a `unsafe impl Sync for UniversalArtifact` which I'm not sure I
could possibly prove. However in the end I ended up being able to avoid
it entirely by giving out `AnyCache` by reference only. Lovely! -- EDIT:
crappa, looks like I did something wrong testing this locally T_T Sync
appears to remain a requirement.

Note that only NearVM uses this cache currently. I don't see a good
reason to port this code back to the old runtimes.

Supersedes #10787
Co-authored-by: Longarithm <the.aleksandr.logunov@gmail.com>
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