spacemeshos / svm

SVM - Spacemesh Virtual Machine
https://spacemesh.io
MIT License
85 stars 14 forks source link

Safety improvements: (additional) mitigation for PR #390 #416

Closed neysofu closed 2 years ago

neysofu commented 2 years ago

This is a follow-up PR to #412. It reverts almost all of the original safety improvements, with additional care not to break Fixed-Gas invariants. The use of unsafe is localized and all usage of pointers in Cursor-related public interfaces is replaced with slices.

neysofu commented 2 years ago

@kobby-pentangeli I agree with .gitignore-ing runtime_calldata.wasm and CallDataTemplate-meta.json. They are artifacts, and as such they have no place in the source repository. I'll create an issue right now, I feel it's best addressed in a separate PR but it's a good point.

The SVM project is neither a library nor a binary, rather a Rust workspace which contains both libraries and binaries. The official docs suggest using a shared Cargo.lock, so I'm inclined to keep it.