From 0cf27ce8e888da82343cc0dfffc00b439b9df319 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 22 Feb 2023 23:24:45 +0100 Subject: [PATCH] fix: patch ruint with quantity fix (#1518) --- Cargo.lock | 6 ++---- Cargo.toml | 2 ++ crates/primitives/src/jsonu256.rs | 5 +---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 865c1d4fcc..677a56f9ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5244,8 +5244,7 @@ dependencies = [ [[package]] name = "ruint" version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad3a104dc8c3867f653b0fec89c65e00b0ceb752718ad282177a7e0f33257ac" +source = "git+https://github.com/mattsse/uint?branch=matt/skip-leading-zeros#7aa078a0d3ea5a05c09e7a2b42c06921d55e7c67" dependencies = [ "arbitrary", "derive_more", @@ -5261,8 +5260,7 @@ dependencies = [ [[package]] name = "ruint-macro" version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc5760263ea229d367e7dff3c0cbf09e4797a125bd87059a6c095804f3b2d1" +source = "git+https://github.com/mattsse/uint?branch=matt/skip-leading-zeros#7aa078a0d3ea5a05c09e7a2b42c06921d55e7c67" [[package]] name = "rustc-demangle" diff --git a/Cargo.toml b/Cargo.toml index 4fc4b06045..bd29418d4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,3 +41,5 @@ default-members = ["bin/reth"] [patch.crates-io] revm = { git = "https://github.com/bluealloy/revm" } revm-primitives = { git = "https://github.com/bluealloy/revm" } +# patched for quantity U256 responses +ruint = { git = "https://github.com/mattsse/uint", branch = "matt/skip-leading-zeros" } diff --git a/crates/primitives/src/jsonu256.rs b/crates/primitives/src/jsonu256.rs index 0332c2da18..58c7158061 100644 --- a/crates/primitives/src/jsonu256.rs +++ b/crates/primitives/src/jsonu256.rs @@ -111,9 +111,6 @@ mod test { let data = JsonU256(U256::from(16)); let serialized = serde_json::to_string(&data).unwrap(); - assert_eq!( - serialized, - r#""0x0000000000000000000000000000000000000000000000000000000000000010""# - ); + assert_eq!(serialized, r#""0x10""#); } }