{"id":914,"date":"2022-08-15T00:58:27","date_gmt":"2022-08-15T00:58:27","guid":{"rendered":"https:\/\/kaspa.org\/?p=914"},"modified":"2022-10-21T16:54:57","modified_gmt":"2022-10-21T16:54:57","slug":"kaspa-on-rust","status":"publish","type":"post","link":"https:\/\/kaspa.org\/kaspa-on-rust\/","title":{"rendered":"Kaspa on RUST"},"content":{"rendered":"
[et_pb_section fb_built=”1″ admin_label=”section” _builder_version=”4.16″ custom_margin=”-24px|||||” custom_padding=”6px|||||” global_colors_info=”{}”][et_pb_row column_structure=”3_4,1_4″ admin_label=”row” _builder_version=”4.16″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” global_colors_info=”{}”][et_pb_column type=”3_4″ _builder_version=”4.16″ custom_padding=”|||” global_colors_info=”{}” custom_padding__hover=”|||”][et_pb_text admin_label=”Text” _builder_version=”4.17.1″ text_font_size=”17px” text_line_height=”1.8em” background_size=”initial” background_position=”top_left” background_repeat=”repeat” global_colors_info=”{}”]Starting in July, the Kaspa development team, led by Michael Sutton, has undertaken an effort to rewrite Kaspad in Rust. This codebase rewrite will allow Kaspa to be in a “Space Code<\/em>” system and reach maximal BPS and TPS through a high-performance well-designed implementation. The rust rewrite will take approximately 4-6 months to be completed and is fully funded by community member donations. To view the codebase foundation, progress on the project, or participate in the code-rewrite, please see our github page<\/a> and reach out to us on Discord<\/a>.<\/p>\n Background: In order to reach physical throughput limits and higher block rates, we believe Kaspa needs to be rewritten in a performance-oriented programming language and with a performance-oriented mindset. The current codebase carries on its back years of R&D efforts. Now that we have a proven, stable and working real-world and world-scale network, it is time to put the pieces back together in their purest form. As Kaspa seeks to be a world-leading financial system, the codebase should also transform to the ultimate level of quality and performance.<\/p>\n The main goals of such a rewrite:<\/p>\n 1) Higher efficiency and tighter performance<\/strong>. The Rust programming language has the right balance for writing a system like Kaspad, with low-level memory management on the one hand (contrary to the currently used go-lang which is Garbage Collection based), and high expressiveness on the other hand (e.g., async-await etc.), not to mention the large and mature crypto-rust ecosystem.<\/p>\n 2) Max BPS and TPS<\/strong>. Given the above some concrete numbers, I believe a goal of 32 BPS is definitely possible, and even 100 BPS is a reasonable target. With our current block-size this would translate to 6400 – 20000 TPS. But block-size can also theoretically be increased to find a sustainable amount of TPS, where the only limiting factor becomes the internet connection itself.<\/p>\n 3) Simplified and modularized codebase<\/strong>. Rewriting will make the codebase more approachable for newcomers. My feeling is that the core of the current Kaspad codebase is hard to figure out for newcomers and is a bit obfuscated. Up until now, all code contributions to Kaspad from non-core members are still in the external realms of the codebase, such as the RPC API and related services.<\/p>\n 4) Incorporation of pending features<\/strong>. New features and upgrades can be taken into consideration without the overhead of making many changes to an existing codebase. Examples include RPC API redesign; Archival nodes (and possibly P2P support for a subnet of such); Header Pruning; Smart-contract ground laying work, and more.<\/p>\n 5) Documentation<\/strong>. Throughout the rewrite process, we can define and follow a standard for high-level documentation of the various sub-protocols and algorithms in the system. This can make it possible to outsource the effort of completing other technical writing to other members of the community, relieving the burden from developers alone.[\/et_pb_text][\/et_pb_column][et_pb_column type=”1_4″ _builder_version=”4.16″ custom_padding=”|||” global_colors_info=”{}” custom_padding__hover=”|||”][et_pb_sidebar _builder_version=”4.17.1″ _module_preset=”default” global_colors_info=”{}”][\/et_pb_sidebar][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":" Starting in July, the Kaspa development team, led by Michael Sutton, has undertaken an effort to rewrite Kaspad in Rust. This codebase rewrite will allow Kaspa to be in a “Space Code” system and reach maximal BPS and TPS through a high-performance well-designed implementation. The rust rewrite will take approximately 4-6 months to be completed […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"Starting in July, the Kaspa development team, led by Michael Sutton, has undertaken an effort to rewrite Kaspad in Rust. This codebase rewrite will allow Kaspa to be in a \"Space Code<\/em>\" system and reach maximal BPS and TPS through a high-performance well-designed implementation. The rust rewrite will take approximately 4-6 months to be completed and is fully funded by community member donations. To view the codebase foundation, progress on the project, or participate in the code-rewrite, please see our github page at: https:\/\/github.com\/kaspanet\/rusty-kaspa and reach out to us on discord at: https:\/\/discord.gg\/sbTjE74B3P\r\n\r\nBackground: In order to reach physical throughput limits and higher block rates, we believe Kaspa needs to be rewritten in a performance-oriented programming language and with a performance-oriented mindset. The current codebase carries on its back years of R&D efforts. Now that we have a proven, stable and working real-world and world-scale network, it is time to put the pieces back together in their purest form. As Kaspa seeks to be a world-leading financial system, the codebase should also transform to the ultimate level of quality and performance.\r\n