-
Notifications
You must be signed in to change notification settings - Fork 79
Draft: Add support for Lua-based TX filtering #119
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: 28.x-knots
Are you sure you want to change the base?
Conversation
Have you considered using WASM instead of Lua for TX filtering? |
But WASM requires compiling, therefore defeating the purpose as I understand it? |
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.
A lot of work to do here, so I'm going to convert the PR to a draft.
Performance is a potential concern, as is security.
I wonder if it's practical to just run Python or something in a super-minimal KVM environment? (But idk if KVM is usable cross-platform...)
CPPFLAGS="-I/opt/homebrew/opt/lua/include/lua $CPPFLAGS" | ||
LIBS="-L/opt/homebrew/opt/lua/lib -llua -lm $LIBS" |
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 certainly isn't portable.
@@ -0,0 +1 @@ | |||
return true |
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.
Two demos that do the same thing?
@@ -24,7 +24,7 @@ bool Clang_IndVarSimplify_Bug_SanityCheck() { | |||
} | |||
last = *it; | |||
} | |||
return false; | |||
return true; |
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 breaks the sanity check. If the test is failing for you, you should get a compiler that doesn't have the bug. It could very well impact other code!
@@ -0,0 +1,53 @@ | |||
// The MIT License (MIT) |
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.
Prefer to use the system-installed sol if possible (optional at compile time). Or at least a subtree.
@jasonfoura Amazing PR! It seems security could be an issue if anyone is allowed to write arbitrary filter code that can be injected into Knots. Perhaps we could have a distribution method that allows well-known devs to attest to particular filters? |
That’s true, but using WASM still wouldn’t require recompiling the node itself, only the individual user scripts. I’m not sure what @jasonfoura’s exact vision is, but either way, having a script-based filtering option like this would be really useful. Just wanted to give my input. |
Thanks for your time and feedback @luke-jr, @DeepDoge, and @chrisguida! I've opened a new discussion. Let's continue there 👍 |
@jasonfoura: Cool. Perhaps add a PR description too including a link to the discussion. |
No description provided.