Replies: 3 comments 10 replies
-
|
@sunnya97 @ValarDragon and @zmanian evaluated CEL recently. I believe osmosis opted not to use it, not sure about som. |
Beta Was this translation helpful? Give feedback.
-
|
the principal issue is that isn't a completely obvious way to introduce metering or gas to CEL implementations to prevent them from using too much compute. It may be a dos vuln or just require forking the runtime. |
Beta Was this translation helpful? Give feedback.
-
|
I was co-developer of CEL for the last few years before I joined Agoric. Your use case sounds reasonable. I documented the compute overhead guarantees at https://github.com/google/cel-spec/blob/master/doc/langdef.md#performance |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
CEL is a small expression language based upon Protobuf from Google. It’s designed to be non-turing complete, side effect free and evaluate in linear time. It uses the protobuf type system, and looking through the docs it seems like we could mostly use it out of the box as even things like cost estimation have been considered.
The particular thing I have in mind is extending
authzwith user-definedAuthorizationconditions. For example, I want aSendAuthorizationwhich checks a list of allowed recipients. We didn’t think of adding this when we createdSendAuthorizationso now I need to file an issue and hope it gets added in the next release. With a CEL-Authorizationtype we could just write this condition asmsg.to_address in [‘cosmosxyz123456sdgj’, ‘cosmos35987135sdghaoeqwr’]and something similar could work for anyMsgtype because everything in CEL is protobuf-based.One solution I’d thought of was supporting WASM
Authorizations but WASM seems like a relatively heavyweight solution requiring a sandboxed VM, rust code, etc.CEL looks pretty impressive so far with a robust golang implementation, and lots of nice features like optional type checking, fine-grained controls over available operations, a protobuf-based AST, etc.
Anyway, just wanted to share as this could be really useful for cases where all we really need is a lightweight expression language rather than full-on smart contract language.
Beta Was this translation helpful? Give feedback.
All reactions