<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="ru"><front><journal-meta><journal-id journal-id-type="publisher-id">mais</journal-id><journal-title-group><journal-title xml:lang="ru">Моделирование и анализ информационных систем</journal-title><trans-title-group xml:lang="en"><trans-title>Modeling and Analysis of Information Systems</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">1818-1015</issn><issn pub-type="epub">2313-5417</issn><publisher><publisher-name>Yaroslavl State University</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.18255/1818-1015-2020-4-472-487</article-id><article-id custom-type="elpub" pub-id-type="custom">mais-1437</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>Theory of Computing</subject></subj-group></article-categories><title-group><article-title>Архитектура формально-верифицированной системы распределенного реестра InnoChain</article-title><trans-title-group xml:lang="en"><trans-title>Architecture of the Formally-Verified Distributed Ledger System InnoChain</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-8427-2200</contrib-id><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Меркин</surname><given-names>Леонид Альбертович</given-names></name><name name-style="western" xml:lang="en"><surname>Merkin-Janson</surname><given-names>Leonid Al'bertovich</given-names></name></name-alternatives><bio xml:lang="ru"><p>Профессор, научный руководитель Лидирующего исследовательского центра в области формально-верифицированных систем распределенного реестра</p></bio><bio xml:lang="en"><p>Professor, Doctor of Mathematics, Delft University of Technology, Dr.</p></bio><email xlink:type="simple">l.merkin@innopolis.ru</email><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-0604-2645</contrib-id><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Резин</surname><given-names>Руслан Маратович</given-names></name><name name-style="western" xml:lang="en"><surname>Rezin</surname><given-names>Ruslan Maratovich</given-names></name></name-alternatives><bio xml:lang="ru"><p>Главный эксперт формальных методов верификации, степень магистра по направлению “Информатика и вычислительная техника”</p></bio><bio xml:lang="en"><p>Head expert in formal verification methods at Innopolis University, Master degree in Computer Science, MSc.</p></bio><email xlink:type="simple">r.rezin@innopolis.ru</email><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0000-0003-3112-5482</contrib-id><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Васильев</surname><given-names>Николай Константинович</given-names></name><name name-style="western" xml:lang="en"><surname>Vasilyev</surname><given-names>Nikolay Konstantinovich</given-names></name></name-alternatives><bio xml:lang="ru"><p>Ведущий разработчик</p></bio><bio xml:lang="en"><p>Lead Developer.</p></bio><email xlink:type="simple">n.vasilev@innopolis.ru</email><xref ref-type="aff" rid="aff-2"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Университет Иннополис</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Innopolis University</institution><country>Russian Federation</country></aff></aff-alternatives><aff-alternatives id="aff-2"><aff xml:lang="ru"><institution>Университет Иннополис, Университетская; Национальный исследовательский университет «Высшая школа экономики»</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Innopolis University; National Research University Higher School of Economics</institution><country>Russian Federation</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2020</year></pub-date><pub-date pub-type="epub"><day>19</day><month>12</month><year>2020</year></pub-date><volume>27</volume><issue>4</issue><fpage>472</fpage><lpage>487</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Меркин Л.А., Резин Р.М., Васильев Н.К., 2020</copyright-statement><copyright-year>2020</copyright-year><copyright-holder xml:lang="ru">Меркин Л.А., Резин Р.М., Васильев Н.К.</copyright-holder><copyright-holder xml:lang="en">Merkin-Janson L.A., Rezin R.M., Vasilyev N.K.</copyright-holder><license xml:lang="ru" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>Данная работа распространяется под лицензией Creative Commons Attribution 4.0.</license-p></license><license xml:lang="en" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://www.mais-journal.ru/jour/article/view/1437">https://www.mais-journal.ru/jour/article/view/1437</self-uri><abstract><p>В настоящей работе рассматривается архитектура системы распределенного реестра (СРР) InnoChain. Основной целью этой архитектуры является реализуемость 5-ти уровней формальной верификации программного обеспечения (ПО) системы InnoChain, включая операционное окружение. Методы формальной верификации являются основными методами обеспечения качества ПО с критическими требованиями по надежности, но до сих пор онине находилиширокого применения в СРР. Архитектура InnoChain включает (1) предметно-ориентированный язык смарт-контрактов с формальной семантикой, встроенный в функциональный язык CakeML (диалект языка ML), что позволяет осуществлять формальную верификацию свойств корректности смарт-контрактов в системах логики высших порядков (например, HOL4); (2) верифицированную трансляцию смарт-контрактов в машинный код с использованием компилятора CakeML вместо использования виртуальных машин для исполнения смарт-контрактов; (3) реализацию функционала узла СРР также на CakeML с формальной верификацией свойств корректности и с верифицированной трансляцией исходного кода узла в машинный код; (4) формальную верификацию протокола консенсуса СРР (HotStuff BFT); (5) использование формально-верифицированного микроядра seL4 в качестве операционного окружения СРР вместо операционных систем общего назначения. Предлагаемая архитектура открывает возможности для использования СРР InnoChain в критических по надежности приложениях, в частности, в системе управления заправкой воздушных судов ПАО Аэрофлот.</p></abstract><trans-abstract xml:lang="en"><p>In this paper we consider the software architecture of InnoChain, a distributed ledger system (DLS) with 5 levels of formal verification, including a formally-verified underlying operating system (OS). The objective of this architecture is to achieve a higher level of DLS dependability compared to more traditional software architectures and quality assurance (QA) methods. The architecture of InnoChain includes (1) a programming language for smart contracts which is a domain-specific language with formal semantics embedded into CakeML, which is a functional language ofthe ML family; this allows us to carry out formal verification of smart contracts' correctness properties using higher-order logic systems, such as HOL4; (2) trusted compilation of smart contracts into the machine code using the verified compiler available for CakeML, rather than relying on a virtual machine for execution of smart contracts; (3) using CakeML for implementation of InnoChain node functionality which allows for formal verification of code correctness and trusted compilation into the machine code; (4) formal verification of the consensus protocol used InnoChain, namely HotStuff BFT; (5) using seL4, a formally-verified microkernel, as the underlying OS for InnoChain instead of more traditional general-purpose OSes such as Linux. The proposed verified architecture will allow InnoChain to be used in mission-critical applications, such as the decentralized Aircraft Fuelling Control System which is currently under development for JSC Aeroflot, the Russian national air carrier.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>системы распределенного реестра</kwd><kwd>формальная верификация</kwd><kwd>HOL4</kwd><kwd>CakeML</kwd><kwd>seL4</kwd></kwd-group><kwd-group xml:lang="en"><kwd>distributed ledger systems</kwd><kwd>formal verification</kwd><kwd>HOL4</kwd><kwd>CakeML</kwd><kwd>seL4</kwd></kwd-group><funding-group><funding-statement xml:lang="ru">Министерство цифрового развития, связи и массовых коммуникаций РФ и АО "Российская венчурная компания"(договор №004/20 от 20.03.2020, ИГК 0000000007119P190002).</funding-statement><funding-statement xml:lang="en">Ministry of Digital Development, Communications and Mass Media of the Russian Federation and Russian Venture Company (Agreement No. 004/20 dd. 20.03.2020, IGK 0000000007119P190002).</funding-statement></funding-group></article-meta></front><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">A. Burns and A. Wellings, Concurrent and Real-Time Programming in Ada 2005. Cambridge University Press, 2007.</mixed-citation><mixed-citation xml:lang="en">A. Burns and A. Wellings, Concurrent and Real-Time Programming in Ada 2005. Cambridge University Press, 2007.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">A. Burns and A. Wellings, Real-Time Systems and Programming Languages. Addison-Wesley, 2009.</mixed-citation><mixed-citation xml:lang="en">A. Burns and A. Wellings, Real-Time Systems and Programming Languages. Addison-Wesley, 2009.</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Smart Contracts Under Control, 2020. [Online]. Available: https://archetype-lang.org.</mixed-citation><mixed-citation xml:lang="en">Smart Contracts Under Control, 2020. [Online]. Available: https://archetype-lang.org.</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">More Ethereum Attacks: Race-To-Empty is the Real Deal, 2016. [Online]. Available: https://vessenes.com/more-ethereum-attacks-race-to-empty-is-the-real-deal.</mixed-citation><mixed-citation xml:lang="en">More Ethereum Attacks: Race-To-Empty is the Real Deal, 2016. [Online]. Available: https://vessenes.com/more-ethereum-attacks-race-to-empty-is-the-real-deal.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">CakeML: A verified implementation of ML, 2020. [Online]. Available: https://cakeml.org.</mixed-citation><mixed-citation xml:lang="en">CakeML: A verified implementation of ML, 2020. [Online]. Available: https://cakeml.org.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">M. Yin, D. Malkhi, M. K. Reiter, G. G. Gueta, and I. Abraham, «HotStuff: BFT Consensus with Linearity and Responsiveness», in PODC, ACM, 2019, pp. 347-356.</mixed-citation><mixed-citation xml:lang="en">M. Yin, D. Malkhi, M. K. Reiter, G. G. Gueta, and I. Abraham, «HotStuff: BFT Consensus with Linearity and Responsiveness», in PODC, ACM, 2019, pp. 347-356.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">G. Heiser, The seL4 Microkernel: An Introduction, 2020. [Online]. Available: https://sel4.systems/About/seL4-whitepaper.pdf .</mixed-citation><mixed-citation xml:lang="en">G. Heiser, The seL4 Microkernel: An Introduction, 2020. [Online]. Available: https://sel4.systems/About/seL4-whitepaper.pdf .</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Libra by Facebook. [Online]. Available: https://github.com/libra/libra.</mixed-citation><mixed-citation xml:lang="en">Libra by Facebook. [Online]. Available: https://github.com/libra/libra.</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">S. Owens, M. O. Myreen, R. Kumar, and Y. K. Tan, «Functional Big-step Semantics», in Programming Languages and Systems: 25th European Symposium on Programming, ESOP 2016, P. Thiemann, Ed., ser. Lecture Notes in Computer Science, vol. 9632, Springer, Apr. 2016, pp. 589-615. doi: 10.1007/978-3-662-49498-1“_23.</mixed-citation><mixed-citation xml:lang="en">S. Owens, M. O. Myreen, R. Kumar, and Y. K. Tan, «Functional Big-step Semantics», in Programming Languages and Systems: 25th European Symposium on Programming, ESOP 2016, P. Thiemann, Ed., ser. Lecture Notes in Computer Science, vol. 9632, Springer, Apr. 2016, pp. 589-615. doi: 10.1007/978-3-662-49498-1“_23.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">T. Gauthier, C. Kaliszyk, and J. Urban, «TacticToe: Learning to Reason with HOL4 Tactics», in LPAR, ser. EPiC Series in Computing, vol. 46, EasyChair, 2017, pp. 125-143.</mixed-citation><mixed-citation xml:lang="en">T. Gauthier, C. Kaliszyk, and J. Urban, «TacticToe: Learning to Reason with HOL4 Tactics», in LPAR, ser. EPiC Series in Computing, vol. 46, EasyChair, 2017, pp. 125-143.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">C. Baier and J.-P. Katoen, Principles of Model Checking. MIT Press, 2008.</mixed-citation><mixed-citation xml:lang="en">C. Baier and J.-P. Katoen, Principles of Model Checking. MIT Press, 2008.</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">J. A. Pohjola, H. Rostedt, and M. O. Myreen, «Characteristic Formulae for Liveness Properties of Non-terminating CakeML Programs», in Interactive Theorem Proving (ITP), To appear, LIPICS, 2019. [Online]. Available: https://cakeml.org/itp19.pdf.</mixed-citation><mixed-citation xml:lang="en">J. A. Pohjola, H. Rostedt, and M. O. Myreen, «Characteristic Formulae for Liveness Properties of Non-terminating CakeML Programs», in Interactive Theorem Proving (ITP), To appear, LIPICS, 2019. [Online]. Available: https://cakeml.org/itp19.pdf.</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">M. O. Myreen and S. Owens, «Proof-producing Translation of Higher-order logic into Pure and Stateful ML», Journal of Functional Programming, vol. 24, no. 2-3, pp. 284-315, 2014. doi: 10.1017/S0956796813000282.</mixed-citation><mixed-citation xml:lang="en">M. O. Myreen and S. Owens, «Proof-producing Translation of Higher-order logic into Pure and Stateful ML», Journal of Functional Programming, vol. 24, no. 2-3, pp. 284-315, 2014. doi: 10.1017/S0956796813000282.</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">O. Abrahamsson, S. Ho, H. Kanabar, R. Kumar, M. O. Myreen, M. Norrish, and Y. K. Tan, «Proof-Producing Synthesis of CakeML from Monadic HOL Functions», Springer, 2020. [Online]. Available: https://rdcu.be/b4FrU.</mixed-citation><mixed-citation xml:lang="en">O. Abrahamsson, S. Ho, H. Kanabar, R. Kumar, M. O. Myreen, M. Norrish, and Y. K. Tan, «Proof-Producing Synthesis of CakeML from Monadic HOL Functions», Springer, 2020. [Online]. Available: https://rdcu.be/b4FrU.</mixed-citation></citation-alternatives></ref><ref id="cit15"><label>15</label><citation-alternatives><mixed-citation xml:lang="ru">P. O'Hearn, «Separation Logic», Communications of the ACM, vol. 62, no. 2, pp. 86-95, 2019. doi: 10.1145/3211968.</mixed-citation><mixed-citation xml:lang="en">P. O'Hearn, «Separation Logic», Communications of the ACM, vol. 62, no. 2, pp. 86-95, 2019. doi: 10.1145/3211968.</mixed-citation></citation-alternatives></ref><ref id="cit16"><label>16</label><citation-alternatives><mixed-citation xml:lang="ru">L. C. Paulson, Isabelle-A GenericTheorem Prover (with a contribution by T. Nipkow), ser. Lecture Notes in Computer Science. Springer, 1994, vol. 828.</mixed-citation><mixed-citation xml:lang="en">L. C. Paulson, Isabelle-A GenericTheorem Prover (with a contribution by T. Nipkow), ser. Lecture Notes in Computer Science. Springer, 1994, vol. 828.</mixed-citation></citation-alternatives></ref><ref id="cit17"><label>17</label><citation-alternatives><mixed-citation xml:lang="ru">L. Hupel and T. Nipkow, «A Verified Compiler from Isabelle/HOL to CakeML», in European Symposium on Programming (ESOP), ser. Lecture Notes in Computer Science, vol. 10801, Springer, 2018, pp. 999-1026. doi: 10.1007/978-3-319-89884-1_35. [Online]. Available: https://lars.hupel.info/pub/isabelle-cakeml.pdf.</mixed-citation><mixed-citation xml:lang="en">L. Hupel and T. Nipkow, «A Verified Compiler from Isabelle/HOL to CakeML», in European Symposium on Programming (ESOP), ser. Lecture Notes in Computer Science, vol. 10801, Springer, 2018, pp. 999-1026. doi: 10.1007/978-3-319-89884-1_35. [Online]. Available: https://lars.hupel.info/pub/isabelle-cakeml.pdf.</mixed-citation></citation-alternatives></ref><ref id="cit18"><label>18</label><citation-alternatives><mixed-citation xml:lang="ru">A. W. Appel, «Verified Software Toolchain», in European Symposium on Programming, Springer, 2011, pp. 1-17.</mixed-citation><mixed-citation xml:lang="en">A. W. Appel, «Verified Software Toolchain», in European Symposium on Programming, Springer, 2011, pp. 1-17.</mixed-citation></citation-alternatives></ref><ref id="cit19"><label>19</label><citation-alternatives><mixed-citation xml:lang="ru">CompCert project. [Online]. Available: https://compcert.org.</mixed-citation><mixed-citation xml:lang="en">CompCert project. [Online]. Available: https://compcert.org.</mixed-citation></citation-alternatives></ref><ref id="cit20"><label>20</label><citation-alternatives><mixed-citation xml:lang="ru">Verification center of the operating system Linux. [Online]. Available: http://linuxtesting.org/publications.</mixed-citation><mixed-citation xml:lang="en">Verification center of the operating system Linux. [Online]. Available: http://linuxtesting.org/publications.</mixed-citation></citation-alternatives></ref><ref id="cit21"><label>21</label><citation-alternatives><mixed-citation xml:lang="ru">Implementation of the network layer for seL4. [Online]. Available: https://github.com/SEL4PROJ/picotcp.</mixed-citation><mixed-citation xml:lang="en">Implementation of the network layer for seL4. [Online]. Available: https://github.com/SEL4PROJ/picotcp.</mixed-citation></citation-alternatives></ref><ref id="cit22"><label>22</label><citation-alternatives><mixed-citation xml:lang="ru">C. Barrett, R. Sebastiani, S. Seshia, and C. Tinelli, «Handbook of Satisfiability», in, ser. Frontiers in Artificial Intelligence and Applications. IOS Press, 2009, vol. 185, ch. Satisfiability Modulo Theories, pp. 825-885.</mixed-citation><mixed-citation xml:lang="en">C. Barrett, R. Sebastiani, S. Seshia, and C. Tinelli, «Handbook of Satisfiability», in, ser. Frontiers in Artificial Intelligence and Applications. IOS Press, 2009, vol. 185, ch. Satisfiability Modulo Theories, pp. 825-885.</mixed-citation></citation-alternatives></ref><ref id="cit23"><label>23</label><citation-alternatives><mixed-citation xml:lang="ru">seL4 deployment using Genode. [Online]. Available: https://genode.org/documentation/articles/sel4_parts_1.</mixed-citation><mixed-citation xml:lang="en">seL4 deployment using Genode. [Online]. Available: https://genode.org/documentation/articles/sel4_parts_1.</mixed-citation></citation-alternatives></ref><ref id="cit24"><label>24</label><citation-alternatives><mixed-citation xml:lang="ru">Introduction to CAmkES. [Online]. Available: https://docs.sel4.systems/Tutorials/hello-camkes-0.html.</mixed-citation><mixed-citation xml:lang="en">Introduction to CAmkES. [Online]. Available: https://docs.sel4.systems/Tutorials/hello-camkes-0.html.</mixed-citation></citation-alternatives></ref><ref id="cit25"><label>25</label><citation-alternatives><mixed-citation xml:lang="ru">R. Rezin, seL4 deploy scripts, 2020. [Online]. Available: https://github.com/RZRussel/seL4-deploy-public.git.</mixed-citation><mixed-citation xml:lang="en">R. Rezin, seL4 deploy scripts, 2020. [Online]. Available: https://github.com/RZRussel/seL4-deploy-public.git.</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
