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

feat: revmc-worker #72

Closed
wants to merge 1 commit into from
Closed

feat: revmc-worker #72

wants to merge 1 commit into from

Conversation

djm07073
Copy link

@djm07073 djm07073 commented Feb 6, 2025

Feature Suggestion Summary

This pull request introduces a new feature(revmc-worker) for JIT compilation of hot contracts that exceed a specified threshold in node runtime.

Files Changed

crates/revmc-worker/: Added new module for revmc-worker.
examples/worker/
: Added example usage for the revmc-worker.

Detailed Description

The new feature enables JIT compilation for contracts that are frequently executed (hot contracts). The threshold for determining a hot contracts is configurable, allowing users to optimize performance based on their specific needs. The revmc-worker module is responsible for managing the compilation process concurrently. The module includes error handling, external function fetching, and a caching mechanism to improve performance.

image

* feat: push ext mutex inwards

* feat: utilize TryLock for non blocking lock operation

* feat: remove box, add comments

* chore: remove unnecessary locks

* comment: add supplementary comments

* comment: more comments

* examples: worker example

* refactor: fix unused code, force using arc

* examples: add working worker example

* examples: few bugs and fixes

* fix: refactor

- make enum to improve readablity
- delete unused crates import
- clean up test code
- use rwlock more precise way

* chore: fixes, and refactor

* chore: remove unnecessay immports

---------

wip: revmc-worker

feat: revmc-compiler-worker crate

fix: update cargo toml

bump dependencies

refactor: match dependencides import with root

refactor: visibility, to be able to import

feat: semaphore in worker

chore: delete out directory

chore: import lru

feat: cache external functions

feat: cache size interface

fix: remove unnecessary locks

feat: CompileWorker to have DB generic

feat: cache_load() error handling

test: test separate utility function

wip: fn pointer bug

fix: match types

test: cache test, add calldata

test: manual account info insert

test: caching + access list success

chore: remove comments

refactor: use fixedbytes for cache key, instead of string

chore: add supplementary comment about cache usage

chore: rename types for clarity

refactor: extract db from ext

fix: clippy & add some comments

fix: use mutex and arc in lru cache (#3)

* fix: use reccell in external worker

* fix: use mutex and arc to handle multi thread

Co-Authored-By: suha jin <[email protected]>

Update Cargo.lock

fix: refactor (#5)

* fix: refactor

* docs: extra docs

* fmt

---------

Co-authored-by: Ji Hwan An <[email protected]>

restore readme
@djm07073 djm07073 requested a review from DaniPopes as a code owner February 6, 2025 15:03
@djm07073
Copy link
Author

Closing this PR. We will reopen it once the issues are resolved. 😄

@djm07073 djm07073 closed this Feb 10, 2025
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.

1 participant