Publishing modules

Hi there

I’m really excited about Libra.

Your documentation states the following: ‘Eventually, Libra users will be able to publish modules under their own accounts.’
Does that mean there is no way to publish modules yet? What about running a local node, does that enable it?

Thanks,
Peter Emil Jensen

6 Likes

Hi Peter, thanks for your question!

It is indeed possible to publish modules and accept custom transaction scripts when running a local node. These features are gated by compile-time VM configuration options here. If you set type = "Open" and rebuild the VM, you will be able to publish modules in your local node.

An easy way to experiment with Move modules/transaction scripts is to add some new tests (as described here).

5 Likes

Thank you.
Will play with the tests instead

can you explain how to rebuild VM and how to publish modules?

Thanks,

This is very interesting. From a product point of view, this means we can create custom transactions (or business logics) inside a local validator node?

example

ex : if today is monday send 1 libra to XYZ account from QWE account ?
Compared to ethereum BC, how this module will interact with external world (oracles?)

Cheers !

Hi César,
This post should help you get started. We are working on making this easier to experiment with locally. Note that this the functionality isn’t officially supported on the testnet yet.

Hi Lucas,
Thanks for your questions!

This is very interesting. From a product point of view, this means we can create custom transactions (or business logics) inside a local validator node? ex : if today is monday send 1 libra to XYZ account from QWE account ?

You can create custom transaction logic, but it must still be submitted to a validator node. There is no event loop inside the Libra blockchain; every state change must be triggered by the execution of a transaction submitted to a validator.

Compared to ethereum BC, how this module will interact with external world (oracles?)

It’s crucially important that transaction execution is both deterministic and hermetic. To ensure this, Move programs cannot interact with any code or data that is not either (a) on the Libra blockchain or (b) in the current transaction. So any interaction with the outside world must occur via an ordinary transaction.

Existing blockchain platforms have the same limitation. Oracle services have clever ways to work around these limitations. The same strategies that oracle services use for existing platforms should also work on the Libra blockchain.

2 Likes