-
Notifications
You must be signed in to change notification settings - Fork 200
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
Add read locks to the Lua runner #260
Open
maurermi
wants to merge
1
commit into
mit-dci:trunk
Choose a base branch
from
maurermi:support-lua-readlocks
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC @ayeshaali |
narula
reviewed
May 1, 2024
scripts/gen_bytecode.lua
Outdated
@@ -10,7 +10,9 @@ function gen_bytecode() | |||
|
|||
function get_account(name) | |||
account_key = get_account_key(name) | |||
account_data = coroutine.yield(account_key) | |||
|
|||
-- 0 is read lock, 1 is write lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps consider using something more enum-like? https://unendli.ch/posts/2016-07-22-enumerations-in-lua.html
maurermi
force-pushed
the
support-lua-readlocks
branch
from
May 6, 2024 14:26
1e538d3
to
c8e806b
Compare
eolesinski
reviewed
Jul 12, 2024
maurermi
force-pushed
the
support-lua-readlocks
branch
3 times, most recently
from
July 12, 2024 14:18
9d79b5c
to
2a5b917
Compare
Update: Responded to comments from @eolesinski, additionally caught an error from testing in |
Support requesting read locks from Lua contracts instead of only write-locks. Signed-off-by: Michael Maurer <maurer.mi@northeastern.edu>
maurermi
force-pushed
the
support-lua-readlocks
branch
from
July 12, 2024 14:44
2a5b917
to
6888c5c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for requesting read locks from Lua contracts. Now values yielded from contracts can include an optional second integer parameter (0 = read, else = write).