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.
-
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
authz
with user-definedAuthorization
conditions. For example, I want aSendAuthorization
which checks a list of allowed recipients. We didn’t think of adding this when we createdSendAuthorization
so now I need to file an issue and hope it gets added in the next release. With a CEL-Authorization
type we could just write this condition asmsg.to_address in [‘cosmosxyz123456sdgj’, ‘cosmos35987135sdghaoeqwr’]
and something similar could work for anyMsg
type because everything in CEL is protobuf-based.One solution I’d thought of was supporting WASM
Authorization
s 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