-
Notifications
You must be signed in to change notification settings - Fork 3
Metering for Bulk Memory Opcodes + Opcode Version #79
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
Open
laurci
wants to merge
36
commits into
rc/after-supernova
Choose a base branch
from
mem-ops-wasm
base: rc/after-supernova
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
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
d433c59
add meetering for bulk memory opcodes
ad1c798
Merge remote-tracking branch 'origin/rc/after-supernova' into mem-ops…
b82a9a6
add capi to check opcode usage
642fa74
fix mem_copy usage detection
265657f
removed get_local_cost, fmt
andrei-marinica 00162a7
opcode version, opcode config refactor
andrei-marinica 876a457
removed used opcode mechanism
andrei-marinica d434536
imports fix
andrei-marinica 6aa525e
import fix
andrei-marinica d655288
get_opcode_cost fix
andrei-marinica e0fbc4e
opcode version test
andrei-marinica 3b1185f
wasmer opcode cost file rename
andrei-marinica ed0ff7d
wasmer opcode cost fix
andrei-marinica 61697d5
Merge branch 'rc/after-supernova' into mem-ops-wasm
andrei-marinica a5c00c1
fix after review
andrei-marinica 66f6a4c
docs
andrei-marinica 965eb28
gitignore fix
andrei-marinica f7f3d24
typos
andrei-marinica ab7d408
docs
andrei-marinica 3196e7a
docs (bulk memory cost)
andrei-marinica 2782518
docs
andrei-marinica 63dbf92
Merge branch 'rc/after-supernova' into mem-ops-wasm
andrei-marinica 168370c
re-generated VM hooks
andrei-marinica ca4b9f3
gitignore tweak
andrei-marinica be5e6f3
bulk memory base cost, opcode cost refactor
andrei-marinica 59ea7f6
bulk memory gas for wasmer-experimental
andrei-marinica 9b0b28c
clippy fix
andrei-marinica 6803e32
Rust versio nupgrade: 1.98
andrei-marinica bbc71f7
doc fix
andrei-marinica 80f4c8d
docs & naming fixes
andrei-marinica d5d7d8a
bulk memory cost temp global changed to i32
andrei-marinica ebc3092
build.rs revert style
andrei-marinica 0275f60
ffi hardening: compilation options
andrei-marinica eb52771
ffi hardening: opcode cost
andrei-marinica f8df5c6
opcodes v2 - removed 15 opcodes
andrei-marinica 20a7a52
Merge branch 'rc/after-supernova' into mem-ops-wasm
andrei-marinica File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [default.extend-words] | ||
| groth = "groth" #groth16 crypto function |
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| //! FFI-safe mirror of `CompilationOptionsLegacy`. | ||
|
|
||
| use multiversx_chain_vm_executor::CompilationOptionsLegacy; | ||
|
|
||
| /// FFI-safe mirror of `CompilationOptionsLegacy`. | ||
| /// | ||
| /// This is a distinct type rather than a cast of `CompilationOptionsLegacy` | ||
| /// itself, so that the general-purpose struct is free to change shape | ||
| /// without touching the C ABI, and vice versa. Fields that are `usize` on | ||
| /// the Rust side are fixed to `u64` here, since `usize` has no guaranteed | ||
| /// width across host platforms. | ||
| #[allow(non_camel_case_types)] | ||
| #[repr(C)] | ||
| pub struct vm_exec_compilation_options_t { | ||
| pub gas_limit: u64, | ||
| pub unmetered_locals: u64, | ||
| pub max_memory_grow: u64, | ||
| pub max_memory_grow_delta: u64, | ||
| pub opcode_trace: bool, | ||
| pub metering: bool, | ||
| pub runtime_breakpoints: bool, | ||
| } | ||
|
|
||
| impl vm_exec_compilation_options_t { | ||
| pub(crate) fn to_legacy(&self) -> CompilationOptionsLegacy { | ||
| CompilationOptionsLegacy { | ||
| gas_limit: self.gas_limit, | ||
| unmetered_locals: self.unmetered_locals as usize, | ||
| max_memory_grow: self.max_memory_grow as usize, | ||
| max_memory_grow_delta: self.max_memory_grow_delta as usize, | ||
| opcode_trace: self.opcode_trace, | ||
| metering: self.metering, | ||
| runtime_breakpoints: self.runtime_breakpoints, | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.