From 71bbb03faa2d41d460dab16b7bc2f68f1d4c73db Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Fri, 3 Mar 2023 11:14:10 +0100 Subject: [PATCH] Nim library upgrades, pt1 (#9703) This PR upgrades a number of libraries as well as nim itself, to address security issues and crashes that we've worked to solve over the past few months on the nimbus-eth2 side leading up to its 1.6 migration - they include changes that are safe to use in both 1.2 and 1.6 without requiring 1.6, making the code compatible with both versions. In particular, 1.6 becomes more strict in several ways including exception handling, style and certain langauge constructs related to memory safety - as a result, we've cleaned up said libraries and improved their stability overall, including fixing several crashes. * nim 1.2.18 - this is the last release in the 1.2 series we produced together with upstream based on nimbus' needs - between the version Desktop is using today and v1.2.18, changes are predominantly backports from newer Nim versions that we asked for while working on stability in Nimbus itself. * chronicles - cleanups * confutils - cleanups * faststreams - cleanups & crash fixes * nim-json-serialization - several important crash fixes for json parsing edge cases * metrics - cleanups & threading fixes * secp256k1 - upstream updates (including security fixes) * serialization - cleanups * stew - many convenience fixes and updates to common low-level utilities, such as Result and hex / base64 / etc parsing * stint - cleanups * zlib - cleanups * nimPNG - cleanups * nimcrypto - cleanups This is part 1 of library upgrades and focuses on the low-level libraries - part 2 will upgrade the network stack (chronos, json-rpc, web3, etc), keeping the two separate so as to limit the potential impact of this PR. --- .gitmodules | 4 ++-- vendor/nim-chronicles | 2 +- vendor/nim-confutils | 2 +- vendor/nim-faststreams | 2 +- vendor/nim-json-serialization | 2 +- vendor/nim-metrics | 2 +- vendor/nim-result | 2 +- vendor/nim-secp256k1 | 2 +- vendor/nim-serialization | 2 +- vendor/nim-stew | 2 +- vendor/nim-stint | 2 +- vendor/nim-zlib | 2 +- vendor/nimPNG | 2 +- vendor/nimbus-build-system | 2 +- vendor/nimcrypto | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitmodules b/.gitmodules index 01182400d9..0e3cbf5051 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "vendor/nimbus-build-system"] path = vendor/nimbus-build-system - url = https://github.com/status-im/nimbus-build-system-desktop.git - branch = desktop + url = https://github.com/status-im/nimbus-build-system.git + branch = status-desktop-1-2 [submodule "vendor/nimqml"] path = vendor/nimqml url = https://github.com/status-im/nimqml.git diff --git a/vendor/nim-chronicles b/vendor/nim-chronicles index ea0368cc30..14e8537e4a 160000 --- a/vendor/nim-chronicles +++ b/vendor/nim-chronicles @@ -1 +1 @@ -Subproject commit ea0368cc303b6ed59792a7c2556285adf310e455 +Subproject commit 14e8537e4aefda832996a187c4acfef8eadb2aeb diff --git a/vendor/nim-confutils b/vendor/nim-confutils index 7176de4ddb..38dfeaaabd 160000 --- a/vendor/nim-confutils +++ b/vendor/nim-confutils @@ -1 +1 @@ -Subproject commit 7176de4ddb3a628a5c3abfcd430010bf0229deb1 +Subproject commit 38dfeaaabdc6792d0f4d701621cbe34001978456 diff --git a/vendor/nim-faststreams b/vendor/nim-faststreams index d3ef34b325..814f8927e1 160000 --- a/vendor/nim-faststreams +++ b/vendor/nim-faststreams @@ -1 +1 @@ -Subproject commit d3ef34b325eafca43405ee2b8390e1b6f218b644 +Subproject commit 814f8927e1f356f39219f37f069b83066bcc893a diff --git a/vendor/nim-json-serialization b/vendor/nim-json-serialization index fe8a82ca76..a7d815ed92 160000 --- a/vendor/nim-json-serialization +++ b/vendor/nim-json-serialization @@ -1 +1 @@ -Subproject commit fe8a82ca76150b60a950d5aa4e5baa382441ada4 +Subproject commit a7d815ed92f200f490c95d3cfd722089cc923ce6 diff --git a/vendor/nim-metrics b/vendor/nim-metrics index f91deb7422..a2293e8a34 160000 --- a/vendor/nim-metrics +++ b/vendor/nim-metrics @@ -1 +1 @@ -Subproject commit f91deb74228ecb14fb82575e4d0f387ad9732b8a +Subproject commit a2293e8a34f2a6cf264aec47e4becf2f53a0e467 diff --git a/vendor/nim-result b/vendor/nim-result index 7c5f2423fe..bd668d16ef 160000 --- a/vendor/nim-result +++ b/vendor/nim-result @@ -1 +1 @@ -Subproject commit 7c5f2423fe6042adc667ce7630a5b13349a13654 +Subproject commit bd668d16efbc41db8b3d8fa2142a444b0a7e5876 diff --git a/vendor/nim-secp256k1 b/vendor/nim-secp256k1 index fb9699702b..4c41c5029f 160000 --- a/vendor/nim-secp256k1 +++ b/vendor/nim-secp256k1 @@ -1 +1 @@ -Subproject commit fb9699702b44f194b5926c8ab4a004cff676b435 +Subproject commit 4c41c5029ffc73b732233f06018cd52f3ed47dce diff --git a/vendor/nim-serialization b/vendor/nim-serialization index f9a1121b87..5b7cea55ef 160000 --- a/vendor/nim-serialization +++ b/vendor/nim-serialization @@ -1 +1 @@ -Subproject commit f9a1121b8733eb75e624ab59f8d79e707f15f76f +Subproject commit 5b7cea55efeb074daa8abd8146a03a34adb4521a diff --git a/vendor/nim-stew b/vendor/nim-stew index 932fa6cef1..e18f5a62af 160000 --- a/vendor/nim-stew +++ b/vendor/nim-stew @@ -1 +1 @@ -Subproject commit 932fa6cef129126064e8c6eda46dcca6fbd555ad +Subproject commit e18f5a62af2ade7a1fd1d39635d4e04d944def08 diff --git a/vendor/nim-stint b/vendor/nim-stint index ddfa6c608a..eb1f32c675 160000 --- a/vendor/nim-stint +++ b/vendor/nim-stint @@ -1 +1 @@ -Subproject commit ddfa6c608a6c2a843d7b405f377a22703947267a +Subproject commit eb1f32c6752478e18dff9256ea45538ab3312cd3 diff --git a/vendor/nim-zlib b/vendor/nim-zlib index 6bbc67d09e..826e2fc013 160000 --- a/vendor/nim-zlib +++ b/vendor/nim-zlib @@ -1 +1 @@ -Subproject commit 6bbc67d09e624d69052d62b2353878f491186942 +Subproject commit 826e2fc013f55b4478802d4f2e39f187c50d520a diff --git a/vendor/nimPNG b/vendor/nimPNG index 7ff39ec00d..e49f3c7bd0 160000 --- a/vendor/nimPNG +++ b/vendor/nimPNG @@ -1 +1 @@ -Subproject commit 7ff39ec00df29b55b6de0f67d31b8d52eb5c2d8f +Subproject commit e49f3c7bd0f71f9843ad5469f2841e0caeccc120 diff --git a/vendor/nimbus-build-system b/vendor/nimbus-build-system index 940acd0927..5eca896a36 160000 --- a/vendor/nimbus-build-system +++ b/vendor/nimbus-build-system @@ -1 +1 @@ -Subproject commit 940acd09279642afa4e01318e12c8a8bb9ace0ba +Subproject commit 5eca896a36b440aad565d2845122964742a0540b diff --git a/vendor/nimcrypto b/vendor/nimcrypto index 30d0ceaba0..4014ef939b 160000 --- a/vendor/nimcrypto +++ b/vendor/nimcrypto @@ -1 +1 @@ -Subproject commit 30d0ceaba02c0b966515f98873a0404786fbf796 +Subproject commit 4014ef939b51e02053c2e16dd3481d47bc9267dd