-
Notifications
You must be signed in to change notification settings - Fork 990
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
Fence off txhashset validation in its own process #2741
Comments
Found this after quick search: libjail-rs. I'd be willing to dig into this issue, if no one else has started on it. |
After reading a bit of their docs, libjail-rs requires root. Found uchroot in python, but it's in python... maybe can adapt their techniques? Somewhat new to Rust, so will keep searching. |
Perfect, thanks for looking into this. |
No worries. Found a couple more promising crates:
Both are actively maintained, and are user-space. Will read through the code, suspect it is nice. |
Please make sure any solution gets tested with a containerized grin node too |
Will do. Also found fuse in my searches, which looks like all that may be needed. Going to experiment a bit, and see what works. |
AFAICT so far, implementing a FUSE filesystem will take some work using They have a low-level API based on
There is an issue open for Windows support via Dokan in What are some more seasoned opinions on how to move forward? |
That sounds like quite a bit of work and several large dependencies. Part of the goal is to limit our exposure to those, so I'm not sure we should go with something as complex of a full FUSE filesystem. How about starting with process isolation, which seems like the more tractable problem? |
100% in agreement, why I wanted to just use a minimal set of the
Will look into it. That's what I started searching for, and somehow got lost down the FUSE rabbit-hole. If you are talking about forking a child process, and doing all the Will continue the search. |
Small update: found Servo's ipc-channel for IPC, which seems like the most mature solution out of Rust crates. No Windows-native support atm, but it's being worked on. Will post a WIP PR once something is working on Linux. |
When downloaded from the network on sync, a txhashset archive should be handled with more care than we do now, as it could be forged to mess things up in all sorts of ways. We should fence this off in a different process until the validation code is completely happy with what we were provided. Something like chroot, that limits the hard drive visibility of the forked process would also be great but may be hard to achieve across platforms.
The text was updated successfully, but these errors were encountered: