Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can also just write bytecode directly. It's a simple stack machine, and contracts should be as simple as possible.


Things are not always simpler at a lower level of abstraction.


It depends what simplicity you mean. The Solidity compiler is very far from simple, so if you consider that part of the complexity incurred by using Solidity, then a reasonably small bytecode program might be much easier to audit. Consider that a typical smart contract is as simple as "if four out of these six addresses make the same proposal then execute it." You can basically write these things in hexadecimal without too much trouble.


Yes, that's definitely a good idea. I will go back to my magnetized needle now, I have some bit flipping to do in order to finish my task for Monday.


Speaking seriously, there is an assembly for Ethereum called LLL. I would love to see code that performs exactly that example you mention and is easier to audit than the equivalent Solidity version.


For a stack machine, Forth might be a great choice.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: