endojs / Jessie

Tiny subset of JavaScript for ocap-safe universal mobile code
Apache License 2.0
281 stars 16 forks source link

Ethereum and Jessie #21

Closed michaelfig closed 5 years ago

michaelfig commented 5 years ago

Hi @erights,

After studying Ethereum for a while, and especially EWASM (Ethereum-flavoured WebAssembly due to be deployed in Serenity), I just wanted to ask about your vision for Jessie-on-Ethereum.

In my understanding, EWASM will allow us to write a Jessie interpreter on top of it, with some endowments specific to Ethereum, but it won't allow communication with outside processes. Will this be modeled as a vat that cannot communicate with anybody except over the input communication channel (its return value), or do you see it as something that won't be able to have vat features?

As another thought, there might be an external vat with Ethereum support, which would encapsulate the creation of EWASM contracts from Jessie, and the submission of transactions to the blockchain.

Just curious about how generic you would make the Ethereum support, or if you intend to have a diversity of APIs for different blockchains.

Thanks, Michael.

michaelfig commented 5 years ago

Another option, and probably the more important one, is to directly compile Jessie smart contracts to EWASM... the interpreter in EWASM is just a personal preference for circulararity.

michaelfig commented 5 years ago

After watching one of Dean Tribble's presentations it makes sense that Agoric is targeting more capable blockchains. Using Jessie smart contracts directly in Ethereum is probably not necessary except as a novelty, especially when other blockchains can offer first-class Ocaps and interoperability with the Ethereum chain.