0

On the Bitshares site I read https://bitshares.org/technology/industrial-performance-scalability

Based upon the lessons we learn from LMAX, we know that a virtual machine for a blockchain should be designed with single-threaded performance in mind. This means it should get optimized for Just-In-Time compilation from the beginning, and that the most frequently used smart contracts should be supported natively by the blockchain, leaving only the rarely-used custom contracts to run in a virtual machine.

They specifically highlight

most frequently used smart contracts should be supported natively by the blockchain,

How does this concept (of native contracts) work in EOS, if at all since it is built on wasm? Has Larimer implemented similar design philosophies, how?

And how does this differ to other implementation as seen in Ethereum.

1 Answer 1

0

As you mentioned, the contracts including the most of the system contracts are built in wasm which is an assembly language. You can find their c++ code at github.

Some of the most frequently AND most fundamental system functions (such as setcode, linkauth and so on...) are built in c++. You can find them in `libraries/chain/eosio_contract.cpp'.

The interesting thing about them is that they trigger action by building a transaction class with c++ language and handing it over to action handler as if it was received from outer-chain just like other ordinary actions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.