Одна C++ схема — protobuf, binary, JSON, YAML и structured logging без ручных маппингов. В статье разбираю, как CONTRACT отделяет стабильный контракт типа от конкретных форматов, зачем нужны BASE, PROPERTY и REFERENCE и как атрибуты полей задают общую политику для разных адаптеров. Всё - на реальном коде из репозитория: YAML-конфиг, структурированный лог и сравнение производительности с libprotobuf. GitHub. Читать далее
An issue was discovered in a smart contract implementation for UserWallet 0x0a7bca9FB7AfF26c6ED8029BB6f0F5D291587c42, an Ethereum token. First, suppose that the owner adds the evil contract address to his sweepers. The evil contract looks like this: contract Exploit { uint public start; function sweep(address _token, uint _amount) returns (bool) { start = 0x123456789; return true;} }. Then, when one calls the function sweep() in the UserWallet contract, it will change the sweeperList to 0X123456789.
CONTRACT умеет писать protobuf-совместимый wire-формат — и в 20 из 28 замеров обогнал по скорости настоящий libprotobuf, включая его собственный сгенерированный protoc-код. Разбираем три инженерных решения, которые это дали, и два сценария, где не получилось. CONTRACT — это C++ библиотека сериализации без кодогена и рантайм-рефлексии: схема объявляется один раз, в самой C+±структуре, и работает сразу под разные форматы. Читать далее
Elrond go is the go implementation for the Elrond Network protocol. In versions prior to 1.3.35, read only calls between contracts can generate smart contracts results. For example, if contract A calls in read only mode contract B and the called function will make changes upon the contract's B state, the state will be altered for contract B as if the call was not made in the read-only mode. This can lead to some effects not designed by the original smart contracts programmers. This issue was patched in…