-
Notifications
You must be signed in to change notification settings - Fork 3
add metering for bulk memory opcodes #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
base: rc/after-supernova
Are you sure you want to change the base?
Conversation
| Operator::Loop { .. } => Some(opcode_cost.opcode_loop), | ||
| Operator::MemoryGrow { .. } => Some(opcode_cost.opcode_memorygrow), | ||
| Operator::MemorySize { .. } => Some(opcode_cost.opcode_memorysize), | ||
| Operator::MemoryCopy { .. } => Some(opcode_cost.opcode_memorycopy), |
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.
We need proper opcode check versioning.
I will be adding it soon.
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.
I do not think we need. Like we might add some opcodes once per year, there is no need for that. SpaceVM can treat activations, there is no need to complicated the executor.
| Operator::Loop { .. } => Some(opcode_cost.opcode_loop), | ||
| Operator::MemoryGrow { .. } => Some(opcode_cost.opcode_memorygrow), | ||
| Operator::MemorySize { .. } => Some(opcode_cost.opcode_memorysize), | ||
| Operator::MemoryCopy { .. } => Some(opcode_cost.opcode_memorycopy), |
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.
I do not think we need. Like we might add some opcodes once per year, there is no need for that. SpaceVM can treat activations, there is no need to complicated the executor.
vm-executor/src/opcode_check_used.rs
Outdated
| impl OpcodeCheckUsed { | ||
| pub fn from_value(value: u32) -> Option<Self> { | ||
| match value { | ||
| 0 => Some(Self::MemoryCopy), |
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.
this is not good. like we would need the full set here. to be easily usable from spaceVM.
No description provided.